@fluidframework/container-runtime 2.0.0-internal.6.1.0 → 2.0.0-internal.6.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 +35 -0
- package/README.md +4 -3
- package/dist/batchTracker.d.ts +1 -1
- package/dist/batchTracker.js +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +4 -20
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +47 -125
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +82 -14
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +236 -138
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +1 -2
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +4 -5
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +1 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.js +2 -2
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +4 -5
- package/dist/dataStores.js.map +1 -1
- package/dist/error.d.ts +14 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +21 -0
- package/dist/error.js.map +1 -0
- package/dist/gc/garbageCollection.d.ts +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +23 -5
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +5 -3
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +2 -0
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +2 -0
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/id-compressor/appendOnlySortedMap.d.ts +8 -30
- package/dist/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/appendOnlySortedMap.js +25 -67
- package/dist/id-compressor/appendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/finalSpace.d.ts +29 -0
- package/dist/id-compressor/finalSpace.d.ts.map +1 -0
- package/dist/id-compressor/finalSpace.js +62 -0
- package/dist/id-compressor/finalSpace.js.map +1 -0
- package/dist/id-compressor/idCompressor.d.ts +25 -250
- package/dist/id-compressor/idCompressor.d.ts.map +1 -1
- package/dist/id-compressor/idCompressor.js +385 -1149
- package/dist/id-compressor/idCompressor.js.map +1 -1
- package/dist/id-compressor/identifiers.d.ts +32 -0
- package/dist/id-compressor/identifiers.d.ts.map +1 -0
- package/dist/id-compressor/identifiers.js +15 -0
- package/dist/id-compressor/identifiers.js.map +1 -0
- package/dist/id-compressor/index.d.ts +5 -6
- package/dist/id-compressor/index.d.ts.map +1 -1
- package/dist/id-compressor/index.js +20 -26
- package/dist/id-compressor/index.js.map +1 -1
- package/dist/id-compressor/persistanceUtilities.d.ts +22 -0
- package/dist/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/dist/id-compressor/persistanceUtilities.js +43 -0
- package/dist/id-compressor/persistanceUtilities.js.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js +80 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/dist/id-compressor/sessions.d.ts +115 -0
- package/dist/id-compressor/sessions.d.ts.map +1 -0
- package/dist/id-compressor/sessions.js +305 -0
- package/dist/id-compressor/sessions.js.map +1 -0
- package/dist/id-compressor/utilities.d.ts +49 -0
- package/dist/id-compressor/utilities.d.ts.map +1 -0
- package/dist/id-compressor/utilities.js +166 -0
- package/dist/id-compressor/utilities.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +1 -2
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +2 -3
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +1 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +10 -11
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +11 -5
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +12 -5
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +24 -10
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +4 -5
- 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 +1 -2
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +2 -3
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +27 -4
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +237 -66
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +6 -5
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +70 -67
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +38 -25
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +1 -2
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +9 -3
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +42 -38
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +7 -6
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +22 -15
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts +1 -1
- package/lib/batchTracker.js +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +4 -20
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +46 -124
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +82 -14
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +223 -123
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +1 -2
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +1 -2
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +1 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.js +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +1 -2
- package/lib/dataStores.js.map +1 -1
- package/lib/error.d.ts +14 -0
- package/lib/error.d.ts.map +1 -0
- package/lib/error.js +17 -0
- package/lib/error.js.map +1 -0
- package/lib/gc/garbageCollection.d.ts +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +22 -4
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +3 -1
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +2 -0
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +2 -0
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/id-compressor/appendOnlySortedMap.d.ts +8 -30
- package/lib/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/appendOnlySortedMap.js +24 -65
- package/lib/id-compressor/appendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/finalSpace.d.ts +29 -0
- package/lib/id-compressor/finalSpace.d.ts.map +1 -0
- package/lib/id-compressor/finalSpace.js +58 -0
- package/lib/id-compressor/finalSpace.js.map +1 -0
- package/lib/id-compressor/idCompressor.d.ts +25 -250
- package/lib/id-compressor/idCompressor.d.ts.map +1 -1
- package/lib/id-compressor/idCompressor.js +381 -1139
- package/lib/id-compressor/idCompressor.js.map +1 -1
- package/lib/id-compressor/identifiers.d.ts +32 -0
- package/lib/id-compressor/identifiers.d.ts.map +1 -0
- package/lib/id-compressor/identifiers.js +11 -0
- package/lib/id-compressor/identifiers.js.map +1 -0
- package/lib/id-compressor/index.d.ts +5 -6
- package/lib/id-compressor/index.d.ts.map +1 -1
- package/lib/id-compressor/index.js +5 -6
- package/lib/id-compressor/index.js.map +1 -1
- package/lib/id-compressor/persistanceUtilities.d.ts +22 -0
- package/lib/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/lib/id-compressor/persistanceUtilities.js +34 -0
- package/lib/id-compressor/persistanceUtilities.js.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js +76 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/lib/id-compressor/sessions.d.ts +115 -0
- package/lib/id-compressor/sessions.d.ts.map +1 -0
- package/lib/id-compressor/sessions.js +290 -0
- package/lib/id-compressor/sessions.js.map +1 -0
- package/lib/id-compressor/utilities.d.ts +49 -0
- package/lib/id-compressor/utilities.d.ts.map +1 -0
- package/lib/id-compressor/utilities.js +148 -0
- package/lib/id-compressor/utilities.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +1 -2
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +1 -2
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +1 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +6 -7
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +12 -6
- 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 +12 -5
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +21 -7
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +1 -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 +1 -2
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +1 -2
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +27 -4
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +237 -66
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +6 -5
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +68 -65
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +38 -25
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +1 -2
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +9 -3
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +43 -39
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +7 -6
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +23 -16
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +27 -24
- package/src/batchTracker.ts +1 -1
- package/src/blobManager.ts +57 -146
- package/src/containerRuntime.ts +331 -158
- package/src/dataStore.ts +1 -2
- package/src/dataStoreContext.ts +3 -6
- package/src/dataStoreContexts.ts +1 -2
- package/src/dataStoreRegistry.ts +1 -1
- package/src/dataStores.ts +3 -5
- package/src/error.ts +18 -0
- package/src/gc/garbageCollection.ts +38 -5
- package/src/gc/gcConfigs.ts +4 -2
- package/src/gc/gcDefinitions.ts +2 -0
- package/src/gc/gcTelemetry.ts +2 -0
- package/src/id-compressor/appendOnlySortedMap.ts +25 -86
- package/src/id-compressor/finalSpace.ts +67 -0
- package/src/id-compressor/idCompressor.ts +455 -1681
- package/src/id-compressor/identifiers.ts +42 -0
- package/src/id-compressor/index.ts +11 -20
- package/src/id-compressor/persistanceUtilities.ts +58 -0
- package/src/id-compressor/sessionSpaceNormalizer.ts +83 -0
- package/src/id-compressor/sessions.ts +405 -0
- package/src/id-compressor/utilities.ts +187 -0
- package/src/index.ts +7 -1
- package/src/opLifecycle/opCompressor.ts +1 -2
- package/src/opLifecycle/opSplitter.ts +4 -4
- package/src/opLifecycle/outbox.ts +13 -10
- package/src/opLifecycle/remoteMessageProcessor.ts +19 -6
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +49 -27
- package/src/scheduleManager.ts +5 -4
- package/src/summary/index.ts +3 -1
- package/src/summary/orderedClientElection.ts +6 -4
- package/src/summary/runningSummarizer.ts +276 -95
- package/src/summary/summarizer.ts +22 -12
- package/src/summary/summarizerClientElection.ts +1 -1
- package/src/summary/summarizerTypes.ts +40 -25
- package/src/summary/summaryCollection.ts +1 -2
- package/src/summary/summaryGenerator.ts +49 -52
- package/src/summary/summaryManager.ts +33 -11
- package/dist/id-compressor/idRange.d.ts +0 -11
- package/dist/id-compressor/idRange.d.ts.map +0 -1
- package/dist/id-compressor/idRange.js +0 -29
- package/dist/id-compressor/idRange.js.map +0 -1
- package/dist/id-compressor/numericUuid.d.ts +0 -59
- package/dist/id-compressor/numericUuid.d.ts.map +0 -1
- package/dist/id-compressor/numericUuid.js +0 -325
- package/dist/id-compressor/numericUuid.js.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/dist/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.js +0 -483
- package/dist/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/dist/id-compressor/utils.d.ts +0 -57
- package/dist/id-compressor/utils.d.ts.map +0 -1
- package/dist/id-compressor/utils.js +0 -90
- package/dist/id-compressor/utils.js.map +0 -1
- package/dist/id-compressor/uuidUtilities.d.ts +0 -28
- package/dist/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/dist/id-compressor/uuidUtilities.js +0 -104
- package/dist/id-compressor/uuidUtilities.js.map +0 -1
- package/lib/id-compressor/idRange.d.ts +0 -11
- package/lib/id-compressor/idRange.d.ts.map +0 -1
- package/lib/id-compressor/idRange.js +0 -25
- package/lib/id-compressor/idRange.js.map +0 -1
- package/lib/id-compressor/numericUuid.d.ts +0 -59
- package/lib/id-compressor/numericUuid.d.ts.map +0 -1
- package/lib/id-compressor/numericUuid.js +0 -315
- package/lib/id-compressor/numericUuid.js.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/lib/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.js +0 -479
- package/lib/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/lib/id-compressor/utils.d.ts +0 -57
- package/lib/id-compressor/utils.d.ts.map +0 -1
- package/lib/id-compressor/utils.js +0 -79
- package/lib/id-compressor/utils.js.map +0 -1
- package/lib/id-compressor/uuidUtilities.d.ts +0 -28
- package/lib/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/lib/id-compressor/uuidUtilities.js +0 -96
- package/lib/id-compressor/uuidUtilities.js.map +0 -1
- package/src/id-compressor/idRange.ts +0 -35
- package/src/id-compressor/numericUuid.ts +0 -383
- package/src/id-compressor/sessionIdNormalizer.ts +0 -609
- package/src/id-compressor/utils.ts +0 -114
- package/src/id-compressor/uuidUtilities.ts +0 -120
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* eslint-disable no-bitwise */
|
|
7
|
+
import { assert } from "@fluidframework/common-utils";
|
|
8
|
+
import { SessionId, StableId } from "@fluidframework/runtime-definitions";
|
|
9
|
+
import { v4 } from "uuid";
|
|
10
|
+
import { LocalCompressedId, NumericUuid } from "./identifiers";
|
|
11
|
+
|
|
12
|
+
const hexadecimalCharCodes = Array.from("09afAF").map((c) => c.charCodeAt(0)) as [
|
|
13
|
+
zero: number,
|
|
14
|
+
nine: number,
|
|
15
|
+
a: number,
|
|
16
|
+
f: number,
|
|
17
|
+
A: number,
|
|
18
|
+
F: number,
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
function isHexadecimalCharacter(charCode: number): boolean {
|
|
22
|
+
return (
|
|
23
|
+
(charCode >= hexadecimalCharCodes[0] && charCode <= hexadecimalCharCodes[1]) ||
|
|
24
|
+
(charCode >= hexadecimalCharCodes[2] && charCode <= hexadecimalCharCodes[3]) ||
|
|
25
|
+
(charCode >= hexadecimalCharCodes[4] && charCode <= hexadecimalCharCodes[5])
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generate a random session ID
|
|
31
|
+
*/
|
|
32
|
+
export function createSessionId(): SessionId {
|
|
33
|
+
return assertIsStableId(v4()) as SessionId;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Asserts that the given string is a stable ID.
|
|
38
|
+
*/
|
|
39
|
+
export function assertIsStableId(stableId: string): StableId {
|
|
40
|
+
assert(isStableId(stableId), 0x4a3 /* Expected a StableId */);
|
|
41
|
+
return stableId;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Asserts that the given string is a stable ID.
|
|
46
|
+
*/
|
|
47
|
+
export function assertIsSessionId(stableId: string): SessionId {
|
|
48
|
+
assertIsStableId(stableId);
|
|
49
|
+
return stableId as SessionId;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Generate a random stable ID
|
|
54
|
+
*/
|
|
55
|
+
export function generateStableId(): StableId {
|
|
56
|
+
return assertIsStableId(v4());
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Returns true iff the given string is a valid Version 4, variant 2 UUID
|
|
61
|
+
* 'xxxxxxxx-xxxx-4xxx-vxxx-xxxxxxxxxxxx'
|
|
62
|
+
*/
|
|
63
|
+
export function isStableId(str: string): str is StableId {
|
|
64
|
+
if (str.length !== 36) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
for (let i = 0; i < str.length; i++) {
|
|
69
|
+
switch (i) {
|
|
70
|
+
case 8:
|
|
71
|
+
case 13:
|
|
72
|
+
case 18:
|
|
73
|
+
case 23:
|
|
74
|
+
if (str.charAt(i) !== "-") {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 14:
|
|
80
|
+
if (str.charAt(i) !== "4") {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
|
|
85
|
+
case 19: {
|
|
86
|
+
const char = str.charAt(i);
|
|
87
|
+
if (char !== "8" && char !== "9" && char !== "a" && char !== "b") {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
default:
|
|
94
|
+
if (!isHexadecimalCharacter(str.charCodeAt(i))) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A numeric comparator used for sorting in ascending order.
|
|
106
|
+
*
|
|
107
|
+
* Handles +/-0 like Map: -0 is equal to +0.
|
|
108
|
+
*/
|
|
109
|
+
export function compareFiniteNumbers<T extends number>(a: T, b: T): number {
|
|
110
|
+
return a - b;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Compares strings lexically to form a strict partial ordering.
|
|
115
|
+
*/
|
|
116
|
+
export function compareStrings<T extends string>(a: T, b: T): number {
|
|
117
|
+
return a > b ? 1 : a === b ? 0 : -1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Compares bigints to form a strict partial ordering.
|
|
122
|
+
*/
|
|
123
|
+
export function compareBigints<T extends bigint>(a: T, b: T): number {
|
|
124
|
+
return a > b ? 1 : a === b ? 0 : -1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function genCountFromLocalId(localId: LocalCompressedId): number {
|
|
128
|
+
return -localId;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function localIdFromGenCount(genCount: number): LocalCompressedId {
|
|
132
|
+
return -genCount as LocalCompressedId;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
|
|
136
|
+
const versionMask = 0x4n << (19n * 4n); // Version 4
|
|
137
|
+
const variantMask = 0x8n << (15n * 4n); // Variant RFC4122 (1 0 x x)
|
|
138
|
+
const upperMask = 0xffffffffffffn << (20n * 4n);
|
|
139
|
+
// Upper mask when version/variant bits are removed
|
|
140
|
+
const strippedUpperMask = upperMask >> 6n;
|
|
141
|
+
const middieBittiesMask = 0xfffn << (16n * 4n);
|
|
142
|
+
// Middie mask when version/variant bits are removed
|
|
143
|
+
const strippedMiddieBittiesMask = middieBittiesMask >> 2n;
|
|
144
|
+
// Note: leading character should be 3 to mask at 0011
|
|
145
|
+
// The more-significant half of the N nibble is used to denote the variant (10xx)
|
|
146
|
+
const lowerMask = 0x3fffffffffffffffn;
|
|
147
|
+
|
|
148
|
+
export function numericUuidFromStableId(stableId: StableId): NumericUuid {
|
|
149
|
+
const uuidU128 = BigInt(`0x${stableId.replace(/-/g, "")}`);
|
|
150
|
+
const upperMasked = uuidU128 & upperMask;
|
|
151
|
+
const middieBittiesMasked = uuidU128 & middieBittiesMask;
|
|
152
|
+
const lowerMasked = uuidU128 & lowerMask;
|
|
153
|
+
|
|
154
|
+
const upperMaskedPlaced = upperMasked >> 6n;
|
|
155
|
+
const middieBittiesMaskedPlaced = middieBittiesMasked >> 2n;
|
|
156
|
+
|
|
157
|
+
const id = upperMaskedPlaced | middieBittiesMaskedPlaced | lowerMasked;
|
|
158
|
+
return id as NumericUuid;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function stableIdFromNumericUuid(numericUuid: NumericUuid): StableId {
|
|
162
|
+
// bitwise reverse transform
|
|
163
|
+
const upperMasked = (numericUuid & strippedUpperMask) << 6n;
|
|
164
|
+
const middieBittiesMasked = (numericUuid & strippedMiddieBittiesMask) << 2n;
|
|
165
|
+
const lowerMasked = numericUuid & lowerMask;
|
|
166
|
+
const uuidU128 = upperMasked | versionMask | middieBittiesMasked | variantMask | lowerMasked;
|
|
167
|
+
// Pad to 32 characters, inserting leading zeroes if needed
|
|
168
|
+
const uuidString = uuidU128.toString(16).padStart(32, "0");
|
|
169
|
+
return `${uuidString.substring(0, 8)}-${uuidString.substring(8, 12)}-${uuidString.substring(
|
|
170
|
+
12,
|
|
171
|
+
16,
|
|
172
|
+
)}-${uuidString.substring(16, 20)}-${uuidString.substring(20, 32)}` as StableId;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function offsetNumericUuid(numericUuid: NumericUuid, offset: number): NumericUuid {
|
|
176
|
+
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
177
|
+
return (numericUuid + BigInt(offset)) as NumericUuid;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function subtractNumericUuids(a: NumericUuid, b: NumericUuid): NumericUuid {
|
|
181
|
+
return (a - b) as NumericUuid;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function addNumericUuids(a: NumericUuid, b: NumericUuid): NumericUuid {
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
186
|
+
return (a + b) as NumericUuid;
|
|
187
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
export {
|
|
7
7
|
ContainerMessageType,
|
|
8
8
|
ContainerRuntimeMessage,
|
|
9
|
+
IContainerRuntimeMessageCompatDetails,
|
|
10
|
+
CompatModeBehavior,
|
|
9
11
|
ISummaryRuntimeOptions,
|
|
10
12
|
ISummaryBaseConfiguration,
|
|
11
13
|
ISummaryConfigurationHeuristics,
|
|
@@ -18,7 +20,9 @@ export {
|
|
|
18
20
|
ContainerRuntime,
|
|
19
21
|
RuntimeHeaders,
|
|
20
22
|
AllowTombstoneRequestHeaderKey,
|
|
23
|
+
AllowInactiveRequestHeaderKey,
|
|
21
24
|
TombstoneResponseHeaderKey,
|
|
25
|
+
InactiveResponseHeaderKey,
|
|
22
26
|
ISummaryConfiguration,
|
|
23
27
|
DefaultSummaryConfiguration,
|
|
24
28
|
ICompressionRuntimeOptions,
|
|
@@ -68,6 +72,8 @@ export {
|
|
|
68
72
|
ICancellableSummarizerController,
|
|
69
73
|
SubmitSummaryFailureData,
|
|
70
74
|
SummaryStage,
|
|
75
|
+
IRetriableFailureResult,
|
|
76
|
+
ISummarizeEventProps,
|
|
71
77
|
} from "./summary";
|
|
78
|
+
export { isStableId, generateStableId, assertIsStableId } from "./id-compressor";
|
|
72
79
|
export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle";
|
|
73
|
-
export { generateStableId, isStableId, assertIsStableId } from "./id-compressor";
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { createChildLogger } from "@fluidframework/telemetry-utils";
|
|
6
|
+
import { createChildLogger, UsageError } from "@fluidframework/telemetry-utils";
|
|
7
7
|
import { assert, IsoBuffer } from "@fluidframework/common-utils";
|
|
8
|
-
import { UsageError } from "@fluidframework/container-utils";
|
|
9
8
|
import { compress } from "lz4js";
|
|
10
9
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
11
10
|
import { CompressionAlgorithms } from "../containerRuntime";
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { createChildLogger } from "@fluidframework/telemetry-utils";
|
|
7
|
-
import { assert } from "@fluidframework/common-utils";
|
|
8
|
-
import { IBatchMessage } from "@fluidframework/container-definitions";
|
|
9
6
|
import {
|
|
7
|
+
createChildLogger,
|
|
10
8
|
DataCorruptionError,
|
|
11
9
|
extractSafePropertiesFromMessage,
|
|
12
|
-
} from "@fluidframework/
|
|
10
|
+
} from "@fluidframework/telemetry-utils";
|
|
11
|
+
import { assert } from "@fluidframework/common-utils";
|
|
12
|
+
import { IBatchMessage } from "@fluidframework/container-definitions";
|
|
13
13
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
14
14
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
15
15
|
import { ContainerMessageType, ContainerRuntimeMessage } from "../containerRuntime";
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
createChildMonitoringContext,
|
|
8
|
+
GenericError,
|
|
9
|
+
MonitoringContext,
|
|
10
|
+
UsageError,
|
|
11
|
+
} from "@fluidframework/telemetry-utils";
|
|
7
12
|
import { assert } from "@fluidframework/common-utils";
|
|
8
13
|
import { IBatchMessage, ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
9
|
-
import { GenericError, UsageError } from "@fluidframework/container-utils";
|
|
10
14
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
11
15
|
import { ICompressionRuntimeOptions } from "../containerRuntime";
|
|
12
16
|
import { IPendingBatchMessage, PendingStateManager } from "../pendingStateManager";
|
|
@@ -63,9 +67,8 @@ export function getLongStack<T>(action: () => T, length: number = 50): T {
|
|
|
63
67
|
if (
|
|
64
68
|
(
|
|
65
69
|
Object.getOwnPropertyDescriptor(errorObj, "stackTraceLimit") ||
|
|
66
|
-
Object.getOwnPropertyDescriptor(Object.getPrototypeOf(errorObj), "stackTraceLimit")
|
|
67
|
-
|
|
68
|
-
).writable !== true
|
|
70
|
+
Object.getOwnPropertyDescriptor(Object.getPrototypeOf(errorObj), "stackTraceLimit")
|
|
71
|
+
)?.writable !== true
|
|
69
72
|
) {
|
|
70
73
|
return action();
|
|
71
74
|
}
|
|
@@ -111,12 +114,12 @@ export class Outbox {
|
|
|
111
114
|
this.blobAttachBatch = new BatchManager({ hardLimit });
|
|
112
115
|
}
|
|
113
116
|
|
|
117
|
+
public get messageCount(): number {
|
|
118
|
+
return this.attachFlowBatch.length + this.mainBatch.length + this.blobAttachBatch.length;
|
|
119
|
+
}
|
|
120
|
+
|
|
114
121
|
public get isEmpty(): boolean {
|
|
115
|
-
return
|
|
116
|
-
this.attachFlowBatch.length === 0 &&
|
|
117
|
-
this.mainBatch.length === 0 &&
|
|
118
|
-
this.blobAttachBatch.length === 0
|
|
119
|
-
);
|
|
122
|
+
return this.messageCount === 0;
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
/**
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
ContainerMessageType,
|
|
9
|
+
ContainerRuntimeMessage,
|
|
10
|
+
SequencedContainerRuntimeMessage,
|
|
11
|
+
} from "../containerRuntime";
|
|
8
12
|
import { OpDecompressor } from "./opDecompressor";
|
|
9
13
|
import { OpGroupingManager } from "./opGroupingManager";
|
|
10
14
|
import { OpSplitter } from "./opSplitter";
|
|
@@ -98,14 +102,23 @@ const copy = (remoteMessage: ISequencedDocumentMessage): ISequencedDocumentMessa
|
|
|
98
102
|
};
|
|
99
103
|
|
|
100
104
|
/**
|
|
101
|
-
* For a given message, it moves the nested
|
|
105
|
+
* For a given message, it moves the nested ContainerRuntimeMessage props one level up.
|
|
102
106
|
*
|
|
107
|
+
* The return type illustrates the assumption that the message param
|
|
108
|
+
* becomes a ContainerRuntimeMessage by the time the function returns
|
|
109
|
+
* (but there is no runtime validation of the 'type' or 'compatDetails' values)
|
|
103
110
|
*/
|
|
104
|
-
|
|
111
|
+
function unpack(
|
|
112
|
+
message: ISequencedDocumentMessage,
|
|
113
|
+
): asserts message is SequencedContainerRuntimeMessage {
|
|
105
114
|
const innerContents = message.contents as ContainerRuntimeMessage;
|
|
106
|
-
|
|
107
|
-
message
|
|
108
|
-
|
|
115
|
+
|
|
116
|
+
// We're going to turn message into a SequencedContainerRuntimeMessage in-place
|
|
117
|
+
const sequencedContainerRuntimeMessage = message as SequencedContainerRuntimeMessage;
|
|
118
|
+
sequencedContainerRuntimeMessage.type = innerContents.type;
|
|
119
|
+
sequencedContainerRuntimeMessage.contents = innerContents.contents;
|
|
120
|
+
sequencedContainerRuntimeMessage.compatDetails = innerContents.compatDetails;
|
|
121
|
+
}
|
|
109
122
|
|
|
110
123
|
/**
|
|
111
124
|
* Unpacks runtime messages.
|
package/src/packageVersion.ts
CHANGED
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import Deque from "double-ended-queue";
|
|
7
|
+
|
|
8
|
+
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
7
9
|
import { assert } from "@fluidframework/common-utils";
|
|
8
10
|
import { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
9
|
-
import { DataProcessingError } from "@fluidframework/container-utils";
|
|
10
11
|
import { Lazy } from "@fluidframework/core-utils";
|
|
11
12
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
12
|
-
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
13
|
-
|
|
14
|
-
import { ContainerMessageType } from "./containerRuntime";
|
|
13
|
+
import { DataProcessingError, ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
14
|
+
|
|
15
|
+
import { ContainerMessageType, SequencedContainerRuntimeMessage } from "./containerRuntime";
|
|
15
16
|
import { pkgVersion } from "./packageVersion";
|
|
16
17
|
import { IBatchMetadata } from "./metadata";
|
|
17
18
|
|
|
@@ -81,15 +82,17 @@ export interface IRuntimeStateHandler {
|
|
|
81
82
|
export class PendingStateManager implements IDisposable {
|
|
82
83
|
private readonly pendingMessages = new Deque<IPendingMessageNew>();
|
|
83
84
|
private readonly initialMessages = new Deque<IPendingMessageNew>();
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Sequenced local ops that are saved when stashing since pending ops may depend on them
|
|
88
|
+
*/
|
|
89
|
+
private savedOps: IPendingMessageNew[] = [];
|
|
90
|
+
|
|
84
91
|
private readonly disposeOnce = new Lazy<void>(() => {
|
|
85
92
|
this.initialMessages.clear();
|
|
86
93
|
this.pendingMessages.clear();
|
|
87
94
|
});
|
|
88
95
|
|
|
89
|
-
public get pendingMessagesCount(): number {
|
|
90
|
-
return this.pendingMessages.length;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
96
|
// Indicates whether we are processing a batch.
|
|
94
97
|
private isProcessingBatch: boolean = false;
|
|
95
98
|
|
|
@@ -99,12 +102,20 @@ export class PendingStateManager implements IDisposable {
|
|
|
99
102
|
|
|
100
103
|
private clientId: string | undefined;
|
|
101
104
|
|
|
105
|
+
/**
|
|
106
|
+
* The pending messages count. Includes `pendingMessages` and `initialMessages` to keep in sync with
|
|
107
|
+
* 'hasPendingMessages'.
|
|
108
|
+
*/
|
|
109
|
+
public get pendingMessagesCount(): number {
|
|
110
|
+
return this.pendingMessages.length + this.initialMessages.length;
|
|
111
|
+
}
|
|
112
|
+
|
|
102
113
|
/**
|
|
103
114
|
* Called to check if there are any pending messages in the pending message queue.
|
|
104
115
|
* @returns A boolean indicating whether there are messages or not.
|
|
105
116
|
*/
|
|
106
117
|
public hasPendingMessages(): boolean {
|
|
107
|
-
return
|
|
118
|
+
return this.pendingMessagesCount !== 0;
|
|
108
119
|
}
|
|
109
120
|
|
|
110
121
|
public getLocalState(): IPendingLocalState | undefined {
|
|
@@ -114,20 +125,22 @@ export class PendingStateManager implements IDisposable {
|
|
|
114
125
|
);
|
|
115
126
|
if (!this.pendingMessages.isEmpty()) {
|
|
116
127
|
return {
|
|
117
|
-
pendingStates: this.pendingMessages.toArray().map(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
parsedContent.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
pendingStates: [...this.savedOps, ...this.pendingMessages.toArray()].map(
|
|
129
|
+
(message) => {
|
|
130
|
+
let content = message.content;
|
|
131
|
+
const parsedContent = JSON.parse(content);
|
|
132
|
+
// IdAllocations need their localOpMetadata stashed in the contents
|
|
133
|
+
// of the op to correctly resume the session when processing stashed ops
|
|
134
|
+
if (parsedContent.type === ContainerMessageType.IdAllocation) {
|
|
135
|
+
parsedContent.contents.stashedState = message.localOpMetadata;
|
|
136
|
+
content = JSON.stringify(parsedContent);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// delete localOpMetadata since it may not be serializable
|
|
140
|
+
// and will be regenerated by applyStashedOp()
|
|
141
|
+
return { ...message, content, localOpMetadata: undefined };
|
|
142
|
+
},
|
|
143
|
+
),
|
|
131
144
|
};
|
|
132
145
|
}
|
|
133
146
|
}
|
|
@@ -230,7 +243,7 @@ export class PendingStateManager implements IDisposable {
|
|
|
230
243
|
* the batch information was preserved for batch messages.
|
|
231
244
|
* @param message - The message that got ack'd and needs to be processed.
|
|
232
245
|
*/
|
|
233
|
-
public processPendingLocalMessage(message:
|
|
246
|
+
public processPendingLocalMessage(message: SequencedContainerRuntimeMessage): unknown {
|
|
234
247
|
// Pre-processing part - This may be the start of a batch.
|
|
235
248
|
this.maybeProcessBatchBegin(message);
|
|
236
249
|
|
|
@@ -240,10 +253,16 @@ export class PendingStateManager implements IDisposable {
|
|
|
240
253
|
pendingMessage !== undefined,
|
|
241
254
|
0x169 /* "No pending message found for this remote message" */,
|
|
242
255
|
);
|
|
256
|
+
this.savedOps.push(pendingMessage);
|
|
257
|
+
|
|
243
258
|
this.pendingMessages.shift();
|
|
244
259
|
|
|
245
|
-
|
|
246
|
-
//
|
|
260
|
+
// IMPORTANT: Order matters here, this must match the order of the properties used
|
|
261
|
+
// when submitting the message.
|
|
262
|
+
const { type, contents, compatDetails } = message;
|
|
263
|
+
const messageContent = JSON.stringify({ type, contents, compatDetails });
|
|
264
|
+
|
|
265
|
+
// Stringified content should match
|
|
247
266
|
if (pendingMessage.content !== messageContent) {
|
|
248
267
|
this.stateHandler.close(
|
|
249
268
|
DataProcessingError.create(
|
|
@@ -424,6 +443,9 @@ export class PendingStateManager implements IDisposable {
|
|
|
424
443
|
}
|
|
425
444
|
}
|
|
426
445
|
|
|
446
|
+
// pending ops should no longer depend on previous sequenced local ops after resubmit
|
|
447
|
+
this.savedOps = [];
|
|
448
|
+
|
|
427
449
|
// We replayPendingStates on read connections too - we expect these to get nack'd though, and to then reconnect
|
|
428
450
|
// on a write connection and replay again. This filters out the replay that happens on the read connection so
|
|
429
451
|
// we only see the replays on write connections (that have a chance to go through).
|
package/src/scheduleManager.ts
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { EventEmitter } from "events";
|
|
6
6
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
7
7
|
import { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
|
-
import { ITelemetryLoggerExt, createChildLogger } from "@fluidframework/telemetry-utils";
|
|
9
|
-
import { assert, performance } from "@fluidframework/common-utils";
|
|
10
|
-
import { isRuntimeMessage } from "@fluidframework/driver-utils";
|
|
11
8
|
import {
|
|
9
|
+
createChildLogger,
|
|
12
10
|
DataCorruptionError,
|
|
13
11
|
DataProcessingError,
|
|
14
12
|
extractSafePropertiesFromMessage,
|
|
15
|
-
|
|
13
|
+
ITelemetryLoggerExt,
|
|
14
|
+
} from "@fluidframework/telemetry-utils";
|
|
15
|
+
import { assert, performance } from "@fluidframework/common-utils";
|
|
16
|
+
import { isRuntimeMessage } from "@fluidframework/driver-utils";
|
|
16
17
|
import { DeltaScheduler } from "./deltaScheduler";
|
|
17
18
|
import { pkgVersion } from "./packageVersion";
|
|
18
19
|
import { IBatchMetadata } from "./metadata";
|
package/src/summary/index.ts
CHANGED
|
@@ -11,7 +11,7 @@ export {
|
|
|
11
11
|
OrderedClientCollection,
|
|
12
12
|
OrderedClientElection,
|
|
13
13
|
} from "./orderedClientElection";
|
|
14
|
-
export { RunningSummarizer } from "./runningSummarizer";
|
|
14
|
+
export { defaultMaxAttemptsForSubmitFailures, RunningSummarizer } from "./runningSummarizer";
|
|
15
15
|
export {
|
|
16
16
|
ICancellableSummarizerController,
|
|
17
17
|
neverCancelledSummaryToken,
|
|
@@ -64,6 +64,8 @@ export {
|
|
|
64
64
|
SummarizeResultPart,
|
|
65
65
|
SubmitSummaryFailureData,
|
|
66
66
|
SummaryStage,
|
|
67
|
+
IRetriableFailureResult,
|
|
68
|
+
ISummarizeEventProps,
|
|
67
69
|
} from "./summarizerTypes";
|
|
68
70
|
export {
|
|
69
71
|
IAckedSummary,
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/* eslint-disable @rushstack/no-new-null */
|
|
6
|
-
import { IEvent, IEventProvider } from "@fluidframework/
|
|
7
|
-
import {
|
|
6
|
+
import { IEvent, IEventProvider, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
|
+
import {
|
|
8
|
+
ITelemetryLoggerExt,
|
|
9
|
+
createChildLogger,
|
|
10
|
+
UsageError,
|
|
11
|
+
} from "@fluidframework/telemetry-utils";
|
|
8
12
|
import { assert, TypedEventEmitter } from "@fluidframework/common-utils";
|
|
9
13
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
10
|
-
import { UsageError } from "@fluidframework/container-utils";
|
|
11
14
|
import { IClient, IQuorumClients, ISequencedClient } from "@fluidframework/protocol-definitions";
|
|
12
|
-
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
13
15
|
import { summarizerClientType } from "./summarizerClientElection";
|
|
14
16
|
|
|
15
17
|
// helper types for recursive readonly.
|