@fluidframework/container-runtime 0.57.0-51086 → 0.57.2
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/containerRuntime.d.ts +10 -6
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +64 -30
- 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 +5 -7
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +11 -6
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +1 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +2 -2
- package/dist/dataStores.js.map +1 -1
- package/dist/garbageCollection.d.ts +24 -11
- package/dist/garbageCollection.d.ts.map +1 -1
- package/dist/garbageCollection.js +94 -53
- 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/lib/containerRuntime.d.ts +10 -6
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +65 -31
- 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 +5 -7
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +11 -6
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.d.ts +1 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +2 -2
- package/lib/dataStores.js.map +1 -1
- package/lib/garbageCollection.d.ts +24 -11
- package/lib/garbageCollection.d.ts.map +1 -1
- package/lib/garbageCollection.js +94 -53
- 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/package.json +13 -13
- package/src/containerRuntime.ts +98 -34
- package/src/dataStore.ts +6 -42
- package/src/dataStoreContext.ts +15 -13
- package/src/dataStores.ts +8 -3
- package/src/garbageCollection.ts +114 -57
- package/src/index.ts +0 -1
- package/src/packageVersion.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
/*!
|
|
2
3
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
4
|
* Licensed under the MIT License.
|
|
4
5
|
*/
|
|
5
|
-
/// <reference types="node" />
|
|
6
6
|
import { EventEmitter } from "events";
|
|
7
7
|
import { ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
8
8
|
import { FluidObject, IFluidHandle, IFluidHandleContext, IFluidObject, IFluidRouter, IRequest, IResponse } from "@fluidframework/core-interfaces";
|
|
@@ -11,11 +11,10 @@ import { IContainerRuntime, IContainerRuntimeEvents } from "@fluidframework/cont
|
|
|
11
11
|
import { TypedEventEmitter } from "@fluidframework/common-utils";
|
|
12
12
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
13
13
|
import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISignalMessage, ISummaryConfiguration, ISummaryTree, MessageType } from "@fluidframework/protocol-definitions";
|
|
14
|
-
import { FlushMode, IFluidDataStoreContextDetached, IFluidDataStoreRegistry, IGarbageCollectionData, NamedFluidDataStoreRegistryEntries, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
14
|
+
import { FlushMode, IFluidDataStoreContextDetached, IFluidDataStoreRegistry, IGarbageCollectionData, NamedFluidDataStoreRegistryEntries, ISummaryTreeWithStats, IDataStore } from "@fluidframework/runtime-definitions";
|
|
15
15
|
import { IPendingLocalState } from "./pendingStateManager";
|
|
16
16
|
import { SubmitSummaryResult, ISubmitSummaryOptions, ISummarizer, ISummarizerInternalsProvider, ISummarizerOptions, ISummarizerRuntime } from "./summarizerTypes";
|
|
17
17
|
import { IGarbageCollectionRuntime, IGCStats } from "./garbageCollection";
|
|
18
|
-
import { IDataStore } from "./dataStore";
|
|
19
18
|
export declare enum ContainerMessageType {
|
|
20
19
|
FluidDataStoreOp = "component",
|
|
21
20
|
Attach = "attach",
|
|
@@ -215,12 +214,15 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
215
214
|
private readonly summaryCollection;
|
|
216
215
|
private readonly summarizerNode;
|
|
217
216
|
private readonly _aliasingEnabled;
|
|
217
|
+
private readonly maxConsecutiveReconnects;
|
|
218
|
+
private readonly defaultMaxConsecutiveReconnects;
|
|
218
219
|
private _orderSequentiallyCalls;
|
|
219
220
|
private _flushMode;
|
|
220
221
|
private needsFlush;
|
|
221
222
|
private flushTrigger;
|
|
222
223
|
private _connected;
|
|
223
224
|
private paused;
|
|
225
|
+
private consecutiveReconnects;
|
|
224
226
|
get connected(): boolean;
|
|
225
227
|
/** clientId of parent (non-summarizing) container that owns summarizer container */
|
|
226
228
|
get summarizerClientId(): string | undefined;
|
|
@@ -249,8 +251,8 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
249
251
|
* and is the single source of truth for this container.
|
|
250
252
|
*/
|
|
251
253
|
readonly disableIsolatedChannels: boolean;
|
|
252
|
-
/** The message
|
|
253
|
-
private
|
|
254
|
+
/** The last message processed at the time of the last summary. */
|
|
255
|
+
private messageAtLastSummary;
|
|
254
256
|
private get summarizer();
|
|
255
257
|
private get summariesDisabled();
|
|
256
258
|
private readonly createContainerMetadata;
|
|
@@ -271,6 +273,8 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
271
273
|
private getDataStoreFromRequest;
|
|
272
274
|
private formMetadata;
|
|
273
275
|
private addContainerStateToSummary;
|
|
276
|
+
private shouldContinueReconnecting;
|
|
277
|
+
private resetReconnectCount;
|
|
274
278
|
private replayPendingStates;
|
|
275
279
|
/**
|
|
276
280
|
* Used to apply stashed ops at their reference sequence number.
|
|
@@ -321,7 +325,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
321
325
|
* This method will be removed. See #6465.
|
|
322
326
|
*/
|
|
323
327
|
private _createDataStoreWithPropsLegacy;
|
|
324
|
-
_createDataStoreWithProps(pkg: string | string[], props?: any, id?: string, isRoot?: boolean): Promise<
|
|
328
|
+
_createDataStoreWithProps(pkg: string | string[], props?: any, id?: string, isRoot?: boolean): Promise<IDataStore>;
|
|
325
329
|
private _createDataStore;
|
|
326
330
|
private canSendOps;
|
|
327
331
|
getQuorum(): IQuorumClients;
|
|
@@ -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,EAER,uBAAuB,EACvB,WAAW,EACX,cAAc,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AAG,IAAI;IAS/D,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAKtF,OAAO,CAAC,MAAM;IAmEd,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;IAkBnC;;;;;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/dist/containerRuntime.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
3
|
exports.ContainerRuntime = exports.getDeviceSpec = exports.agentSchedulerId = exports.ScheduleManager = exports.unpackRuntimeMessage = exports.isRuntimeMessage = exports.RuntimeMessage = exports.RuntimeHeaders = exports.ContainerMessageType = void 0;
|
|
8
4
|
const container_definitions_1 = require("@fluidframework/container-definitions");
|
|
@@ -78,6 +74,7 @@ var RuntimeHeaders;
|
|
|
78
74
|
// Local storage key to set the default flush mode to TurnBased
|
|
79
75
|
const turnBasedFlushModeKey = "Fluid.ContainerRuntime.FlushModeTurnBased";
|
|
80
76
|
const useDataStoreAliasingKey = "Fluid.ContainerRuntime.UseDataStoreAliasing";
|
|
77
|
+
const maxConsecutiveReconnectsKey = "Fluid.ContainerRuntime.MaxConsecutiveReconnects";
|
|
81
78
|
var RuntimeMessage;
|
|
82
79
|
(function (RuntimeMessage) {
|
|
83
80
|
RuntimeMessage["FluidDataStoreOp"] = "component";
|
|
@@ -355,7 +352,7 @@ exports.getDeviceSpec = getDeviceSpec;
|
|
|
355
352
|
*/
|
|
356
353
|
class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
357
354
|
constructor(context, registry, metadata, electedSummarizerData, chunks, dataStoreAliasMap, runtimeOptions, containerScope, logger, existing, blobManagerSnapshot, requestHandler, _storage) {
|
|
358
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
359
356
|
super();
|
|
360
357
|
this.context = context;
|
|
361
358
|
this.registry = registry;
|
|
@@ -364,10 +361,12 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
364
361
|
this.logger = logger;
|
|
365
362
|
this.requestHandler = requestHandler;
|
|
366
363
|
this._storage = _storage;
|
|
364
|
+
this.defaultMaxConsecutiveReconnects = 15;
|
|
367
365
|
this._orderSequentiallyCalls = 0;
|
|
368
366
|
this.needsFlush = false;
|
|
369
367
|
this.flushTrigger = false;
|
|
370
368
|
this.paused = false;
|
|
369
|
+
this.consecutiveReconnects = 0;
|
|
371
370
|
this._disposed = false;
|
|
372
371
|
this.emitDirtyDocumentEvent = true;
|
|
373
372
|
this.summarizerWarning = (warning) => this.mc.logger.sendTelemetryEvent({ eventName: "summarizerWarning" }, warning);
|
|
@@ -420,7 +419,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
420
419
|
throw new container_utils_1.UsageError(`Can't summarize, disableSummaries: ${this.summariesDisabled}`);
|
|
421
420
|
}
|
|
422
421
|
};
|
|
423
|
-
this.
|
|
422
|
+
this.messageAtLastSummary = metadata === null || metadata === void 0 ? void 0 : metadata.message;
|
|
424
423
|
// If this is an existing container, we get values from metadata.
|
|
425
424
|
// otherwise, we initialize them.
|
|
426
425
|
if (existing) {
|
|
@@ -447,20 +446,13 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
447
446
|
this._aliasingEnabled =
|
|
448
447
|
((_c = this.mc.config.getBoolean(useDataStoreAliasingKey)) !== null && _c !== void 0 ? _c : false) ||
|
|
449
448
|
((_d = runtimeOptions.useDataStoreAliasing) !== null && _d !== void 0 ? _d : false);
|
|
449
|
+
this.maxConsecutiveReconnects = (_e = this.mc.config.getNumber(maxConsecutiveReconnectsKey)) !== null && _e !== void 0 ? _e : this.defaultMaxConsecutiveReconnects;
|
|
450
|
+
this.garbageCollector = garbageCollection_1.GarbageCollector.create(this, this.runtimeOptions.gcOptions, (unusedRoutes) => this.dataStores.deleteUnusedRoutes(unusedRoutes), (nodePath) => this.dataStores.getNodePackagePath(nodePath),
|
|
450
451
|
/**
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
* We use the timestamp of the last op for current timestamp. However, there can be cases where
|
|
454
|
-
* we don't have an op (on demand summaries for instance). In those cases, we will use the timestamp
|
|
455
|
-
* of this client's connection.
|
|
452
|
+
* Returns the timestamp of the last message seen by this client. This is used by garbage collector as
|
|
453
|
+
* the current reference timestamp for tracking unreferenced objects.
|
|
456
454
|
*/
|
|
457
|
-
|
|
458
|
-
var _a, _b, _c;
|
|
459
|
-
const client = this.clientId !== undefined ? this.getAudience().getMember(this.clientId) : undefined;
|
|
460
|
-
const timestamp = client === null || client === void 0 ? void 0 : client.timestamp;
|
|
461
|
-
return (_c = (_b = (_a = this.deltaManager.lastMessage) === null || _a === void 0 ? void 0 : _a.timestamp) !== null && _b !== void 0 ? _b : timestamp) !== null && _c !== void 0 ? _c : Date.now();
|
|
462
|
-
};
|
|
463
|
-
this.garbageCollector = garbageCollection_1.GarbageCollector.create(this, this.runtimeOptions.gcOptions, (unusedRoutes) => this.dataStores.deleteUnusedRoutes(unusedRoutes), (nodePath) => this.dataStores.getNodePackagePath(nodePath), getCurrentTimestamp, this.closeFn, context.baseSnapshot, async (id) => driver_utils_1.readAndParse(this.storage, id), this.mc.logger, existing, metadata);
|
|
455
|
+
() => { var _a, _b, _c; return (_b = (_a = this.deltaManager.lastMessage) === null || _a === void 0 ? void 0 : _a.timestamp) !== null && _b !== void 0 ? _b : (_c = this.messageAtLastSummary) === null || _c === void 0 ? void 0 : _c.timestamp; }, () => { var _a; return (_a = this.messageAtLastSummary) === null || _a === void 0 ? void 0 : _a.timestamp; }, context.baseSnapshot, async (id) => driver_utils_1.readAndParse(this.storage, id), this.mc.logger, existing, metadata);
|
|
464
456
|
const loadedFromSequenceNumber = this.deltaManager.initialSequenceNumber;
|
|
465
457
|
this.summarizerNode = runtime_utils_1.createRootSummarizerNodeWithGC(telemetry_utils_1.ChildLogger.create(this.logger, "SummarizerNode"),
|
|
466
458
|
// Summarize function to call when summarize is called. Summarizer node always tracks summary state.
|
|
@@ -481,7 +473,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
481
473
|
if (this.context.baseSnapshot) {
|
|
482
474
|
this.summarizerNode.loadBaseSummaryWithoutDifferential(this.context.baseSnapshot);
|
|
483
475
|
}
|
|
484
|
-
this.dataStores = new dataStores_1.DataStores(dataStores_1.getSummaryForDatastores(context.baseSnapshot, metadata), this, (attachMsg) => this.submit(ContainerMessageType.Attach, attachMsg), (id, createParam) => (summarizeInternal, getGCDataFn, getBaseGCDetailsFn) => this.summarizerNode.createChild(summarizeInternal, id, createParam, undefined, getGCDataFn, getBaseGCDetailsFn), (id) => this.summarizerNode.deleteChild(id), this.mc.logger, async () => this.garbageCollector.getDataStoreBaseGCDetails(), (
|
|
476
|
+
this.dataStores = new dataStores_1.DataStores(dataStores_1.getSummaryForDatastores(context.baseSnapshot, metadata), this, (attachMsg) => this.submit(ContainerMessageType.Attach, attachMsg), (id, createParam) => (summarizeInternal, getGCDataFn, getBaseGCDetailsFn) => this.summarizerNode.createChild(summarizeInternal, id, createParam, undefined, getGCDataFn, getBaseGCDetailsFn), (id) => this.summarizerNode.deleteChild(id), this.mc.logger, async () => this.garbageCollector.getDataStoreBaseGCDetails(), (path, timestampMs, packagePath) => this.garbageCollector.nodeUpdated(path, "Changed", timestampMs, packagePath), new Map(dataStoreAliasMap), this.garbageCollector.writeDataAtRoot);
|
|
485
477
|
this.blobManager = new blobManager_1.BlobManager(this.handleContext, blobManagerSnapshot, () => this.storage, (blobId) => this.submit(ContainerMessageType.BlobAttach, undefined, undefined, { blobId }), this, this.logger);
|
|
486
478
|
this.scheduleManager = new ScheduleManager(context.deltaManager, this, telemetry_utils_1.ChildLogger.create(this.logger, "ScheduleManager"));
|
|
487
479
|
this.deltaSender = this.deltaManager;
|
|
@@ -492,7 +484,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
492
484
|
this.summaryCollection = new summaryCollection_1.SummaryCollection(this.deltaManager, this.logger);
|
|
493
485
|
const { attachState, pendingLocalState } = this.context;
|
|
494
486
|
this.dirtyContainer = attachState !== container_definitions_1.AttachState.Attached
|
|
495
|
-
|| ((
|
|
487
|
+
|| ((_f = pendingLocalState) === null || _f === void 0 ? void 0 : _f.pendingStates.length) > 0;
|
|
496
488
|
this.context.updateDirtyContainerState(this.dirtyContainer);
|
|
497
489
|
// Map the deprecated generateSummaries flag to disableSummaries.
|
|
498
490
|
if (this.runtimeOptions.summaryOptions.generateSummaries === false) {
|
|
@@ -505,8 +497,8 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
505
497
|
const orderedClientLogger = telemetry_utils_1.ChildLogger.create(this.logger, "OrderedClientElection");
|
|
506
498
|
const orderedClientCollection = new orderedClientElection_1.OrderedClientCollection(orderedClientLogger, this.context.deltaManager, this.context.quorum);
|
|
507
499
|
const orderedClientElectionForSummarizer = new orderedClientElection_1.OrderedClientElection(orderedClientLogger, orderedClientCollection, electedSummarizerData !== null && electedSummarizerData !== void 0 ? electedSummarizerData : this.context.deltaManager.lastSequenceNumber, summarizerClientElection_1.SummarizerClientElection.isClientEligible);
|
|
508
|
-
const summarizerClientElectionEnabled = (
|
|
509
|
-
const maxOpsSinceLastSummary = (
|
|
500
|
+
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;
|
|
501
|
+
const maxOpsSinceLastSummary = (_j = this.runtimeOptions.summaryOptions.maxOpsSinceLastSummary) !== null && _j !== void 0 ? _j : 7000;
|
|
510
502
|
this.summarizerClientElection = new summarizerClientElection_1.SummarizerClientElection(orderedClientLogger, this.summaryCollection, orderedClientElectionForSummarizer, maxOpsSinceLastSummary, summarizerClientElectionEnabled);
|
|
511
503
|
if (this.context.clientDetails.type === summarizerClientElection_1.summarizerClientType) {
|
|
512
504
|
this._summarizer = new summarizer_1.Summarizer("/_summarizer", this /* ISummarizerRuntime */, () => this.summaryConfiguration, this /* ISummarizerInternalsProvider */, this.handleContext, this.summaryCollection, async (runtime) => runWhileConnectedCoordinator_1.RunWhileConnectedCoordinator.create(runtime));
|
|
@@ -853,17 +845,15 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
853
845
|
}
|
|
854
846
|
}
|
|
855
847
|
const dataStoreChannel = await dataStoreContext.realize();
|
|
856
|
-
|
|
857
|
-
// that the package path is available.
|
|
858
|
-
this.garbageCollector.nodeUpdated(`/${id}`, "Loaded", dataStoreContext.packagePath, request === null || request === void 0 ? void 0 : request.headers);
|
|
848
|
+
this.garbageCollector.nodeUpdated(`/${id}`, "Loaded", undefined /* timestampMs */, dataStoreContext.packagePath, request === null || request === void 0 ? void 0 : request.headers);
|
|
859
849
|
return dataStoreChannel;
|
|
860
850
|
}
|
|
861
851
|
formMetadata() {
|
|
862
852
|
var _a;
|
|
863
853
|
return Object.assign(Object.assign({}, this.createContainerMetadata), { summaryCount: this.summaryCount, summaryFormatVersion: 1, disableIsolatedChannels: this.disableIsolatedChannels || undefined, gcFeature: this.garbageCollector.gcSummaryFeatureVersion,
|
|
864
|
-
// The last message processed at the time of summary. If there are no messages,
|
|
865
|
-
//
|
|
866
|
-
message: (_a = summaryFormat_1.extractSummaryMetadataMessage(this.deltaManager.lastMessage)) !== null && _a !== void 0 ? _a : this.
|
|
854
|
+
// The last message processed at the time of summary. If there are no new messages, use the message from the
|
|
855
|
+
// last summary.
|
|
856
|
+
message: (_a = summaryFormat_1.extractSummaryMetadataMessage(this.deltaManager.lastMessage)) !== null && _a !== void 0 ? _a : this.messageAtLastSummary, sessionExpiryTimeoutMs: this.garbageCollector.sessionExpiryTimeoutMs });
|
|
867
857
|
}
|
|
868
858
|
addContainerStateToSummary(summaryTree) {
|
|
869
859
|
var _a;
|
|
@@ -894,6 +884,37 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
894
884
|
}
|
|
895
885
|
}
|
|
896
886
|
}
|
|
887
|
+
// Track how many times the container tries to reconnect with pending messages.
|
|
888
|
+
// This happens when the connection state is changed and we reset the counter
|
|
889
|
+
// when we are able to process a local op or when there are no pending messages.
|
|
890
|
+
// If this counter reaches a max, it's a good indicator that the container
|
|
891
|
+
// is not making progress and it is stuck in a retry loop.
|
|
892
|
+
shouldContinueReconnecting() {
|
|
893
|
+
if (this.maxConsecutiveReconnects <= 0) {
|
|
894
|
+
// Feature disabled, we never stop reconnecting
|
|
895
|
+
return true;
|
|
896
|
+
}
|
|
897
|
+
if (!this.pendingStateManager.hasPendingMessages()) {
|
|
898
|
+
// If there are no pending messages, we can always reconnect
|
|
899
|
+
this.resetReconnectCount();
|
|
900
|
+
return true;
|
|
901
|
+
}
|
|
902
|
+
this.consecutiveReconnects++;
|
|
903
|
+
if (this.consecutiveReconnects === Math.floor(this.maxConsecutiveReconnects / 2)) {
|
|
904
|
+
// If we're halfway through the max reconnects, send an event in order
|
|
905
|
+
// to better identify false positives, if any. If the rate of this event
|
|
906
|
+
// matches `MaxReconnectsWithNoProgress`, we can safely cut down
|
|
907
|
+
// maxConsecutiveReconnects to half.
|
|
908
|
+
this.mc.logger.sendTelemetryEvent({
|
|
909
|
+
eventName: "ReconnectsWithNoProgress",
|
|
910
|
+
attempts: this.consecutiveReconnects,
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
return this.consecutiveReconnects < this.maxConsecutiveReconnects;
|
|
914
|
+
}
|
|
915
|
+
resetReconnectCount() {
|
|
916
|
+
this.consecutiveReconnects = 0;
|
|
917
|
+
}
|
|
897
918
|
replayPendingStates() {
|
|
898
919
|
// We need to be able to send ops to replay states
|
|
899
920
|
if (!this.canSendOps()) {
|
|
@@ -946,6 +967,11 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
946
967
|
if (changeOfState) {
|
|
947
968
|
this.deltaManager.off("op", this.onOp);
|
|
948
969
|
this.context.pendingLocalState = undefined;
|
|
970
|
+
if (!this.shouldContinueReconnecting()) {
|
|
971
|
+
this.closeFn(new container_utils_1.GenericError("MaxReconnectsWithNoProgress", undefined, // error
|
|
972
|
+
{ attempts: this.consecutiveReconnects }));
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
949
975
|
this.replayPendingStates();
|
|
950
976
|
}
|
|
951
977
|
this.dataStores.setConnectionState(connected, clientId);
|
|
@@ -998,6 +1024,12 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
998
1024
|
}
|
|
999
1025
|
this.emit("op", message);
|
|
1000
1026
|
this.scheduleManager.afterOpProcessing(undefined, message);
|
|
1027
|
+
if (local) {
|
|
1028
|
+
// If we have processed a local op, this means that the container is
|
|
1029
|
+
// making progress and we can reset the counter for how many times
|
|
1030
|
+
// we have consecutively replayed the pending states
|
|
1031
|
+
this.resetReconnectCount();
|
|
1032
|
+
}
|
|
1001
1033
|
}
|
|
1002
1034
|
catch (e) {
|
|
1003
1035
|
this.scheduleManager.afterOpProcessing(e, message);
|
|
@@ -1125,7 +1157,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
1125
1157
|
const dataStore = await this._createDataStore(pkg, false /* isRoot */, internalId, props);
|
|
1126
1158
|
const aliasedDataStore = dataStore_1.channelToDataStore(dataStore, internalId, this, this.dataStores, this.mc.logger);
|
|
1127
1159
|
const result = await aliasedDataStore.trySetAlias(alias);
|
|
1128
|
-
if (result !==
|
|
1160
|
+
if (result !== "Success") {
|
|
1129
1161
|
throw new container_utils_1.GenericError("dataStoreAliasFailure", undefined /* error */, {
|
|
1130
1162
|
alias: {
|
|
1131
1163
|
value: alias,
|
|
@@ -1157,7 +1189,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
1157
1189
|
if (isRoot) {
|
|
1158
1190
|
fluidDataStore.bindToContext();
|
|
1159
1191
|
}
|
|
1160
|
-
return fluidDataStore;
|
|
1192
|
+
return dataStore_1.channelToDataStore(fluidDataStore, id, this, this.dataStores, this.mc.logger);
|
|
1161
1193
|
}
|
|
1162
1194
|
async _createDataStoreWithProps(pkg, props, id = uuid_1.v4(), isRoot = false) {
|
|
1163
1195
|
return this._aliasingEnabled === true && isRoot ?
|
|
@@ -1413,6 +1445,8 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
|
|
|
1413
1445
|
return { stage: "base", referenceSequenceNumber: summaryRefSeqNum, error };
|
|
1414
1446
|
}
|
|
1415
1447
|
const { summary: summaryTree, stats: partialStats } = summarizeResult;
|
|
1448
|
+
// Now that we have generated the summary, update the message at last summary to the last message processed.
|
|
1449
|
+
this.messageAtLastSummary = this.deltaManager.lastMessage;
|
|
1416
1450
|
// Counting dataStores and handles
|
|
1417
1451
|
// Because handles are unchanged dataStores in the current logic,
|
|
1418
1452
|
// summarized dataStore count is total dataStore count minus handle count
|