@fluidframework/container-runtime 2.0.0-internal.5.1.0 → 2.0.0-internal.5.2.0
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/CHANGELOG.md +16 -0
- package/dist/containerRuntime.d.ts +22 -0
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +54 -10
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +2 -1
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStores.d.ts +2 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +0 -1
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- 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/opLifecycle/batchManager.d.ts +2 -1
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +5 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +11 -0
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +1 -1
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +2 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +29 -2
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +87 -19
- package/dist/opLifecycle/outbox.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 +8 -3
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +23 -16
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/index.d.ts +2 -2
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +2 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +1 -1
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizerNode/index.d.ts +1 -1
- package/dist/summary/summarizerNode/index.d.ts.map +1 -1
- package/dist/summary/summarizerNode/index.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +32 -6
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +90 -22
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +22 -2
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +17 -2
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +56 -20
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +7 -1
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -1
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +1 -0
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +2 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +13 -4
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +22 -8
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +2 -1
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +22 -0
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +57 -13
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +2 -1
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStores.d.ts +2 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +0 -1
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- 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/opLifecycle/batchManager.d.ts +2 -1
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +5 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +11 -0
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +1 -1
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js +1 -1
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +29 -2
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +85 -18
- package/lib/opLifecycle/outbox.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 +8 -3
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +23 -16
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/index.d.ts +2 -2
- 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/runningSummarizer.d.ts +1 -1
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizerNode/index.d.ts +1 -1
- package/lib/summary/summarizerNode/index.d.ts.map +1 -1
- package/lib/summary/summarizerNode/index.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +32 -6
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +90 -22
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +22 -2
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +17 -2
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +56 -20
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +7 -1
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -1
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +1 -0
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +2 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +13 -4
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +20 -7
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +2 -1
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +17 -17
- package/src/containerRuntime.ts +82 -14
- package/src/dataStoreContext.ts +8 -2
- package/src/dataStoreContexts.ts +2 -1
- package/src/dataStores.ts +2 -2
- package/src/gc/gcDefinitions.ts +0 -1
- package/src/index.ts +2 -0
- package/src/opLifecycle/batchManager.ts +9 -1
- package/src/opLifecycle/definitions.ts +11 -0
- package/src/opLifecycle/index.ts +1 -1
- package/src/opLifecycle/outbox.ts +107 -16
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +38 -34
- package/src/summary/index.ts +3 -1
- package/src/summary/runningSummarizer.ts +1 -1
- package/src/summary/summarizerNode/index.ts +1 -0
- package/src/summary/summarizerNode/summarizerNode.ts +107 -25
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +25 -2
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +61 -19
- package/src/summary/summarizerTypes.ts +10 -1
- package/src/summary/summaryCollection.ts +2 -1
- package/src/summary/summaryFormat.ts +5 -1
- package/src/summary/summaryGenerator.ts +31 -8
- package/src/summary/summaryManager.ts +2 -1
package/lib/containerRuntime.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { AttachState, LoaderHeader, } from "@fluidframework/container-definitions";
|
|
2
13
|
import { assert, delay, LazyPromise, Trace, TypedEventEmitter, unreachableCase, } from "@fluidframework/common-utils";
|
|
3
14
|
import { ChildLogger, raiseConnectedEvent, PerformanceEvent, TaggedLoggerAdapter, loggerToMonitoringContext, wrapError, } from "@fluidframework/telemetry-utils";
|
|
@@ -11,17 +22,17 @@ import { v4 as uuid } from "uuid";
|
|
|
11
22
|
import { ContainerFluidHandleContext } from "./containerHandleContext";
|
|
12
23
|
import { FluidDataStoreRegistry } from "./dataStoreRegistry";
|
|
13
24
|
import { ReportOpPerfTelemetry } from "./connectionTelemetry";
|
|
14
|
-
import { PendingStateManager } from "./pendingStateManager";
|
|
25
|
+
import { PendingStateManager, } from "./pendingStateManager";
|
|
15
26
|
import { pkgVersion } from "./packageVersion";
|
|
16
27
|
import { BlobManager } from "./blobManager";
|
|
17
28
|
import { DataStores, getSummaryForDatastores } from "./dataStores";
|
|
18
|
-
import { aliasBlobName, blobsTreeName, chunksBlobName, createRootSummarizerNodeWithGC, electedSummarizerBlobName, extractSummaryMetadataMessage, idCompressorBlobName, metadataBlobName, Summarizer, SummaryManager, wrapSummaryInChannelsTree, SummaryCollection, OrderedClientCollection, OrderedClientElection, SummarizerClientElection, summarizerClientType, RunWhileConnectedCoordinator, } from "./summary";
|
|
29
|
+
import { aliasBlobName, blobsTreeName, chunksBlobName, createRootSummarizerNodeWithGC, electedSummarizerBlobName, extractSummaryMetadataMessage, idCompressorBlobName, metadataBlobName, Summarizer, SummaryManager, wrapSummaryInChannelsTree, SummaryCollection, OrderedClientCollection, OrderedClientElection, SummarizerClientElection, summarizerClientType, RunWhileConnectedCoordinator, RetriableSummaryError, } from "./summary";
|
|
19
30
|
import { formExponentialFn, Throttler } from "./throttler";
|
|
20
31
|
import { GarbageCollector, GCNodeType, gcTombstoneGenerationOptionName, shouldAllowGcTombstoneEnforcement, trimLeadingAndTrailingSlashes, } from "./gc";
|
|
21
32
|
import { channelToDataStore, isDataStoreAliasMessage } from "./dataStore";
|
|
22
33
|
import { BindBatchTracker } from "./batchTracker";
|
|
23
34
|
import { ScheduleManager } from "./scheduleManager";
|
|
24
|
-
import { OpCompressor, OpDecompressor, Outbox, OpSplitter, RemoteMessageProcessor, OpGroupingManager, } from "./opLifecycle";
|
|
35
|
+
import { OpCompressor, OpDecompressor, Outbox, OpSplitter, RemoteMessageProcessor, OpGroupingManager, getLongStack, } from "./opLifecycle";
|
|
25
36
|
import { DeltaManagerSummarizerProxy } from "./deltaManagerSummarizerProxy";
|
|
26
37
|
export var ContainerMessageType;
|
|
27
38
|
(function (ContainerMessageType) {
|
|
@@ -151,7 +162,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
151
162
|
* @internal
|
|
152
163
|
*/
|
|
153
164
|
constructor(context, registry, metadata, electedSummarizerData, chunks, dataStoreAliasMap, runtimeOptions, containerScope, logger, existing, blobManagerSnapshot, _storage, idCompressor, requestHandler, summaryConfiguration, initializeEntryPoint) {
|
|
154
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
165
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
155
166
|
if (summaryConfiguration === void 0) { summaryConfiguration = Object.assign(Object.assign({}, DefaultSummaryConfiguration), (_a = runtimeOptions.summaryOptions) === null || _a === void 0 ? void 0 : _a.summaryConfigOverrides); }
|
|
156
167
|
super();
|
|
157
168
|
this.context = context;
|
|
@@ -303,7 +314,6 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
303
314
|
getNodePackagePath: async (nodePath) => this.getGCNodePackagePath(nodePath),
|
|
304
315
|
getLastSummaryTimestampMs: () => { var _a; return (_a = this.messageAtLastSummary) === null || _a === void 0 ? void 0 : _a.timestamp; },
|
|
305
316
|
readAndParseBlob: async (id) => readAndParse(this.storage, id),
|
|
306
|
-
getContainerDiagnosticId: () => this.context.id,
|
|
307
317
|
// GC runs in summarizer client and needs access to the real (non-proxy) active information. The proxy
|
|
308
318
|
// delta manager would always return false for summarizer client.
|
|
309
319
|
activeConnection: () => this.innerDeltaManager.active,
|
|
@@ -348,7 +358,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
348
358
|
close: this.closeFn,
|
|
349
359
|
connected: () => this.connected,
|
|
350
360
|
reSubmit: this.reSubmit.bind(this),
|
|
351
|
-
|
|
361
|
+
reSubmitBatch: this.reSubmitBatch.bind(this),
|
|
352
362
|
}, pendingRuntimeState === null || pendingRuntimeState === void 0 ? void 0 : pendingRuntimeState.pending);
|
|
353
363
|
const disableCompression = this.mc.config.getBoolean("Fluid.ContainerRuntime.CompressionDisabled");
|
|
354
364
|
const compressionOptions = disableCompression === true
|
|
@@ -358,6 +368,8 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
358
368
|
}
|
|
359
369
|
: runtimeOptions.compressionOptions;
|
|
360
370
|
const disablePartialFlush = this.mc.config.getBoolean("Fluid.ContainerRuntime.DisablePartialFlush");
|
|
371
|
+
const enableBatchRebasing = runtimeOptions.enableBatchRebasing &&
|
|
372
|
+
this.mc.config.getBoolean("Fluid.ContainerRuntime.DisableBatchRebasing") !== true;
|
|
361
373
|
this.outbox = new Outbox({
|
|
362
374
|
shouldSend: () => this.canSendOps(),
|
|
363
375
|
pendingStateManager: this.pendingStateManager,
|
|
@@ -368,6 +380,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
368
380
|
compressionOptions,
|
|
369
381
|
maxBatchSizeInBytes: runtimeOptions.maxBatchSizeInBytes,
|
|
370
382
|
disablePartialFlush: disablePartialFlush === true,
|
|
383
|
+
enableBatchRebasing,
|
|
371
384
|
},
|
|
372
385
|
logger: this.mc.logger,
|
|
373
386
|
groupingManager: opGroupingManager,
|
|
@@ -375,13 +388,18 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
375
388
|
referenceSequenceNumber: this.deltaManager.lastSequenceNumber,
|
|
376
389
|
clientSequenceNumber: this._processedClientSequenceNumber,
|
|
377
390
|
}),
|
|
391
|
+
reSubmit: this.reSubmit.bind(this),
|
|
392
|
+
opReentrancy: () => this.ensureNoDataModelChangesCalls > 0,
|
|
393
|
+
closeContainer: this.closeFn,
|
|
378
394
|
});
|
|
379
395
|
this.context.quorum.on("removeMember", (clientId) => {
|
|
380
396
|
this.remoteMessageProcessor.clearPartialMessagesFor(clientId);
|
|
381
397
|
});
|
|
382
|
-
this.summaryStateUpdateMethod = this.mc.config.getString("Fluid.ContainerRuntime.Test.
|
|
398
|
+
this.summaryStateUpdateMethod = this.mc.config.getString("Fluid.ContainerRuntime.Test.SummaryStateUpdateMethodV2");
|
|
383
399
|
const closeSummarizerDelayOverride = this.mc.config.getNumber("Fluid.ContainerRuntime.Test.CloseSummarizerDelayOverrideMs");
|
|
384
400
|
this.closeSummarizerDelayMs = closeSummarizerDelayOverride !== null && closeSummarizerDelayOverride !== void 0 ? closeSummarizerDelayOverride : defaultCloseSummarizerDelayMs;
|
|
401
|
+
this.validateSummaryBeforeUpload =
|
|
402
|
+
(_l = this.mc.config.getBoolean("Fluid.ContainerRuntime.Test.ValidateSummaryBeforeUpload")) !== null && _l !== void 0 ? _l : false;
|
|
385
403
|
this.summaryCollection = new SummaryCollection(this.deltaManager, this.logger);
|
|
386
404
|
this.dirtyContainer =
|
|
387
405
|
this.context.attachState !== AttachState.Attached ||
|
|
@@ -462,6 +480,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
462
480
|
idCompressorEnabled: this.idCompressorEnabled,
|
|
463
481
|
summaryStateUpdateMethod: this.summaryStateUpdateMethod,
|
|
464
482
|
closeSummarizerDelayOverride,
|
|
483
|
+
enableBatchRebasing,
|
|
465
484
|
}), telemetryDocumentId: this.telemetryDocumentId, groupedBatchingEnabled: this.groupedBatchingEnabled }));
|
|
466
485
|
ReportOpPerfTelemetry(this.context.clientId, this.deltaManager, this.logger);
|
|
467
486
|
BindBatchTracker(this, this.logger);
|
|
@@ -529,7 +548,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
529
548
|
runtimeVersion: pkgVersion,
|
|
530
549
|
},
|
|
531
550
|
});
|
|
532
|
-
const { summaryOptions = {}, gcOptions = {}, loadSequenceNumberVerification = "close", flushMode = defaultFlushMode, compressionOptions = defaultCompressionConfig, maxBatchSizeInBytes = defaultMaxBatchSizeInBytes, enableRuntimeIdCompressor = false, chunkSizeInBytes = defaultChunkSizeInBytes, enableOpReentryCheck = false, enableGroupedBatching = false, } = runtimeOptions;
|
|
551
|
+
const { summaryOptions = {}, gcOptions = {}, loadSequenceNumberVerification = "close", flushMode = defaultFlushMode, compressionOptions = defaultCompressionConfig, maxBatchSizeInBytes = defaultMaxBatchSizeInBytes, enableRuntimeIdCompressor = false, chunkSizeInBytes = defaultChunkSizeInBytes, enableOpReentryCheck = false, enableGroupedBatching = false, enableBatchRebasing = false, } = runtimeOptions;
|
|
533
552
|
const registry = new FluidDataStoreRegistry(registryEntries);
|
|
534
553
|
const tryFetchBlob = async (blobName) => {
|
|
535
554
|
var _a;
|
|
@@ -598,6 +617,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
598
617
|
enableRuntimeIdCompressor,
|
|
599
618
|
enableOpReentryCheck,
|
|
600
619
|
enableGroupedBatching,
|
|
620
|
+
enableBatchRebasing,
|
|
601
621
|
}, containerScope, logger, loadExisting, blobManagerSnapshot, context.storage, idCompressor, requestHandler, undefined, // summaryConfiguration
|
|
602
622
|
initializeEntryPoint);
|
|
603
623
|
// It's possible to have ops with a reference sequence number of 0. Op sequence numbers start
|
|
@@ -1690,6 +1710,16 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1690
1710
|
generateDuration: trace.trace().duration,
|
|
1691
1711
|
forcedFullTree,
|
|
1692
1712
|
};
|
|
1713
|
+
// If validateSummaryBeforeUpload is true, validate that the summary generated by the summarizer nodes is
|
|
1714
|
+
// correct before this summary is uploaded.
|
|
1715
|
+
if (this.validateSummaryBeforeUpload) {
|
|
1716
|
+
const validateResult = this.summarizerNode.validateSummary();
|
|
1717
|
+
if (!validateResult.success) {
|
|
1718
|
+
const { success } = validateResult, loggingProps = __rest(validateResult, ["success"]);
|
|
1719
|
+
const error = new RetriableSummaryError(validateResult.reason, validateResult.retryAfterSeconds, Object.assign({}, loggingProps));
|
|
1720
|
+
return Object.assign(Object.assign({ stage: "base" }, generateSummaryData), { error });
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1693
1723
|
continueResult = checkContinue();
|
|
1694
1724
|
if (!continueResult.continue) {
|
|
1695
1725
|
return Object.assign(Object.assign({ stage: "generate" }, generateSummaryData), { error: continueResult.error });
|
|
@@ -1750,7 +1780,13 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1750
1780
|
return Object.assign(Object.assign({ stage: "upload" }, uploadData), { error });
|
|
1751
1781
|
}
|
|
1752
1782
|
const submitData = Object.assign(Object.assign({ stage: "submit" }, uploadData), { clientSequenceNumber, submitOpDuration: trace.trace().duration });
|
|
1753
|
-
|
|
1783
|
+
try {
|
|
1784
|
+
// If validateSummaryBeforeUpload is false, the summary should be validated in this step.
|
|
1785
|
+
this.summarizerNode.completeSummary(handle, !this.validateSummaryBeforeUpload /* validate */);
|
|
1786
|
+
}
|
|
1787
|
+
catch (error) {
|
|
1788
|
+
return Object.assign(Object.assign({ stage: "upload" }, uploadData), { error });
|
|
1789
|
+
}
|
|
1754
1790
|
return submitData;
|
|
1755
1791
|
}
|
|
1756
1792
|
finally {
|
|
@@ -1960,7 +1996,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1960
1996
|
if (this.opReentryCallsToReport > 0) {
|
|
1961
1997
|
this.mc.logger.sendTelemetryEvent({ eventName: "OpReentry" },
|
|
1962
1998
|
// We need to capture the call stack in order to inspect the source of this usage pattern
|
|
1963
|
-
new UsageError(errorMessage));
|
|
1999
|
+
getLongStack(() => new UsageError(errorMessage)));
|
|
1964
2000
|
this.opReentryCallsToReport--;
|
|
1965
2001
|
}
|
|
1966
2002
|
// Creating ops while processing ops can lead
|
|
@@ -1980,10 +2016,18 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1980
2016
|
}
|
|
1981
2017
|
}
|
|
1982
2018
|
}
|
|
1983
|
-
|
|
2019
|
+
reSubmitBatch(batch) {
|
|
2020
|
+
this.orderSequentially(() => {
|
|
2021
|
+
for (const message of batch) {
|
|
2022
|
+
this.reSubmit(message);
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
this.flush();
|
|
2026
|
+
}
|
|
2027
|
+
reSubmit(message) {
|
|
1984
2028
|
// Need to parse from string for back-compat
|
|
1985
|
-
const { contents, type } = this.parseOpContent(content);
|
|
1986
|
-
this.reSubmitCore(type, contents, localOpMetadata, opMetadata);
|
|
2029
|
+
const { contents, type } = this.parseOpContent(message.content);
|
|
2030
|
+
this.reSubmitCore(type, contents, message.localOpMetadata, message.opMetadata);
|
|
1987
2031
|
}
|
|
1988
2032
|
/**
|
|
1989
2033
|
* Finds the right store and asks it to resubmit the message. This typically happens when we
|