@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @fluidframework/container-runtime
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.6.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
|
|
8
|
+
|
|
9
|
+
The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
|
|
10
|
+
imported from the **@fluidframework/core-interfaces** package:
|
|
11
|
+
|
|
12
|
+
- interface IDisposable
|
|
13
|
+
- interface IErrorEvent
|
|
14
|
+
- interface IErrorEvent
|
|
15
|
+
- interface IEvent
|
|
16
|
+
- interface IEventProvider
|
|
17
|
+
- interface ILoggingError
|
|
18
|
+
- interface ITaggedTelemetryPropertyType
|
|
19
|
+
- interface ITelemetryBaseEvent
|
|
20
|
+
- interface ITelemetryBaseLogger
|
|
21
|
+
- interface ITelemetryErrorEvent
|
|
22
|
+
- interface ITelemetryGenericEvent
|
|
23
|
+
- interface ITelemetryLogger
|
|
24
|
+
- interface ITelemetryPerformanceEvent
|
|
25
|
+
- interface ITelemetryProperties
|
|
26
|
+
- type ExtendEventProvider
|
|
27
|
+
- type IEventThisPlaceHolder
|
|
28
|
+
- type IEventTransformer
|
|
29
|
+
- type ReplaceIEventThisPlaceHolder
|
|
30
|
+
- type ReplaceIEventThisPlaceHolder
|
|
31
|
+
- type TelemetryEventCategory
|
|
32
|
+
- type TelemetryEventPropertyType
|
|
33
|
+
|
|
34
|
+
- Deprecated `refreshLatestAck` in `ISummarizeOptions`, `IOnDemandSummarizeOptions` and `IEnqueueSummarizeOptions` ([#16907](https://github.com/microsoft/FluidFramework/issues/16907)) [5a921c56a6](https://github.com/microsoft/FluidFramework/commits/5a921c56a6ccd29a454e235e9d836717ce401714)
|
|
35
|
+
|
|
36
|
+
Passing `refreshLatestAck` as true will result in closing the summarizer. It is not supported anymore and will be removed in a future release. It should not be passed in to `summarizeOnDemand` and `enqueueSummarize` APIs anymore.
|
|
37
|
+
|
|
3
38
|
## 2.0.0-internal.6.1.0
|
|
4
39
|
|
|
5
40
|
Dependency updates only.
|
package/README.md
CHANGED
|
@@ -11,9 +11,10 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
|
|
|
11
11
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
12
12
|
library consumers should always prefer `^`.
|
|
13
13
|
|
|
14
|
-
Note that when depending on a library version of the form 2.0.0-internal.x.y.z
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
15
|
+
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
16
|
+
Standard `^` and `~` ranges will not work as expected.
|
|
17
|
+
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
17
18
|
package for more information including tools to convert between version schemes.
|
|
18
19
|
|
|
19
20
|
## Installation
|
package/dist/batchTracker.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare class BatchTracker {
|
|
|
17
17
|
* Track batch sizes in terms of op counts and processing times
|
|
18
18
|
*
|
|
19
19
|
* @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations
|
|
20
|
-
* @param logger - See {@link @fluidframework/
|
|
20
|
+
* @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}
|
|
21
21
|
* @param batchLengthThreshold - threshold for the length of a batch when to send an error event
|
|
22
22
|
* @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics
|
|
23
23
|
*/
|
package/dist/batchTracker.js
CHANGED
|
@@ -50,7 +50,7 @@ exports.BatchTracker = BatchTracker;
|
|
|
50
50
|
* Track batch sizes in terms of op counts and processing times
|
|
51
51
|
*
|
|
52
52
|
* @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations
|
|
53
|
-
* @param logger - See {@link @fluidframework/
|
|
53
|
+
* @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}
|
|
54
54
|
* @param batchLengthThreshold - threshold for the length of a batch when to send an error event
|
|
55
55
|
* @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics
|
|
56
56
|
*/
|
package/dist/batchTracker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batchTracker.js","sourceRoot":"","sources":["../src/batchTracker.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qEAAyF;AACzF,+DAAmE;AAInE,MAAa,YAAY;IAMxB,YACkB,iBAA+B,EAChD,MAA4B,EAC5B,oBAA4B,EAC5B,sBAA8B,EAC9B,mBAAiC,GAAG,EAAE,CAAC,0BAAW,CAAC,GAAG,EAAE;QAJvC,sBAAiB,GAAjB,iBAAiB,CAAc;QAJzC,sBAAiB,GAAW,CAAC,CAAC;QAUrC,IAAI,CAAC,MAAM,GAAG,IAAA,mCAAiB,EAAC,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,OAAkC,EAAE,EAAE;YAC9E,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,cAAc,CAAC;YACvD,IAAI,CAAC,6BAA6B,GAAG,gBAAgB,EAAE,CAAC;YACxD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,CAAC,EAAE,CACxB,UAAU,EACV,CAAC,KAAsB,EAAE,OAAkC,EAAE,EAAE;YAC9D,IAAA,qBAAM,EACL,IAAI,CAAC,wBAAwB,KAAK,SA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ed under the MIT License.\n */\n\nimport { EventEmitter } from \"events\";\nimport { ITelemetryLoggerExt, createChildLogger } from \"@fluidframework/telemetry-utils\";\nimport { assert, performance } from \"@fluidframework/common-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\n\nexport class BatchTracker {\n\tprivate readonly logger: ITelemetryLoggerExt;\n\tprivate startBatchSequenceNumber: number | undefined;\n\tprivate trackedBatchCount: number = 0;\n\tprivate batchProcessingStartTimeStamp: number | undefined;\n\n\tconstructor(\n\t\tprivate readonly batchEventEmitter: EventEmitter,\n\t\tlogger: ITelemetryBaseLogger,\n\t\tbatchLengthThreshold: number,\n\t\tbatchCountSamplingRate: number,\n\t\tdateTimeProvider: () => number = () => performance.now(),\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"Batching\" });\n\n\t\tthis.batchEventEmitter.on(\"batchBegin\", (message: ISequencedDocumentMessage) => {\n\t\t\tthis.startBatchSequenceNumber = message.sequenceNumber;\n\t\t\tthis.batchProcessingStartTimeStamp = dateTimeProvider();\n\t\t\tthis.trackedBatchCount++;\n\t\t});\n\n\t\tthis.batchEventEmitter.on(\n\t\t\t\"batchEnd\",\n\t\t\t(error: any | undefined, message: ISequencedDocumentMessage) => {\n\t\t\t\tassert(\n\t\t\t\t\tthis.startBatchSequenceNumber !== undefined &&\n\t\t\t\t\t\tthis.batchProcessingStartTimeStamp !== undefined,\n\t\t\t\t\t0x2ba /* \"batchBegin must fire before batchEnd\" */,\n\t\t\t\t);\n\n\t\t\t\tconst length = message.sequenceNumber - this.startBatchSequenceNumber + 1;\n\t\t\t\tif (length >= batchLengthThreshold) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"LengthTooBig\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tthreshold: batchLengthThreshold,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t\tbatchError: error !== undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (this.trackedBatchCount % batchCountSamplingRate === 0) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"Length\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tsamplingRate: batchCountSamplingRate,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.startBatchSequenceNumber = undefined;\n\t\t\t\tthis.batchProcessingStartTimeStamp = undefined;\n\t\t\t},\n\t\t);\n\t}\n}\n\n/**\n * Track batch sizes in terms of op counts and processing times\n *\n * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations\n * @param logger - See {@link @fluidframework/
|
|
1
|
+
{"version":3,"file":"batchTracker.js","sourceRoot":"","sources":["../src/batchTracker.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qEAAyF;AACzF,+DAAmE;AAInE,MAAa,YAAY;IAMxB,YACkB,iBAA+B,EAChD,MAA4B,EAC5B,oBAA4B,EAC5B,sBAA8B,EAC9B,mBAAiC,GAAG,EAAE,CAAC,0BAAW,CAAC,GAAG,EAAE;QAJvC,sBAAiB,GAAjB,iBAAiB,CAAc;QAJzC,sBAAiB,GAAW,CAAC,CAAC;QAUrC,IAAI,CAAC,MAAM,GAAG,IAAA,mCAAiB,EAAC,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,OAAkC,EAAE,EAAE;YAC9E,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,cAAc,CAAC;YACvD,IAAI,CAAC,6BAA6B,GAAG,gBAAgB,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C3B,uBAA+B,IAAI,EACnC,yBAAiC,IAAI,EACpC,EAAE,CAAC,IAAI,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AALlF,QAAA,gBAAgB,oBAKkE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter } from \"events\";\nimport { ITelemetryLoggerExt, createChildLogger } from \"@fluidframework/telemetry-utils\";\nimport { assert, performance } from \"@fluidframework/common-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\n\nexport class BatchTracker {\n\tprivate readonly logger: ITelemetryLoggerExt;\n\tprivate startBatchSequenceNumber: number | undefined;\n\tprivate trackedBatchCount: number = 0;\n\tprivate batchProcessingStartTimeStamp: number | undefined;\n\n\tconstructor(\n\t\tprivate readonly batchEventEmitter: EventEmitter,\n\t\tlogger: ITelemetryBaseLogger,\n\t\tbatchLengthThreshold: number,\n\t\tbatchCountSamplingRate: number,\n\t\tdateTimeProvider: () => number = () => performance.now(),\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"Batching\" });\n\n\t\tthis.batchEventEmitter.on(\"batchBegin\", (message: ISequencedDocumentMessage) => {\n\t\t\tthis.startBatchSequenceNumber = message.sequenceNumber;\n\t\t\tthis.batchProcessingStartTimeStamp = dateTimeProvider();\n\t\t\tthis.trackedBatchCount++;\n\t\t});\n\n\t\tthis.batchEventEmitter.on(\n\t\t\t\"batchEnd\",\n\t\t\t(error: any | undefined, message: ISequencedDocumentMessage) => {\n\t\t\t\tassert(\n\t\t\t\t\tthis.startBatchSequenceNumber !== undefined &&\n\t\t\t\t\t\tthis.batchProcessingStartTimeStamp !== undefined,\n\t\t\t\t\t0x2ba /* \"batchBegin must fire before batchEnd\" */,\n\t\t\t\t);\n\n\t\t\t\tconst length = message.sequenceNumber - this.startBatchSequenceNumber + 1;\n\t\t\t\tif (length >= batchLengthThreshold) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"LengthTooBig\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tthreshold: batchLengthThreshold,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t\tbatchError: error !== undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (this.trackedBatchCount % batchCountSamplingRate === 0) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"Length\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tsamplingRate: batchCountSamplingRate,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.startBatchSequenceNumber = undefined;\n\t\t\t\tthis.batchProcessingStartTimeStamp = undefined;\n\t\t\t},\n\t\t);\n\t}\n}\n\n/**\n * Track batch sizes in terms of op counts and processing times\n *\n * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations\n * @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}\n * @param batchLengthThreshold - threshold for the length of a batch when to send an error event\n * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics\n */\nexport const BindBatchTracker = (\n\tbatchEventEmitter: EventEmitter,\n\tlogger: ITelemetryLoggerExt,\n\tbatchLengthThreshold: number = 1000,\n\tbatchCountSamplingRate: number = 1000,\n) => new BatchTracker(batchEventEmitter, logger, batchLengthThreshold, batchCountSamplingRate);\n"]}
|
package/dist/blobManager.d.ts
CHANGED
|
@@ -38,12 +38,6 @@ export interface IBlobManagerLoadInfo {
|
|
|
38
38
|
redirectTable?: [string, string][];
|
|
39
39
|
}
|
|
40
40
|
export declare type IBlobManagerRuntime = Pick<IContainerRuntime, "attachState" | "connected" | "logger" | "clientDetails"> & Pick<ContainerRuntime, "gcTombstoneEnforcementAllowed"> & TypedEventEmitter<IContainerRuntimeEvents>;
|
|
41
|
-
export declare enum PendingBlobStatus {
|
|
42
|
-
OnlinePendingUpload = 0,
|
|
43
|
-
OnlinePendingOp = 1,
|
|
44
|
-
OfflinePendingUpload = 2,
|
|
45
|
-
OfflinePendingOp = 3
|
|
46
|
-
}
|
|
47
41
|
export interface IPendingBlobs {
|
|
48
42
|
[id: string]: {
|
|
49
43
|
blob: string;
|
|
@@ -76,9 +70,7 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
76
70
|
*/
|
|
77
71
|
private readonly redirectTable;
|
|
78
72
|
/**
|
|
79
|
-
* Blobs which
|
|
80
|
-
* Until we see the op round-trip, there is a possibility we may need to re-upload the blob, so
|
|
81
|
-
* we must save it. This is true for both the online and offline flow.
|
|
73
|
+
* Blobs which we have not yet seen a BlobAttach op round-trip and not yet attached to a DDS.
|
|
82
74
|
*/
|
|
83
75
|
private readonly pendingBlobs;
|
|
84
76
|
/**
|
|
@@ -108,21 +100,14 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
108
100
|
* before any ops that reference the local ID, otherwise, an invalid handle could be added to the document.
|
|
109
101
|
*/
|
|
110
102
|
sendBlobAttachOp: (localId: string, storageId?: string) => void, blobRequested: (blobPath: string) => void, isBlobDeleted: (blobPath: string) => boolean, runtime: IBlobManagerRuntime, stashedBlobs: IPendingBlobs | undefined, closeContainer: (error?: ICriticalContainerError) => void);
|
|
111
|
-
private get pendingOfflineUploads();
|
|
112
|
-
get hasPendingOfflineUploads(): boolean;
|
|
113
103
|
get allBlobsAttached(): boolean;
|
|
114
104
|
get hasPendingBlobs(): boolean;
|
|
115
105
|
private createAbortError;
|
|
116
106
|
/**
|
|
117
107
|
* Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
|
|
118
108
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
* Transition online blobs waiting for BlobAttach op round-trip since we will not see the op until we are connected
|
|
122
|
-
* again
|
|
123
|
-
*/
|
|
124
|
-
private onDisconnected;
|
|
125
|
-
private shutdownPendingBlobs;
|
|
109
|
+
processStashedChanges(): Promise<void>;
|
|
110
|
+
private stashPendingBlobs;
|
|
126
111
|
/**
|
|
127
112
|
* Set of actual storage IDs (i.e., IDs that can be requested from storage). This will be empty if the container is
|
|
128
113
|
* detached or there are no (non-pending) attachment blobs in the document
|
|
@@ -142,7 +127,6 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
142
127
|
private deletePendingBlob;
|
|
143
128
|
private onUploadResolve;
|
|
144
129
|
private onUploadReject;
|
|
145
|
-
private transitionToOffline;
|
|
146
130
|
/**
|
|
147
131
|
* Resubmit a BlobAttach op. Used to add storage IDs to ops that were
|
|
148
132
|
* submitted to runtime while disconnected.
|
|
@@ -205,6 +189,6 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
205
189
|
*/
|
|
206
190
|
private verifyBlobValidity;
|
|
207
191
|
setRedirectTable(table: Map<string, string>): void;
|
|
208
|
-
getPendingBlobs(waitBlobsToAttach?: boolean): Promise<IPendingBlobs>;
|
|
192
|
+
getPendingBlobs(waitBlobsToAttach?: boolean): Promise<IPendingBlobs | undefined>;
|
|
209
193
|
}
|
|
210
194
|
//# sourceMappingURL=blobManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobManager.d.ts","sourceRoot":"","sources":["../src/blobManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAEN,yBAAyB,EACzB,aAAa,EACb,MAAM,sCAAsC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under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.BlobManager = exports.
|
|
7
|
+
exports.BlobManager = exports.BlobHandle = void 0;
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
9
9
|
const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
10
10
|
const common_utils_1 = require("@fluidframework/common-utils");
|
|
11
11
|
const container_definitions_1 = require("@fluidframework/container-definitions");
|
|
12
12
|
const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
|
|
13
|
-
const container_utils_1 = require("@fluidframework/container-utils");
|
|
14
13
|
const containerRuntime_1 = require("./containerRuntime");
|
|
15
14
|
const gc_1 = require("./gc");
|
|
16
15
|
const throttler_1 = require("./throttler");
|
|
@@ -64,15 +63,6 @@ class CancellableThrottler {
|
|
|
64
63
|
this.cancelP = new common_utils_1.Deferred();
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
// Note that while offline we "submit" an op before uploading the blob, but we always
|
|
68
|
-
// expect blobs to be uploaded before we actually see the op round-trip
|
|
69
|
-
var PendingBlobStatus;
|
|
70
|
-
(function (PendingBlobStatus) {
|
|
71
|
-
PendingBlobStatus[PendingBlobStatus["OnlinePendingUpload"] = 0] = "OnlinePendingUpload";
|
|
72
|
-
PendingBlobStatus[PendingBlobStatus["OnlinePendingOp"] = 1] = "OnlinePendingOp";
|
|
73
|
-
PendingBlobStatus[PendingBlobStatus["OfflinePendingUpload"] = 2] = "OfflinePendingUpload";
|
|
74
|
-
PendingBlobStatus[PendingBlobStatus["OfflinePendingOp"] = 3] = "OfflinePendingOp";
|
|
75
|
-
})(PendingBlobStatus = exports.PendingBlobStatus || (exports.PendingBlobStatus = {}));
|
|
76
66
|
class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
77
67
|
constructor(routeContext, snapshot, getStorage,
|
|
78
68
|
/**
|
|
@@ -100,9 +90,7 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
100
90
|
this.runtime = runtime;
|
|
101
91
|
this.closeContainer = closeContainer;
|
|
102
92
|
/**
|
|
103
|
-
* Blobs which
|
|
104
|
-
* Until we see the op round-trip, there is a possibility we may need to re-upload the blob, so
|
|
105
|
-
* we must save it. This is true for both the online and offline flow.
|
|
93
|
+
* Blobs which we have not yet seen a BlobAttach op round-trip and not yet attached to a DDS.
|
|
106
94
|
*/
|
|
107
95
|
this.pendingBlobs = new Map();
|
|
108
96
|
/**
|
|
@@ -129,7 +117,6 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
129
117
|
this.mc.config.getBoolean(gc_1.throwOnTombstoneLoadKey) === true &&
|
|
130
118
|
this.runtime.gcTombstoneEnforcementAllowed &&
|
|
131
119
|
this.runtime.clientDetails.type !== summary_1.summarizerClientType;
|
|
132
|
-
this.runtime.on("disconnected", () => this.onDisconnected());
|
|
133
120
|
this.redirectTable = this.load(snapshot);
|
|
134
121
|
// Begin uploading stashed blobs from previous container instance
|
|
135
122
|
Object.entries(stashedBlobs).forEach(([localId, entry]) => {
|
|
@@ -143,7 +130,8 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
143
130
|
if (entry.minTTLInSeconds - timeLapseSinceLocalUpload > entry.minTTLInSeconds / 2) {
|
|
144
131
|
this.pendingBlobs.set(localId, {
|
|
145
132
|
blob,
|
|
146
|
-
|
|
133
|
+
uploading: false,
|
|
134
|
+
opsent: true,
|
|
147
135
|
handleP: new common_utils_1.Deferred(),
|
|
148
136
|
storageId,
|
|
149
137
|
uploadP: undefined,
|
|
@@ -157,46 +145,39 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
157
145
|
}
|
|
158
146
|
this.pendingBlobs.set(localId, {
|
|
159
147
|
blob,
|
|
160
|
-
|
|
148
|
+
uploading: true,
|
|
161
149
|
handleP: new common_utils_1.Deferred(),
|
|
162
150
|
uploadP: this.uploadBlob(localId, blob),
|
|
163
151
|
attached,
|
|
164
152
|
acked,
|
|
153
|
+
opsent: true,
|
|
165
154
|
});
|
|
166
155
|
});
|
|
167
156
|
this.sendBlobAttachOp = (localId, blobId) => {
|
|
168
157
|
const pendingEntry = this.pendingBlobs.get(localId);
|
|
169
158
|
(0, common_utils_1.assert)(pendingEntry !== undefined, 0x725 /* Must have pending blob entry for upcoming op */);
|
|
170
|
-
pendingEntry.opsent = true;
|
|
171
159
|
if (pendingEntry?.uploadTime && pendingEntry?.minTTLInSeconds) {
|
|
172
160
|
const secondsSinceUpload = (Date.now() - pendingEntry.uploadTime) / 1000;
|
|
173
161
|
const expired = pendingEntry.minTTLInSeconds - secondsSinceUpload < 0;
|
|
174
162
|
this.mc.logger.sendTelemetryEvent({
|
|
175
163
|
eventName: "sendBlobAttach",
|
|
176
|
-
entryStatus: pendingEntry.status,
|
|
177
164
|
secondsSinceUpload,
|
|
178
165
|
minTTLInSeconds: pendingEntry.minTTLInSeconds,
|
|
179
166
|
expired,
|
|
180
167
|
});
|
|
181
168
|
if (expired) {
|
|
182
169
|
// we want to avoid submitting ops with broken handles
|
|
183
|
-
this.closeContainer(new
|
|
170
|
+
this.closeContainer(new telemetry_utils_1.GenericError("Trying to submit a BlobAttach for expired blob", undefined, {
|
|
184
171
|
localId,
|
|
185
172
|
blobId,
|
|
186
|
-
entryStatus: pendingEntry.status,
|
|
187
173
|
secondsSinceUpload,
|
|
188
174
|
}));
|
|
189
175
|
}
|
|
190
176
|
}
|
|
177
|
+
pendingEntry.opsent = true;
|
|
191
178
|
return sendBlobAttachOp(localId, blobId);
|
|
192
179
|
};
|
|
193
180
|
}
|
|
194
|
-
get pendingOfflineUploads() {
|
|
195
|
-
return Array.from(this.pendingBlobs.values()).filter((e) => e.status === PendingBlobStatus.OfflinePendingUpload);
|
|
196
|
-
}
|
|
197
|
-
get hasPendingOfflineUploads() {
|
|
198
|
-
return this.pendingOfflineUploads.length > 0;
|
|
199
|
-
}
|
|
200
181
|
get allBlobsAttached() {
|
|
201
182
|
for (const [, entry] of this.pendingBlobs) {
|
|
202
183
|
if (entry.attached === false) {
|
|
@@ -212,45 +193,28 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
212
193
|
createAbortError(pending) {
|
|
213
194
|
return new telemetry_utils_1.LoggingError("uploadBlob aborted", {
|
|
214
195
|
acked: pending?.acked,
|
|
215
|
-
status: pending?.status,
|
|
216
196
|
uploadTime: pending?.uploadTime,
|
|
217
197
|
});
|
|
218
198
|
}
|
|
219
199
|
/**
|
|
220
200
|
* Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
|
|
221
201
|
*/
|
|
222
|
-
async
|
|
202
|
+
async processStashedChanges() {
|
|
223
203
|
this.retryThrottler.cancel();
|
|
224
|
-
const pendingUploads = this.
|
|
204
|
+
const pendingUploads = Array.from(this.pendingBlobs.values())
|
|
205
|
+
.filter((e) => e.uploading === true)
|
|
206
|
+
.map(async (e) => e.uploadP);
|
|
225
207
|
await telemetry_utils_1.PerformanceEvent.timedExecAsync(this.mc.logger, {
|
|
226
|
-
eventName: "
|
|
208
|
+
eventName: "BlobUploadProcessStashedChanges",
|
|
227
209
|
count: pendingUploads.length,
|
|
228
210
|
}, async () => Promise.all(pendingUploads), { start: true, end: true });
|
|
229
211
|
}
|
|
230
|
-
|
|
231
|
-
* Transition online blobs waiting for BlobAttach op round-trip since we will not see the op until we are connected
|
|
232
|
-
* again
|
|
233
|
-
*/
|
|
234
|
-
onDisconnected() {
|
|
235
|
-
for (const [localId, entry] of this.pendingBlobs) {
|
|
236
|
-
if (entry.status === PendingBlobStatus.OnlinePendingOp) {
|
|
237
|
-
// This will submit another BlobAttach op for this blob. This is necessary because the one we sent
|
|
238
|
-
// already didn't have the local ID.
|
|
239
|
-
this.transitionToOffline(localId);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
async shutdownPendingBlobs() {
|
|
212
|
+
async stashPendingBlobs() {
|
|
244
213
|
for (const [localId, entry] of this.pendingBlobs) {
|
|
245
|
-
if (entry.
|
|
214
|
+
if (!entry.opsent) {
|
|
246
215
|
this.sendBlobAttachOp(localId, entry.storageId);
|
|
247
|
-
entry.status = PendingBlobStatus.OfflinePendingUpload;
|
|
248
|
-
entry.handleP.resolve(this.getBlobHandle(localId));
|
|
249
|
-
}
|
|
250
|
-
else if (entry.status === PendingBlobStatus.OnlinePendingOp) {
|
|
251
|
-
entry.status = PendingBlobStatus.OfflinePendingOp;
|
|
252
|
-
entry.handleP.resolve(this.getBlobHandle(localId));
|
|
253
216
|
}
|
|
217
|
+
entry.handleP.resolve(this.getBlobHandle(localId));
|
|
254
218
|
}
|
|
255
219
|
return new Promise((resolve) => {
|
|
256
220
|
if (this.allBlobsAttached) {
|
|
@@ -342,7 +306,7 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
342
306
|
const localId = (0, uuid_1.v4)();
|
|
343
307
|
const pendingEntry = {
|
|
344
308
|
blob,
|
|
345
|
-
|
|
309
|
+
uploading: true,
|
|
346
310
|
handleP: new common_utils_1.Deferred(),
|
|
347
311
|
uploadP: this.uploadBlob(localId, blob),
|
|
348
312
|
attached: false,
|
|
@@ -391,47 +355,31 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
391
355
|
this.deletePendingBlob(localId);
|
|
392
356
|
return;
|
|
393
357
|
}
|
|
394
|
-
(0, common_utils_1.assert)(entry.
|
|
395
|
-
entry.status === PendingBlobStatus.OfflinePendingUpload, 0x386 /* Must have pending blob entry for uploaded blob */);
|
|
358
|
+
(0, common_utils_1.assert)(entry.uploading === true, 0x386 /* Must have pending blob entry for uploaded blob */);
|
|
396
359
|
entry.storageId = response.id;
|
|
397
360
|
entry.uploadTime = Date.now();
|
|
398
361
|
entry.minTTLInSeconds = response.minTTLInSeconds;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
// If there is already an op for this storage ID, append the local ID to the list. Once any op for
|
|
417
|
-
// this storage ID is ack'd, all pending blobs for it can be resolved since the op will keep the
|
|
418
|
-
// blob alive in storage.
|
|
419
|
-
this.opsInFlight.set(response.id, (this.opsInFlight.get(response.id) ?? []).concat(localId));
|
|
420
|
-
entry.status = PendingBlobStatus.OnlinePendingOp;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
else if (entry.status === PendingBlobStatus.OfflinePendingUpload) {
|
|
424
|
-
// We already submitted a BlobAttach op for this blob when it was transitioned to offline flow
|
|
425
|
-
entry.status = PendingBlobStatus.OfflinePendingOp;
|
|
426
|
-
}
|
|
362
|
+
// Send a blob attach op. This serves two purposes:
|
|
363
|
+
// 1. If its a new blob, i.e., it isn't de-duped, the server will keep the blob alive if it sees this op
|
|
364
|
+
// until its storage ID is added to the next summary.
|
|
365
|
+
// 2. It will create a local ID to storage ID mapping in all clients which is needed to retrieve the
|
|
366
|
+
// blob from the server via the storage ID.
|
|
367
|
+
if (!entry.opsent) {
|
|
368
|
+
this.sendBlobAttachOp(localId, response.id);
|
|
369
|
+
}
|
|
370
|
+
if (this.storageIds.has(response.id)) {
|
|
371
|
+
// The blob is de-duped. Set up a local ID to storage ID mapping and return the blob. Since this is
|
|
372
|
+
// an existing blob, we don't have to wait for the op to be ack'd since this step has already
|
|
373
|
+
// happened before and so, the server won't delete it.
|
|
374
|
+
this.setRedirection(localId, response.id);
|
|
375
|
+
entry.handleP.resolve(this.getBlobHandle(localId));
|
|
376
|
+
this.deletePendingBlobMaybe(localId);
|
|
427
377
|
}
|
|
428
378
|
else {
|
|
429
|
-
//
|
|
430
|
-
this
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
entry.status = PendingBlobStatus.OfflinePendingOp;
|
|
379
|
+
// If there is already an op for this storage ID, append the local ID to the list. Once any op for
|
|
380
|
+
// this storage ID is ack'd, all pending blobs for it can be resolved since the op will keep the
|
|
381
|
+
// blob alive in storage.
|
|
382
|
+
this.opsInFlight.set(response.id, (this.opsInFlight.get(response.id) ?? []).concat(localId));
|
|
435
383
|
}
|
|
436
384
|
return response;
|
|
437
385
|
}
|
|
@@ -443,9 +391,6 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
443
391
|
return;
|
|
444
392
|
}
|
|
445
393
|
if (!this.runtime.connected) {
|
|
446
|
-
if (entry.status === PendingBlobStatus.OnlinePendingUpload) {
|
|
447
|
-
this.transitionToOffline(localId);
|
|
448
|
-
}
|
|
449
394
|
// we are probably not connected to storage but start another upload request in case we are
|
|
450
395
|
entry.uploadP = this.retryThrottler
|
|
451
396
|
.getDelay()
|
|
@@ -457,27 +402,6 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
457
402
|
throw error;
|
|
458
403
|
}
|
|
459
404
|
}
|
|
460
|
-
transitionToOffline(localId) {
|
|
461
|
-
(0, common_utils_1.assert)(!this.runtime.connected, 0x388 /* Must only transition to offline flow while runtime is disconnected */);
|
|
462
|
-
const entry = this.pendingBlobs.get(localId);
|
|
463
|
-
(0, common_utils_1.assert)(!!entry, 0x389 /* No pending blob entry */);
|
|
464
|
-
(0, common_utils_1.assert)([PendingBlobStatus.OnlinePendingUpload, PendingBlobStatus.OnlinePendingOp].includes(entry.status), 0x38a /* Blob must be in online flow to transition to offline flow */);
|
|
465
|
-
/**
|
|
466
|
-
* If we haven't already submitted a BlobAttach op for this entry, send it before returning the blob handle.
|
|
467
|
-
* This will make sure that the BlobAttach op is sequenced prior to any ops referencing the handle. Otherwise,
|
|
468
|
-
* an invalid handle could be added to the document.
|
|
469
|
-
* storageId may be undefined but since we are not connected we will have a chance to add it when reSubmit()
|
|
470
|
-
* is called on reconnection.
|
|
471
|
-
*/
|
|
472
|
-
if (entry.status !== PendingBlobStatus.OnlinePendingOp) {
|
|
473
|
-
this.sendBlobAttachOp(localId, entry.storageId);
|
|
474
|
-
}
|
|
475
|
-
entry.status =
|
|
476
|
-
entry.status === PendingBlobStatus.OnlinePendingUpload
|
|
477
|
-
? PendingBlobStatus.OfflinePendingUpload
|
|
478
|
-
: PendingBlobStatus.OfflinePendingOp;
|
|
479
|
-
entry.handleP.resolve(this.getBlobHandle(localId));
|
|
480
|
-
}
|
|
481
405
|
/**
|
|
482
406
|
* Resubmit a BlobAttach op. Used to add storage IDs to ops that were
|
|
483
407
|
* submitted to runtime while disconnected.
|
|
@@ -490,8 +414,7 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
490
414
|
const pendingEntry = this.pendingBlobs.get(localId);
|
|
491
415
|
if (!blobId) {
|
|
492
416
|
// We submitted this op while offline. The blob should have been uploaded by now.
|
|
493
|
-
(0, common_utils_1.assert)(pendingEntry?.
|
|
494
|
-
!!pendingEntry?.storageId, 0x38d /* blob must be uploaded before resubmitting BlobAttach op */);
|
|
417
|
+
(0, common_utils_1.assert)(pendingEntry?.opsent === true && !!pendingEntry?.storageId, 0x38d /* blob must be uploaded before resubmitting BlobAttach op */);
|
|
495
418
|
return this.sendBlobAttachOp(localId, pendingEntry?.storageId);
|
|
496
419
|
}
|
|
497
420
|
return this.sendBlobAttachOp(localId, blobId);
|
|
@@ -526,21 +449,17 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
526
449
|
waitingBlobs.forEach((pendingLocalId) => {
|
|
527
450
|
const entry = this.pendingBlobs.get(pendingLocalId);
|
|
528
451
|
(0, common_utils_1.assert)(entry !== undefined, 0x38f /* local online BlobAttach op with no pending blob entry */);
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
entry.handleP.resolve(this.getBlobHandle(pendingLocalId));
|
|
534
|
-
this.deletePendingBlobMaybe(pendingLocalId);
|
|
535
|
-
}
|
|
452
|
+
this.setRedirection(pendingLocalId, blobId);
|
|
453
|
+
entry.acked = true;
|
|
454
|
+
entry.handleP.resolve(this.getBlobHandle(pendingLocalId));
|
|
455
|
+
this.deletePendingBlobMaybe(pendingLocalId);
|
|
536
456
|
});
|
|
537
457
|
this.opsInFlight.delete(blobId);
|
|
538
458
|
}
|
|
539
|
-
// offline flow does not resolve the handle (since it was already resolved)
|
|
540
|
-
// but we still need to delete the entry in case is acked and attached.
|
|
541
459
|
const localEntry = this.pendingBlobs.get(localId);
|
|
542
460
|
if (localEntry) {
|
|
543
461
|
localEntry.acked = true;
|
|
462
|
+
localEntry.handleP.resolve(this.getBlobHandle(localId));
|
|
544
463
|
this.deletePendingBlobMaybe(localId);
|
|
545
464
|
}
|
|
546
465
|
}
|
|
@@ -761,7 +680,10 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
|
|
|
761
680
|
}
|
|
762
681
|
async getPendingBlobs(waitBlobsToAttach) {
|
|
763
682
|
if (waitBlobsToAttach) {
|
|
764
|
-
await this.
|
|
683
|
+
await this.stashPendingBlobs();
|
|
684
|
+
}
|
|
685
|
+
if (this.pendingBlobs.size === 0) {
|
|
686
|
+
return;
|
|
765
687
|
}
|
|
766
688
|
const blobs = {};
|
|
767
689
|
for (const [key, entry] of this.pendingBlobs) {
|