update on disk version to v7 #799
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #799"
general
weight: 0.35
r-devulap
Write inline int8 vectors at on-disk format version 7, not version 6
Targets
int8-support(#709).Problem
#709 adds
FeatureId.INLINE_BYTE_VECTORStoallFeatures(), which is the feature set of format version 6. Version 6 shipped in 4.0.1 and 4.0.2, and the Javadoc onallFeatures()says its set must not change. Graphs that use the feature have a layout 4.0.x can't read:dimensioninline bytes, so it's longer and every field after the inline block moves.I wrote a byte-vector graph with
withVersion(6)on #709 and loaded it withjvector-basebuilt from the4.0.2tag. It fails while reading the header:Hosts choose the format version they write so they can roll back. For example, DataStax Cassandra passes its SAI-selected version (6 today) to every JVector write. If V6 allows this feature, a host could start writing byte-vector graphs as V6 without ever opting into a new format, and rolling back to 4.0.x would then fail on those indexes. A new version makes that an explicit choice and lets 4.0.x reject the files cleanly as an unknown version.
Change
This follows the version 7 structure on
ash-dev(#796), which addsFUSED_ASHthe same way. Where the two branches make the same change, the text is identical, so those lines merge cleanly.This follows the version 7 structure on
ash-dev(#796), which addsFUSED_ASHthe same way. Where the two branches make the same change, the text is identical, so those lines merge cleanly.AbstractGraphIndexFormat.allFeatures(): back to the five features V6 shipped with.GraphIndexFormatV6: a protected(int version, Set<FeatureId>)constructor, so a later version can reuse the V6 layout. Identical toash-dev.GraphIndexFormatV7: extends V6 and addsINLINE_BYTE_VECTORS. Same structure asash-dev's.GraphIndexFormatFactory: registers version 7. Identical toash-dev.OnDiskGraphIndex.CURRENT_VERSION: 6 → 7. Identical toash-dev. Writers that don't set a version now write V7.onDiskIndexVersion6 → 7, becauseMultiConfigrequires it to equalCURRENT_VERSION. Identical toash-devexcept in the files noted under merge notes.ash-devalready has this fix. Without it, raisingCURRENT_VERSIONwould make awithVersion(6)graph embed version 7 in its PQ and NVQ headers, so the file would no longer match what 4.0.x writes. The commit is applied as is, except for itsFusedASHhunk (that class doesn't exist here).InlineByteVectorsgets the same versionedwriteHeader(out, version)asInlineVectors. Its header is empty, so its bytes are unchanged.UPGRADING.mdgets an "On-disk format version 7" section, worded likeash-dev's.709.feature.mdnow says int8 indexes need version 7.On-disk effect
INLINE_BYTE_VECTORS. 4.0.x rejects it as an unsupported version.withVersion(6). A V6 writer now rejectsINLINE_BYTE_VECTORS:Feature INLINE_BYTE_VECTORS is not supported by version 6.withVersion(6), asUPGRADING.mddescribes.Testing
TestGraphIndexFormatFactory: V6 excludesINLINE_BYTE_VECTORS; V7 supports every feature.TestOnDiskGraphIndex.testInlineByteVectorsRequiresVersion7: a V6 writer rejects the feature. The existingtestInlineByteVectorsRoundTripnow writes V7 by default.TestFeatureHeaderVersion(from #797, without itsFUSED_ASHcase): for every version from 2 toCURRENT_VERSION, PQ, NVQ and separated NVQ headers are written at that version.TestDatasetPrefetching: its YAML usesCURRENT_VERSIONinstead of a hard-coded 6.jvector-tests(421) andjvector-examples(127) suites: 0 failures.Merge notes with
ash-devWhichever of this PR and #796 reaches
mainsecond will need to resolve these:FeatureIdordinals: both branches append their feature as ordinal 5. Ordinals are the on-disk feature IDs in V6+ headers, so the second branch must move its feature to ordinal 6. Neither is released, but V7 files written for testing before the merge won't load afterwards.GraphIndexFormatV7: both branches add this file. Keep one class whosesupportedFeatures()adds both features.TestGraphIndexFormatFactory,UPGRADING.md,709.feature.md: list both features for V7 and exclude both from V6.TestFeatureHeaderVersion: both branches add it. Takeash-dev's version, which includes theFUSED_ASHcase.run-config.yml:ash-dev's version line carries an ASH-specific comment.dpr-gemma-10M.yml,dpr-gemma-1M.yml:ash-devdeletes these in favour of lowercase-10m/-1mcopies. Take the delete.TestDatasetPrefetching:ash-devalso bumpsyamlSchemaVersionto 2. Take its version.