@fluidframework/container-runtime 0.57.0 → 0.58.0-55983
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/batchTracker.d.ts +26 -0
- package/dist/batchTracker.d.ts.map +1 -0
- package/dist/batchTracker.js +59 -0
- package/dist/batchTracker.js.map +1 -0
- package/dist/containerRuntime.d.ts +10 -5
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +113 -35
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +1 -36
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +5 -27
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -7
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +11 -7
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.js +1 -1
- package/dist/dataStores.js.map +1 -1
- package/dist/garbageCollection.d.ts +1 -0
- package/dist/garbageCollection.d.ts.map +1 -1
- package/dist/garbageCollection.js +6 -4
- package/dist/garbageCollection.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +1 -6
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/runningSummarizer.d.ts +1 -1
- package/dist/runningSummarizer.d.ts.map +1 -1
- package/dist/runningSummarizer.js +1 -1
- package/dist/runningSummarizer.js.map +1 -1
- package/dist/summarizer.d.ts +3 -4
- package/dist/summarizer.d.ts.map +1 -1
- package/dist/summarizer.js +8 -9
- package/dist/summarizer.js.map +1 -1
- package/dist/summaryGenerator.d.ts +1 -1
- package/dist/summaryGenerator.d.ts.map +1 -1
- package/dist/summaryGenerator.js +1 -1
- package/dist/summaryGenerator.js.map +1 -1
- package/dist/summaryManager.d.ts +2 -6
- package/dist/summaryManager.d.ts.map +1 -1
- package/dist/summaryManager.js +4 -10
- package/dist/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts +26 -0
- package/lib/batchTracker.d.ts.map +1 -0
- package/lib/batchTracker.js +54 -0
- package/lib/batchTracker.js.map +1 -0
- package/lib/containerRuntime.d.ts +10 -5
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +114 -36
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +1 -36
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +4 -26
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -7
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +12 -8
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.js +1 -1
- package/lib/dataStores.js.map +1 -1
- package/lib/garbageCollection.d.ts +1 -0
- package/lib/garbageCollection.d.ts.map +1 -1
- package/lib/garbageCollection.js +4 -2
- package/lib/garbageCollection.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +1 -6
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/runningSummarizer.d.ts +1 -1
- package/lib/runningSummarizer.d.ts.map +1 -1
- package/lib/runningSummarizer.js +1 -1
- package/lib/runningSummarizer.js.map +1 -1
- package/lib/summarizer.d.ts +3 -4
- package/lib/summarizer.d.ts.map +1 -1
- package/lib/summarizer.js +8 -9
- package/lib/summarizer.js.map +1 -1
- package/lib/summaryGenerator.d.ts +1 -1
- package/lib/summaryGenerator.d.ts.map +1 -1
- package/lib/summaryGenerator.js +1 -1
- package/lib/summaryGenerator.js.map +1 -1
- package/lib/summaryManager.d.ts +2 -6
- package/lib/summaryManager.d.ts.map +1 -1
- package/lib/summaryManager.js +5 -11
- package/lib/summaryManager.js.map +1 -1
- package/package.json +16 -16
- package/src/batchTracker.ts +80 -0
- package/src/containerRuntime.ts +151 -38
- package/src/dataStore.ts +6 -42
- package/src/dataStoreContext.ts +12 -15
- package/src/dataStores.ts +1 -1
- package/src/garbageCollection.ts +11 -10
- package/src/index.ts +0 -1
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +4 -8
- package/src/runningSummarizer.ts +3 -3
- package/src/summarizer.ts +8 -8
- package/src/summaryGenerator.ts +2 -2
- package/src/summaryManager.ts +5 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerRuntime.d.ts","sourceRoot":"","sources":["../src/containerRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"containerRuntime.d.ts","sourceRoot":"","sources":["../src/containerRuntime.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAgD,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EACH,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,SAAS,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EAEb,QAAQ,EACR,uBAAuB,EACvB,WAAW,EACX,cAAc,EAEjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACH,iBAAiB,EACjB,uBAAuB,EAC1B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAGH,iBAAiB,EAGpB,MAAM,8BAA8B,CAAC;A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B;IA0ClC,OAAO,CAAC,oBAAoB;IAqB5B,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,oBAAoB;IAgB5B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAMvB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IA6BhB,6EAA6E;IAChE,uBAAuB,CAChC,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,gBAAgB;IAoBnC;;;;;OAKG;YACW,iCAAiC;YAuBjC,wBAAwB;IAwB/B,oBAAoB;IAI3B,SAAgB,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAajE;IAEF,SAAgB,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAa/D;IAEF;;;SAGK;IACL,OAAO,CAAC,uBAAuB;CAyBlC"}
|
package/lib/containerRuntime.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
1
|
import { AttachState, LoaderHeader, } from "@fluidframework/container-definitions";
|
|
6
2
|
import { assert, Trace, TypedEventEmitter, unreachableCase, performance, } from "@fluidframework/common-utils";
|
|
7
3
|
import { ChildLogger, raiseConnectedEvent, PerformanceEvent, normalizeError, TaggedLoggerAdapter, loggerToMonitoringContext, TelemetryDataTag, } from "@fluidframework/telemetry-utils";
|
|
@@ -29,7 +25,8 @@ import { SummarizerClientElection, summarizerClientType } from "./summarizerClie
|
|
|
29
25
|
import { formExponentialFn, Throttler } from "./throttler";
|
|
30
26
|
import { RunWhileConnectedCoordinator } from "./runWhileConnectedCoordinator";
|
|
31
27
|
import { GarbageCollector, gcTreeKey, } from "./garbageCollection";
|
|
32
|
-
import {
|
|
28
|
+
import { channelToDataStore, isDataStoreAliasMessage, } from "./dataStore";
|
|
29
|
+
import { BindBatchTracker } from "./batchTracker";
|
|
33
30
|
export var ContainerMessageType;
|
|
34
31
|
(function (ContainerMessageType) {
|
|
35
32
|
// An op to be delivered to store
|
|
@@ -72,9 +69,16 @@ export var RuntimeHeaders;
|
|
|
72
69
|
/** True if the request is coming from an IFluidHandle. */
|
|
73
70
|
RuntimeHeaders["viaHandle"] = "viaHandle";
|
|
74
71
|
})(RuntimeHeaders || (RuntimeHeaders = {}));
|
|
75
|
-
// Local storage key to set the default flush mode to TurnBased
|
|
76
|
-
const turnBasedFlushModeKey = "Fluid.ContainerRuntime.FlushModeTurnBased";
|
|
77
72
|
const useDataStoreAliasingKey = "Fluid.ContainerRuntime.UseDataStoreAliasing";
|
|
73
|
+
const maxConsecutiveReconnectsKey = "Fluid.ContainerRuntime.MaxConsecutiveReconnects";
|
|
74
|
+
// Feature gate for the max op size. If the value is negative, chunking is enabled
|
|
75
|
+
// and all ops over 16k would be chunked. If the value is positive, all ops with
|
|
76
|
+
// a size strictly larger will be rejected and the container closed with an error.
|
|
77
|
+
const maxOpSizeInBytesKey = "Fluid.ContainerRuntime.MaxOpSizeInBytes";
|
|
78
|
+
// By default, we should reject any op larger than 768KB,
|
|
79
|
+
// in order to account for some extra overhead from serialization
|
|
80
|
+
// to not reach the 1MB limits in socket.io and Kafka.
|
|
81
|
+
const defaultMaxOpSizeInBytes = 768000;
|
|
78
82
|
export var RuntimeMessage;
|
|
79
83
|
(function (RuntimeMessage) {
|
|
80
84
|
RuntimeMessage["FluidDataStoreOp"] = "component";
|
|
@@ -348,7 +352,7 @@ export function getDeviceSpec() {
|
|
|
348
352
|
*/
|
|
349
353
|
export class ContainerRuntime extends TypedEventEmitter {
|
|
350
354
|
constructor(context, registry, metadata, electedSummarizerData, chunks, dataStoreAliasMap, runtimeOptions, containerScope, logger, existing, blobManagerSnapshot, requestHandler, _storage) {
|
|
351
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
352
356
|
super();
|
|
353
357
|
this.context = context;
|
|
354
358
|
this.registry = registry;
|
|
@@ -357,13 +361,15 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
357
361
|
this.logger = logger;
|
|
358
362
|
this.requestHandler = requestHandler;
|
|
359
363
|
this._storage = _storage;
|
|
364
|
+
this.defaultMaxConsecutiveReconnects = 15;
|
|
360
365
|
this._orderSequentiallyCalls = 0;
|
|
366
|
+
this._flushMode = FlushMode.TurnBased;
|
|
361
367
|
this.needsFlush = false;
|
|
362
368
|
this.flushTrigger = false;
|
|
363
369
|
this.paused = false;
|
|
370
|
+
this.consecutiveReconnects = 0;
|
|
364
371
|
this._disposed = false;
|
|
365
372
|
this.emitDirtyDocumentEvent = true;
|
|
366
|
-
this.summarizerWarning = (warning) => this.mc.logger.sendTelemetryEvent({ eventName: "summarizerWarning" }, warning);
|
|
367
373
|
/**
|
|
368
374
|
* Used to apply stashed ops at their reference sequence number.
|
|
369
375
|
* Normal op processing is synchronous, but applying stashed ops is async since the
|
|
@@ -435,11 +441,11 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
435
441
|
this.chunkMap = new Map(chunks);
|
|
436
442
|
this.handleContext = new ContainerFluidHandleContext("", this);
|
|
437
443
|
this.mc = loggerToMonitoringContext(ChildLogger.create(this.logger, "ContainerRuntime"));
|
|
438
|
-
this._flushMode =
|
|
439
|
-
((_b = this.mc.config.getBoolean(turnBasedFlushModeKey)) !== null && _b !== void 0 ? _b : false) ? FlushMode.TurnBased : FlushMode.Immediate;
|
|
440
444
|
this._aliasingEnabled =
|
|
441
|
-
((
|
|
442
|
-
((
|
|
445
|
+
((_b = this.mc.config.getBoolean(useDataStoreAliasingKey)) !== null && _b !== void 0 ? _b : false) ||
|
|
446
|
+
((_c = runtimeOptions.useDataStoreAliasing) !== null && _c !== void 0 ? _c : false);
|
|
447
|
+
this._maxOpSizeInBytes = ((_d = this.mc.config.getNumber(maxOpSizeInBytesKey)) !== null && _d !== void 0 ? _d : defaultMaxOpSizeInBytes);
|
|
448
|
+
this.maxConsecutiveReconnects = (_e = this.mc.config.getNumber(maxConsecutiveReconnectsKey)) !== null && _e !== void 0 ? _e : this.defaultMaxConsecutiveReconnects;
|
|
443
449
|
this.garbageCollector = GarbageCollector.create(this, this.runtimeOptions.gcOptions, (unusedRoutes) => this.dataStores.deleteUnusedRoutes(unusedRoutes), (nodePath) => this.dataStores.getNodePackagePath(nodePath),
|
|
444
450
|
/**
|
|
445
451
|
* Returns the timestamp of the last message seen by this client. This is used by garbage collector as
|
|
@@ -477,7 +483,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
477
483
|
this.summaryCollection = new SummaryCollection(this.deltaManager, this.logger);
|
|
478
484
|
const { attachState, pendingLocalState } = this.context;
|
|
479
485
|
this.dirtyContainer = attachState !== AttachState.Attached
|
|
480
|
-
|| ((
|
|
486
|
+
|| ((_f = pendingLocalState) === null || _f === void 0 ? void 0 : _f.pendingStates.length) > 0;
|
|
481
487
|
this.context.updateDirtyContainerState(this.dirtyContainer);
|
|
482
488
|
// Map the deprecated generateSummaries flag to disableSummaries.
|
|
483
489
|
if (this.runtimeOptions.summaryOptions.generateSummaries === false) {
|
|
@@ -490,8 +496,8 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
490
496
|
const orderedClientLogger = ChildLogger.create(this.logger, "OrderedClientElection");
|
|
491
497
|
const orderedClientCollection = new OrderedClientCollection(orderedClientLogger, this.context.deltaManager, this.context.quorum);
|
|
492
498
|
const orderedClientElectionForSummarizer = new OrderedClientElection(orderedClientLogger, orderedClientCollection, electedSummarizerData !== null && electedSummarizerData !== void 0 ? electedSummarizerData : this.context.deltaManager.lastSequenceNumber, SummarizerClientElection.isClientEligible);
|
|
493
|
-
const summarizerClientElectionEnabled = (
|
|
494
|
-
const maxOpsSinceLastSummary = (
|
|
499
|
+
const summarizerClientElectionEnabled = (_g = this.mc.config.getBoolean("Fluid.ContainerRuntime.summarizerClientElection")) !== null && _g !== void 0 ? _g : ((_h = this.runtimeOptions.summaryOptions) === null || _h === void 0 ? void 0 : _h.summarizerClientElection) === true;
|
|
500
|
+
const maxOpsSinceLastSummary = (_j = this.runtimeOptions.summaryOptions.maxOpsSinceLastSummary) !== null && _j !== void 0 ? _j : 7000;
|
|
495
501
|
this.summarizerClientElection = new SummarizerClientElection(orderedClientLogger, this.summaryCollection, orderedClientElectionForSummarizer, maxOpsSinceLastSummary, summarizerClientElectionEnabled);
|
|
496
502
|
if (this.context.clientDetails.type === summarizerClientType) {
|
|
497
503
|
this._summarizer = new Summarizer("/_summarizer", this /* ISummarizerRuntime */, () => this.summaryConfiguration, this /* ISummarizerInternalsProvider */, this.handleContext, this.summaryCollection, async (runtime) => RunWhileConnectedCoordinator.create(runtime));
|
|
@@ -523,7 +529,6 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
523
529
|
formExponentialFn({ coefficient: 20, initialDelay: 0 })), {
|
|
524
530
|
initialDelayMs: this.runtimeOptions.summaryOptions.initialSummarizerDelayMs,
|
|
525
531
|
}, this.runtimeOptions.summaryOptions.summarizerOptions);
|
|
526
|
-
this.summaryManager.on("summarizerWarning", this.summarizerWarning);
|
|
527
532
|
this.summaryManager.start();
|
|
528
533
|
}
|
|
529
534
|
}
|
|
@@ -554,6 +559,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
554
559
|
// logging container load stats
|
|
555
560
|
this.logger.sendTelemetryEvent(Object.assign(Object.assign(Object.assign({ eventName: "ContainerLoadStats" }, this.createContainerMetadata), this.dataStores.containerLoadStats), { summaryCount: this.summaryCount, summaryFormatVersion: metadata === null || metadata === void 0 ? void 0 : metadata.summaryFormatVersion, disableIsolatedChannels: metadata === null || metadata === void 0 ? void 0 : metadata.disableIsolatedChannels, gcVersion: metadata === null || metadata === void 0 ? void 0 : metadata.gcFeature }));
|
|
556
561
|
ReportOpPerfTelemetry(this.context.clientId, this.deltaManager, this.logger);
|
|
562
|
+
BindBatchTracker(this, this.logger);
|
|
557
563
|
}
|
|
558
564
|
get IContainerRuntime() { return this; }
|
|
559
565
|
get IFluidRouter() { return this; }
|
|
@@ -569,7 +575,8 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
569
575
|
var _a, _b, _c;
|
|
570
576
|
// If taggedLogger exists, use it. Otherwise, wrap the vanilla logger:
|
|
571
577
|
// back-compat: Remove the TaggedLoggerAdapter fallback once all the host are using loader > 0.45
|
|
572
|
-
const
|
|
578
|
+
const backCompatContext = context;
|
|
579
|
+
const passLogger = (_a = backCompatContext.taggedLogger) !== null && _a !== void 0 ? _a : new TaggedLoggerAdapter(backCompatContext.logger);
|
|
573
580
|
const logger = ChildLogger.create(passLogger, undefined, {
|
|
574
581
|
all: {
|
|
575
582
|
runtimeVersion: pkgVersion,
|
|
@@ -630,7 +637,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
630
637
|
// Unless bypass is explicitly set, then take action when sequence numbers mismatch.
|
|
631
638
|
if (loadSequenceNumberVerification !== "bypass" && runtimeSequenceNumber !== protocolSequenceNumber) {
|
|
632
639
|
// "Load from summary, runtime metadata sequenceNumber !== initialSequenceNumber"
|
|
633
|
-
const error = new DataCorruptionError("
|
|
640
|
+
const error = new DataCorruptionError("Summary metadata mismatch", { runtimeSequenceNumber, protocolSequenceNumber });
|
|
634
641
|
if (loadSequenceNumberVerification === "log") {
|
|
635
642
|
logger.sendErrorEvent({ eventName: "SequenceNumberMismatch" }, error);
|
|
636
643
|
}
|
|
@@ -732,7 +739,6 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
732
739
|
attachState: this.attachState,
|
|
733
740
|
}, error);
|
|
734
741
|
if (this.summaryManager !== undefined) {
|
|
735
|
-
this.summaryManager.off("summarizerWarning", this.summarizerWarning);
|
|
736
742
|
this.summaryManager.dispose();
|
|
737
743
|
}
|
|
738
744
|
this.garbageCollector.dispose();
|
|
@@ -877,6 +883,37 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
877
883
|
}
|
|
878
884
|
}
|
|
879
885
|
}
|
|
886
|
+
// Track how many times the container tries to reconnect with pending messages.
|
|
887
|
+
// This happens when the connection state is changed and we reset the counter
|
|
888
|
+
// when we are able to process a local op or when there are no pending messages.
|
|
889
|
+
// If this counter reaches a max, it's a good indicator that the container
|
|
890
|
+
// is not making progress and it is stuck in a retry loop.
|
|
891
|
+
shouldContinueReconnecting() {
|
|
892
|
+
if (this.maxConsecutiveReconnects <= 0) {
|
|
893
|
+
// Feature disabled, we never stop reconnecting
|
|
894
|
+
return true;
|
|
895
|
+
}
|
|
896
|
+
if (!this.pendingStateManager.hasPendingMessages()) {
|
|
897
|
+
// If there are no pending messages, we can always reconnect
|
|
898
|
+
this.resetReconnectCount();
|
|
899
|
+
return true;
|
|
900
|
+
}
|
|
901
|
+
this.consecutiveReconnects++;
|
|
902
|
+
if (this.consecutiveReconnects === Math.floor(this.maxConsecutiveReconnects / 2)) {
|
|
903
|
+
// If we're halfway through the max reconnects, send an event in order
|
|
904
|
+
// to better identify false positives, if any. If the rate of this event
|
|
905
|
+
// matches Container Close count below, we can safely cut down
|
|
906
|
+
// maxConsecutiveReconnects to half.
|
|
907
|
+
this.mc.logger.sendTelemetryEvent({
|
|
908
|
+
eventName: "ReconnectsWithNoProgress",
|
|
909
|
+
attempts: this.consecutiveReconnects,
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
return this.consecutiveReconnects < this.maxConsecutiveReconnects;
|
|
913
|
+
}
|
|
914
|
+
resetReconnectCount() {
|
|
915
|
+
this.consecutiveReconnects = 0;
|
|
916
|
+
}
|
|
880
917
|
replayPendingStates() {
|
|
881
918
|
// We need to be able to send ops to replay states
|
|
882
919
|
if (!this.canSendOps()) {
|
|
@@ -929,6 +966,11 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
929
966
|
if (changeOfState) {
|
|
930
967
|
this.deltaManager.off("op", this.onOp);
|
|
931
968
|
this.context.pendingLocalState = undefined;
|
|
969
|
+
if (!this.shouldContinueReconnecting()) {
|
|
970
|
+
this.closeFn(new GenericError("Runtime detected too many reconnects with no progress syncing local ops", undefined, // error
|
|
971
|
+
{ attempts: this.consecutiveReconnects }));
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
932
974
|
this.replayPendingStates();
|
|
933
975
|
}
|
|
934
976
|
this.dataStores.setConnectionState(connected, clientId);
|
|
@@ -981,6 +1023,12 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
981
1023
|
}
|
|
982
1024
|
this.emit("op", message);
|
|
983
1025
|
this.scheduleManager.afterOpProcessing(undefined, message);
|
|
1026
|
+
if (local) {
|
|
1027
|
+
// If we have processed a local op, this means that the container is
|
|
1028
|
+
// making progress and we can reset the counter for how many times
|
|
1029
|
+
// we have consecutively replayed the pending states
|
|
1030
|
+
this.resetReconnectCount();
|
|
1031
|
+
}
|
|
984
1032
|
}
|
|
985
1033
|
catch (e) {
|
|
986
1034
|
this.scheduleManager.afterOpProcessing(e, message);
|
|
@@ -1065,7 +1113,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1065
1113
|
callback();
|
|
1066
1114
|
}
|
|
1067
1115
|
catch (error) {
|
|
1068
|
-
this.closeFn(new GenericError("
|
|
1116
|
+
this.closeFn(new GenericError("orderSequentially callback exception", error));
|
|
1069
1117
|
throw error; // throw the original error for the consumer of the runtime
|
|
1070
1118
|
}
|
|
1071
1119
|
finally {
|
|
@@ -1108,7 +1156,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1108
1156
|
const dataStore = await this._createDataStore(pkg, false /* isRoot */, internalId, props);
|
|
1109
1157
|
const aliasedDataStore = channelToDataStore(dataStore, internalId, this, this.dataStores, this.mc.logger);
|
|
1110
1158
|
const result = await aliasedDataStore.trySetAlias(alias);
|
|
1111
|
-
if (result !==
|
|
1159
|
+
if (result !== "Success") {
|
|
1112
1160
|
throw new GenericError("dataStoreAliasFailure", undefined /* error */, {
|
|
1113
1161
|
alias: {
|
|
1114
1162
|
value: alias,
|
|
@@ -1140,7 +1188,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1140
1188
|
if (isRoot) {
|
|
1141
1189
|
fluidDataStore.bindToContext();
|
|
1142
1190
|
}
|
|
1143
|
-
return fluidDataStore;
|
|
1191
|
+
return channelToDataStore(fluidDataStore, id, this, this.dataStores, this.mc.logger);
|
|
1144
1192
|
}
|
|
1145
1193
|
async _createDataStoreWithProps(pkg, props, id = uuid(), isRoot = false) {
|
|
1146
1194
|
return this._aliasingEnabled === true && isRoot ?
|
|
@@ -1322,7 +1370,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1322
1370
|
* @param options - options controlling how the summary is generated or submitted
|
|
1323
1371
|
*/
|
|
1324
1372
|
async submitSummary(options) {
|
|
1325
|
-
var _a, _b;
|
|
1373
|
+
var _a, _b, _c;
|
|
1326
1374
|
const { fullTree, refreshLatestAck, summaryLogger } = options;
|
|
1327
1375
|
if (refreshLatestAck) {
|
|
1328
1376
|
const latestSummaryRefSeq = await this.refreshLatestSummaryAckFromServer(ChildLogger.create(summaryLogger, undefined, { all: { safeSummary: true } }));
|
|
@@ -1340,6 +1388,14 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1340
1388
|
await this.deltaManager.inbound.pause();
|
|
1341
1389
|
const summaryRefSeqNum = this.deltaManager.lastSequenceNumber;
|
|
1342
1390
|
const message = `Summary @${summaryRefSeqNum}:${this.deltaManager.minimumSequenceNumber}`;
|
|
1391
|
+
// We should be here is we haven't processed be here. If we are of if the last message's sequence number
|
|
1392
|
+
// doesn't match the last processed sequence number, log an error.
|
|
1393
|
+
if (summaryRefSeqNum !== ((_a = this.deltaManager.lastMessage) === null || _a === void 0 ? void 0 : _a.sequenceNumber)) {
|
|
1394
|
+
summaryLogger.sendErrorEvent({
|
|
1395
|
+
eventName: "LastSequenceMismatch",
|
|
1396
|
+
message,
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1343
1399
|
this.summarizerNode.startSummary(summaryRefSeqNum, summaryLogger);
|
|
1344
1400
|
// Helper function to check whether we should still continue between each async step.
|
|
1345
1401
|
const checkContinue = () => {
|
|
@@ -1404,7 +1460,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1404
1460
|
const dataStoreTree = this.disableIsolatedChannels ? summaryTree : summaryTree.tree[channelsTreeName];
|
|
1405
1461
|
assert(dataStoreTree.type === SummaryType.Tree, 0x1fc /* "summary is not a tree" */);
|
|
1406
1462
|
const handleCount = Object.values(dataStoreTree.tree).filter((value) => value.type === SummaryType.Handle).length;
|
|
1407
|
-
const summaryStats = Object.assign({ dataStoreCount: this.dataStores.size, summarizedDataStoreCount: this.dataStores.size - handleCount, gcStateUpdatedDataStoreCount: (
|
|
1463
|
+
const summaryStats = Object.assign({ dataStoreCount: this.dataStores.size, summarizedDataStoreCount: this.dataStores.size - handleCount, gcStateUpdatedDataStoreCount: (_b = summarizeResult.gcStats) === null || _b === void 0 ? void 0 : _b.updatedDataStoreCount }, partialStats);
|
|
1408
1464
|
const generateSummaryData = {
|
|
1409
1465
|
referenceSequenceNumber: summaryRefSeqNum,
|
|
1410
1466
|
summaryTree,
|
|
@@ -1420,7 +1476,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1420
1476
|
const summaryContext = lastAck === undefined
|
|
1421
1477
|
? {
|
|
1422
1478
|
proposalHandle: undefined,
|
|
1423
|
-
ackHandle: (
|
|
1479
|
+
ackHandle: (_c = this.context.getLoadedFromVersion()) === null || _c === void 0 ? void 0 : _c.id,
|
|
1424
1480
|
referenceSequenceNumber: summaryRefSeqNum,
|
|
1425
1481
|
}
|
|
1426
1482
|
: {
|
|
@@ -1551,16 +1607,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1551
1607
|
});
|
|
1552
1608
|
}
|
|
1553
1609
|
}
|
|
1554
|
-
|
|
1555
|
-
// there will be a lot of escape characters that can make it up to 2x bigger!
|
|
1556
|
-
// This is Ok, because DeltaManager.shouldSplit() will have 2 * maxMessageSize limit
|
|
1557
|
-
if (!serializedContent || serializedContent.length <= maxOpSize) {
|
|
1558
|
-
clientSequenceNumber = this.submitRuntimeMessage(type, content,
|
|
1559
|
-
/* batch: */ this._flushMode === FlushMode.TurnBased, opMetadataInternal);
|
|
1560
|
-
}
|
|
1561
|
-
else {
|
|
1562
|
-
clientSequenceNumber = this.submitChunkedMessage(type, serializedContent, maxOpSize);
|
|
1563
|
-
}
|
|
1610
|
+
clientSequenceNumber = this.submitMaybeChunkedMessages(type, content, serializedContent, maxOpSize, this._flushMode === FlushMode.TurnBased, opMetadataInternal);
|
|
1564
1611
|
}
|
|
1565
1612
|
// Let the PendingStateManager know that a message was submitted.
|
|
1566
1613
|
this.pendingStateManager.onSubmitMessage(type, clientSequenceNumber, this.deltaManager.lastSequenceNumber, content, localOpMetadata, opMetadataInternal);
|
|
@@ -1568,6 +1615,35 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1568
1615
|
this.updateDocumentDirtyState(true);
|
|
1569
1616
|
}
|
|
1570
1617
|
}
|
|
1618
|
+
submitMaybeChunkedMessages(type, content, serializedContent, serverMaxOpSize, batch, opMetadataInternal = undefined) {
|
|
1619
|
+
if (this._maxOpSizeInBytes >= 0) {
|
|
1620
|
+
// Chunking disabled
|
|
1621
|
+
if (!serializedContent || serializedContent.length <= this._maxOpSizeInBytes) {
|
|
1622
|
+
return this.submitRuntimeMessage(type, content, batch, opMetadataInternal);
|
|
1623
|
+
}
|
|
1624
|
+
// When chunking is disabled, we ignore the server max message size
|
|
1625
|
+
// and if the content length is larger than the client configured message size
|
|
1626
|
+
// instead of splitting the content, we will fail by explicitly close the container
|
|
1627
|
+
this.closeFn(new GenericError("OpTooLarge",
|
|
1628
|
+
/* error */ undefined, {
|
|
1629
|
+
length: {
|
|
1630
|
+
value: serializedContent.length,
|
|
1631
|
+
tag: TelemetryDataTag.PackageData,
|
|
1632
|
+
},
|
|
1633
|
+
limit: {
|
|
1634
|
+
value: this._maxOpSizeInBytes,
|
|
1635
|
+
tag: TelemetryDataTag.PackageData,
|
|
1636
|
+
},
|
|
1637
|
+
}));
|
|
1638
|
+
return -1;
|
|
1639
|
+
}
|
|
1640
|
+
// Chunking enabled, fallback on the server's max message size
|
|
1641
|
+
// and split the content accordingly
|
|
1642
|
+
if (!serializedContent || serializedContent.length <= serverMaxOpSize) {
|
|
1643
|
+
return this.submitRuntimeMessage(type, content, batch, opMetadataInternal);
|
|
1644
|
+
}
|
|
1645
|
+
return this.submitChunkedMessage(type, serializedContent, serverMaxOpSize);
|
|
1646
|
+
}
|
|
1571
1647
|
submitChunkedMessage(type, content, maxOpSize) {
|
|
1572
1648
|
const contentLength = content.length;
|
|
1573
1649
|
const chunkN = Math.floor((contentLength - 1) / maxOpSize) + 1;
|
|
@@ -1646,6 +1722,8 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1646
1722
|
const readAndParseBlob = async (id) => readAndParse(this.storage, id);
|
|
1647
1723
|
const result = await this.summarizerNode.refreshLatestSummary(proposalHandle, summaryRefSeq, async () => this.fetchSnapshotFromStorage(ackHandle, summaryLogger, {
|
|
1648
1724
|
eventName: "RefreshLatestSummaryGetSnapshot",
|
|
1725
|
+
ackHandle,
|
|
1726
|
+
summaryRefSeq,
|
|
1649
1727
|
fetchLatest: false,
|
|
1650
1728
|
}), readAndParseBlob, summaryLogger);
|
|
1651
1729
|
// Notify the garbage collector so it can update its latest summary state.
|