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