-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get multiple cached values #379
base: main
Are you sure you want to change the base?
Conversation
if you find anyway to improve it please let me know! i tried a few things but can't seem to get it faster. |
I forgot to add the locked shard to the map fixing it made a big difference |
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.
Please reformat with gofmt
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #379 +/- ##
==========================================
+ Coverage 88.66% 89.52% +0.85%
==========================================
Files 15 15
Lines 794 821 +27
==========================================
+ Hits 704 735 +31
+ Misses 76 73 -3
+ Partials 14 13 -1
Continue to review full report in Codecov by Sentry.
|
Co-authored-by: Tomasz Janiszewski <[email protected]>
Got a bit of a locking issue, when stats is enabled the shard tries to wlock but as it is now it’s already rlocked. This causes a deadlock issue, I’m thinking about moving the hit call outside getWithoutLock. |
seems like my test was failing because it was too big for the github action 🙂 looks ok now though. |
This is ready for another review 🙂 @janisz |
Closes #324
It works but it's not always faster, the sweet spot where the multi is faster seems to be using 512 shards. I tried using batches and getting all keys at once.