@fluidframework/container-runtime 2.31.0 → 2.32.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 +8 -0
- package/container-runtime.test-files.tar +0 -0
- package/dist/channelCollection.d.ts +0 -14
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +10 -25
- package/dist/channelCollection.js.map +1 -1
- package/dist/containerRuntime.d.ts +16 -9
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +137 -103
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -5
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +0 -8
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +3 -7
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +4 -4
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +4 -4
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +40 -6
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +4 -3
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +4 -3
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +10 -11
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +19 -18
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +9 -5
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +18 -22
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSerialization.d.ts +20 -0
- package/dist/opLifecycle/opSerialization.d.ts.map +1 -0
- package/dist/opLifecycle/opSerialization.js +40 -0
- package/dist/opLifecycle/opSerialization.js.map +1 -0
- package/dist/opLifecycle/opSplitter.d.ts +12 -13
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +13 -13
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +16 -18
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +57 -43
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +0 -7
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +1 -15
- 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 +2 -2
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +1 -1
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/runtimeLayerCompatState.d.ts.map +1 -1
- package/dist/runtimeLayerCompatState.js +6 -5
- package/dist/runtimeLayerCompatState.js.map +1 -1
- package/dist/summary/index.d.ts +5 -8
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +20 -21
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.js +9 -9
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +0 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +3 -3
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +3 -75
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js +2 -0
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/{lib/summary/summaryGenerator.d.ts → dist/summary/summarizerUtils.d.ts} +12 -43
- package/dist/summary/summarizerUtils.d.ts.map +1 -0
- package/dist/summary/summarizerUtils.js +71 -0
- package/dist/summary/summarizerUtils.js.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/index.d.ts +10 -0
- package/dist/summary/summaryDelayLoadedModule/index.d.ts.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/index.js +20 -0
- package/dist/summary/summaryDelayLoadedModule/index.js.map +1 -0
- package/dist/summary/{runWhileConnectedCoordinator.d.ts → summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts} +1 -1
- package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.js.map +1 -0
- package/dist/summary/{runningSummarizer.d.ts → summaryDelayLoadedModule/runningSummarizer.d.ts} +4 -13
- package/dist/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -0
- package/dist/summary/{runningSummarizer.js → summaryDelayLoadedModule/runningSummarizer.js} +17 -24
- package/dist/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -0
- package/dist/summary/{summarizer.d.ts → summaryDelayLoadedModule/summarizer.d.ts} +13 -2
- package/dist/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -0
- package/dist/summary/{summarizer.js → summaryDelayLoadedModule/summarizer.js} +13 -3
- package/dist/summary/summaryDelayLoadedModule/summarizer.js.map +1 -0
- package/{lib/summary → dist/summary/summaryDelayLoadedModule}/summarizerHeuristics.d.ts +3 -3
- package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +36 -0
- package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -0
- package/dist/summary/{summaryGenerator.js → summaryDelayLoadedModule/summaryGenerator.js} +14 -99
- package/dist/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts +21 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.js +44 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.js.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts +80 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts.map +1 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.js +7 -0
- package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.js.map +1 -0
- package/dist/summary/summaryHelpers.d.ts +1 -1
- package/dist/summary/summaryHelpers.d.ts.map +1 -1
- package/dist/summary/summaryHelpers.js +2 -2
- package/dist/summary/summaryHelpers.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +4 -3
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +2 -2
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/channelCollection.d.ts +0 -14
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +6 -21
- package/lib/channelCollection.js.map +1 -1
- package/lib/containerRuntime.d.ts +16 -9
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +140 -106
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -5
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +0 -8
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/messageTypes.d.ts +3 -7
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +4 -4
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +4 -4
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +40 -6
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +4 -3
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js +3 -2
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +10 -11
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +20 -19
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +9 -5
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +18 -22
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSerialization.d.ts +20 -0
- package/lib/opLifecycle/opSerialization.d.ts.map +1 -0
- package/lib/opLifecycle/opSerialization.js +35 -0
- package/lib/opLifecycle/opSerialization.js.map +1 -0
- package/lib/opLifecycle/opSplitter.d.ts +12 -13
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +13 -13
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +16 -18
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +56 -41
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +0 -7
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +0 -13
- 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 +2 -2
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +1 -1
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/runtimeLayerCompatState.d.ts.map +1 -1
- package/lib/runtimeLayerCompatState.js +3 -2
- package/lib/runtimeLayerCompatState.js.map +1 -1
- package/lib/summary/index.d.ts +5 -8
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +5 -7
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.js +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +0 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +3 -75
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/{dist/summary/summaryGenerator.d.ts → lib/summary/summarizerUtils.d.ts} +12 -43
- package/lib/summary/summarizerUtils.d.ts.map +1 -0
- package/lib/summary/summarizerUtils.js +64 -0
- package/lib/summary/summarizerUtils.js.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/index.d.ts +10 -0
- package/lib/summary/summaryDelayLoadedModule/index.d.ts.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/index.js +9 -0
- package/lib/summary/summaryDelayLoadedModule/index.js.map +1 -0
- package/lib/summary/{runWhileConnectedCoordinator.d.ts → summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts} +1 -1
- package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.js.map +1 -0
- package/lib/summary/{runningSummarizer.d.ts → summaryDelayLoadedModule/runningSummarizer.d.ts} +4 -13
- package/lib/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -0
- package/lib/summary/{runningSummarizer.js → summaryDelayLoadedModule/runningSummarizer.js} +5 -12
- package/lib/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -0
- package/lib/summary/{summarizer.d.ts → summaryDelayLoadedModule/summarizer.d.ts} +13 -2
- package/lib/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -0
- package/lib/summary/{summarizer.js → summaryDelayLoadedModule/summarizer.js} +11 -1
- package/lib/summary/summaryDelayLoadedModule/summarizer.js.map +1 -0
- package/{dist/summary → lib/summary/summaryDelayLoadedModule}/summarizerHeuristics.d.ts +3 -3
- package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +36 -0
- package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -0
- package/lib/summary/{summaryGenerator.js → summaryDelayLoadedModule/summaryGenerator.js} +4 -85
- package/lib/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts +21 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.js +40 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.js.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts +80 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts.map +1 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.js +6 -0
- package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.js.map +1 -0
- package/lib/summary/summaryHelpers.d.ts +1 -1
- package/lib/summary/summaryHelpers.d.ts.map +1 -1
- package/lib/summary/summaryHelpers.js +1 -1
- package/lib/summary/summaryHelpers.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +4 -3
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +2 -2
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +21 -20
- package/src/channelCollection.ts +5 -20
- package/src/containerRuntime.ts +220 -178
- package/src/dataStoreContext.ts +0 -11
- package/src/index.ts +0 -1
- package/src/messageTypes.ts +5 -19
- package/src/opLifecycle/batchManager.ts +19 -12
- package/src/opLifecycle/definitions.ts +45 -6
- package/src/opLifecycle/index.ts +14 -3
- package/src/opLifecycle/opCompressor.ts +25 -24
- package/src/opLifecycle/opGroupingManager.ts +27 -26
- package/src/opLifecycle/opSerialization.ts +46 -0
- package/src/opLifecycle/opSplitter.ts +20 -16
- package/src/opLifecycle/outbox.ts +101 -66
- package/src/opLifecycle/remoteMessageProcessor.ts +0 -17
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +3 -3
- package/src/runtimeLayerCompatState.ts +3 -2
- package/src/summary/index.ts +35 -31
- package/src/summary/orderedClientElection.ts +1 -1
- package/src/summary/summarizerClientElection.ts +1 -2
- package/src/summary/summarizerTypes.ts +7 -91
- package/src/summary/summarizerUtils.ts +132 -0
- package/src/summary/summaryDelayLoadedModule/index.ts +28 -0
- package/src/summary/{runWhileConnectedCoordinator.ts → summaryDelayLoadedModule/runWhileConnectedCoordinator.ts} +1 -1
- package/src/summary/{runningSummarizer.ts → summaryDelayLoadedModule/runningSummarizer.ts} +13 -28
- package/src/summary/{summarizer.ts → summaryDelayLoadedModule/summarizer.ts} +19 -8
- package/src/summary/{summarizerHeuristics.ts → summaryDelayLoadedModule/summarizerHeuristics.ts} +3 -3
- package/src/summary/{summaryGenerator.ts → summaryDelayLoadedModule/summaryGenerator.ts} +13 -179
- package/src/summary/summaryDelayLoadedModule/summaryResultBuilder.ts +70 -0
- package/src/summary/summaryDelayLoadedModule/summaryResultTypes.ts +100 -0
- package/src/summary/summaryHelpers.ts +6 -6
- package/src/summary/summaryManager.ts +8 -6
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +0 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +0 -1
- package/dist/summary/runningSummarizer.d.ts.map +0 -1
- package/dist/summary/runningSummarizer.js.map +0 -1
- package/dist/summary/summarizer.d.ts.map +0 -1
- package/dist/summary/summarizer.js.map +0 -1
- package/dist/summary/summarizerHeuristics.d.ts.map +0 -1
- package/dist/summary/summarizerHeuristics.js.map +0 -1
- package/dist/summary/summaryGenerator.d.ts.map +0 -1
- package/dist/summary/summaryGenerator.js.map +0 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +0 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +0 -1
- package/lib/summary/runningSummarizer.d.ts.map +0 -1
- package/lib/summary/runningSummarizer.js.map +0 -1
- package/lib/summary/summarizer.d.ts.map +0 -1
- package/lib/summary/summarizer.js.map +0 -1
- package/lib/summary/summarizerHeuristics.d.ts.map +0 -1
- package/lib/summary/summarizerHeuristics.js.map +0 -1
- package/lib/summary/summaryGenerator.d.ts.map +0 -1
- package/lib/summary/summaryGenerator.js.map +0 -1
- /package/dist/summary/{runWhileConnectedCoordinator.js → summaryDelayLoadedModule/runWhileConnectedCoordinator.js} +0 -0
- /package/dist/summary/{summarizerHeuristics.js → summaryDelayLoadedModule/summarizerHeuristics.js} +0 -0
- /package/lib/summary/{runWhileConnectedCoordinator.js → summaryDelayLoadedModule/runWhileConnectedCoordinator.js} +0 -0
- /package/lib/summary/{summarizerHeuristics.js → summaryDelayLoadedModule/summarizerHeuristics.js} +0 -0
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
7
6
|
import { IBatchMessage } from "@fluidframework/container-definitions/internal";
|
|
8
7
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
9
8
|
import { assert, Lazy } from "@fluidframework/core-utils/internal";
|
|
@@ -16,7 +15,6 @@ import {
|
|
|
16
15
|
} from "@fluidframework/telemetry-utils/internal";
|
|
17
16
|
|
|
18
17
|
import { ICompressionRuntimeOptions } from "../containerRuntime.js";
|
|
19
|
-
import { OutboundContainerRuntimeMessage } from "../messageTypes.js";
|
|
20
18
|
import { PendingMessageResubmitData, PendingStateManager } from "../pendingStateManager.js";
|
|
21
19
|
|
|
22
20
|
import {
|
|
@@ -26,12 +24,17 @@ import {
|
|
|
26
24
|
sequenceNumbersMatch,
|
|
27
25
|
type BatchId,
|
|
28
26
|
} from "./batchManager.js";
|
|
29
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
LocalBatchMessage,
|
|
29
|
+
IBatchCheckpoint,
|
|
30
|
+
type OutboundBatchMessage,
|
|
31
|
+
type OutboundSingletonBatch,
|
|
32
|
+
type LocalBatch,
|
|
33
|
+
type OutboundBatch,
|
|
34
|
+
} from "./definitions.js";
|
|
30
35
|
import { OpCompressor } from "./opCompressor.js";
|
|
31
36
|
import { OpGroupingManager } from "./opGroupingManager.js";
|
|
32
37
|
import { OpSplitter } from "./opSplitter.js";
|
|
33
|
-
// eslint-disable-next-line unused-imports/no-unused-imports -- Used by "@link" comment annotation below
|
|
34
|
-
import { ensureContentsDeserialized } from "./remoteMessageProcessor.js";
|
|
35
38
|
|
|
36
39
|
export interface IOutboxConfig {
|
|
37
40
|
readonly compressionOptions: ICompressionRuntimeOptions;
|
|
@@ -53,7 +56,7 @@ export interface IOutboxParameters {
|
|
|
53
56
|
readonly submitBatchFn:
|
|
54
57
|
| ((batch: IBatchMessage[], referenceSequenceNumber?: number) => number)
|
|
55
58
|
| undefined;
|
|
56
|
-
readonly legacySendBatchFn: (batch:
|
|
59
|
+
readonly legacySendBatchFn: (batch: OutboundBatch) => number;
|
|
57
60
|
readonly config: IOutboxConfig;
|
|
58
61
|
readonly compressor: OpCompressor;
|
|
59
62
|
readonly splitter: OpSplitter;
|
|
@@ -62,15 +65,6 @@ export interface IOutboxParameters {
|
|
|
62
65
|
readonly getCurrentSequenceNumbers: () => BatchSequenceNumbers;
|
|
63
66
|
readonly reSubmit: (message: PendingMessageResubmitData) => void;
|
|
64
67
|
readonly opReentrancy: () => boolean;
|
|
65
|
-
readonly closeContainer: (error?: ICriticalContainerError) => void;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Before submitting an op to the Outbox, its contents must be serialized using this function.
|
|
70
|
-
* @remarks - The deserialization on process happens via the function {@link ensureContentsDeserialized}.
|
|
71
|
-
*/
|
|
72
|
-
export function serializeOpContents(contents: OutboundContainerRuntimeMessage): string {
|
|
73
|
-
return JSON.stringify(contents);
|
|
74
68
|
}
|
|
75
69
|
|
|
76
70
|
/**
|
|
@@ -258,25 +252,28 @@ export class Outbox {
|
|
|
258
252
|
throw errorWrapper.value;
|
|
259
253
|
}
|
|
260
254
|
|
|
261
|
-
public submit(message:
|
|
255
|
+
public submit(message: LocalBatchMessage): void {
|
|
262
256
|
this.maybeFlushPartialBatch();
|
|
263
257
|
|
|
264
258
|
this.addMessageToBatchManager(this.mainBatch, message);
|
|
265
259
|
}
|
|
266
260
|
|
|
267
|
-
public submitBlobAttach(message:
|
|
261
|
+
public submitBlobAttach(message: LocalBatchMessage): void {
|
|
268
262
|
this.maybeFlushPartialBatch();
|
|
269
263
|
|
|
270
264
|
this.addMessageToBatchManager(this.blobAttachBatch, message);
|
|
271
265
|
}
|
|
272
266
|
|
|
273
|
-
public submitIdAllocation(message:
|
|
267
|
+
public submitIdAllocation(message: LocalBatchMessage): void {
|
|
274
268
|
this.maybeFlushPartialBatch();
|
|
275
269
|
|
|
276
270
|
this.addMessageToBatchManager(this.idAllocationBatch, message);
|
|
277
271
|
}
|
|
278
272
|
|
|
279
|
-
private addMessageToBatchManager(
|
|
273
|
+
private addMessageToBatchManager(
|
|
274
|
+
batchManager: BatchManager,
|
|
275
|
+
message: LocalBatchMessage,
|
|
276
|
+
): void {
|
|
280
277
|
if (
|
|
281
278
|
!batchManager.push(
|
|
282
279
|
message,
|
|
@@ -285,7 +282,7 @@ export class Outbox {
|
|
|
285
282
|
)
|
|
286
283
|
) {
|
|
287
284
|
throw new GenericError("BatchTooLarge", /* error */ undefined, {
|
|
288
|
-
opSize: message.
|
|
285
|
+
opSize: message.serializedOp?.length ?? 0,
|
|
289
286
|
batchSize: batchManager.contentSizeInBytes,
|
|
290
287
|
count: batchManager.length,
|
|
291
288
|
limit: batchManager.options.hardLimit,
|
|
@@ -296,15 +293,16 @@ export class Outbox {
|
|
|
296
293
|
/**
|
|
297
294
|
* Flush all the batches to the ordering service.
|
|
298
295
|
* This method is expected to be called at the end of a batch.
|
|
296
|
+
*
|
|
297
|
+
* @throws If called from a reentrant context, or if the batch being flushed is too large.
|
|
299
298
|
* @param resubmittingBatchId - If defined, indicates this is a resubmission of a batch
|
|
300
299
|
* with the given Batch ID, which must be preserved
|
|
301
300
|
*/
|
|
302
301
|
public flush(resubmittingBatchId?: BatchId): void {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
302
|
+
assert(
|
|
303
|
+
!this.isContextReentrant(),
|
|
304
|
+
0xb7b /* Flushing must not happen while incoming changes are being processed */,
|
|
305
|
+
);
|
|
308
306
|
|
|
309
307
|
this.flushAll(resubmittingBatchId);
|
|
310
308
|
}
|
|
@@ -346,16 +344,19 @@ export class Outbox {
|
|
|
346
344
|
referenceSequenceNumber !== undefined,
|
|
347
345
|
0xa01 /* reference sequence number should be defined */,
|
|
348
346
|
);
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
347
|
+
const { outboundBatch, placeholderMessage } =
|
|
348
|
+
this.params.groupingManager.createEmptyGroupedBatch(
|
|
349
|
+
resubmittingBatchId,
|
|
350
|
+
referenceSequenceNumber,
|
|
351
|
+
);
|
|
353
352
|
let clientSequenceNumber: number | undefined;
|
|
354
353
|
if (this.params.shouldSend()) {
|
|
355
|
-
clientSequenceNumber = this.sendBatch(
|
|
354
|
+
clientSequenceNumber = this.sendBatch(outboundBatch);
|
|
356
355
|
}
|
|
356
|
+
|
|
357
|
+
// Push the empty batch placeholder to the PendingStateManager
|
|
357
358
|
this.params.pendingStateManager.onFlushBatch(
|
|
358
|
-
|
|
359
|
+
[{ ...placeholderMessage, serializedOp: "", contents: undefined }], // placeholder message - serializedOp will never be used
|
|
359
360
|
clientSequenceNumber,
|
|
360
361
|
);
|
|
361
362
|
return;
|
|
@@ -371,9 +372,16 @@ export class Outbox {
|
|
|
371
372
|
}
|
|
372
373
|
|
|
373
374
|
const rawBatch = batchManager.popBatch(resubmittingBatchId);
|
|
374
|
-
const
|
|
375
|
-
!disableGroupedBatching && this.params.groupingManager.
|
|
376
|
-
if (
|
|
375
|
+
const groupingEnabled =
|
|
376
|
+
!disableGroupedBatching && this.params.groupingManager.groupedBatchingEnabled();
|
|
377
|
+
if (
|
|
378
|
+
batchManager.options.canRebase &&
|
|
379
|
+
rawBatch.hasReentrantOps === true &&
|
|
380
|
+
// NOTE: This is too restrictive. We should rebase for any reentrant op, not just if it's going to be a grouped batch
|
|
381
|
+
// However there is some test that is depending on this behavior so we haven't removed these conditions yet. See AB#33427
|
|
382
|
+
groupingEnabled &&
|
|
383
|
+
rawBatch.messages.length > 1
|
|
384
|
+
) {
|
|
377
385
|
assert(!this.rebasing, 0x6fa /* A rebased batch should never have reentrant ops */);
|
|
378
386
|
// If a batch contains reentrant ops (ops created as a result from processing another op)
|
|
379
387
|
// it needs to be rebased so that we can ensure consistent reference sequence numbers
|
|
@@ -387,12 +395,9 @@ export class Outbox {
|
|
|
387
395
|
// If so, do nothing, as pending state manager will resubmit it correctly on reconnect.
|
|
388
396
|
// Because flush() is a task that executes async (on clean stack), we can get here in disconnected state.
|
|
389
397
|
if (this.params.shouldSend()) {
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
shouldGroup ? this.params.groupingManager.groupBatch(rawBatch) : rawBatch,
|
|
394
|
-
);
|
|
395
|
-
clientSequenceNumber = this.sendBatch(processedBatch);
|
|
398
|
+
const virtualizedBatch = this.virtualizeBatch(rawBatch, groupingEnabled);
|
|
399
|
+
|
|
400
|
+
clientSequenceNumber = this.sendBatch(virtualizedBatch);
|
|
396
401
|
assert(
|
|
397
402
|
clientSequenceNumber === undefined || clientSequenceNumber >= 0,
|
|
398
403
|
0x9d2 /* unexpected negative clientSequenceNumber (empty batch should yield undefined) */,
|
|
@@ -412,15 +417,14 @@ export class Outbox {
|
|
|
412
417
|
*
|
|
413
418
|
* @param rawBatch - the batch to be rebased
|
|
414
419
|
*/
|
|
415
|
-
private rebase(rawBatch:
|
|
420
|
+
private rebase(rawBatch: LocalBatch, batchManager: BatchManager): void {
|
|
416
421
|
assert(!this.rebasing, 0x6fb /* Reentrancy */);
|
|
417
422
|
assert(batchManager.options.canRebase, 0x9a7 /* BatchManager does not support rebase */);
|
|
418
423
|
|
|
419
424
|
this.rebasing = true;
|
|
420
425
|
for (const message of rawBatch.messages) {
|
|
421
426
|
this.params.reSubmit({
|
|
422
|
-
|
|
423
|
-
content: message.contents!,
|
|
427
|
+
content: message.serializedOp,
|
|
424
428
|
localOpMetadata: message.localOpMetadata,
|
|
425
429
|
opMetadata: message.metadata,
|
|
426
430
|
});
|
|
@@ -447,45 +451,76 @@ export class Outbox {
|
|
|
447
451
|
}
|
|
448
452
|
|
|
449
453
|
/**
|
|
450
|
-
* As necessary and enabled, compresses
|
|
454
|
+
* As necessary and enabled, groups / compresses / chunks the given batch.
|
|
451
455
|
*
|
|
452
456
|
* @remarks - If chunking happens, a side effect here is that 1 or more chunks are queued immediately for sending in next JS turn.
|
|
453
457
|
*
|
|
454
|
-
* @param
|
|
455
|
-
* @
|
|
456
|
-
*
|
|
458
|
+
* @param localBatch - Local Batch to be virtualized - i.e. transformed into an Outbound Batch
|
|
459
|
+
* @param groupingEnabled - If true, Grouped batching is enabled.
|
|
460
|
+
* @returns One of the following:
|
|
461
|
+
* - (A) The original batch (Based on what's enabled)
|
|
462
|
+
* - (B) A grouped batch (it's a singleton batch)
|
|
463
|
+
* - (C) A compressed singleton batch
|
|
464
|
+
* - (D) A singleton batch containing the last chunk.
|
|
457
465
|
*/
|
|
458
|
-
private
|
|
466
|
+
private virtualizeBatch(localBatch: LocalBatch, groupingEnabled: boolean): OutboundBatch {
|
|
467
|
+
// Shallow copy the local batch, updating the messages to be outbound messages
|
|
468
|
+
const originalBatch: OutboundBatch = {
|
|
469
|
+
...localBatch,
|
|
470
|
+
messages: localBatch.messages.map<OutboundBatchMessage>(
|
|
471
|
+
({ serializedOp, ...message }) => ({
|
|
472
|
+
contents: serializedOp,
|
|
473
|
+
...message,
|
|
474
|
+
}),
|
|
475
|
+
),
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
const originalOrGroupedBatch = groupingEnabled
|
|
479
|
+
? this.params.groupingManager.groupBatch(originalBatch)
|
|
480
|
+
: originalBatch;
|
|
481
|
+
|
|
482
|
+
if (originalOrGroupedBatch.messages.length !== 1) {
|
|
483
|
+
// Compression requires a single message, so return early otherwise.
|
|
484
|
+
return originalOrGroupedBatch;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// Regardless of whether we grouped or not, we now have a batch with a single message.
|
|
488
|
+
// Now proceed to compress/chunk it if necessary.
|
|
489
|
+
const singletonBatch = originalOrGroupedBatch as OutboundSingletonBatch;
|
|
490
|
+
|
|
459
491
|
if (
|
|
460
|
-
batch.messages.length === 0 ||
|
|
461
492
|
this.params.config.compressionOptions === undefined ||
|
|
462
493
|
this.params.config.compressionOptions.minimumBatchSizeInBytes >
|
|
463
|
-
|
|
464
|
-
this.params.submitBatchFn === undefined
|
|
465
|
-
!this.params.groupingManager.groupedBatchingEnabled()
|
|
494
|
+
singletonBatch.contentSizeInBytes ||
|
|
495
|
+
this.params.submitBatchFn === undefined
|
|
466
496
|
) {
|
|
467
|
-
// Nothing to do if
|
|
468
|
-
return
|
|
497
|
+
// Nothing to do if compression is disabled, unnecessary or unsupported.
|
|
498
|
+
return singletonBatch;
|
|
469
499
|
}
|
|
470
500
|
|
|
471
|
-
const compressedBatch = this.params.compressor.compressBatch(
|
|
501
|
+
const compressedBatch = this.params.compressor.compressBatch(singletonBatch);
|
|
472
502
|
|
|
473
503
|
if (this.params.splitter.isBatchChunkingEnabled) {
|
|
474
504
|
return compressedBatch.contentSizeInBytes <= this.params.splitter.chunkSizeInBytes
|
|
475
505
|
? compressedBatch
|
|
476
|
-
: this.params.splitter.
|
|
506
|
+
: this.params.splitter.splitSingletonBatchMessage(compressedBatch);
|
|
477
507
|
}
|
|
478
508
|
|
|
479
509
|
if (compressedBatch.contentSizeInBytes >= this.params.config.maxBatchSizeInBytes) {
|
|
480
|
-
throw
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
510
|
+
throw DataProcessingError.create(
|
|
511
|
+
"BatchTooLarge",
|
|
512
|
+
"compressionInsufficient",
|
|
513
|
+
/* sequencedMessage */ undefined,
|
|
514
|
+
{
|
|
515
|
+
batchSize: singletonBatch.contentSizeInBytes,
|
|
516
|
+
compressedBatchSize: compressedBatch.contentSizeInBytes,
|
|
517
|
+
count: compressedBatch.messages.length,
|
|
518
|
+
limit: this.params.config.maxBatchSizeInBytes,
|
|
519
|
+
chunkingEnabled: this.params.splitter.isBatchChunkingEnabled,
|
|
520
|
+
compressionOptions: JSON.stringify(this.params.config.compressionOptions),
|
|
521
|
+
socketSize: estimateSocketSize(singletonBatch),
|
|
522
|
+
},
|
|
523
|
+
);
|
|
489
524
|
}
|
|
490
525
|
|
|
491
526
|
return compressedBatch;
|
|
@@ -497,7 +532,7 @@ export class Outbox {
|
|
|
497
532
|
* @param batch - batch to be sent
|
|
498
533
|
* @returns the clientSequenceNumber of the start of the batch, or undefined if nothing was sent
|
|
499
534
|
*/
|
|
500
|
-
private sendBatch(batch:
|
|
535
|
+
private sendBatch(batch: OutboundBatch): number | undefined {
|
|
501
536
|
const length = batch.messages.length;
|
|
502
537
|
if (length === 0) {
|
|
503
538
|
return undefined; // Nothing submitted
|
|
@@ -19,9 +19,6 @@ import { asBatchMetadata } from "../metadata.js";
|
|
|
19
19
|
import { OpDecompressor } from "./opDecompressor.js";
|
|
20
20
|
import { OpGroupingManager, isGroupedBatch } from "./opGroupingManager.js";
|
|
21
21
|
import { OpSplitter, isChunkedMessage } from "./opSplitter.js";
|
|
22
|
-
// eslint-disable-next-line unused-imports/no-unused-imports -- Used by "@link" comment annotation below
|
|
23
|
-
import { serializeOpContents } from "./outbox.js";
|
|
24
|
-
|
|
25
22
|
/**
|
|
26
23
|
* Info about the batch we learn when we process the first message
|
|
27
24
|
*/
|
|
@@ -247,20 +244,6 @@ export class RemoteMessageProcessor {
|
|
|
247
244
|
}
|
|
248
245
|
}
|
|
249
246
|
|
|
250
|
-
/**
|
|
251
|
-
* Takes an incoming runtime message JSON.parse's its contents in place, if needed (old Loader does this for us).
|
|
252
|
-
* Only to be used for runtine messages.
|
|
253
|
-
* @remarks - Serialization during submit happens via {@link serializeOpContents}
|
|
254
|
-
* @param mutableMessage - op message received
|
|
255
|
-
*/
|
|
256
|
-
export function ensureContentsDeserialized(mutableMessage: ISequencedDocumentMessage): void {
|
|
257
|
-
// This should become unconditional once Loader LTS reaches 2.4 or later.
|
|
258
|
-
// There will be a long time of needing both cases, until LTS advances to that point.
|
|
259
|
-
if (typeof mutableMessage.contents === "string" && mutableMessage.contents !== "") {
|
|
260
|
-
mutableMessage.contents = JSON.parse(mutableMessage.contents);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
247
|
/**
|
|
265
248
|
* For a given message, it moves the nested InboundContainerRuntimeMessage props one level up.
|
|
266
249
|
*
|
package/src/packageVersion.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { asBatchMetadata, asEmptyBatchLocalOpMetadata } from "./metadata.js";
|
|
24
24
|
import {
|
|
25
25
|
BatchId,
|
|
26
|
-
|
|
26
|
+
LocalBatchMessage,
|
|
27
27
|
getEffectiveBatchId,
|
|
28
28
|
BatchStartInfo,
|
|
29
29
|
InboundMessageResult,
|
|
@@ -305,7 +305,7 @@ export class PendingStateManager implements IDisposable {
|
|
|
305
305
|
* @param ignoreBatchId - Whether to ignore the batchId in the batchStartInfo
|
|
306
306
|
*/
|
|
307
307
|
public onFlushBatch(
|
|
308
|
-
batch:
|
|
308
|
+
batch: LocalBatchMessage[],
|
|
309
309
|
clientSequenceNumber: number | undefined,
|
|
310
310
|
ignoreBatchId?: boolean,
|
|
311
311
|
): void {
|
|
@@ -325,7 +325,7 @@ export class PendingStateManager implements IDisposable {
|
|
|
325
325
|
|
|
326
326
|
for (const message of batch) {
|
|
327
327
|
const {
|
|
328
|
-
|
|
328
|
+
serializedOp: content,
|
|
329
329
|
referenceSequenceNumber,
|
|
330
330
|
localOpMetadata,
|
|
331
331
|
metadata: opMetadata,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
type ILayerCompatSupportRequirements,
|
|
10
10
|
} from "@fluid-internal/client-utils";
|
|
11
11
|
import type { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
12
|
+
import { encodeHandlesInContainerRuntime } from "@fluidframework/runtime-definitions/internal";
|
|
12
13
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
13
14
|
|
|
14
15
|
import { pkgVersion } from "./packageVersion.js";
|
|
@@ -63,9 +64,9 @@ export const loaderSupportRequirements: ILayerCompatSupportRequirements = {
|
|
|
63
64
|
export const runtimeCompatDetailsForDataStore: ILayerCompatDetails = {
|
|
64
65
|
...runtimeCoreCompatDetails,
|
|
65
66
|
/**
|
|
66
|
-
* The features supported by the Runtime layer across the Runtime /
|
|
67
|
+
* The features supported by the Runtime layer across the Runtime / DataStore boundary.
|
|
67
68
|
*/
|
|
68
|
-
supportedFeatures: new Set<string>(),
|
|
69
|
+
supportedFeatures: new Set<string>([encodeHandlesInContainerRuntime]),
|
|
69
70
|
};
|
|
70
71
|
|
|
71
72
|
/**
|
package/src/summary/index.ts
CHANGED
|
@@ -3,31 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export {
|
|
7
|
-
IOrderedClientCollection,
|
|
8
|
-
IOrderedClientElection,
|
|
9
|
-
ISerializedElection,
|
|
10
|
-
ITrackedClient,
|
|
11
|
-
OrderedClientCollection,
|
|
12
|
-
OrderedClientElection,
|
|
13
|
-
} from "./orderedClientElection.js";
|
|
14
|
-
export {
|
|
15
|
-
defaultMaxAttemptsForSubmitFailures,
|
|
16
|
-
RunningSummarizer,
|
|
17
|
-
} from "./runningSummarizer.js";
|
|
18
|
-
export {
|
|
19
|
-
ICancellableSummarizerController,
|
|
20
|
-
neverCancelledSummaryToken,
|
|
21
|
-
RunWhileConnectedCoordinator,
|
|
22
|
-
} from "./runWhileConnectedCoordinator.js";
|
|
23
|
-
export { Summarizer } from "./summarizer.js";
|
|
24
|
-
export {
|
|
25
|
-
ISummarizerClientElection,
|
|
26
|
-
ISummarizerClientElectionEvents,
|
|
27
|
-
SummarizerClientElection,
|
|
28
|
-
summarizerClientType,
|
|
29
|
-
} from "./summarizerClientElection.js";
|
|
30
|
-
export { SummarizeHeuristicData, SummarizeHeuristicRunner } from "./summarizerHeuristics.js";
|
|
31
6
|
export {
|
|
32
7
|
createRootSummarizerNode,
|
|
33
8
|
createRootSummarizerNodeWithGC,
|
|
@@ -36,6 +11,7 @@ export {
|
|
|
36
11
|
IRootSummarizerNodeWithGC,
|
|
37
12
|
} from "./summarizerNode/index.js";
|
|
38
13
|
export {
|
|
14
|
+
summarizerClientType,
|
|
39
15
|
IConnectableRuntime,
|
|
40
16
|
IGeneratedSummaryStats,
|
|
41
17
|
IRefreshSummaryAckOptions,
|
|
@@ -43,19 +19,14 @@ export {
|
|
|
43
19
|
ISummarizeAttempt,
|
|
44
20
|
ISummarizeHeuristicData,
|
|
45
21
|
ISummarizer,
|
|
46
|
-
ISummarizeResults,
|
|
47
22
|
ISummarizerInternalsProvider,
|
|
48
23
|
ISummarizerRuntime,
|
|
49
24
|
ISummaryCancellationToken,
|
|
50
25
|
SubmitSummaryResult,
|
|
51
|
-
EnqueueSummarizeResult,
|
|
52
|
-
IAckSummaryResult,
|
|
53
26
|
IBaseSummarizeResult,
|
|
54
|
-
IBroadcastSummaryResult,
|
|
55
27
|
ICancellationToken,
|
|
56
28
|
IEnqueueSummarizeOptions,
|
|
57
29
|
IGenerateSummaryTreeResult,
|
|
58
|
-
INackSummaryResult,
|
|
59
30
|
IOnDemandSummarizeOptions,
|
|
60
31
|
ISubmitSummaryOpResult,
|
|
61
32
|
ISummarizeOptions,
|
|
@@ -71,6 +42,14 @@ export {
|
|
|
71
42
|
type ISummaryConfigurationHeuristics,
|
|
72
43
|
type ISummaryBaseConfiguration,
|
|
73
44
|
} from "./summarizerTypes.js";
|
|
45
|
+
export {
|
|
46
|
+
IOrderedClientCollection,
|
|
47
|
+
IOrderedClientElection,
|
|
48
|
+
ISerializedElection,
|
|
49
|
+
ITrackedClient,
|
|
50
|
+
OrderedClientCollection,
|
|
51
|
+
OrderedClientElection,
|
|
52
|
+
} from "./orderedClientElection.js";
|
|
74
53
|
export {
|
|
75
54
|
IAckedSummary,
|
|
76
55
|
ISummaryCollectionOpEvents,
|
|
@@ -83,6 +62,11 @@ export {
|
|
|
83
62
|
OpActionEventListener,
|
|
84
63
|
OpActionEventName,
|
|
85
64
|
} from "./summaryCollection.js";
|
|
65
|
+
export {
|
|
66
|
+
ISummarizerClientElection,
|
|
67
|
+
ISummarizerClientElectionEvents,
|
|
68
|
+
SummarizerClientElection,
|
|
69
|
+
} from "./summarizerClientElection.js";
|
|
86
70
|
export {
|
|
87
71
|
aliasBlobName,
|
|
88
72
|
chunksBlobName,
|
|
@@ -125,7 +109,11 @@ export {
|
|
|
125
109
|
IDocumentSchemaChangeMessage,
|
|
126
110
|
IDocumentSchemaFeatures,
|
|
127
111
|
} from "./documentSchema.js";
|
|
128
|
-
export {
|
|
112
|
+
export {
|
|
113
|
+
getFailMessage,
|
|
114
|
+
RetriableSummaryError,
|
|
115
|
+
SummarizeReason,
|
|
116
|
+
} from "./summarizerUtils.js";
|
|
129
117
|
export {
|
|
130
118
|
IConnectedEvents,
|
|
131
119
|
IConnectedState,
|
|
@@ -133,3 +121,19 @@ export {
|
|
|
133
121
|
SummaryManager,
|
|
134
122
|
SummaryManagerState,
|
|
135
123
|
} from "./summaryManager.js";
|
|
124
|
+
export {
|
|
125
|
+
defaultMaxAttempts,
|
|
126
|
+
defaultMaxAttemptsForSubmitFailures,
|
|
127
|
+
ICancellableSummarizerController,
|
|
128
|
+
neverCancelledSummaryToken,
|
|
129
|
+
RunWhileConnectedCoordinator,
|
|
130
|
+
Summarizer,
|
|
131
|
+
IBroadcastSummaryResult,
|
|
132
|
+
ISummarizeResults,
|
|
133
|
+
EnqueueSummarizeResult,
|
|
134
|
+
IAckSummaryResult,
|
|
135
|
+
INackSummaryResult,
|
|
136
|
+
RunningSummarizer,
|
|
137
|
+
SummarizeHeuristicData,
|
|
138
|
+
SummarizeHeuristicRunner,
|
|
139
|
+
} from "./summaryDelayLoadedModule/index.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
createChildLogger,
|
|
17
17
|
} from "@fluidframework/telemetry-utils/internal";
|
|
18
18
|
|
|
19
|
-
import { summarizerClientType } from "./
|
|
19
|
+
import { summarizerClientType } from "./index.js";
|
|
20
20
|
|
|
21
21
|
// helper types for recursive readonly.
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -14,10 +14,9 @@ import {
|
|
|
14
14
|
ISerializedElection,
|
|
15
15
|
ITrackedClient,
|
|
16
16
|
} from "./orderedClientElection.js";
|
|
17
|
+
import { summarizerClientType } from "./summarizerTypes.js";
|
|
17
18
|
import { ISummaryCollectionOpEvents } from "./summaryCollection.js";
|
|
18
19
|
|
|
19
|
-
export const summarizerClientType = "summarizer";
|
|
20
|
-
|
|
21
20
|
export interface ISummarizerClientElectionEvents extends IEvent {
|
|
22
21
|
(event: "electedSummarizerChanged", handler: () => void): void;
|
|
23
22
|
}
|
|
@@ -27,12 +27,13 @@ import {
|
|
|
27
27
|
ITelemetryLoggerPropertyBag,
|
|
28
28
|
} from "@fluidframework/telemetry-utils/internal";
|
|
29
29
|
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} from "./
|
|
35
|
-
|
|
30
|
+
import type { SummarizeReason } from "./summarizerUtils.js";
|
|
31
|
+
import type {
|
|
32
|
+
EnqueueSummarizeResult,
|
|
33
|
+
ISummarizeResults,
|
|
34
|
+
} from "./summaryDelayLoadedModule/index.js";
|
|
35
|
+
|
|
36
|
+
export const summarizerClientType = "summarizer";
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Similar to AbortSignal, but using promise instead of events
|
|
@@ -359,33 +360,6 @@ export interface SubmitSummaryFailureData {
|
|
|
359
360
|
stage: SummaryStage;
|
|
360
361
|
}
|
|
361
362
|
|
|
362
|
-
/**
|
|
363
|
-
* @legacy
|
|
364
|
-
* @alpha
|
|
365
|
-
*/
|
|
366
|
-
export interface IBroadcastSummaryResult {
|
|
367
|
-
readonly summarizeOp: ISummaryOpMessage;
|
|
368
|
-
readonly broadcastDuration: number;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* @legacy
|
|
373
|
-
* @alpha
|
|
374
|
-
*/
|
|
375
|
-
export interface IAckSummaryResult {
|
|
376
|
-
readonly summaryAckOp: ISummaryAckMessage;
|
|
377
|
-
readonly ackNackDuration: number;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* @legacy
|
|
382
|
-
* @alpha
|
|
383
|
-
*/
|
|
384
|
-
export interface INackSummaryResult {
|
|
385
|
-
readonly summaryNackOp: ISummaryNackMessage;
|
|
386
|
-
readonly ackNackDuration: number;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
363
|
/**
|
|
390
364
|
* @legacy
|
|
391
365
|
* @alpha
|
|
@@ -402,64 +376,6 @@ export type SummarizeResultPart<TSuccess, TFailure = undefined> =
|
|
|
402
376
|
error: IRetriableFailureError;
|
|
403
377
|
};
|
|
404
378
|
|
|
405
|
-
/**
|
|
406
|
-
* @legacy
|
|
407
|
-
* @alpha
|
|
408
|
-
*/
|
|
409
|
-
export interface ISummarizeResults {
|
|
410
|
-
/**
|
|
411
|
-
* Resolves when we generate, upload, and submit the summary.
|
|
412
|
-
*/
|
|
413
|
-
readonly summarySubmitted: Promise<
|
|
414
|
-
SummarizeResultPart<SubmitSummaryResult, SubmitSummaryFailureData>
|
|
415
|
-
>;
|
|
416
|
-
/**
|
|
417
|
-
* Resolves when we observe our summarize op broadcast.
|
|
418
|
-
*/
|
|
419
|
-
readonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;
|
|
420
|
-
/**
|
|
421
|
-
* Resolves when we receive a summaryAck or summaryNack.
|
|
422
|
-
*/
|
|
423
|
-
readonly receivedSummaryAckOrNack: Promise<
|
|
424
|
-
SummarizeResultPart<IAckSummaryResult, INackSummaryResult>
|
|
425
|
-
>;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* @legacy
|
|
430
|
-
* @alpha
|
|
431
|
-
*/
|
|
432
|
-
export type EnqueueSummarizeResult =
|
|
433
|
-
| (ISummarizeResults & {
|
|
434
|
-
/**
|
|
435
|
-
* Indicates that another summarize attempt is not already enqueued,
|
|
436
|
-
* and this attempt has been enqueued.
|
|
437
|
-
*/
|
|
438
|
-
readonly alreadyEnqueued?: undefined;
|
|
439
|
-
})
|
|
440
|
-
| (ISummarizeResults & {
|
|
441
|
-
/**
|
|
442
|
-
* Indicates that another summarize attempt was already enqueued.
|
|
443
|
-
*/
|
|
444
|
-
readonly alreadyEnqueued: true;
|
|
445
|
-
/**
|
|
446
|
-
* Indicates that the other enqueued summarize attempt was abandoned,
|
|
447
|
-
* and this attempt has been enqueued enqueued.
|
|
448
|
-
*/
|
|
449
|
-
readonly overridden: true;
|
|
450
|
-
})
|
|
451
|
-
| {
|
|
452
|
-
/**
|
|
453
|
-
* Indicates that another summarize attempt was already enqueued.
|
|
454
|
-
*/
|
|
455
|
-
readonly alreadyEnqueued: true;
|
|
456
|
-
/**
|
|
457
|
-
* Indicates that the other enqueued summarize attempt remains enqueued,
|
|
458
|
-
* and this attempt has not been enqueued.
|
|
459
|
-
*/
|
|
460
|
-
readonly overridden?: undefined;
|
|
461
|
-
};
|
|
462
|
-
|
|
463
379
|
/**
|
|
464
380
|
* @legacy
|
|
465
381
|
* @alpha
|