utsaslab / RECIPE

RECIPE : high-performance, concurrent indexes for persistent memory (SOSP 2019)
Apache License 2.0
197 stars 46 forks source link

Fix bug of memcmp of string keys whose length mod 8 < 4 #23

Closed g4197 closed 2 years ago

g4197 commented 2 years ago

Sorry for the inconvenience caused by my frequent PR...

Several days ago, I created a PR to fix the bug of masstree key-compare function, but I found that the bug in scan function may not be fixed correctly. I assumed that memcmp was only used for judging whether two keys are equal or not, but it is also used in scan function to judge "more than", which I haven't noticed before. Therefore, creating a keycmp function is of necessity. I used a keycmp function to do element-wise uint64_t comparison for keys.

However, I can't construct a testcase now for this bug... Maybe a testcase constructor is needed for it.

SeKwonLee commented 2 years ago

No worry. We didn't notice this bug before, so we really appreciate your contributions. I will check the changes in details and then merge soon.