-
Notifications
You must be signed in to change notification settings - Fork 276
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
Missing keys #157
Comments
Hi @1angkawi. That is certainly unexpected. I can try to help with debugging if you are able to provide some sort of reproduction (and perhaps the details of the machine you're using). It is true that the size of the table (computed here) does not actually inspect the contents of the table, so it may be possible that some bug is causing the lock counters to get out of sync with the bucket contents. But I am not spotting anything from a quick inspection of the code. Otherwise, maybe another debugging idea is just to print out the values of the |
Hi @manugoyal Thanks for your reply. Actually I think the size by summing up the elem_counters are correct, because it equals to the actual key size. However, it has less keys when I try to iterate over the table. I added a debug method to check the number of slots that are occupied:
And I can see that the size is greater than the total. And I did try to iterate the table again immediately after the first iteration, and sometimes the size is correct on the second iteration. Is it possible that there is some post operation that is still in progress after the Here is the cpu info of my machine:
|
Yes, since neither the The safest way to check for consistency between table size and table contents is by locking the table. We have a
|
We found a missing keys issue recently. After inserted some keys, then iterate the table, and the number of items traversed is smaller than the size. However I cannot reproduce it stably. May I ask how to debug in this case? Is there any case the it will lead to missing keys? Thanks
The text was updated successfully, but these errors were encountered: