Skip to content

Commit 2015c59

Browse files
[Port 2.0] Hide part of code behind feature flag (#22529) (#22537)
Original: #22529 Part of a hotfix There is some minimum sequence number shenanigans going on. Not exactly sure, but we want to be able to safely turn off the feature.
1 parent 8b98697 commit 2015c59

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/runtime/container-runtime/src/containerRuntime.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,7 @@ export class ContainerRuntime
12511251
private dirtyContainer: boolean;
12521252
private emitDirtyDocumentEvent = true;
12531253
private readonly disableAttachReorder: boolean | undefined;
1254+
private readonly useDeltaManagerOpsProxy: boolean;
12541255
private readonly closeSummarizerDelayMs: number;
12551256
private readonly defaultTelemetrySignalSampleCount = 100;
12561257
private readonly _perfSignalData: IPerfSignalReport = {
@@ -1542,8 +1543,8 @@ export class ContainerRuntime
15421543
);
15431544

15441545
let outerDeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
1545-
const useDeltaManagerOpsProxy =
1546-
this.mc.config.getBoolean("Fluid.ContainerRuntime.DeltaManagerOpsProxy") !== false;
1546+
this.useDeltaManagerOpsProxy =
1547+
this.mc.config.getBoolean("Fluid.ContainerRuntime.DeltaManagerOpsProxy") === true;
15471548
// The summarizerDeltaManager Proxy is used to lie to the summarizer to convince it is in the right state as a summarizer client.
15481549
const summarizerDeltaManagerProxy = new DeltaManagerSummarizerProxy(
15491550
this.innerDeltaManager,
@@ -1552,7 +1553,7 @@ export class ContainerRuntime
15521553

15531554
// The DeltaManagerPendingOpsProxy is used to control the minimum sequence number
15541555
// It allows us to lie to the layers below so that they can maintain enough local state for rebasing ops.
1555-
if (useDeltaManagerOpsProxy) {
1556+
if (this.useDeltaManagerOpsProxy) {
15561557
const pendingOpsDeltaManagerProxy = new DeltaManagerPendingOpsProxy(
15571558
summarizerDeltaManagerProxy,
15581559
this.pendingStateManager,
@@ -2633,8 +2634,9 @@ export class ContainerRuntime
26332634
// Intercept to reduce minimum sequence number to the delta manager's minimum sequence number.
26342635
// Sequence numbers are not guaranteed to follow any sort of order. Re-entrancy is one of those situations
26352636
if (
2637+
this.useDeltaManagerOpsProxy &&
26362638
this.deltaManager.minimumSequenceNumber <
2637-
messageWithContext.message.minimumSequenceNumber
2639+
messageWithContext.message.minimumSequenceNumber
26382640
) {
26392641
messageWithContext.message.minimumSequenceNumber =
26402642
this.deltaManager.minimumSequenceNumber;

0 commit comments

Comments
 (0)