(tree) Add versioning to shared tree and its summarizables' summaries #25876
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.
The summaries written by Shared Tree and its summarizables are not versioned. Any changes to the summary format can lead to failures in clients that do not understand this new format. For example, the incremental summarization feature changes the forest's summary format by adding more nodes to its summary tree which older clients won't be able to read. Making this change behind a new version makes it safer as we can fail fast on seeing unrecognizable versions.
This change adds versioning by adding a metadata blob to the summary tree of the shared tree and its summarizables. This metadata blob will contain the format version of the summary. Every time, the format of the summary changes, a new version should be added so that clients that don't understand this format will fail.
The metadata blob will be written when
minVersionForCollabis greater than the next release version 2.73.0.Since the metadata blob and hence the versions did not exist before 2.73.0, changes to the summary format will not result in failing them during reading from the snapshot. Instead, the faiilures may manifest later when the underlying data is read. So, the recommended way to change format is to do it in a way that will break as soon as possible. For example, chaging the id of the summary node where the summary is stored will result in older clients not finding the snapshot.
AB#53723