@fluidframework/container-loader 0.57.0-51086 → 0.58.0-55561
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/connectionManager.d.ts +2 -2
- package/dist/connectionManager.d.ts.map +1 -1
- package/dist/connectionManager.js +8 -12
- package/dist/connectionManager.js.map +1 -1
- package/dist/connectionStateHandler.d.ts +2 -3
- package/dist/connectionStateHandler.d.ts.map +1 -1
- package/dist/connectionStateHandler.js +9 -10
- package/dist/connectionStateHandler.js.map +1 -1
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +10 -9
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +2 -6
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js +9 -8
- package/dist/containerContext.js.map +1 -1
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +13 -23
- package/dist/deltaManager.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/retriableDocumentStorageService.js +1 -1
- package/dist/retriableDocumentStorageService.js.map +1 -1
- package/lib/connectionManager.d.ts +2 -2
- package/lib/connectionManager.d.ts.map +1 -1
- package/lib/connectionManager.js +8 -12
- package/lib/connectionManager.js.map +1 -1
- package/lib/connectionStateHandler.d.ts +2 -3
- package/lib/connectionStateHandler.d.ts.map +1 -1
- package/lib/connectionStateHandler.js +9 -10
- package/lib/connectionStateHandler.js.map +1 -1
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +10 -9
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +2 -6
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js +9 -8
- package/lib/containerContext.js.map +1 -1
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +14 -24
- package/lib/deltaManager.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/retriableDocumentStorageService.js +1 -1
- package/lib/retriableDocumentStorageService.js.map +1 -1
- package/package.json +7 -7
- package/src/connectionManager.ts +8 -15
- package/src/connectionStateHandler.ts +11 -12
- package/src/container.ts +10 -9
- package/src/containerContext.ts +10 -9
- package/src/deltaManager.ts +14 -26
- package/src/packageVersion.ts +1 -1
- package/src/retriableDocumentStorageService.ts +1 -1
package/dist/container.js
CHANGED
|
@@ -160,6 +160,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
|
|
|
160
160
|
error: {
|
|
161
161
|
// load information to associate errors with the specific load point
|
|
162
162
|
dmInitialSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.initialSequenceNumber; },
|
|
163
|
+
dmLastProcessedSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastSequenceNumber; },
|
|
163
164
|
dmLastKnownSeqNumber: () => { var _a; return (_a = this._deltaManager) === null || _a === void 0 ? void 0 : _a.lastKnownSeqNumber; },
|
|
164
165
|
containerLoadedFromVersionId: () => { var _a; return (_a = this.loadedFromVersion) === null || _a === void 0 ? void 0 : _a.id; },
|
|
165
166
|
containerLoadedFromVersionDate: () => { var _a; return (_a = this.loadedFromVersion) === null || _a === void 0 ? void 0 : _a.date; },
|
|
@@ -175,7 +176,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
|
|
|
175
176
|
const summarizeProtocolTree = (_c = this.mc.config.getBoolean("Fluid.Container.summarizeProtocolTree")) !== null && _c !== void 0 ? _c : this.loader.services.options.summarizeProtocolTree;
|
|
176
177
|
this.options = Object.assign(Object.assign({}, this.loader.services.options), { summarizeProtocolTree });
|
|
177
178
|
this.connectionStateHandler = new connectionStateHandler_1.ConnectionStateHandler({
|
|
178
|
-
|
|
179
|
+
quorumClients: () => { var _a; return (_a = this._protocolHandler) === null || _a === void 0 ? void 0 : _a.quorum; },
|
|
179
180
|
logConnectionStateChangeTelemetry: (value, oldState, reason) => this.logConnectionStateChangeTelemetry(value, oldState, reason),
|
|
180
181
|
shouldClientJoinWrite: () => this._deltaManager.connectionManager.shouldJoinWrite(),
|
|
181
182
|
maxClientLeaveWaitTime: this.loader.services.options.maxClientLeaveWaitTime,
|
|
@@ -281,7 +282,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
|
|
|
281
282
|
common_utils_1.assert(pendingLocalState === undefined || loadOptions.loadMode === undefined, 0x1e1 /* "pending state requires immediate connection!" */);
|
|
282
283
|
const mode = (_a = loadOptions.loadMode) !== null && _a !== void 0 ? _a : defaultMode;
|
|
283
284
|
const onClosed = (err) => {
|
|
284
|
-
reject(err !== null && err !== void 0 ? err : new container_utils_1.GenericError("
|
|
285
|
+
reject(err !== null && err !== void 0 ? err : new container_utils_1.GenericError("Container closed without error during load"));
|
|
285
286
|
};
|
|
286
287
|
container.on("closed", onClosed);
|
|
287
288
|
container.load(version, mode, pendingLocalState)
|
|
@@ -517,7 +518,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
|
|
|
517
518
|
async attach(request) {
|
|
518
519
|
await telemetry_utils_1.PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "Attach" }, async () => {
|
|
519
520
|
if (this._lifecycleState !== "loaded") {
|
|
520
|
-
throw new container_utils_1.UsageError(`
|
|
521
|
+
throw new container_utils_1.UsageError(`The Container is not in a valid state for attach [${this._lifecycleState}]`);
|
|
521
522
|
}
|
|
522
523
|
// If container is already attached or attach is in progress, throw an error.
|
|
523
524
|
common_utils_1.assert(this._attachState === container_definitions_1.AttachState.Detached && !this.attachStarted, 0x205 /* "attach() called more than once" */);
|
|
@@ -696,7 +697,7 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
|
|
|
696
697
|
this.deltaManager.inboundSignal.resume();
|
|
697
698
|
return;
|
|
698
699
|
}
|
|
699
|
-
this.close(new container_utils_1.GenericError("
|
|
700
|
+
this.close(new container_utils_1.GenericError("Existing context does not satisfy incoming proposal"));
|
|
700
701
|
}
|
|
701
702
|
async getVersion(version) {
|
|
702
703
|
const versions = await this.storageService.getVersions(version, 1);
|
|
@@ -1153,16 +1154,16 @@ class Container extends telemetry_utils_1.EventEmitterWithErrorHandling {
|
|
|
1153
1154
|
// Check and report if we're getting messages from a clientId that we previously
|
|
1154
1155
|
// flagged as shouldHaveLeft, or from a client that's not in the quorum but should be
|
|
1155
1156
|
if (message.clientId != null) {
|
|
1156
|
-
let
|
|
1157
|
+
let errorMsg;
|
|
1157
1158
|
const client = this.getQuorum().getMember(message.clientId);
|
|
1158
1159
|
if (client === undefined && message.type !== protocol_definitions_1.MessageType.ClientJoin) {
|
|
1159
|
-
|
|
1160
|
+
errorMsg = "Remote message's clientId is missing from the quorum";
|
|
1160
1161
|
}
|
|
1161
1162
|
else if ((client === null || client === void 0 ? void 0 : client.shouldHaveLeft) === true && message.type !== protocol_definitions_1.MessageType.NoOp) {
|
|
1162
|
-
|
|
1163
|
+
errorMsg = "Remote message's clientId already should have left";
|
|
1163
1164
|
}
|
|
1164
|
-
if (
|
|
1165
|
-
const error = new container_utils_1.DataCorruptionError(
|
|
1165
|
+
if (errorMsg !== undefined) {
|
|
1166
|
+
const error = new container_utils_1.DataCorruptionError(errorMsg, container_utils_1.extractSafePropertiesFromMessage(message));
|
|
1166
1167
|
this.close(telemetry_utils_1.normalizeError(error));
|
|
1167
1168
|
}
|
|
1168
1169
|
}
|