From 2a5bb00e750f3f5edaf719fdc4b9f7d021d10753 Mon Sep 17 00:00:00 2001 From: Navin Agarwal Date: Tue, 18 Feb 2025 11:09:25 -0800 Subject: [PATCH 1/3] (op bunching) Depreate process on FluidDataStoreRuntime --- .changeset/tender-rabbits-speak.md | 10 ++++++++++ packages/runtime/datastore/src/dataStoreRuntime.ts | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changeset/tender-rabbits-speak.md diff --git a/.changeset/tender-rabbits-speak.md b/.changeset/tender-rabbits-speak.md new file mode 100644 index 000000000000..eebb68f39545 --- /dev/null +++ b/.changeset/tender-rabbits-speak.md @@ -0,0 +1,10 @@ +--- +"@fluidframework/datastore": minor +--- +--- +"section": deprecation +--- + +The function `process` on `FluidDataStoreRuntime` is now deprecated. + +A new function `processMessages` has been added in its place which will be called to process multiple messages instead of a single one on the data store runtime. This is part of a feature called "Op bunching" where contiguous ops of a given type and to a given data store / DDS are bunched and sent together for processing. diff --git a/packages/runtime/datastore/src/dataStoreRuntime.ts b/packages/runtime/datastore/src/dataStoreRuntime.ts index 8ded05a42811..4177a1ec425a 100644 --- a/packages/runtime/datastore/src/dataStoreRuntime.ts +++ b/packages/runtime/datastore/src/dataStoreRuntime.ts @@ -790,8 +790,8 @@ export class FluidDataStoreRuntime /** * back-compat ADO 21575. - * This is still here for back-compat purposes because it exists on IFluidDataStoreChannel. Once it is removed from - * the interface, this method can be removed. + * @deprecated processMessages should be used instead to process messages. This is still here for back-compat + * because it exists on IFluidDataStoreChannel. Once it is removed from the interface, this method can be removed. */ public process( message: ISequencedDocumentMessage, From b4bf047ce6447e50f466f45e526121833026873f Mon Sep 17 00:00:00 2001 From: Navin Agarwal Date: Tue, 18 Feb 2025 12:24:10 -0800 Subject: [PATCH 2/3] API md --- .../runtime/datastore/api-report/datastore.legacy.alpha.api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md b/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md index 891074649e8c..67cd4e9b00b3 100644 --- a/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md +++ b/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md @@ -70,6 +70,7 @@ export class FluidDataStoreRuntime extends TypedEventEmitter; + // @deprecated process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void; processMessages(messageCollection: IRuntimeMessageCollection): void; // (undocumented) From 3609a02a648911bcd69a118e6b065ac6dad14c5e Mon Sep 17 00:00:00 2001 From: Navin Agarwal Date: Tue, 18 Feb 2025 15:09:47 -0800 Subject: [PATCH 3/3] PR doc comments --- .changeset/tender-rabbits-speak.md | 3 ++- packages/runtime/datastore/src/dataStoreRuntime.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.changeset/tender-rabbits-speak.md b/.changeset/tender-rabbits-speak.md index eebb68f39545..41230f472999 100644 --- a/.changeset/tender-rabbits-speak.md +++ b/.changeset/tender-rabbits-speak.md @@ -5,6 +5,7 @@ "section": deprecation --- -The function `process` on `FluidDataStoreRuntime` is now deprecated. +The FluidDataStoreRuntime.process function is now deprecated A new function `processMessages` has been added in its place which will be called to process multiple messages instead of a single one on the data store runtime. This is part of a feature called "Op bunching" where contiguous ops of a given type and to a given data store / DDS are bunched and sent together for processing. +Note that `process` may still be called in scenarios where this data store runtime (Datastore layer) is running with an older version of data store context (Runtime layer) in the same client. This is to support Fluid layer compatibility. diff --git a/packages/runtime/datastore/src/dataStoreRuntime.ts b/packages/runtime/datastore/src/dataStoreRuntime.ts index 4177a1ec425a..1f031d022cbd 100644 --- a/packages/runtime/datastore/src/dataStoreRuntime.ts +++ b/packages/runtime/datastore/src/dataStoreRuntime.ts @@ -790,7 +790,7 @@ export class FluidDataStoreRuntime /** * back-compat ADO 21575. - * @deprecated processMessages should be used instead to process messages. This is still here for back-compat + * @deprecated {@link FluidDataStoreRuntime.processMessages} should be used instead to process messages. This is still here for back-compat * because it exists on IFluidDataStoreChannel. Once it is removed from the interface, this method can be removed. */ public process(