Repository navigation
Fetch updated cache entries in bulk - #5970
Conversation
sorindumitru
left a comment
There was a problem hiding this comment.
I think we'll also want to limit the number of entries we fetch in one go, I'm sure we'll reach some limit otherwise
Like a page size? |
Sort of, more like a chunk size. Basically if you have a chunk size of 100 and 800 entries, you'd end up making 8 FetchRegistrationEntries calls. |
@sorindumitru Added this functionality in. |
sorindumitru
left a comment
There was a problem hiding this comment.
This looks great to me. I'll try to run it tomorrow through a setup I had where I can reproduce the skipped entries issue with a large number of events, to see how well it behaves and also try to test a couple of different options for the pageSize.
|
Ran this locally with mysql, postgres and sqlite and it seemed to work ok with all 3. For mysql and postgres I ran them using the public docker container for them, so a very simple setup. All 3 of them seem to work ok with this as it is. Somewhat surprisingly postgres seems to have worked the best and sqlite the worst. But this turned out to be more about the time it took to create the entries as opposed to sync them. In terms of limits I could find that postgres has a limit of 65536, sqlite of 32768. I couldn't find a good source for mysql but one source mentioned 65536 for prepared statements due to using a short for holding the number of parameters. |
sorindumitru
left a comment
There was a problem hiding this comment.
Looks good to me, thanks Faisal!
9709900 to
56ad1ec
Compare
|
Thanks for testing @sorindumitru |
350b999 to
2f10852
Compare
Signed-off-by: Faisal Memon <[email protected]>
…ies.go Co-authored-by: Sorin Dumitru <[email protected]> Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
Signed-off-by: Faisal Memon <[email protected]>
…ies.go Co-authored-by: Sorin Dumitru <[email protected]> Signed-off-by: Faisal Memon <[email protected]>
2f10852 to
6d03747
Compare
Pull Request check list
Affected functionality
Events based cache
Description of change
Use the new
FetchRegistrationEntriesAPI from #5910 to get the full list of updated entries rather than fetching them individually.Which issue this PR fixes
partially addresses #5624