[seekdb][vector] Fix HGRAPH snapshot key prefix#952
Open
hnwyllmm wants to merge 1 commit into
Open
Conversation
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]( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 formattabletId_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 --checkob-make -j4 ob_storageUpgrade 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
ca47db833ea fix vector hgraph snapshot key prefix.2is not included in this MR.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.