Skip to content

Commit

Permalink
Fix calculation of current_point_offset in test_insert_consolidate_de…
Browse files Browse the repository at this point in the history
…letes (#501)

The program builds the streaming index after two optional steps: 1) skipping S points from the input file and 2) batch building of initial index using B points from the input file.

After these two steps, the offset to the input file should be S + B, but the current code first sets it to S in line 163 then overwrites it to B in line 249, instead of adding B to the offset. The tool which `test_insert_deletes_consolidate` was based on was using `+=` in the modified line.
  • Loading branch information
theantony authored Jan 26, 2024
1 parent 38cf26d commit 5cf0360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/test_insert_deletes_consolidate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void build_incremental_index(const std::string &data_path, diskann::IndexWritePa
std::cout << "Initial non-incremental index build time for " << beginning_index_size << " points took "
<< elapsedSeconds << " seconds (" << beginning_index_size / elapsedSeconds << " points/second)\n ";

current_point_offset = beginning_index_size;
current_point_offset += beginning_index_size;

if (points_to_delete_from_beginning > max_points_to_insert)
{
Expand Down

0 comments on commit 5cf0360

Please sign in to comment.