Skip to content

Commit 787bbe7

Browse files
authored
Don't send ops during legacy SharedTree summarization (#21459)
## Description Previously, SharedTree would send ops from the summarizer client during certain race conditions. The op was redundant and unnecessary, but was nonetheless submitted. Recently, it has become an error to send to an op from a summarizer client, so this prevents the sending of the op. No meaningful change in the behavior of the legacy tree is expected from this change. This also updates the legacy tree package's dds stress test command to include the `node_modules` prefix. Without it, the command will fail when running `test:stress` locally.
1 parent c17c136 commit 787bbe7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

experimental/dds/tree/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"test:coverage": "c8 npm test",
6969
"test:mocha": "mocha \"dist/**/*.tests.js\" --exit -r node_modules/@fluid-internal/mocha-test-setup",
7070
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
71-
"test:stress": "cross-env FUZZ_TEST_COUNT=10 FUZZ_STRESS_RUN=true mocha \"dist/**/*.fuzz.tests.js\" --exit -r @fluid-internal/mocha-test-setup",
71+
"test:stress": "cross-env FUZZ_TEST_COUNT=10 FUZZ_STRESS_RUN=true mocha \"dist/**/*.fuzz.tests.js\" --exit -r node_modules/@fluid-internal/mocha-test-setup",
7272
"tsc": "fluid-tsc commonjs --project ./tsconfig.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist"
7373
},
7474
"dependencies": {

experimental/dds/tree/src/SharedTree.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,10 @@ export class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeI
827827
public loadSummary(summary: SharedTreeSummaryBase): void {
828828
const { version: loadedSummaryVersion } = summary;
829829

830-
if (isUpdateRequired(loadedSummaryVersion, this.writeFormat)) {
830+
if (
831+
this.deltaManager.readOnlyInfo.readonly !== true &&
832+
isUpdateRequired(loadedSummaryVersion, this.writeFormat)
833+
) {
831834
this.submitOp({ type: SharedTreeOpType.Update, version: this.writeFormat });
832835
this.logger.sendTelemetryEvent({
833836
eventName: 'RequestVersionUpdate',

0 commit comments

Comments
 (0)