This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fetch edits for multiple events in a single query #11660
Fetch edits for multiple events in a single query #11660
Changes from 14 commits
b16ce01
4344f10
7e97e55
d4a41c8
e9908c8
7ac2a9d
aacf47e
e79d656
8132180
e00cec0
05c38f9
8400c20
e2f905b
ffad611
5ce3e07
9a7cc1a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This query seems to not return the expected value. It seems to be unstable -- in the tests the
origin_server_ts
should never be duplicated, but sometimes this query is returning the maxedit.event_id
instead.I suspect we should only ever use a single
MAX()
(orMIN()
to get this behavior from SQLite, trying to see if there's a way to workaround this...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up switching to the older, less efficient version for SQLite (where all edits are pulled) since the
MAX
/MIN
trick doesn't seem to work well when you have multiple columns you want to order over.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this class depend on
EventsWorkerStore
instead of ignoring the error?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can attempt to do that! Note that we have similar ignores all over, see #11165.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives other errors (similar to #11165) about inconsistent MROs. I'm going to leave this to be solved in #11165.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair!