Fix calculation of current_point_offset in test_insert_consolidate_deletes (#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.
This commit is contained in:
Andrija Antonijevic 2024-01-25 20:15:18 -08:00 коммит произвёл GitHub
Родитель 38cf26d88e
Коммит 5cf0360d7e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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)
{