jhuckaby / megahash

A super-fast C++ hash table with Node.js wrapper, tested up to 1 billion keys.
Other
411 stars 29 forks source link

Fix of: Disappearing keys #5

Closed svaraborut closed 4 years ago

svaraborut commented 4 years ago

Keys were disappearing from HashMap when updating keys with close digest. See issue report.

jhuckaby commented 4 years ago

See #4 for a resolution. This was patched separately.

Thank you very much for not only reporting this bug, but also fixing it in the code. I cannot believe I missed this, as it seems like such an obvious mistake on my part. All my unit tests didn't catch it either!

I hope you don't mind, but I applied the fix myself instead of merging your pull request, because it contained a bunch of unrelated comments, and I also wanted to also write a unit test that explicitly reproduces the bug, and made sure that the unit test passes in the new version.

Thanks again! Great work!