Skip to content

Commit

Permalink
Fix graph store reserve space
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanhaoji2 committed Jul 22, 2024
1 parent a2f2d6b commit df7c299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ std::unique_ptr<AbstractIndex> IndexFactory::create_instance()
if (_config->data_strategy == DataStoreStrategy::MEMORY && _config->pq_dist_build)
{
pq_data_store =
construct_pq_datastore<data_type>(_config->data_strategy, num_points + _config->num_frozen_pts, dim,
construct_pq_datastore<data_type>(_config->data_strategy, num_points, dim,
_config->metric, _config->num_pq_chunks, _config->use_opq);
}
else
Expand All @@ -139,7 +139,7 @@ std::unique_ptr<AbstractIndex> IndexFactory::create_instance()
(size_t)(defaults::GRAPH_SLACK_FACTOR * 1.05 *
(_config->index_write_params == nullptr ? 0 : _config->index_write_params->max_degree));
std::unique_ptr<AbstractGraphStore> graph_store =
construct_graphstore(_config->graph_strategy, num_points + _config->num_frozen_pts, max_reserve_degree);
construct_graphstore(_config->graph_strategy, num_points, max_reserve_degree);

// REFACTOR TODO: Must construct in-memory PQDatastore if strategy == ONDISK and must construct
// in-mem and on-disk PQDataStore if strategy == ONDISK and diskPQ is required.
Expand Down

0 comments on commit df7c299

Please sign in to comment.