-
Notifications
You must be signed in to change notification settings - Fork 549
Shared Tree: Persisted Schema Format v2 with persisted metadata support #24590
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
- Added in-memory schema format v2. - Implemented the schema format v2 codec. - Updated test utils that previously assumed there was only one format. - Added snapshots for many of the v2 tests.
…ion as a parameter. - Fixed naming of schema index formats. - Changed schemaChangeFormat to be schema format-agnostic.
…formats. - Moved SchemaCodecVersion.
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
Co-authored-by: Alex Villarreal <[email protected]>
- Made importCompressed always use a v1 schema when encoding.
packages/dds/tree/src/test/feature-libraries/schema-index/codecUtil.ts
Outdated
Show resolved
Hide resolved
- Added better test data to one of the codec tests for the v2 schema format.
…added in another PR. - Updated a comment.
packages/dds/tree/src/feature-libraries/schema-index/formatV2.ts
Outdated
Show resolved
Hide resolved
In the context of SharedTree, "Schema" without any specific qualifiers (meaning not "Stored Schema" or "Persisted Schema") refers to the "View Schema" the user facing API and objects for defining schema (TreeNodeSchema, SchemaFactory etc). As this PR makes not changes at that layer, I don't think "Schema v2 with persisted metadata support" is a great name for this. I think "Persisted Schema Format v2 with persisted metadata support" would be better. Similar changes should be made to the PR description as well. |
This PR does not meet the criteria in https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines (also linked from the default PR description via the template) to be marked as non-draft. I think the status of this PR and the kind of feedback desired could be better communicated by marking it as draft until those criteria are fulfilled. |
- Added tests calling schemaFactoryAlpha.
@@ -45,21 +48,23 @@ export function makeSchemaChangeCodec( | |||
/** | |||
* Compose the v1 schema change codec. | |||
* @param options - The codec options. | |||
* @param schemaWriteVersion - The schema write version. |
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.
With support for this now, should the function name should change? Or what am I not getting about what "V1" means?
@@ -89,7 +89,7 @@ export function convertField(schema: SimpleFieldSchema): TreeFieldStoredSchema { | |||
const kind: FieldKindIdentifier = | |||
convertFieldKind.get(schema.kind)?.identifier ?? fail(0xae3 /* Invalid field kind */); | |||
const types: TreeTypeSet = schema.allowedTypesIdentifiers as TreeTypeSet; | |||
return { kind, types }; | |||
return { kind, types, persistedMetadata: undefined }; |
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.
Should this be schema.metadata
, like we already do below for Map and Array nodes?
Adds a new Persisted Schema Format with persisted metadata support. This change does not enable it by default.
Changes
Notes for reviewers
Todo
Related PRs