Skip to content

[seekdb][vector] Fix HGRAPH snapshot key prefix#952

Open
hnwyllmm wants to merge 1 commit into
masterfrom
issue/2026062500116993052
Open

[seekdb][vector] Fix HGRAPH snapshot key prefix#952
hnwyllmm wants to merge 1 commit into
masterfrom
issue/2026062500116993052

Conversation

@hnwyllmm

Copy link
Copy Markdown
Member

Task Description

Fix a Vsag deserialize failure that occurs when OceanBase reloads a serialized HGRAPH snapshot index from the snapshot data table. The failure, reported as BufferStreamReader: The file size is smaller than the memory you want to read, happens because the binary stream reconstructed from snapshot rows can be incomplete or mixed, causing Vsag to attempt reading more bytes than are available.

Solution Description

The root cause was that the row key for normal DDL HGRAPH snapshot data was generated without the snapshot version (tabletId_hgraph_data_partNNNNN), while other vector snapshot paths (direct-load, async refresh) correctly used the format tabletId_snapshotVersion_hgraph_data_partNNNNN. This missing version weakened version isolation, making it unsafe when multiple HGRAPH snapshot generations coexisted or during concurrent operations.

The fix ensures the normal DDL HGRAPH snapshot key includes the snapshot_version_, aligning it with the format used by direct-load and async refresh: tabletId_snapshotVersion_hgraph_data_partNNNNN. This restores consistency across the write path, adapter prefix management, and reload logic.

Passed Regressions

  • git diff --check
  • ob-make -j4 ob_storage

Upgrade Compatibility

This change only affects newly written HGRAPH snapshot-data row keys generated by normal DDL operations. It aligns the key format with the existing, correct formats used by direct-load and async refresh paths.

Other Information

  • Local commit: ca47db833ea fix vector hgraph snapshot key prefix.
  • Untracked local file 2 is not included in this MR.
  • Related issue: DIMA-2026062500116993052

Release Note

Fixed a deserialization failure in HGRAPH snapshot reload by correcting the row key prefix for normal DDL operations to include the snapshot version, ensuring proper version isolation.

@hnwyllmm

Copy link
Copy Markdown
Member Author

The mapping Dima issue is [[seekdb][ddltest_duomo][errcode=-7604] [Vsag](Log=BufferStreamReader: The file size is smaller than the memory you want to read](

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant