Skip to content

Commit

Permalink
fix hgraph deserialize bug (#417)
Browse files Browse the repository at this point in the history
Signed-off-by: LHT129 <[email protected]>
  • Loading branch information
LHT129 authored Feb 18, 2025
1 parent 6e0330d commit 7b1ebaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/algorithm/hgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ HGraph::Deserialize(StreamReader& reader) {
for (uint64_t i = 0; i < this->max_level_; ++i) {
this->route_graphs_[i]->Deserialize(reader);
}
resize(max_capacity_);
this->neighbors_mutex_->Resize(max_capacity_);
pool_ = std::make_shared<hnswlib::VisitedListPool>(max_capacity_, allocator_);
}

void
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HgraphTestIndex : public fixtures::TestIndex {

static fixtures::TempDir dir;

constexpr static uint64_t base_count = 1000;
constexpr static uint64_t base_count = 1200;

constexpr static const char* search_param_tmp = R"(
{{
Expand Down

0 comments on commit 7b1ebaa

Please sign in to comment.