microsoft / ALEX

A library for building an in-memory, Adaptive Learned indEX
MIT License
662 stars 114 forks source link

attempt to fix some bugs of null pointers, 0 slopes, and 1 expansion factors #29

Closed curtis-sun closed 6 months ago

curtis-sun commented 2 years ago
  1. In function "expand_root" (alex.h), all pointers must be assigned to resolve issue #26 .
  2. The case that the slope is equal to 0 must be carefully check to prevent emergence of infinite.
  3. In function "significant_cost_deviation" and "catastrophic_cost" (alex_nodes.h), if the slope is equal to 0, keys of the data node are equal and should not be split. Otherwise, one key cannot be mapped to different data nodes.
  4. In function "expand_root" (alex.h), the computation of expansion factor should be more precise for long long int, especially for "ceil" function, or expansion factor may be equal to 1.
ghost commented 2 years ago

CLA assistant check
All CLA requirements met.

meltingOcean commented 7 months ago

Before applying this solution, the benchmark would stop when continuously inserting unsorted keys. After applying the fixes, it works well without any problems. Thank you!

jialinding commented 6 months ago

Thank you for these fixes!