Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove event fetching from DB threads #835

Merged
merged 1 commit into from
Jun 3, 2016
Merged

Conversation

erikjohnston
Copy link
Member

No description provided.

@NegativeMjark
Copy link
Contributor

LGTM

@erikjohnston erikjohnston merged commit f6be734 into develop Jun 3, 2016
@ara4n
Copy link
Member

ara4n commented Jun 3, 2016

what's the rationale here?

@erikjohnston
Copy link
Member Author

@ara4n:

what's the rationale here?

Mainly consistency:

  1. Consistency with everywhere else ─ most of these are uncommon code paths.
  2. It means we can get rid of the horrible duplication between the txn and non-txn versions of fetching events (turns out its not easy to split out the common code)
  3. Everything now goes through the same bulk fetching of events code, which is nice.
  4. The event cache no longer needs to be thread safe.
  5. The DB metrics report how long the actual queries take, rather than also including the time it takes to get events.
  6. Fetching events takes a bit of CPU time, and I'd rather do CPU work on the main thread, as otherwise it takes up a DB thread (which are in relatively limited supply)

@richvdh richvdh deleted the erikj/get_event_txn branch December 1, 2016 14:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants