@fluidframework/container-runtime 2.0.0-dev.4.4.0.162574 → 2.0.0-dev.5.3.2.178189
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 +69 -0
- package/dist/batchTracker.d.ts +4 -4
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +2 -2
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +5 -2
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +53 -24
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +2 -2
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +8 -1
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +19 -7
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +98 -22
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +2 -2
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +1 -1
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +3 -4
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +5 -5
- 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 +2 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStores.d.ts +1 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +2 -1
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaScheduler.d.ts +2 -2
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +1 -1
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +2 -2
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +4 -3
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +3 -4
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +5 -5
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/id-compressor/idCompressor.d.ts +2 -2
- package/dist/id-compressor/idCompressor.d.ts.map +1 -1
- package/dist/id-compressor/idCompressor.js.map +1 -1
- package/dist/id-compressor/uuidUtilities.d.ts +0 -2
- package/dist/id-compressor/uuidUtilities.d.ts.map +1 -1
- package/dist/id-compressor/uuidUtilities.js +1 -3
- package/dist/id-compressor/uuidUtilities.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/metadata.d.ts +18 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +7 -0
- package/dist/metadata.js.map +1 -0
- 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 +13 -2
- 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/opCompressor.d.ts +2 -2
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +3 -6
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +2 -2
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +14 -8
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +6 -11
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +2 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +5 -3
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +35 -4
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +135 -45
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +3 -1
- 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 +24 -15
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +67 -72
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts +2 -2
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +8 -2
- package/dist/scheduleManager.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/orderedClientElection.d.ts +4 -3
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +3 -18
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +4 -3
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +5 -6
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +2 -3
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +2 -3
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +3 -2
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +2 -2
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.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 +41 -14
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +91 -23
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +24 -4
- 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 +23 -8
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +60 -23
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +16 -9
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +4 -2
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +4 -0
- 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 +14 -5
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +23 -9
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +4 -2
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/lib/batchTracker.d.ts +4 -4
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +2 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +5 -2
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +53 -24
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +2 -2
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +8 -1
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +19 -7
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +101 -25
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +2 -2
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +1 -1
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +3 -4
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +5 -5
- 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 +2 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStores.d.ts +1 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +2 -1
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaScheduler.d.ts +2 -2
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +1 -1
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +2 -2
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +2 -1
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +3 -4
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +5 -5
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +1 -1
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/id-compressor/idCompressor.d.ts +2 -2
- package/lib/id-compressor/idCompressor.d.ts.map +1 -1
- package/lib/id-compressor/idCompressor.js.map +1 -1
- package/lib/id-compressor/uuidUtilities.d.ts +0 -2
- package/lib/id-compressor/uuidUtilities.d.ts.map +1 -1
- package/lib/id-compressor/uuidUtilities.js +1 -3
- package/lib/id-compressor/uuidUtilities.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/metadata.d.ts +18 -0
- package/lib/metadata.d.ts.map +1 -0
- package/lib/metadata.js +6 -0
- package/lib/metadata.js.map +1 -0
- 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 +13 -2
- 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/opCompressor.d.ts +2 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +3 -6
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +2 -2
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +14 -8
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +6 -11
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +2 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +5 -3
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +35 -4
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +133 -44
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +3 -1
- 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 +24 -15
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +67 -72
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts +2 -2
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +8 -2
- package/lib/scheduleManager.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/orderedClientElection.d.ts +4 -3
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +3 -18
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +4 -3
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +5 -6
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +2 -3
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +2 -3
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +3 -2
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +2 -2
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.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 +41 -14
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +91 -23
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +24 -4
- 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 +23 -8
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +59 -22
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +16 -9
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +4 -2
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +4 -0
- 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 +14 -5
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +21 -8
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +4 -2
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +1 -1
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +25 -41
- package/src/batchTracker.ts +5 -6
- package/src/blobManager.ts +70 -29
- package/src/connectionTelemetry.ts +14 -6
- package/src/containerRuntime.ts +124 -38
- package/src/dataStore.ts +3 -4
- package/src/dataStoreContext.ts +12 -9
- package/src/dataStoreContexts.ts +6 -8
- package/src/dataStores.ts +8 -3
- package/src/deltaScheduler.ts +2 -3
- package/src/gc/garbageCollection.ts +7 -6
- package/src/gc/gcDefinitions.ts +3 -4
- package/src/gc/gcTelemetry.ts +9 -5
- package/src/id-compressor/idCompressor.ts +2 -2
- package/src/id-compressor/uuidUtilities.ts +1 -4
- package/src/index.ts +2 -0
- package/src/metadata.ts +19 -0
- package/src/opLifecycle/README.md +20 -0
- package/src/opLifecycle/batchManager.ts +9 -1
- package/src/opLifecycle/definitions.ts +13 -2
- package/src/opLifecycle/index.ts +1 -1
- package/src/opLifecycle/opCompressor.ts +4 -8
- package/src/opLifecycle/opDecompressor.ts +43 -16
- package/src/opLifecycle/opGroupingManager.ts +19 -13
- package/src/opLifecycle/opSplitter.ts +7 -6
- package/src/opLifecycle/outbox.ts +172 -57
- package/src/opLifecycle/remoteMessageProcessor.ts +5 -1
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +113 -129
- package/src/scheduleManager.ts +18 -10
- package/src/summary/index.ts +3 -1
- package/src/summary/orderedClientElection.ts +7 -20
- package/src/summary/runningSummarizer.ts +11 -10
- package/src/summary/summarizer.ts +8 -8
- package/src/summary/summarizerClientElection.ts +3 -2
- package/src/summary/summarizerHeuristics.ts +2 -2
- package/src/summary/summarizerNode/index.ts +1 -0
- package/src/summary/summarizerNode/summarizerNode.ts +121 -38
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +27 -4
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +73 -27
- package/src/summary/summarizerTypes.ts +19 -14
- package/src/summary/summaryCollection.ts +10 -4
- package/src/summary/summaryFormat.ts +5 -1
- package/src/summary/summaryGenerator.ts +38 -11
- package/src/summary/summaryManager.ts +9 -9
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
7
|
-
import { assert } from "@fluidframework/common-utils";
|
|
8
|
-
import { IContainerContext } from "@fluidframework/container-definitions";
|
|
9
|
-
import { GenericError, UsageError } from "@fluidframework/container-utils";
|
|
10
|
-
import { MessageType } from "@fluidframework/protocol-definitions";
|
|
11
6
|
import {
|
|
7
|
+
ITelemetryLoggerExt,
|
|
12
8
|
ChildLogger,
|
|
13
9
|
loggerToMonitoringContext,
|
|
14
10
|
MonitoringContext,
|
|
15
11
|
} from "@fluidframework/telemetry-utils";
|
|
12
|
+
import { assert } from "@fluidframework/common-utils";
|
|
13
|
+
import { IContainerContext, ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
14
|
+
import { GenericError, UsageError } from "@fluidframework/container-utils";
|
|
15
|
+
import { MessageType } from "@fluidframework/protocol-definitions";
|
|
16
16
|
import { ICompressionRuntimeOptions } from "../containerRuntime";
|
|
17
|
-
import { PendingStateManager } from "../pendingStateManager";
|
|
17
|
+
import { IPendingBatchMessage, PendingStateManager } from "../pendingStateManager";
|
|
18
18
|
import {
|
|
19
19
|
BatchManager,
|
|
20
20
|
BatchSequenceNumbers,
|
|
@@ -31,6 +31,7 @@ export interface IOutboxConfig {
|
|
|
31
31
|
// The maximum size of a batch that we can send over the wire.
|
|
32
32
|
readonly maxBatchSizeInBytes: number;
|
|
33
33
|
readonly disablePartialFlush: boolean;
|
|
34
|
+
readonly enableGroupedBatching: boolean;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export interface IOutboxParameters {
|
|
@@ -40,21 +41,43 @@ export interface IOutboxParameters {
|
|
|
40
41
|
readonly config: IOutboxConfig;
|
|
41
42
|
readonly compressor: OpCompressor;
|
|
42
43
|
readonly splitter: OpSplitter;
|
|
43
|
-
readonly logger:
|
|
44
|
+
readonly logger: ITelemetryLoggerExt;
|
|
44
45
|
readonly groupingManager: OpGroupingManager;
|
|
45
46
|
readonly getCurrentSequenceNumbers: () => BatchSequenceNumbers;
|
|
47
|
+
readonly reSubmit: (message: IPendingBatchMessage) => void;
|
|
48
|
+
readonly opReentrancy: () => boolean;
|
|
49
|
+
readonly closeContainer: (error?: ICriticalContainerError) => void;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Temporarily increase the stack limit while executing the provided action.
|
|
54
|
+
* If a negative value is provided for `length`, no stack frames will be collected.
|
|
55
|
+
* If Infinity is provided, all frames will be collected.
|
|
56
|
+
*
|
|
57
|
+
* ADO:4663 - add this to the common packages.
|
|
58
|
+
*
|
|
59
|
+
* @param action - action which returns an error
|
|
60
|
+
* @param length - number of stack frames to collect, 50 if unspecified.
|
|
61
|
+
* @returns the result of the action provided
|
|
62
|
+
*/
|
|
63
|
+
export function getLongStack<T>(action: () => T, length: number = 50): T {
|
|
64
|
+
const errorObj = Error as any;
|
|
65
|
+
if (
|
|
66
|
+
(
|
|
67
|
+
Object.getOwnPropertyDescriptor(errorObj, "stackTraceLimit") ||
|
|
68
|
+
Object.getOwnPropertyDescriptor(Object.getPrototypeOf(errorObj), "stackTraceLimit") ||
|
|
69
|
+
{}
|
|
70
|
+
).writable !== true
|
|
71
|
+
) {
|
|
72
|
+
return action();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const originalStackTraceLimit = errorObj.stackTraceLimit;
|
|
50
76
|
try {
|
|
51
|
-
|
|
52
|
-
(Error as any).stackTraceLimit = 50;
|
|
53
|
-
const result = action();
|
|
54
|
-
(Error as any).stackTraceLimit = originalStackTraceLimit;
|
|
55
|
-
return result;
|
|
56
|
-
} catch (error) {
|
|
77
|
+
errorObj.stackTraceLimit = length;
|
|
57
78
|
return action();
|
|
79
|
+
} finally {
|
|
80
|
+
errorObj.stackTraceLimit = originalStackTraceLimit;
|
|
58
81
|
}
|
|
59
82
|
}
|
|
60
83
|
|
|
@@ -62,7 +85,10 @@ export class Outbox {
|
|
|
62
85
|
private readonly mc: MonitoringContext;
|
|
63
86
|
private readonly attachFlowBatch: BatchManager;
|
|
64
87
|
private readonly mainBatch: BatchManager;
|
|
88
|
+
private readonly blobAttachBatch: BatchManager;
|
|
65
89
|
private readonly defaultAttachFlowSoftLimitInBytes = 320 * 1024;
|
|
90
|
+
private batchRebasesToReport = 5;
|
|
91
|
+
private rebasing = false;
|
|
66
92
|
|
|
67
93
|
/**
|
|
68
94
|
* Track the number of ops which were detected to have a mismatched
|
|
@@ -84,10 +110,15 @@ export class Outbox {
|
|
|
84
110
|
|
|
85
111
|
this.attachFlowBatch = new BatchManager({ hardLimit, softLimit });
|
|
86
112
|
this.mainBatch = new BatchManager({ hardLimit });
|
|
113
|
+
this.blobAttachBatch = new BatchManager({ hardLimit });
|
|
87
114
|
}
|
|
88
115
|
|
|
89
116
|
public get isEmpty(): boolean {
|
|
90
|
-
return
|
|
117
|
+
return (
|
|
118
|
+
this.attachFlowBatch.length === 0 &&
|
|
119
|
+
this.mainBatch.length === 0 &&
|
|
120
|
+
this.blobAttachBatch.length === 0
|
|
121
|
+
);
|
|
91
122
|
}
|
|
92
123
|
|
|
93
124
|
/**
|
|
@@ -99,9 +130,11 @@ export class Outbox {
|
|
|
99
130
|
private maybeFlushPartialBatch() {
|
|
100
131
|
const mainBatchSeqNums = this.mainBatch.sequenceNumbers;
|
|
101
132
|
const attachFlowBatchSeqNums = this.attachFlowBatch.sequenceNumbers;
|
|
133
|
+
const blobAttachSeqNums = this.blobAttachBatch.sequenceNumbers;
|
|
102
134
|
assert(
|
|
103
135
|
this.params.config.disablePartialFlush ||
|
|
104
|
-
sequenceNumbersMatch(mainBatchSeqNums, attachFlowBatchSeqNums)
|
|
136
|
+
(sequenceNumbersMatch(mainBatchSeqNums, attachFlowBatchSeqNums) &&
|
|
137
|
+
sequenceNumbersMatch(mainBatchSeqNums, blobAttachSeqNums)),
|
|
105
138
|
0x58d /* Reference sequence numbers from both batches must be in sync */,
|
|
106
139
|
);
|
|
107
140
|
|
|
@@ -109,7 +142,8 @@ export class Outbox {
|
|
|
109
142
|
|
|
110
143
|
if (
|
|
111
144
|
sequenceNumbersMatch(mainBatchSeqNums, currentSequenceNumbers) &&
|
|
112
|
-
sequenceNumbersMatch(attachFlowBatchSeqNums, currentSequenceNumbers)
|
|
145
|
+
sequenceNumbersMatch(attachFlowBatchSeqNums, currentSequenceNumbers) &&
|
|
146
|
+
sequenceNumbersMatch(blobAttachSeqNums, currentSequenceNumbers)
|
|
113
147
|
) {
|
|
114
148
|
// The reference sequence numbers are stable, there is nothing to do
|
|
115
149
|
return;
|
|
@@ -124,6 +158,8 @@ export class Outbox {
|
|
|
124
158
|
mainClientSequenceNumber: mainBatchSeqNums.clientSequenceNumber,
|
|
125
159
|
attachReferenceSequenceNumber: attachFlowBatchSeqNums.referenceSequenceNumber,
|
|
126
160
|
attachClientSequenceNumber: attachFlowBatchSeqNums.clientSequenceNumber,
|
|
161
|
+
blobAttachReferenceSequenceNumber: blobAttachSeqNums.referenceSequenceNumber,
|
|
162
|
+
blobAttachClientSequenceNumber: blobAttachSeqNums.clientSequenceNumber,
|
|
127
163
|
currentReferenceSequenceNumber: currentSequenceNumbers.referenceSequenceNumber,
|
|
128
164
|
currentClientSequenceNumber: currentSequenceNumbers.clientSequenceNumber,
|
|
129
165
|
},
|
|
@@ -132,26 +168,14 @@ export class Outbox {
|
|
|
132
168
|
}
|
|
133
169
|
|
|
134
170
|
if (!this.params.config.disablePartialFlush) {
|
|
135
|
-
this.
|
|
171
|
+
this.flushAll();
|
|
136
172
|
}
|
|
137
173
|
}
|
|
138
174
|
|
|
139
175
|
public submit(message: BatchMessage) {
|
|
140
176
|
this.maybeFlushPartialBatch();
|
|
141
177
|
|
|
142
|
-
|
|
143
|
-
!this.mainBatch.push(
|
|
144
|
-
message,
|
|
145
|
-
this.params.getCurrentSequenceNumbers().clientSequenceNumber,
|
|
146
|
-
)
|
|
147
|
-
) {
|
|
148
|
-
throw new GenericError("BatchTooLarge", /* error */ undefined, {
|
|
149
|
-
opSize: message.contents?.length ?? 0,
|
|
150
|
-
batchSize: this.mainBatch.contentSizeInBytes,
|
|
151
|
-
count: this.mainBatch.length,
|
|
152
|
-
limit: this.mainBatch.options.hardLimit,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
178
|
+
this.addMessageToBatchManager(this.mainBatch, message);
|
|
155
179
|
}
|
|
156
180
|
|
|
157
181
|
public submitAttach(message: BatchMessage) {
|
|
@@ -160,26 +184,16 @@ export class Outbox {
|
|
|
160
184
|
if (
|
|
161
185
|
!this.attachFlowBatch.push(
|
|
162
186
|
message,
|
|
187
|
+
this.isContextReentrant(),
|
|
163
188
|
this.params.getCurrentSequenceNumbers().clientSequenceNumber,
|
|
164
189
|
)
|
|
165
190
|
) {
|
|
166
191
|
// BatchManager has two limits - soft limit & hard limit. Soft limit is only engaged
|
|
167
192
|
// when queue is not empty.
|
|
168
193
|
// Flush queue & retry. Failure on retry would mean - single message is bigger than hard limit
|
|
169
|
-
this.flushInternal(this.attachFlowBatch
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
message,
|
|
173
|
-
this.params.getCurrentSequenceNumbers().clientSequenceNumber,
|
|
174
|
-
)
|
|
175
|
-
) {
|
|
176
|
-
throw new GenericError("BatchTooLarge", /* error */ undefined, {
|
|
177
|
-
opSize: message.contents?.length ?? 0,
|
|
178
|
-
batchSize: this.attachFlowBatch.contentSizeInBytes,
|
|
179
|
-
count: this.attachFlowBatch.length,
|
|
180
|
-
limit: this.attachFlowBatch.options.hardLimit,
|
|
181
|
-
});
|
|
182
|
-
}
|
|
194
|
+
this.flushInternal(this.attachFlowBatch);
|
|
195
|
+
|
|
196
|
+
this.addMessageToBatchManager(this.attachFlowBatch, message);
|
|
183
197
|
}
|
|
184
198
|
|
|
185
199
|
// If compression is enabled, we will always successfully receive
|
|
@@ -191,23 +205,122 @@ export class Outbox {
|
|
|
191
205
|
this.attachFlowBatch.contentSizeInBytes >=
|
|
192
206
|
this.params.config.compressionOptions.minimumBatchSizeInBytes
|
|
193
207
|
) {
|
|
194
|
-
this.flushInternal(this.attachFlowBatch
|
|
208
|
+
this.flushInternal(this.attachFlowBatch);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
public submitBlobAttach(message: BatchMessage) {
|
|
213
|
+
this.maybeFlushPartialBatch();
|
|
214
|
+
|
|
215
|
+
this.addMessageToBatchManager(this.blobAttachBatch, message);
|
|
216
|
+
|
|
217
|
+
// If compression is enabled, we will always successfully receive
|
|
218
|
+
// blobAttach ops and compress then send them at the next JS turn, regardless
|
|
219
|
+
// of the overall size of the accumulated ops in the batch.
|
|
220
|
+
// However, it is more efficient to flush these ops faster, preferably
|
|
221
|
+
// after they reach a size which would benefit from compression.
|
|
222
|
+
if (
|
|
223
|
+
this.blobAttachBatch.contentSizeInBytes >=
|
|
224
|
+
this.params.config.compressionOptions.minimumBatchSizeInBytes
|
|
225
|
+
) {
|
|
226
|
+
this.flushInternal(this.blobAttachBatch);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
private addMessageToBatchManager(batchManager: BatchManager, message: BatchMessage) {
|
|
231
|
+
if (
|
|
232
|
+
!batchManager.push(
|
|
233
|
+
message,
|
|
234
|
+
this.isContextReentrant(),
|
|
235
|
+
this.params.getCurrentSequenceNumbers().clientSequenceNumber,
|
|
236
|
+
)
|
|
237
|
+
) {
|
|
238
|
+
throw new GenericError("BatchTooLarge", /* error */ undefined, {
|
|
239
|
+
opSize: message.contents?.length ?? 0,
|
|
240
|
+
batchSize: batchManager.contentSizeInBytes,
|
|
241
|
+
count: batchManager.length,
|
|
242
|
+
limit: batchManager.options.hardLimit,
|
|
243
|
+
});
|
|
195
244
|
}
|
|
196
245
|
}
|
|
197
246
|
|
|
198
247
|
public flush() {
|
|
199
|
-
|
|
200
|
-
|
|
248
|
+
if (this.isContextReentrant()) {
|
|
249
|
+
const error = new UsageError("Flushing is not supported inside DDS event handlers");
|
|
250
|
+
this.params.closeContainer(error);
|
|
251
|
+
throw error;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
this.flushAll();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
private flushAll() {
|
|
258
|
+
this.flushInternal(this.attachFlowBatch);
|
|
259
|
+
this.flushInternal(this.blobAttachBatch, true /* disableGroupedBatching */);
|
|
260
|
+
this.flushInternal(this.mainBatch);
|
|
201
261
|
}
|
|
202
262
|
|
|
203
|
-
private flushInternal(
|
|
204
|
-
|
|
263
|
+
private flushInternal(batchManager: BatchManager, disableGroupedBatching: boolean = false) {
|
|
264
|
+
if (batchManager.empty) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const rawBatch = batchManager.popBatch();
|
|
269
|
+
if (rawBatch.hasReentrantOps === true && this.params.config.enableGroupedBatching) {
|
|
270
|
+
assert(!this.rebasing, 0x6fa /* A rebased batch should never have reentrant ops */);
|
|
271
|
+
// If a batch contains reentrant ops (ops created as a result from processing another op)
|
|
272
|
+
// it needs to be rebased so that we can ensure consistent reference sequence numbers
|
|
273
|
+
// and eventual consistency at the DDS level.
|
|
274
|
+
this.rebase(rawBatch, batchManager);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const processedBatch = this.compressBatch(rawBatch, disableGroupedBatching);
|
|
205
279
|
this.sendBatch(processedBatch);
|
|
206
280
|
|
|
207
281
|
this.persistBatch(rawBatch.content);
|
|
208
282
|
}
|
|
209
283
|
|
|
210
|
-
|
|
284
|
+
/**
|
|
285
|
+
* Rebases a batch. All the ops in the batch are resubmitted to the runtime and
|
|
286
|
+
* they will end up back in the same batch manager they were flushed from and subsequently flushed.
|
|
287
|
+
*
|
|
288
|
+
* @param rawBatch - the batch to be rebased
|
|
289
|
+
*/
|
|
290
|
+
private rebase(rawBatch: IBatch, batchManager: BatchManager) {
|
|
291
|
+
assert(!this.rebasing, 0x6fb /* Reentrancy */);
|
|
292
|
+
|
|
293
|
+
this.rebasing = true;
|
|
294
|
+
for (const message of rawBatch.content) {
|
|
295
|
+
this.params.reSubmit({
|
|
296
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
297
|
+
content: message.contents!,
|
|
298
|
+
localOpMetadata: message.localOpMetadata,
|
|
299
|
+
opMetadata: message.metadata,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (this.batchRebasesToReport > 0) {
|
|
304
|
+
this.mc.logger.sendTelemetryEvent(
|
|
305
|
+
{
|
|
306
|
+
eventName: "BatchRebase",
|
|
307
|
+
length: rawBatch.content.length,
|
|
308
|
+
referenceSequenceNumber: rawBatch.referenceSequenceNumber,
|
|
309
|
+
},
|
|
310
|
+
new UsageError("BatchRebase"),
|
|
311
|
+
);
|
|
312
|
+
this.batchRebasesToReport--;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
this.flushInternal(batchManager);
|
|
316
|
+
this.rebasing = false;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
private isContextReentrant(): boolean {
|
|
320
|
+
return this.params.opReentrancy() && !this.rebasing;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
private compressBatch(batch: IBatch, disableGroupedBatching: boolean): IBatch {
|
|
211
324
|
if (
|
|
212
325
|
batch.content.length === 0 ||
|
|
213
326
|
this.params.config.compressionOptions === undefined ||
|
|
@@ -216,11 +329,11 @@ export class Outbox {
|
|
|
216
329
|
this.params.containerContext.submitBatchFn === undefined
|
|
217
330
|
) {
|
|
218
331
|
// Nothing to do if the batch is empty or if compression is disabled or not supported, or if we don't need to compress
|
|
219
|
-
return this.params.groupingManager.groupBatch(batch);
|
|
332
|
+
return disableGroupedBatching ? batch : this.params.groupingManager.groupBatch(batch);
|
|
220
333
|
}
|
|
221
334
|
|
|
222
335
|
const compressedBatch = this.params.compressor.compressBatch(
|
|
223
|
-
this.params.groupingManager.groupBatch(batch),
|
|
336
|
+
disableGroupedBatching ? batch : this.params.groupingManager.groupBatch(batch),
|
|
224
337
|
);
|
|
225
338
|
|
|
226
339
|
if (this.params.splitter.isBatchChunkingEnabled) {
|
|
@@ -279,7 +392,8 @@ export class Outbox {
|
|
|
279
392
|
for (const message of batch.content) {
|
|
280
393
|
this.params.containerContext.submitFn(
|
|
281
394
|
MessageType.Operation,
|
|
282
|
-
|
|
395
|
+
// For back-compat (submitFn only works on deserialized content)
|
|
396
|
+
message.contents === undefined ? undefined : JSON.parse(message.contents),
|
|
283
397
|
true, // batch
|
|
284
398
|
message.metadata,
|
|
285
399
|
);
|
|
@@ -308,9 +422,9 @@ export class Outbox {
|
|
|
308
422
|
// In future, need to shift toward keeping batch as a whole!
|
|
309
423
|
for (const message of batch) {
|
|
310
424
|
this.params.pendingStateManager.onSubmitMessage(
|
|
311
|
-
|
|
425
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
426
|
+
message.contents!,
|
|
312
427
|
message.referenceSequenceNumber,
|
|
313
|
-
message.deserializedContent.contents,
|
|
314
428
|
message.localOpMetadata,
|
|
315
429
|
message.metadata,
|
|
316
430
|
);
|
|
@@ -321,6 +435,7 @@ export class Outbox {
|
|
|
321
435
|
return {
|
|
322
436
|
mainBatch: this.mainBatch.checkpoint(),
|
|
323
437
|
attachFlowBatch: this.attachFlowBatch.checkpoint(),
|
|
438
|
+
blobAttachBatch: this.blobAttachBatch.checkpoint(),
|
|
324
439
|
};
|
|
325
440
|
}
|
|
326
441
|
}
|
|
@@ -120,7 +120,11 @@ export function unpackRuntimeMessage(message: ISequencedDocumentMessage): boolea
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// legacy op format?
|
|
123
|
-
if
|
|
123
|
+
// TODO: Unsure if this is a real format we should be concerned with. There doesn't appear to be anything prepared to handle the address member.
|
|
124
|
+
if (
|
|
125
|
+
(message.contents as { address?: unknown }).address !== undefined &&
|
|
126
|
+
(message.contents as { type?: unknown }).type === undefined
|
|
127
|
+
) {
|
|
124
128
|
message.type = ContainerMessageType.FluidDataStoreOp;
|
|
125
129
|
} else {
|
|
126
130
|
// new format
|
package/src/packageVersion.ts
CHANGED