-
Notifications
You must be signed in to change notification settings - Fork 562
(tree) Add summary format version 3 for Edit Manager and Detached Field Index #26171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new breaking summary format (v3) for Edit Manager and Detached Field Index to ensure older clients (pre-2.74) fail fast when encountering the new format. The v3 format changes the storage location of summary content from legacy keys ("String" and "DetachedFieldIndexBlob") to a standardized "contents" key.
Key changes:
- Introduces v3 summary format versions that change blob key storage locations for better fail-fast behavior
- Adds version-specific files to separate legacy (v1-v2) and new (v3) blob key constants
- Updates summarizers to select appropriate blob keys based on
minVersionForCollabconfiguration - Sets FluidClientVersion.v2_81 as the threshold for writing v3 format
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| editManagerSummaryFormatV3.ts | Defines new "contents" blob key for EditManager v3 format |
| editManagerSummaryFormatV1toV2.ts | Extracts legacy "String" blob key used in v1 and v2 formats |
| detachedFieldIndexSummaryFormatV3.ts | Defines new "contents" blob key for DetachedFieldIndex v3 format |
| detachedFieldIndexSummaryFormatV1ToV2.ts | Extracts legacy "DetachedFieldIndexBlob" key used in v1 and v2 formats |
| editManagerSummarizer.ts | Implements v3 format support with version-based blob key selection and backward compatibility |
| detachedFieldIndexSummarizer.ts | Implements v3 format support with version-based blob key selection and backward compatibility |
| codec.ts | Adds FluidClientVersion.v2_81 constant and documents v3 format introduction |
| detachedFieldIndexSummarizer.spec.ts | Updates test to use version-specific import for legacy blob key |
| summaryFormatV3.ts | Fixes spacing in comment (removes extra space) |
| tree.alpha.api.md | Updates API surface to include new v2_81 version constant |
packages/dds/tree/src/shared-tree-core/editManagerSummaryFormatV1ToV2.ts
Show resolved
Hide resolved
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
This change adds a new breaking summary format (v3) for Edit Manager and Detached Field Index summaries.
#25876 added versioning for shared tree summaries. With that change, future changes to the summary tree structure (with a new version) will make clients fail fast when they do not know that version.
However, clients older than the FF version where versioning was added (2.74) will not fail fast and will likely fail at a random place when trying to read the data. This does not give a good experience to users of FF and also makes debugging harder. So, in this PR, an explicit version is added for Edit Manager and Detached Field Index summaries which changes the location of the summary content. Clients older than 2.74 will fail fast with v3 because they will not find the summary content.
Note: v3 has been added for Forest Summarizer in #26002. That leaves Schema summarizer - the logic to store its content in a different location is not straightforward because it uses incremental summaries and additional handling needs to be done. It will be done separately.
AB#53973