@fluidframework/container-runtime 2.1.0-274160 → 2.1.0-276985
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/README.md +14 -5
- package/container-runtime.test-files.tar +0 -0
- package/{lib → dist/blobManager}/blobManager.d.ts +9 -28
- package/dist/blobManager/blobManager.d.ts.map +1 -0
- package/dist/{blobManager.js → blobManager/blobManager.js} +23 -83
- package/dist/blobManager/blobManager.js.map +1 -0
- package/dist/blobManager/blobManagerSnapSum.d.ts +30 -0
- package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -0
- package/dist/blobManager/blobManagerSnapSum.js +82 -0
- package/dist/blobManager/blobManagerSnapSum.js.map +1 -0
- package/dist/blobManager/index.d.ts +7 -0
- package/dist/blobManager/index.d.ts.map +1 -0
- package/dist/blobManager/index.js +16 -0
- package/dist/blobManager/index.js.map +1 -0
- package/dist/channelCollection.d.ts +1 -0
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +23 -13
- package/dist/channelCollection.js.map +1 -1
- package/dist/containerRuntime.d.ts +20 -7
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +82 -77
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -0
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +7 -2
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/gc/garbageCollection.js +2 -2
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +9 -0
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +1 -0
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/messageTypes.d.ts +1 -0
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js +1 -0
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +4 -0
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +8 -4
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +18 -16
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +17 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +43 -5
- package/dist/opLifecycle/remoteMessageProcessor.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/pendingStateManager.d.ts +11 -7
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +34 -15
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +8 -0
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +2 -0
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +1 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +1 -2
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +1 -0
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -0
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/summarizer.d.ts +1 -0
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +1 -0
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +29 -0
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +10 -0
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +1 -0
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +8 -1
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +3 -3
- package/dist/summary/summaryFormat.js.map +1 -1
- package/{dist → lib/blobManager}/blobManager.d.ts +9 -28
- package/lib/blobManager/blobManager.d.ts.map +1 -0
- package/lib/{blobManager.js → blobManager/blobManager.js} +21 -83
- package/lib/blobManager/blobManager.js.map +1 -0
- package/lib/blobManager/blobManagerSnapSum.d.ts +30 -0
- package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -0
- package/lib/blobManager/blobManagerSnapSum.js +75 -0
- package/lib/blobManager/blobManagerSnapSum.js.map +1 -0
- package/lib/blobManager/index.d.ts +7 -0
- package/lib/blobManager/index.d.ts.map +1 -0
- package/lib/blobManager/index.js +7 -0
- package/lib/blobManager/index.js.map +1 -0
- package/lib/channelCollection.d.ts +1 -0
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +23 -13
- package/lib/channelCollection.js.map +1 -1
- package/lib/containerRuntime.d.ts +20 -7
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +31 -26
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -0
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +7 -2
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/gc/garbageCollection.js +2 -2
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +9 -0
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +1 -0
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/messageTypes.d.ts +1 -0
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js +1 -0
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +4 -0
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +8 -4
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +18 -16
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +17 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +41 -3
- package/lib/opLifecycle/remoteMessageProcessor.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/pendingStateManager.d.ts +11 -7
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +35 -16
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +8 -0
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +2 -0
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +1 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +1 -0
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -0
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/summarizer.d.ts +1 -0
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +1 -0
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +29 -0
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +10 -0
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -0
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +8 -1
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/package.json +23 -23
- package/src/{blobManager.ts → blobManager/blobManager.ts} +38 -122
- package/src/blobManager/blobManagerSnapSum.ts +133 -0
- package/src/blobManager/index.ts +19 -0
- package/src/channelCollection.ts +23 -13
- package/src/containerRuntime.ts +57 -39
- package/src/dataStoreContext.ts +8 -2
- package/src/gc/garbageCollection.ts +2 -2
- package/src/gc/gcDefinitions.ts +9 -0
- package/src/index.ts +1 -1
- package/src/messageTypes.ts +1 -0
- package/src/opLifecycle/batchManager.ts +4 -0
- package/src/opLifecycle/outbox.ts +19 -21
- package/src/opLifecycle/remoteMessageProcessor.ts +63 -6
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +43 -20
- package/src/summary/documentSchema.ts +8 -0
- package/src/summary/index.ts +0 -1
- package/src/summary/orderedClientElection.ts +1 -0
- package/src/summary/runWhileConnectedCoordinator.ts +1 -0
- package/src/summary/summarizer.ts +1 -0
- package/src/summary/summarizerTypes.ts +29 -0
- package/src/summary/summaryCollection.ts +10 -0
- package/src/summary/summaryFormat.ts +9 -1
- package/dist/blobManager.d.ts.map +0 -1
- package/dist/blobManager.js.map +0 -1
- package/lib/blobManager.d.ts.map +0 -1
- package/lib/blobManager.js.map +0 -1
- /package/api-report/{container-runtime.alpha.api.md → container-runtime.legacy.alpha.api.md} +0 -0
package/dist/containerRuntime.js
CHANGED
|
@@ -17,20 +17,20 @@ const internal_6 = require("@fluidframework/runtime-utils/internal");
|
|
|
17
17
|
const internal_7 = require("@fluidframework/telemetry-utils/internal");
|
|
18
18
|
const uuid_1 = require("uuid");
|
|
19
19
|
const batchTracker_js_1 = require("./batchTracker.js");
|
|
20
|
-
const
|
|
20
|
+
const index_js_1 = require("./blobManager/index.js");
|
|
21
21
|
const channelCollection_js_1 = require("./channelCollection.js");
|
|
22
22
|
const connectionTelemetry_js_1 = require("./connectionTelemetry.js");
|
|
23
23
|
const containerHandleContext_js_1 = require("./containerHandleContext.js");
|
|
24
24
|
const dataStore_js_1 = require("./dataStore.js");
|
|
25
25
|
const dataStoreRegistry_js_1 = require("./dataStoreRegistry.js");
|
|
26
26
|
const deltaManagerProxies_js_1 = require("./deltaManagerProxies.js");
|
|
27
|
-
const
|
|
27
|
+
const index_js_2 = require("./gc/index.js");
|
|
28
28
|
const messageTypes_js_1 = require("./messageTypes.js");
|
|
29
|
-
const
|
|
29
|
+
const index_js_3 = require("./opLifecycle/index.js");
|
|
30
30
|
const packageVersion_js_1 = require("./packageVersion.js");
|
|
31
31
|
const pendingStateManager_js_1 = require("./pendingStateManager.js");
|
|
32
32
|
const scheduleManager_js_1 = require("./scheduleManager.js");
|
|
33
|
-
const
|
|
33
|
+
const index_js_4 = require("./summary/index.js");
|
|
34
34
|
const throttler_js_1 = require("./throttler.js");
|
|
35
35
|
/**
|
|
36
36
|
* Utility to implement compat behaviors given an unknown message type
|
|
@@ -45,6 +45,7 @@ function compatBehaviorAllowsMessageType(_unknownContainerRuntimeMessageType, co
|
|
|
45
45
|
return compatBehavior === "Ignore";
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
+
* @legacy
|
|
48
49
|
* @alpha
|
|
49
50
|
*/
|
|
50
51
|
exports.DefaultSummaryConfiguration = {
|
|
@@ -63,16 +64,19 @@ exports.DefaultSummaryConfiguration = {
|
|
|
63
64
|
};
|
|
64
65
|
/**
|
|
65
66
|
* Error responses when requesting a deleted object will have this header set to true
|
|
67
|
+
* @legacy
|
|
66
68
|
* @alpha
|
|
67
69
|
*/
|
|
68
70
|
exports.DeletedResponseHeaderKey = "wasDeleted";
|
|
69
71
|
/**
|
|
70
72
|
* Tombstone error responses will have this header set to true
|
|
73
|
+
* @legacy
|
|
71
74
|
* @alpha
|
|
72
75
|
*/
|
|
73
76
|
exports.TombstoneResponseHeaderKey = "isTombstoned";
|
|
74
77
|
/**
|
|
75
78
|
* Inactive error responses will have this header set to true
|
|
79
|
+
* @legacy
|
|
76
80
|
* @alpha
|
|
77
81
|
*/
|
|
78
82
|
exports.InactiveResponseHeaderKey = "isInactive";
|
|
@@ -85,13 +89,17 @@ exports.defaultRuntimeHeaderData = {
|
|
|
85
89
|
};
|
|
86
90
|
/**
|
|
87
91
|
* Available compression algorithms for op compression.
|
|
92
|
+
* @legacy
|
|
88
93
|
* @alpha
|
|
89
94
|
*/
|
|
90
95
|
var CompressionAlgorithms;
|
|
91
96
|
(function (CompressionAlgorithms) {
|
|
92
97
|
CompressionAlgorithms["lz4"] = "lz4";
|
|
93
98
|
})(CompressionAlgorithms || (exports.CompressionAlgorithms = CompressionAlgorithms = {}));
|
|
94
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* @legacy
|
|
101
|
+
* @alpha
|
|
102
|
+
*/
|
|
95
103
|
exports.disabledCompressionConfig = {
|
|
96
104
|
minimumBatchSizeInBytes: Infinity,
|
|
97
105
|
compressionAlgorithm: CompressionAlgorithms.lz4,
|
|
@@ -154,13 +162,16 @@ exports.getDeviceSpec = getDeviceSpec;
|
|
|
154
162
|
* we can provide a partially-applied function to keep those items private to the ContainerRuntime.
|
|
155
163
|
*/
|
|
156
164
|
const makeLegacySendBatchFn = (submitFn, deltaManager) => (batch) => {
|
|
165
|
+
// Default to negative one to match Container.submitBatch behavior
|
|
166
|
+
let clientSequenceNumber = -1;
|
|
157
167
|
for (const message of batch.content) {
|
|
158
|
-
submitFn(internal_3.MessageType.Operation,
|
|
168
|
+
clientSequenceNumber = submitFn(internal_3.MessageType.Operation,
|
|
159
169
|
// For back-compat (submitFn only works on deserialized content)
|
|
160
170
|
message.contents === undefined ? undefined : JSON.parse(message.contents), true, // batch
|
|
161
171
|
message.metadata);
|
|
162
172
|
}
|
|
163
173
|
deltaManager.flush();
|
|
174
|
+
return clientSequenceNumber;
|
|
164
175
|
};
|
|
165
176
|
exports.makeLegacySendBatchFn = makeLegacySendBatchFn;
|
|
166
177
|
const summarizerRequestUrl = "_summarizer";
|
|
@@ -173,7 +184,7 @@ async function createSummarizer(loader, url) {
|
|
|
173
184
|
[internal_1.LoaderHeader.cache]: false,
|
|
174
185
|
[internal_1.LoaderHeader.clientDetails]: {
|
|
175
186
|
capabilities: { interactive: false },
|
|
176
|
-
type:
|
|
187
|
+
type: index_js_4.summarizerClientType,
|
|
177
188
|
},
|
|
178
189
|
[internal_3.DriverHeader.summarizingClient]: true,
|
|
179
190
|
[internal_1.LoaderHeader.reconnect]: false,
|
|
@@ -215,6 +226,7 @@ function lastMessageFromMetadata(metadata) {
|
|
|
215
226
|
/**
|
|
216
227
|
* Represents the runtime of the container. Contains helper functions/state of the container.
|
|
217
228
|
* It will define the store level mappings.
|
|
229
|
+
* @legacy
|
|
218
230
|
* @alpha
|
|
219
231
|
*/
|
|
220
232
|
class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
@@ -262,19 +274,14 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
262
274
|
}
|
|
263
275
|
};
|
|
264
276
|
const [chunks, metadata, electedSummarizerData, aliases, serializedIdCompressor] = await Promise.all([
|
|
265
|
-
tryFetchBlob(
|
|
266
|
-
tryFetchBlob(
|
|
267
|
-
tryFetchBlob(
|
|
268
|
-
tryFetchBlob(
|
|
269
|
-
tryFetchBlob(
|
|
277
|
+
tryFetchBlob(index_js_4.chunksBlobName),
|
|
278
|
+
tryFetchBlob(index_js_4.metadataBlobName),
|
|
279
|
+
tryFetchBlob(index_js_4.electedSummarizerBlobName),
|
|
280
|
+
tryFetchBlob(index_js_4.aliasBlobName),
|
|
281
|
+
tryFetchBlob(index_js_4.idCompressorBlobName),
|
|
270
282
|
]);
|
|
271
283
|
// read snapshot blobs needed for BlobManager to load
|
|
272
|
-
const blobManagerSnapshot = await
|
|
273
|
-
// IContainerContext storage api return type still has undefined in 0.39 package version.
|
|
274
|
-
// So once we release 0.40 container-defn package we can remove this check.
|
|
275
|
-
(0, internal_2.assert)(context.storage !== undefined, 0x256 /* "storage undefined in attached container" */);
|
|
276
|
-
return (0, internal_4.readAndParse)(context.storage, id);
|
|
277
|
-
});
|
|
284
|
+
const blobManagerSnapshot = await (0, index_js_1.loadBlobManagerLoadInfo)(context);
|
|
278
285
|
const messageAtLastSummary = lastMessageFromMetadata(metadata);
|
|
279
286
|
// Verify summary runtime sequence number matches protocol sequence number.
|
|
280
287
|
const runtimeSequenceNumber = messageAtLastSummary?.sequenceNumber;
|
|
@@ -376,7 +383,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
376
383
|
const compressionLz4 = disableCompression !== true &&
|
|
377
384
|
compressionOptions.minimumBatchSizeInBytes !== Infinity &&
|
|
378
385
|
compressionOptions.compressionAlgorithm === "lz4";
|
|
379
|
-
const documentSchemaController = new
|
|
386
|
+
const documentSchemaController = new index_js_4.DocumentsSchemaController(existing, protocolSequenceNumber, metadata?.documentSchema, {
|
|
380
387
|
explicitSchemaControl,
|
|
381
388
|
compressionLz4,
|
|
382
389
|
idCompressorMode,
|
|
@@ -603,7 +610,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
603
610
|
// Values are generally expected to be set from the runtime side.
|
|
604
611
|
this.options = options ?? {};
|
|
605
612
|
this.clientDetails = clientDetails;
|
|
606
|
-
this.isSummarizerClient = this.clientDetails.type ===
|
|
613
|
+
this.isSummarizerClient = this.clientDetails.type === index_js_4.summarizerClientType;
|
|
607
614
|
this.loadedFromVersionId = context.getLoadedFromVersion()?.id;
|
|
608
615
|
this._getClientId = () => context.clientId;
|
|
609
616
|
this._getAttachState = () => context.attachState;
|
|
@@ -652,20 +659,20 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
652
659
|
eventName: "GCFeatureMatrix",
|
|
653
660
|
metadataValue: JSON.stringify(metadata?.gcFeatureMatrix),
|
|
654
661
|
inputs: JSON.stringify({
|
|
655
|
-
gcOptions_gcGeneration: this.runtimeOptions.gcOptions[
|
|
662
|
+
gcOptions_gcGeneration: this.runtimeOptions.gcOptions[index_js_2.gcGenerationOptionName],
|
|
656
663
|
}),
|
|
657
664
|
});
|
|
658
665
|
this.telemetryDocumentId = metadata?.telemetryDocumentId ?? (0, uuid_1.v4)();
|
|
659
666
|
this.disableAttachReorder = this.mc.config.getBoolean("Fluid.ContainerRuntime.disableAttachOpReorder");
|
|
660
667
|
const disableChunking = this.mc.config.getBoolean("Fluid.ContainerRuntime.CompressionChunkingDisabled");
|
|
661
|
-
const opGroupingManager = new
|
|
668
|
+
const opGroupingManager = new index_js_3.OpGroupingManager({
|
|
662
669
|
groupedBatchingEnabled: this.groupedBatchingEnabled,
|
|
663
670
|
opCountThreshold: this.mc.config.getNumber("Fluid.ContainerRuntime.GroupedBatchingOpCount") ?? 2,
|
|
664
671
|
reentrantBatchGroupingEnabled: this.mc.config.getBoolean("Fluid.ContainerRuntime.GroupedBatchingReentrancy") ??
|
|
665
672
|
true,
|
|
666
673
|
}, this.mc.logger);
|
|
667
|
-
const opSplitter = new
|
|
668
|
-
this.remoteMessageProcessor = new
|
|
674
|
+
const opSplitter = new index_js_3.OpSplitter(chunks, this.submitBatchFn, disableChunking === true ? Number.POSITIVE_INFINITY : runtimeOptions.chunkSizeInBytes, runtimeOptions.maxBatchSizeInBytes, this.mc.logger);
|
|
675
|
+
this.remoteMessageProcessor = new index_js_3.RemoteMessageProcessor(opSplitter, new index_js_3.OpDecompressor(this.mc.logger), opGroupingManager);
|
|
669
676
|
const pendingRuntimeState = pendingLocalState;
|
|
670
677
|
this.pendingStateManager = new pendingStateManager_js_1.PendingStateManager({
|
|
671
678
|
applyStashedOp: this.applyStashedOp.bind(this),
|
|
@@ -721,7 +728,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
721
728
|
throw new internal_7.UsageError("Driver's maximumCacheDurationMs policy cannot exceed 5 days");
|
|
722
729
|
}
|
|
723
730
|
}
|
|
724
|
-
this.garbageCollector =
|
|
731
|
+
this.garbageCollector = index_js_2.GarbageCollector.create({
|
|
725
732
|
runtime: this,
|
|
726
733
|
gcOptions: this.runtimeOptions.gcOptions,
|
|
727
734
|
baseSnapshot,
|
|
@@ -737,7 +744,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
737
744
|
sessionExpiryTimerStarted: pendingRuntimeState?.sessionExpiryTimerStarted,
|
|
738
745
|
});
|
|
739
746
|
const loadedFromSequenceNumber = this.deltaManager.initialSequenceNumber;
|
|
740
|
-
this.summarizerNode = (0,
|
|
747
|
+
this.summarizerNode = (0, index_js_4.createRootSummarizerNodeWithGC)((0, internal_7.createChildLogger)({ logger: this.logger, namespace: "SummarizerNode" }),
|
|
741
748
|
// Summarize function to call when summarize is called. Summarizer node always tracks summary state.
|
|
742
749
|
async (fullTree, trackState, telemetryContext) => this.summarizeInternal(fullTree, trackState, telemetryContext),
|
|
743
750
|
// Latest change sequence number, no changes since summary applied yet
|
|
@@ -777,7 +784,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
777
784
|
...props,
|
|
778
785
|
timestampMs: props.timestampMs ?? this.getCurrentReferenceTimestampMs(),
|
|
779
786
|
}), (path) => this.garbageCollector.isNodeDeleted(path), new Map(dataStoreAliasMap), async (runtime) => provideEntryPoint);
|
|
780
|
-
this.blobManager = new
|
|
787
|
+
this.blobManager = new index_js_1.BlobManager({
|
|
781
788
|
routeContext: this.handleContext,
|
|
782
789
|
snapshot: blobManagerSnapshot,
|
|
783
790
|
getStorage: () => this.storage,
|
|
@@ -802,12 +809,12 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
802
809
|
this.scheduleManager = new scheduleManager_js_1.ScheduleManager(this.innerDeltaManager, this, () => this.clientId, (0, internal_7.createChildLogger)({ logger: this.logger, namespace: "ScheduleManager" }));
|
|
803
810
|
const disablePartialFlush = this.mc.config.getBoolean("Fluid.ContainerRuntime.DisablePartialFlush");
|
|
804
811
|
const legacySendBatchFn = (0, exports.makeLegacySendBatchFn)(this.submitFn, this.innerDeltaManager);
|
|
805
|
-
this.outbox = new
|
|
812
|
+
this.outbox = new index_js_3.Outbox({
|
|
806
813
|
shouldSend: () => this.canSendOps(),
|
|
807
814
|
pendingStateManager: this.pendingStateManager,
|
|
808
815
|
submitBatchFn: this.submitBatchFn,
|
|
809
816
|
legacySendBatchFn,
|
|
810
|
-
compressor: new
|
|
817
|
+
compressor: new index_js_3.OpCompressor(this.mc.logger),
|
|
811
818
|
splitter: opSplitter,
|
|
812
819
|
config: {
|
|
813
820
|
compressionOptions,
|
|
@@ -852,7 +859,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
852
859
|
const closeSummarizerDelayOverride = this.mc.config.getNumber("Fluid.ContainerRuntime.Test.CloseSummarizerDelayOverrideMs");
|
|
853
860
|
this.closeSummarizerDelayMs =
|
|
854
861
|
closeSummarizerDelayOverride ?? defaultCloseSummarizerDelayMs;
|
|
855
|
-
this.summaryCollection = new
|
|
862
|
+
this.summaryCollection = new index_js_4.SummaryCollection(this.deltaManager, this.logger);
|
|
856
863
|
this.dirtyContainer =
|
|
857
864
|
this.attachState !== container_definitions_1.AttachState.Attached || this.hasPendingMessages();
|
|
858
865
|
context.updateDirtyContainerState(this.dirtyContainer);
|
|
@@ -864,16 +871,16 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
864
871
|
logger: this.logger,
|
|
865
872
|
namespace: "OrderedClientElection",
|
|
866
873
|
});
|
|
867
|
-
const orderedClientCollection = new
|
|
868
|
-
const orderedClientElectionForSummarizer = new
|
|
869
|
-
this.summarizerClientElection = new
|
|
874
|
+
const orderedClientCollection = new index_js_4.OrderedClientCollection(orderedClientLogger, this.innerDeltaManager, this._quorum);
|
|
875
|
+
const orderedClientElectionForSummarizer = new index_js_4.OrderedClientElection(orderedClientLogger, orderedClientCollection, electedSummarizerData ?? this.innerDeltaManager.lastSequenceNumber, index_js_4.SummarizerClientElection.isClientEligible, this.mc.config.getBoolean("Fluid.ContainerRuntime.OrderedClientElection.EnablePerformanceEvents"));
|
|
876
|
+
this.summarizerClientElection = new index_js_4.SummarizerClientElection(orderedClientLogger, this.summaryCollection, orderedClientElectionForSummarizer, this.maxOpsSinceLastSummary);
|
|
870
877
|
if (this.isSummarizerClient) {
|
|
871
|
-
this._summarizer = new
|
|
878
|
+
this._summarizer = new index_js_4.Summarizer(this /* ISummarizerRuntime */, () => this.summaryConfiguration, this /* ISummarizerInternalsProvider */, this.handleContext, this.summaryCollection, async (runtime) => index_js_4.RunWhileConnectedCoordinator.create(runtime,
|
|
872
879
|
// Summarization runs in summarizer client and needs access to the real (non-proxy) active
|
|
873
880
|
// information. The proxy delta manager would always return false for summarizer client.
|
|
874
881
|
() => this.innerDeltaManager.active));
|
|
875
882
|
}
|
|
876
|
-
else if (
|
|
883
|
+
else if (index_js_4.SummarizerClientElection.clientDetailsPermitElection(this.clientDetails)) {
|
|
877
884
|
// Only create a SummaryManager and SummarizerClientElection
|
|
878
885
|
// if summaries are enabled and we are not the summarizer client.
|
|
879
886
|
const defaultAction = () => {
|
|
@@ -895,7 +902,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
895
902
|
};
|
|
896
903
|
this.summaryCollection.on("default", defaultAction);
|
|
897
904
|
// Create the SummaryManager and mark the initial state
|
|
898
|
-
this.summaryManager = new
|
|
905
|
+
this.summaryManager = new index_js_4.SummaryManager(this.summarizerClientElection, this, // IConnectedState
|
|
899
906
|
this.summaryCollection, this.logger, this.formCreateSummarizerFn(loader), new throttler_js_1.Throttler(60 * 1000, // 60 sec delay window
|
|
900
907
|
30 * 1000, // 30 sec max delay
|
|
901
908
|
// throttling function increases exponentially (0ms, 40ms, 80ms, 160ms, etc)
|
|
@@ -1043,7 +1050,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1043
1050
|
}),
|
|
1044
1051
|
});
|
|
1045
1052
|
// Find the snapshotTree inside the returned snapshot based on the path as given in the request.
|
|
1046
|
-
const hasIsolatedChannels = (0,
|
|
1053
|
+
const hasIsolatedChannels = (0, index_js_4.rootHasIsolatedChannels)(this.metadata);
|
|
1047
1054
|
const snapshotTreeForPath = this.getSnapshotTreeForPath(snapshot.snapshotTree, pathParts, hasIsolatedChannels);
|
|
1048
1055
|
(0, internal_2.assert)(snapshotTreeForPath !== undefined, 0x8ef /* no snapshotTree for the path */);
|
|
1049
1056
|
const snapshotSeqNumber = snapshot.sequenceNumber;
|
|
@@ -1154,7 +1161,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1154
1161
|
// eslint-disable-next-line @typescript-eslint/return-await -- Adding an await here causes test failures
|
|
1155
1162
|
return this.resolveHandle(requestParser.createSubRequest(1));
|
|
1156
1163
|
}
|
|
1157
|
-
if (id ===
|
|
1164
|
+
if (id === index_js_1.blobManagerBasePath && requestParser.isLeaf(2)) {
|
|
1158
1165
|
const blob = await this.blobManager.getBlob(requestParser.pathParts[1]);
|
|
1159
1166
|
return blob
|
|
1160
1167
|
? {
|
|
@@ -1186,7 +1193,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1186
1193
|
addMetadataToSummary(summaryTree) {
|
|
1187
1194
|
// The last message processed at the time of summary. If there are no new messages, use the message from the
|
|
1188
1195
|
// last summary.
|
|
1189
|
-
const message = (0,
|
|
1196
|
+
const message = (0, index_js_4.extractSummaryMetadataMessage)(this.deltaManager.lastMessage) ??
|
|
1190
1197
|
this.messageAtLastSummary;
|
|
1191
1198
|
const documentSchema = this.documentsSchemaController.summarizeDocumentSchema(this.deltaManager.lastSequenceNumber);
|
|
1192
1199
|
// Is document schema explicit control on?
|
|
@@ -1209,31 +1216,31 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1209
1216
|
lastMessage: explicitSchemaControl ? message : undefined,
|
|
1210
1217
|
documentSchema,
|
|
1211
1218
|
};
|
|
1212
|
-
(0, internal_6.addBlobToSummary)(summaryTree,
|
|
1219
|
+
(0, internal_6.addBlobToSummary)(summaryTree, index_js_4.metadataBlobName, JSON.stringify(metadata));
|
|
1213
1220
|
}
|
|
1214
1221
|
addContainerStateToSummary(summaryTree, fullTree, trackState, telemetryContext) {
|
|
1215
1222
|
this.addMetadataToSummary(summaryTree);
|
|
1216
1223
|
if (this._idCompressor) {
|
|
1217
1224
|
const idCompressorState = JSON.stringify(this._idCompressor.serialize(false));
|
|
1218
|
-
(0, internal_6.addBlobToSummary)(summaryTree,
|
|
1225
|
+
(0, internal_6.addBlobToSummary)(summaryTree, index_js_4.idCompressorBlobName, idCompressorState);
|
|
1219
1226
|
}
|
|
1220
1227
|
if (this.remoteMessageProcessor.partialMessages.size > 0) {
|
|
1221
1228
|
const content = JSON.stringify([...this.remoteMessageProcessor.partialMessages]);
|
|
1222
|
-
(0, internal_6.addBlobToSummary)(summaryTree,
|
|
1229
|
+
(0, internal_6.addBlobToSummary)(summaryTree, index_js_4.chunksBlobName, content);
|
|
1223
1230
|
}
|
|
1224
1231
|
const dataStoreAliases = this.channelCollection.aliases;
|
|
1225
1232
|
if (dataStoreAliases.size > 0) {
|
|
1226
|
-
(0, internal_6.addBlobToSummary)(summaryTree,
|
|
1233
|
+
(0, internal_6.addBlobToSummary)(summaryTree, index_js_4.aliasBlobName, JSON.stringify([...dataStoreAliases]));
|
|
1227
1234
|
}
|
|
1228
1235
|
if (this.summarizerClientElection) {
|
|
1229
1236
|
const electedSummarizerContent = JSON.stringify(this.summarizerClientElection?.serialize());
|
|
1230
|
-
(0, internal_6.addBlobToSummary)(summaryTree,
|
|
1237
|
+
(0, internal_6.addBlobToSummary)(summaryTree, index_js_4.electedSummarizerBlobName, electedSummarizerContent);
|
|
1231
1238
|
}
|
|
1232
1239
|
const blobManagerSummary = this.blobManager.summarize();
|
|
1233
1240
|
// Some storage (like git) doesn't allow empty tree, so we can omit it.
|
|
1234
1241
|
// and the blob manager can handle the tree not existing when loading
|
|
1235
1242
|
if (Object.keys(blobManagerSummary.summary.tree).length > 0) {
|
|
1236
|
-
(0, internal_6.addSummarizeResultToSummary)(summaryTree,
|
|
1243
|
+
(0, internal_6.addSummarizeResultToSummary)(summaryTree, index_js_1.blobsTreeName, blobManagerSummary);
|
|
1237
1244
|
}
|
|
1238
1245
|
const gcSummary = this.garbageCollector.summarize(fullTree, trackState, telemetryContext);
|
|
1239
1246
|
if (gcSummary !== undefined) {
|
|
@@ -1468,7 +1475,13 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1468
1475
|
// but will not modify the contents object (likely it will replace it on the message).
|
|
1469
1476
|
const messageCopy = { ...messageArg };
|
|
1470
1477
|
const savedOp = messageCopy.metadata?.savedOp;
|
|
1471
|
-
|
|
1478
|
+
const processResult = this.remoteMessageProcessor.process(messageCopy);
|
|
1479
|
+
if (processResult === undefined) {
|
|
1480
|
+
// This means the incoming message is an incomplete part of a message or batch
|
|
1481
|
+
// and we need to process more messages before the rest of the system can understand it.
|
|
1482
|
+
return;
|
|
1483
|
+
}
|
|
1484
|
+
for (const message of processResult.messages) {
|
|
1472
1485
|
const msg = modernRuntimeMessage
|
|
1473
1486
|
? {
|
|
1474
1487
|
// Cast it since we expect it to be this based on modernRuntimeMessage computation above.
|
|
@@ -1478,12 +1491,14 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1478
1491
|
message: message,
|
|
1479
1492
|
local,
|
|
1480
1493
|
modernRuntimeMessage,
|
|
1494
|
+
batchStartCsn: processResult.batchStartCsn,
|
|
1481
1495
|
}
|
|
1482
1496
|
: // Unrecognized message will be ignored.
|
|
1483
1497
|
{
|
|
1484
1498
|
message,
|
|
1485
1499
|
local,
|
|
1486
1500
|
modernRuntimeMessage,
|
|
1501
|
+
batchStartCsn: processResult.batchStartCsn,
|
|
1487
1502
|
};
|
|
1488
1503
|
msg.savedOp = savedOp;
|
|
1489
1504
|
// ensure that we observe any re-entrancy, and if needed, rebase ops
|
|
@@ -1515,7 +1530,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1515
1530
|
(0, internal_2.assert)(message.type !== messageTypes_js_1.ContainerMessageType.ChunkedOp, 0x93b /* we should never get here with chunked ops */);
|
|
1516
1531
|
let localOpMetadata;
|
|
1517
1532
|
if (local && messageWithContext.modernRuntimeMessage) {
|
|
1518
|
-
localOpMetadata = this.pendingStateManager.processPendingLocalMessage(messageWithContext.message);
|
|
1533
|
+
localOpMetadata = this.pendingStateManager.processPendingLocalMessage(messageWithContext.message, messageWithContext.batchStartCsn);
|
|
1519
1534
|
}
|
|
1520
1535
|
// If there are no more pending messages after processing a local message,
|
|
1521
1536
|
// the document is no longer dirty.
|
|
@@ -1887,14 +1902,14 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1887
1902
|
}
|
|
1888
1903
|
const summarizeResult = this.channelCollection.getAttachSummary(telemetryContext);
|
|
1889
1904
|
// Wrap data store summaries in .channels subtree.
|
|
1890
|
-
(0,
|
|
1905
|
+
(0, index_js_4.wrapSummaryInChannelsTree)(summarizeResult);
|
|
1891
1906
|
this.addContainerStateToSummary(summarizeResult, true /* fullTree */, false /* trackState */, telemetryContext);
|
|
1892
1907
|
return summarizeResult.summary;
|
|
1893
1908
|
}
|
|
1894
1909
|
async summarizeInternal(fullTree, trackState, telemetryContext) {
|
|
1895
1910
|
const summarizeResult = await this.channelCollection.summarize(fullTree, trackState, telemetryContext);
|
|
1896
1911
|
// Wrap data store summaries in .channels subtree.
|
|
1897
|
-
(0,
|
|
1912
|
+
(0, index_js_4.wrapSummaryInChannelsTree)(summarizeResult);
|
|
1898
1913
|
const pathPartsForChildren = [internal_5.channelsTreeName];
|
|
1899
1914
|
// Ensure that ID compressor had a chance to load, if we are using delayed mode.
|
|
1900
1915
|
await this.loadIdCompressor();
|
|
@@ -1999,10 +2014,10 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1999
2014
|
* blob manager.
|
|
2000
2015
|
*/
|
|
2001
2016
|
getNodeType(nodePath) {
|
|
2002
|
-
if (
|
|
2003
|
-
return
|
|
2017
|
+
if ((0, index_js_1.isBlobPath)(nodePath)) {
|
|
2018
|
+
return index_js_2.GCNodeType.Blob;
|
|
2004
2019
|
}
|
|
2005
|
-
return this.channelCollection.getGCNodeType(nodePath) ??
|
|
2020
|
+
return this.channelCollection.getGCNodeType(nodePath) ?? index_js_2.GCNodeType.Other;
|
|
2006
2021
|
}
|
|
2007
2022
|
/**
|
|
2008
2023
|
* Called by GC to retrieve the package path of the node with the given path. The node should belong to a
|
|
@@ -2015,25 +2030,15 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2015
2030
|
return ["_gcRoot"];
|
|
2016
2031
|
}
|
|
2017
2032
|
switch (this.getNodeType(nodePath)) {
|
|
2018
|
-
case
|
|
2019
|
-
return [
|
|
2020
|
-
case
|
|
2021
|
-
case
|
|
2033
|
+
case index_js_2.GCNodeType.Blob:
|
|
2034
|
+
return [index_js_1.blobManagerBasePath];
|
|
2035
|
+
case index_js_2.GCNodeType.DataStore:
|
|
2036
|
+
case index_js_2.GCNodeType.SubDataStore:
|
|
2022
2037
|
return this.channelCollection.getDataStorePackagePath(nodePath);
|
|
2023
2038
|
default:
|
|
2024
2039
|
(0, internal_2.assert)(false, 0x2de /* "Package path requested for unsupported node type." */);
|
|
2025
2040
|
}
|
|
2026
2041
|
}
|
|
2027
|
-
/**
|
|
2028
|
-
* Returns whether a given path is for attachment blobs that are in the format - "/BlobManager.basePath/...".
|
|
2029
|
-
*/
|
|
2030
|
-
isBlobPath(path) {
|
|
2031
|
-
const pathParts = path.split("/");
|
|
2032
|
-
if (pathParts.length < 2 || pathParts[1] !== blobManager_js_1.BlobManager.basePath) {
|
|
2033
|
-
return false;
|
|
2034
|
-
}
|
|
2035
|
-
return true;
|
|
2036
|
-
}
|
|
2037
2042
|
/**
|
|
2038
2043
|
* From a given list of routes, separate and return routes that belong to blob manager and data stores.
|
|
2039
2044
|
* @param routes - A list of routes that can belong to data stores or blob manager.
|
|
@@ -2044,7 +2049,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2044
2049
|
const blobManagerRoutes = [];
|
|
2045
2050
|
const dataStoreRoutes = [];
|
|
2046
2051
|
for (const route of routes) {
|
|
2047
|
-
if (
|
|
2052
|
+
if ((0, index_js_1.isBlobPath)(route)) {
|
|
2048
2053
|
blobManagerRoutes.push(route);
|
|
2049
2054
|
}
|
|
2050
2055
|
else {
|
|
@@ -2176,7 +2181,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2176
2181
|
stage: "base",
|
|
2177
2182
|
referenceSequenceNumber: summaryRefSeqNum,
|
|
2178
2183
|
minimumSequenceNumber,
|
|
2179
|
-
error: new
|
|
2184
|
+
error: new index_js_4.RetriableSummaryError(`Summarizer node state inconsistent with summarizer state.`),
|
|
2180
2185
|
};
|
|
2181
2186
|
}
|
|
2182
2187
|
}
|
|
@@ -2219,7 +2224,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2219
2224
|
stage: "base",
|
|
2220
2225
|
referenceSequenceNumber: summaryRefSeqNum,
|
|
2221
2226
|
minimumSequenceNumber,
|
|
2222
|
-
error: new
|
|
2227
|
+
error: new index_js_4.RetriableSummaryError(continueResult.error),
|
|
2223
2228
|
};
|
|
2224
2229
|
}
|
|
2225
2230
|
const trace = client_utils_1.Trace.start();
|
|
@@ -2237,14 +2242,14 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2237
2242
|
stage: "base",
|
|
2238
2243
|
referenceSequenceNumber: summaryRefSeqNum,
|
|
2239
2244
|
minimumSequenceNumber,
|
|
2240
|
-
error: (0, internal_7.wrapError)(error, (msg) => new
|
|
2245
|
+
error: (0, internal_7.wrapError)(error, (msg) => new index_js_4.RetriableSummaryError(msg)),
|
|
2241
2246
|
};
|
|
2242
2247
|
}
|
|
2243
2248
|
// Validate that the summary generated by summarizer nodes is correct before uploading.
|
|
2244
2249
|
const validateResult = this.summarizerNode.validateSummary();
|
|
2245
2250
|
if (!validateResult.success) {
|
|
2246
2251
|
const { success, ...loggingProps } = validateResult;
|
|
2247
|
-
const error = new
|
|
2252
|
+
const error = new index_js_4.RetriableSummaryError(validateResult.reason, validateResult.retryAfterSeconds, { ...loggingProps });
|
|
2248
2253
|
return {
|
|
2249
2254
|
stage: "base",
|
|
2250
2255
|
referenceSequenceNumber: summaryRefSeqNum,
|
|
@@ -2291,7 +2296,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2291
2296
|
return {
|
|
2292
2297
|
stage: "generate",
|
|
2293
2298
|
...generateSummaryData,
|
|
2294
|
-
error: new
|
|
2299
|
+
error: new index_js_4.RetriableSummaryError(continueResult.error),
|
|
2295
2300
|
};
|
|
2296
2301
|
}
|
|
2297
2302
|
const summaryContext = lastAck === undefined
|
|
@@ -2313,7 +2318,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2313
2318
|
return {
|
|
2314
2319
|
stage: "generate",
|
|
2315
2320
|
...generateSummaryData,
|
|
2316
|
-
error: (0, internal_7.wrapError)(error, (msg) => new
|
|
2321
|
+
error: (0, internal_7.wrapError)(error, (msg) => new index_js_4.RetriableSummaryError(msg)),
|
|
2317
2322
|
};
|
|
2318
2323
|
}
|
|
2319
2324
|
const parent = summaryContext.ackHandle;
|
|
@@ -2334,7 +2339,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2334
2339
|
return {
|
|
2335
2340
|
stage: "upload",
|
|
2336
2341
|
...uploadData,
|
|
2337
|
-
error: new
|
|
2342
|
+
error: new index_js_4.RetriableSummaryError(continueResult.error),
|
|
2338
2343
|
};
|
|
2339
2344
|
}
|
|
2340
2345
|
let clientSequenceNumber;
|
|
@@ -2345,7 +2350,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2345
2350
|
return {
|
|
2346
2351
|
stage: "upload",
|
|
2347
2352
|
...uploadData,
|
|
2348
|
-
error: (0, internal_7.wrapError)(error, (msg) => new
|
|
2353
|
+
error: (0, internal_7.wrapError)(error, (msg) => new index_js_4.RetriableSummaryError(msg)),
|
|
2349
2354
|
};
|
|
2350
2355
|
}
|
|
2351
2356
|
const submitData = {
|
|
@@ -2361,7 +2366,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2361
2366
|
return {
|
|
2362
2367
|
stage: "upload",
|
|
2363
2368
|
...uploadData,
|
|
2364
|
-
error: (0, internal_7.wrapError)(error, (msg) => new
|
|
2369
|
+
error: (0, internal_7.wrapError)(error, (msg) => new index_js_4.RetriableSummaryError(msg)),
|
|
2365
2370
|
};
|
|
2366
2371
|
}
|
|
2367
2372
|
return submitData;
|
|
@@ -2410,7 +2415,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2410
2415
|
// based on telemetry while we decide on a stable number.
|
|
2411
2416
|
const retryDelayMs = this.mc.config.getNumber("Fluid.Summarizer.PendingOpsRetryDelayMs") ??
|
|
2412
2417
|
exports.defaultPendingOpsRetryDelayMs;
|
|
2413
|
-
const error = new
|
|
2418
|
+
const error = new index_js_4.RetriableSummaryError("PendingOpsWhileSummarizing", retryDelayMs / 1000, {
|
|
2414
2419
|
count: this.pendingMessagesCount,
|
|
2415
2420
|
beforeGenerate: beforeSummaryGeneration,
|
|
2416
2421
|
});
|