Skip to content

Commit

Permalink
disable message batching for Azure customers (microsoft#11568)
Browse files Browse the repository at this point in the history
* Add e2e test to demo use of flush mode

* override flush mode for azure clients

* disable new test for local driver

* PR feedback
  • Loading branch information
alpaix committed Aug 25, 2022
1 parent 6b56bc1 commit 030d469
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/framework/fluid-static/src/rootDataObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "@fluidframework/aqueduct";
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
import { IFluidLoadable } from "@fluidframework/core-interfaces";
import { FlushMode } from "@fluidframework/runtime-definitions";
import { requestFluidObject } from "@fluidframework/runtime-utils";
import {
ContainerSchema,
Expand Down Expand Up @@ -156,7 +157,14 @@ export class DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFacto
{},
registryEntries,
);
super([rootDataObjectFactory.registryEntry], undefined, [defaultRouteRequestHandler(rootDataStoreId)]);
super(
[rootDataObjectFactory.registryEntry],
undefined,
[defaultRouteRequestHandler(rootDataStoreId)],
// temporary workaround to disable message batching until the message batch size issue is resolved
// resolution progress is tracked by the Feature 465 work item in AzDO
{ flushMode: FlushMode.Immediate },
);
this.rootDataObjectFactory = rootDataObjectFactory;
this.initialObjects = schema.initialObjects;
}
Expand Down
15 changes: 15 additions & 0 deletions packages/test/test-end-to-end-tests/src/test/messageSize.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { describeNoCompat, itExpects } from "@fluidframework/test-version-utils"
import { IContainer, IErrorBase } from "@fluidframework/container-definitions";
import { ConfigTypes, IConfigProviderBase, TelemetryDataTag } from "@fluidframework/telemetry-utils";
import { GenericError } from "@fluidframework/container-utils";
import { FlushMode } from "@fluidframework/runtime-definitions";

describeNoCompat("Message size", (getTestObjectProvider) => {
const mapId = "mapId";
Expand Down Expand Up @@ -144,4 +145,18 @@ describeNoCompat("Message size", (getTestObjectProvider) => {

assertMapValues(dataObject2map, messageCount, largeString);
});

it("Batched small ops pass when batch is larger than max op size", async function() {
// flush mode is not applicable for the local driver
if (provider.driver.type === "local") {
this.skip();
}
await setupContainers({ ...testContainerConfig, runtimeOptions: { flushMode: FlushMode.Immediate } }, {});
const largeString = generateStringOfSize(500000);
const messageCount = 10;
setMapKeys(dataObject1map, messageCount, largeString);
await provider.ensureSynchronized();

assertMapValues(dataObject2map, messageCount, largeString);
});
});

0 comments on commit 030d469

Please sign in to comment.