Skip to content

Fix hnsw index could not be mmapped after restart#3274

Merged
yuzhichang merged 4 commits intoinfiniflow:mainfrom
euvre:fix-hnsw-mmap-after-restart
Mar 4, 2026
Merged

Fix hnsw index could not be mmapped after restart#3274
yuzhichang merged 4 commits intoinfiniflow:mainfrom
euvre:fix-hnsw-mmap-after-restart

Conversation

@euvre
Copy link
Contributor

@euvre euvre commented Feb 27, 2026

What problem does this PR solve?

Because the hnswbuffer_obj disappears after a restart, when it is reconstructed its state is set to kPersistent instead of kMmap. On the relevant code paths you should manually set it to kMmap before reading the index.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: noob <yixiao121314@outlook.com>
@euvre euvre marked this pull request as ready for review February 27, 2026 12:45
@euvre euvre added the ci PR can be test label Feb 27, 2026
@euvre euvre marked this pull request as draft February 27, 2026 12:46
@euvre euvre marked this pull request as ready for review February 27, 2026 12:46
euvre and others added 3 commits February 27, 2026 20:50
Signed-off-by: noob <yixiao121314@outlook.com>
Signed-off-by: noob <yixiao121314@outlook.com>
@euvre euvre marked this pull request as draft March 3, 2026 08:27
@euvre euvre marked this pull request as ready for review March 3, 2026 08:27
@euvre euvre marked this pull request as draft March 3, 2026 08:55
@euvre euvre marked this pull request as ready for review March 3, 2026 08:56
@euvre euvre marked this pull request as draft March 4, 2026 02:05
@euvre euvre marked this pull request as ready for review March 4, 2026 02:06
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 42.79%. Comparing base (0c5df9d) to head (7fe396f).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/storage/buffer/buffer_obj_impl.cpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3274      +/-   ##
==========================================
- Coverage   50.54%   42.79%   -7.75%     
==========================================
  Files         731      731              
  Lines      153402   153403       +1     
  Branches    27752    27752              
==========================================
- Hits        77534    65648   -11886     
- Misses      65532    78193   +12661     
+ Partials    10336     9562     -774     
Flag Coverage Δ
debug http test 28.15% <50.00%> (+0.08%) ⬆️
debug parallel test 17.45% <50.00%> (?)
debug pysdk test ?
debug sqllogical test ?
debug unit test 38.63% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yuzhichang yuzhichang merged commit 52e1e95 into infiniflow:main Mar 4, 2026
117 of 120 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci PR can be test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants