@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
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
|
|
6
|
+
import Deque from "double-ended-queue";
|
|
7
|
+
|
|
8
|
+
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
9
|
+
import { assert, Lazy } from "@fluidframework/core-utils";
|
|
8
10
|
import { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
9
|
-
import { DataProcessingError } from "@fluidframework/container-utils";
|
|
10
11
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
11
|
-
import
|
|
12
|
-
|
|
12
|
+
import { DataProcessingError, ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
13
|
+
|
|
14
|
+
import { ContainerMessageType, SequencedContainerRuntimeMessage } from "./containerRuntime";
|
|
13
15
|
import { pkgVersion } from "./packageVersion";
|
|
16
|
+
import { IBatchMetadata } from "./metadata";
|
|
14
17
|
|
|
15
18
|
/**
|
|
16
|
-
* ! TODO: Remove this interface in "2.0.0-internal.7.0.0" once we only read IPendingMessageNew
|
|
19
|
+
* ! TODO: Remove this interface in "2.0.0-internal.7.0.0" once we only read IPendingMessageNew (AB#4763)
|
|
17
20
|
*/
|
|
18
21
|
export interface IPendingMessageOld {
|
|
19
22
|
type: "message";
|
|
@@ -39,7 +42,7 @@ export interface IPendingMessageNew {
|
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
/**
|
|
42
|
-
* ! TODO: Remove this type in "2.0.0-internal.7.0.0"
|
|
45
|
+
* ! TODO: Remove this type in "2.0.0-internal.7.0.0" (AB#4763)
|
|
43
46
|
*/
|
|
44
47
|
export type IPendingState = IPendingMessageOld | IPendingMessageNew;
|
|
45
48
|
|
|
@@ -50,17 +53,20 @@ export interface IPendingLocalState {
|
|
|
50
53
|
pendingStates: IPendingState[];
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
export interface IPendingBatchMessage {
|
|
57
|
+
content: string;
|
|
58
|
+
localOpMetadata: unknown;
|
|
59
|
+
opMetadata: Record<string, unknown> | undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
53
62
|
export interface IRuntimeStateHandler {
|
|
54
63
|
connected(): boolean;
|
|
55
64
|
clientId(): string | undefined;
|
|
56
65
|
close(error?: ICriticalContainerError): void;
|
|
57
66
|
applyStashedOp(content: string): Promise<unknown>;
|
|
58
|
-
reSubmit(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
opMetadata: Record<string, unknown> | undefined,
|
|
62
|
-
): void;
|
|
63
|
-
orderSequentially(callback: () => void): void;
|
|
67
|
+
reSubmit(message: IPendingBatchMessage): void;
|
|
68
|
+
reSubmitBatch(batch: IPendingBatchMessage[]): void;
|
|
69
|
+
isActiveConnection: () => boolean;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
/**
|
|
@@ -75,15 +81,17 @@ export interface IRuntimeStateHandler {
|
|
|
75
81
|
export class PendingStateManager implements IDisposable {
|
|
76
82
|
private readonly pendingMessages = new Deque<IPendingMessageNew>();
|
|
77
83
|
private readonly initialMessages = new Deque<IPendingMessageNew>();
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Sequenced local ops that are saved when stashing since pending ops may depend on them
|
|
87
|
+
*/
|
|
88
|
+
private savedOps: IPendingMessageNew[] = [];
|
|
89
|
+
|
|
78
90
|
private readonly disposeOnce = new Lazy<void>(() => {
|
|
79
91
|
this.initialMessages.clear();
|
|
80
92
|
this.pendingMessages.clear();
|
|
81
93
|
});
|
|
82
94
|
|
|
83
|
-
public get pendingMessagesCount(): number {
|
|
84
|
-
return this.pendingMessages.length;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
95
|
// Indicates whether we are processing a batch.
|
|
88
96
|
private isProcessingBatch: boolean = false;
|
|
89
97
|
|
|
@@ -93,12 +101,20 @@ export class PendingStateManager implements IDisposable {
|
|
|
93
101
|
|
|
94
102
|
private clientId: string | undefined;
|
|
95
103
|
|
|
104
|
+
/**
|
|
105
|
+
* The pending messages count. Includes `pendingMessages` and `initialMessages` to keep in sync with
|
|
106
|
+
* 'hasPendingMessages'.
|
|
107
|
+
*/
|
|
108
|
+
public get pendingMessagesCount(): number {
|
|
109
|
+
return this.pendingMessages.length + this.initialMessages.length;
|
|
110
|
+
}
|
|
111
|
+
|
|
96
112
|
/**
|
|
97
113
|
* Called to check if there are any pending messages in the pending message queue.
|
|
98
114
|
* @returns A boolean indicating whether there are messages or not.
|
|
99
115
|
*/
|
|
100
116
|
public hasPendingMessages(): boolean {
|
|
101
|
-
return
|
|
117
|
+
return this.pendingMessagesCount !== 0;
|
|
102
118
|
}
|
|
103
119
|
|
|
104
120
|
public getLocalState(): IPendingLocalState | undefined {
|
|
@@ -108,23 +124,22 @@ export class PendingStateManager implements IDisposable {
|
|
|
108
124
|
);
|
|
109
125
|
if (!this.pendingMessages.isEmpty()) {
|
|
110
126
|
return {
|
|
111
|
-
pendingStates: this.pendingMessages.toArray().map(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
content: content.contents,
|
|
127
|
+
pendingStates: [...this.savedOps, ...this.pendingMessages.toArray()].map(
|
|
128
|
+
(message) => {
|
|
129
|
+
let content = message.content;
|
|
130
|
+
const parsedContent = JSON.parse(content);
|
|
131
|
+
// IdAllocations need their localOpMetadata stashed in the contents
|
|
132
|
+
// of the op to correctly resume the session when processing stashed ops
|
|
133
|
+
if (parsedContent.type === ContainerMessageType.IdAllocation) {
|
|
134
|
+
parsedContent.contents.stashedState = message.localOpMetadata;
|
|
135
|
+
content = JSON.stringify(parsedContent);
|
|
136
|
+
}
|
|
137
|
+
|
|
123
138
|
// delete localOpMetadata since it may not be serializable
|
|
124
139
|
// and will be regenerated by applyStashedOp()
|
|
125
|
-
localOpMetadata: undefined
|
|
126
|
-
}
|
|
127
|
-
|
|
140
|
+
return { ...message, content, localOpMetadata: undefined };
|
|
141
|
+
},
|
|
142
|
+
),
|
|
128
143
|
};
|
|
129
144
|
}
|
|
130
145
|
}
|
|
@@ -132,10 +147,11 @@ export class PendingStateManager implements IDisposable {
|
|
|
132
147
|
constructor(
|
|
133
148
|
private readonly stateHandler: IRuntimeStateHandler,
|
|
134
149
|
initialLocalState: IPendingLocalState | undefined,
|
|
150
|
+
private readonly logger: ITelemetryLoggerExt | undefined,
|
|
135
151
|
) {
|
|
136
152
|
/**
|
|
137
153
|
* Convert old local state format to the new format (IPendingMessageOld to IPendingMessageNew)
|
|
138
|
-
* ! TODO: Remove this conversion in "2.0.0-internal.7.0.0"
|
|
154
|
+
* ! TODO: Remove this conversion in "2.0.0-internal.7.0.0" (AB#4763)
|
|
139
155
|
*/
|
|
140
156
|
if (initialLocalState?.pendingStates) {
|
|
141
157
|
for (const initialState of initialLocalState.pendingStates) {
|
|
@@ -207,9 +223,13 @@ export class PendingStateManager implements IDisposable {
|
|
|
207
223
|
}
|
|
208
224
|
}
|
|
209
225
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
226
|
+
try {
|
|
227
|
+
// applyStashedOp will cause the DDS to behave as if it has sent the op but not actually send it
|
|
228
|
+
const localOpMetadata = await this.stateHandler.applyStashedOp(nextMessage.content);
|
|
229
|
+
nextMessage.localOpMetadata = localOpMetadata;
|
|
230
|
+
} catch (error) {
|
|
231
|
+
throw DataProcessingError.wrapIfUnrecognized(error, "applyStashedOp", nextMessage);
|
|
232
|
+
}
|
|
213
233
|
|
|
214
234
|
// then we push onto pendingMessages which will cause PendingStateManager to resubmit when we connect
|
|
215
235
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -222,7 +242,7 @@ export class PendingStateManager implements IDisposable {
|
|
|
222
242
|
* the batch information was preserved for batch messages.
|
|
223
243
|
* @param message - The message that got ack'd and needs to be processed.
|
|
224
244
|
*/
|
|
225
|
-
public processPendingLocalMessage(message:
|
|
245
|
+
public processPendingLocalMessage(message: SequencedContainerRuntimeMessage): unknown {
|
|
226
246
|
// Pre-processing part - This may be the start of a batch.
|
|
227
247
|
this.maybeProcessBatchBegin(message);
|
|
228
248
|
|
|
@@ -232,10 +252,16 @@ export class PendingStateManager implements IDisposable {
|
|
|
232
252
|
pendingMessage !== undefined,
|
|
233
253
|
0x169 /* "No pending message found for this remote message" */,
|
|
234
254
|
);
|
|
255
|
+
this.savedOps.push(pendingMessage);
|
|
256
|
+
|
|
235
257
|
this.pendingMessages.shift();
|
|
236
258
|
|
|
237
|
-
|
|
238
|
-
//
|
|
259
|
+
// IMPORTANT: Order matters here, this must match the order of the properties used
|
|
260
|
+
// when submitting the message.
|
|
261
|
+
const { type, contents, compatDetails } = message;
|
|
262
|
+
const messageContent = JSON.stringify({ type, contents, compatDetails });
|
|
263
|
+
|
|
264
|
+
// Stringified content should match
|
|
239
265
|
if (pendingMessage.content !== messageContent) {
|
|
240
266
|
this.stateHandler.close(
|
|
241
267
|
DataProcessingError.create(
|
|
@@ -262,7 +288,7 @@ export class PendingStateManager implements IDisposable {
|
|
|
262
288
|
*/
|
|
263
289
|
private maybeProcessBatchBegin(message: ISequencedDocumentMessage) {
|
|
264
290
|
// This message is the first in a batch if the "batch" property on the metadata is set to true
|
|
265
|
-
if (message.metadata?.batch) {
|
|
291
|
+
if ((message.metadata as IBatchMetadata | undefined)?.batch) {
|
|
266
292
|
// We should not already be processing a batch and there should be no pending batch begin message.
|
|
267
293
|
assert(
|
|
268
294
|
!this.isProcessingBatch && this.pendingBatchBeginMessage === undefined,
|
|
@@ -290,10 +316,12 @@ export class PendingStateManager implements IDisposable {
|
|
|
290
316
|
0x16d /* "There is no pending batch begin message" */,
|
|
291
317
|
);
|
|
292
318
|
|
|
293
|
-
const batchEndMetadata = message.metadata?.batch;
|
|
319
|
+
const batchEndMetadata = (message.metadata as IBatchMetadata | undefined)?.batch;
|
|
294
320
|
if (this.pendingMessages.isEmpty() || batchEndMetadata === false) {
|
|
295
321
|
// Get the batch begin metadata from the first message in the batch.
|
|
296
|
-
const batchBeginMetadata =
|
|
322
|
+
const batchBeginMetadata = (
|
|
323
|
+
this.pendingBatchBeginMessage.metadata as IBatchMetadata | undefined
|
|
324
|
+
)?.batch;
|
|
297
325
|
|
|
298
326
|
// There could be just a single message in the batch. If so, it should not have any batch metadata. If there
|
|
299
327
|
// are multiple messages in the batch, verify that we got the correct batch begin and end metadata.
|
|
@@ -311,7 +339,10 @@ export class PendingStateManager implements IDisposable {
|
|
|
311
339
|
message,
|
|
312
340
|
{
|
|
313
341
|
runtimeVersion: pkgVersion,
|
|
314
|
-
batchClientId:
|
|
342
|
+
batchClientId:
|
|
343
|
+
this.pendingBatchBeginMessage.clientId === null
|
|
344
|
+
? "null"
|
|
345
|
+
: this.pendingBatchBeginMessage.clientId,
|
|
315
346
|
clientId: this.stateHandler.clientId(),
|
|
316
347
|
hasBatchStart: batchBeginMetadata === true,
|
|
317
348
|
hasBatchEnd: batchEndMetadata === false,
|
|
@@ -351,18 +382,16 @@ export class PendingStateManager implements IDisposable {
|
|
|
351
382
|
0x174 /* "initial states should be empty before replaying pending" */,
|
|
352
383
|
);
|
|
353
384
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
385
|
+
const initialPendingMessagesCount = this.pendingMessages.length;
|
|
386
|
+
let remainingPendingMessagesCount = this.pendingMessages.length;
|
|
358
387
|
|
|
359
388
|
// Process exactly `pendingMessagesCount` items in the queue as it represents the number of messages that were
|
|
360
389
|
// pending when we connected. This is important because the `reSubmitFn` might add more items in the queue
|
|
361
390
|
// which must not be replayed.
|
|
362
|
-
while (
|
|
391
|
+
while (remainingPendingMessagesCount > 0) {
|
|
363
392
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
364
393
|
let pendingMessage = this.pendingMessages.shift()!;
|
|
365
|
-
|
|
394
|
+
remainingPendingMessagesCount--;
|
|
366
395
|
assert(
|
|
367
396
|
pendingMessage.opMetadata?.batch !== false,
|
|
368
397
|
0x41b /* We cannot process batches in chunks */,
|
|
@@ -375,40 +404,56 @@ export class PendingStateManager implements IDisposable {
|
|
|
375
404
|
*/
|
|
376
405
|
if (pendingMessage.opMetadata?.batch) {
|
|
377
406
|
assert(
|
|
378
|
-
|
|
407
|
+
remainingPendingMessagesCount > 0,
|
|
379
408
|
0x554 /* Last pending message cannot be a batch begin */,
|
|
380
409
|
);
|
|
381
410
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
assert(pendingMessagesCount > 0, 0x555 /* No batch end found */);
|
|
395
|
-
|
|
396
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
397
|
-
pendingMessage = this.pendingMessages.shift()!;
|
|
398
|
-
pendingMessagesCount--;
|
|
399
|
-
assert(
|
|
400
|
-
pendingMessage.opMetadata?.batch !== true,
|
|
401
|
-
0x556 /* Batch start needs a corresponding batch end */,
|
|
402
|
-
);
|
|
411
|
+
const batch: IPendingBatchMessage[] = [];
|
|
412
|
+
|
|
413
|
+
// check is >= because batch end may be last pending message
|
|
414
|
+
while (remainingPendingMessagesCount >= 0) {
|
|
415
|
+
batch.push({
|
|
416
|
+
content: pendingMessage.content,
|
|
417
|
+
localOpMetadata: pendingMessage.localOpMetadata,
|
|
418
|
+
opMetadata: pendingMessage.opMetadata,
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
if (pendingMessage.opMetadata?.batch === false) {
|
|
422
|
+
break;
|
|
403
423
|
}
|
|
404
|
-
|
|
424
|
+
assert(remainingPendingMessagesCount > 0, 0x555 /* No batch end found */);
|
|
425
|
+
|
|
426
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
427
|
+
pendingMessage = this.pendingMessages.shift()!;
|
|
428
|
+
remainingPendingMessagesCount--;
|
|
429
|
+
assert(
|
|
430
|
+
pendingMessage.opMetadata?.batch !== true,
|
|
431
|
+
0x556 /* Batch start needs a corresponding batch end */,
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
this.stateHandler.reSubmitBatch(batch);
|
|
405
436
|
} else {
|
|
406
|
-
this.stateHandler.reSubmit(
|
|
407
|
-
pendingMessage.content,
|
|
408
|
-
pendingMessage.localOpMetadata,
|
|
409
|
-
pendingMessage.opMetadata,
|
|
410
|
-
);
|
|
437
|
+
this.stateHandler.reSubmit({
|
|
438
|
+
content: pendingMessage.content,
|
|
439
|
+
localOpMetadata: pendingMessage.localOpMetadata,
|
|
440
|
+
opMetadata: pendingMessage.opMetadata,
|
|
441
|
+
});
|
|
411
442
|
}
|
|
412
443
|
}
|
|
444
|
+
|
|
445
|
+
// pending ops should no longer depend on previous sequenced local ops after resubmit
|
|
446
|
+
this.savedOps = [];
|
|
447
|
+
|
|
448
|
+
// We replayPendingStates on read connections too - we expect these to get nack'd though, and to then reconnect
|
|
449
|
+
// on a write connection and replay again. This filters out the replay that happens on the read connection so
|
|
450
|
+
// we only see the replays on write connections (that have a chance to go through).
|
|
451
|
+
if (this.stateHandler.isActiveConnection()) {
|
|
452
|
+
this.logger?.sendTelemetryEvent({
|
|
453
|
+
eventName: "PendingStatesReplayed",
|
|
454
|
+
count: initialPendingMessagesCount,
|
|
455
|
+
clientId: this.stateHandler.clientId(),
|
|
456
|
+
});
|
|
457
|
+
}
|
|
413
458
|
}
|
|
414
459
|
}
|
package/src/scheduleManager.ts
CHANGED
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
import { EventEmitter } from "events";
|
|
6
6
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
7
7
|
import { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
|
-
import { ITelemetryLoggerExt, ChildLogger } from "@fluidframework/telemetry-utils";
|
|
9
|
-
import { assert, performance } from "@fluidframework/common-utils";
|
|
10
|
-
import { isRuntimeMessage } from "@fluidframework/driver-utils";
|
|
11
8
|
import {
|
|
9
|
+
createChildLogger,
|
|
12
10
|
DataCorruptionError,
|
|
13
11
|
DataProcessingError,
|
|
14
12
|
extractSafePropertiesFromMessage,
|
|
15
|
-
|
|
13
|
+
ITelemetryLoggerExt,
|
|
14
|
+
} from "@fluidframework/telemetry-utils";
|
|
15
|
+
import { assert } from "@fluidframework/core-utils";
|
|
16
|
+
import { performance } from "@fluid-internal/client-utils";
|
|
17
|
+
import { isRuntimeMessage } from "@fluidframework/driver-utils";
|
|
16
18
|
import { DeltaScheduler } from "./deltaScheduler";
|
|
17
19
|
import { pkgVersion } from "./packageVersion";
|
|
20
|
+
import { IBatchMetadata } from "./metadata";
|
|
18
21
|
|
|
19
22
|
type IRuntimeMessageMetadata =
|
|
20
23
|
| undefined
|
|
@@ -44,7 +47,7 @@ export class ScheduleManager {
|
|
|
44
47
|
) {
|
|
45
48
|
this.deltaScheduler = new DeltaScheduler(
|
|
46
49
|
this.deltaManager,
|
|
47
|
-
|
|
50
|
+
createChildLogger({ logger: this.logger, namespace: "DeltaScheduler" }),
|
|
48
51
|
);
|
|
49
52
|
void new ScheduleManagerCore(deltaManager, getClientId, logger);
|
|
50
53
|
}
|
|
@@ -61,7 +64,9 @@ export class ScheduleManager {
|
|
|
61
64
|
this.deltaScheduler.batchBegin(message);
|
|
62
65
|
|
|
63
66
|
const batch = (message?.metadata as IRuntimeMessageMetadata)?.batch;
|
|
64
|
-
this
|
|
67
|
+
// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
69
|
+
this.batchClientId = batch ? (message.clientId as string) : undefined;
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
|
|
@@ -127,7 +132,9 @@ class ScheduleManagerCore {
|
|
|
127
132
|
|
|
128
133
|
// Set the batch flag to false on the last message to indicate the end of the send batch
|
|
129
134
|
const lastMessage = messages[messages.length - 1];
|
|
130
|
-
|
|
135
|
+
// TODO: It's not clear if this shallow clone is required, as opposed to just setting "batch" to false.
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
137
|
+
lastMessage.metadata = { ...(lastMessage.metadata as any), batch: false };
|
|
131
138
|
});
|
|
132
139
|
|
|
133
140
|
// Listen for updates and peek at the inbound
|
|
@@ -185,7 +192,7 @@ class ScheduleManagerCore {
|
|
|
185
192
|
{
|
|
186
193
|
type: message.type,
|
|
187
194
|
contentType: typeof message.contents,
|
|
188
|
-
batch: message.metadata?.batch,
|
|
195
|
+
batch: (message.metadata as IBatchMetadata | undefined)?.batch,
|
|
189
196
|
compression: message.compression,
|
|
190
197
|
pauseSeqNum: this.pauseSequenceNumber,
|
|
191
198
|
},
|
|
@@ -263,7 +270,8 @@ class ScheduleManagerCore {
|
|
|
263
270
|
message,
|
|
264
271
|
{
|
|
265
272
|
runtimeVersion: pkgVersion,
|
|
266
|
-
batchClientId:
|
|
273
|
+
batchClientId:
|
|
274
|
+
this.currentBatchClientId === null ? "null" : this.currentBatchClientId,
|
|
267
275
|
pauseSequenceNumber: this.pauseSequenceNumber,
|
|
268
276
|
localBatch: this.currentBatchClientId === this.getClientId(),
|
|
269
277
|
messageType: message.type,
|
|
@@ -297,7 +305,8 @@ class ScheduleManagerCore {
|
|
|
297
305
|
) {
|
|
298
306
|
throw new DataCorruptionError("OpBatchIncomplete", {
|
|
299
307
|
runtimeVersion: pkgVersion,
|
|
300
|
-
batchClientId:
|
|
308
|
+
batchClientId:
|
|
309
|
+
this.currentBatchClientId === null ? "null" : this.currentBatchClientId,
|
|
301
310
|
pauseSequenceNumber: this.pauseSequenceNumber,
|
|
302
311
|
localBatch: this.currentBatchClientId === this.getClientId(),
|
|
303
312
|
localMessage: message.clientId === this.getClientId(),
|
|
@@ -321,7 +330,9 @@ class ScheduleManagerCore {
|
|
|
321
330
|
0x29f /* "we should be processing ops when there is no active batch" */,
|
|
322
331
|
);
|
|
323
332
|
this.pauseSequenceNumber = message.sequenceNumber;
|
|
324
|
-
this
|
|
333
|
+
// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)
|
|
334
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
335
|
+
this.currentBatchClientId = message.clientId as string;
|
|
325
336
|
// Start of the batch
|
|
326
337
|
// Only pause processing if queue has no other ops!
|
|
327
338
|
// If there are any other ops in the queue, processing will be stopped when they are processed!
|
package/src/summary/index.ts
CHANGED
|
@@ -11,7 +11,7 @@ export {
|
|
|
11
11
|
OrderedClientCollection,
|
|
12
12
|
OrderedClientElection,
|
|
13
13
|
} from "./orderedClientElection";
|
|
14
|
-
export { RunningSummarizer } from "./runningSummarizer";
|
|
14
|
+
export { defaultMaxAttemptsForSubmitFailures, RunningSummarizer } from "./runningSummarizer";
|
|
15
15
|
export {
|
|
16
16
|
ICancellableSummarizerController,
|
|
17
17
|
neverCancelledSummaryToken,
|
|
@@ -28,10 +28,9 @@ export { SummarizeHeuristicData, SummarizeHeuristicRunner } from "./summarizerHe
|
|
|
28
28
|
export {
|
|
29
29
|
createRootSummarizerNode,
|
|
30
30
|
createRootSummarizerNodeWithGC,
|
|
31
|
-
|
|
31
|
+
IRefreshSummaryResult,
|
|
32
32
|
IRootSummarizerNode,
|
|
33
33
|
IRootSummarizerNodeWithGC,
|
|
34
|
-
RefreshSummaryResult,
|
|
35
34
|
} from "./summarizerNode";
|
|
36
35
|
export {
|
|
37
36
|
IConnectableRuntime,
|
|
@@ -62,6 +61,10 @@ export {
|
|
|
62
61
|
ISummarizingWarning,
|
|
63
62
|
IUploadSummaryResult,
|
|
64
63
|
SummarizeResultPart,
|
|
64
|
+
SubmitSummaryFailureData,
|
|
65
|
+
SummaryStage,
|
|
66
|
+
IRetriableFailureResult,
|
|
67
|
+
ISummarizeEventProps,
|
|
65
68
|
} from "./summarizerTypes";
|
|
66
69
|
export {
|
|
67
70
|
IAckedSummary,
|
|
@@ -96,7 +99,7 @@ export {
|
|
|
96
99
|
wrapSummaryInChannelsTree,
|
|
97
100
|
idCompressorBlobName,
|
|
98
101
|
} from "./summaryFormat";
|
|
99
|
-
export { getFailMessage, SummarizeReason } from "./summaryGenerator";
|
|
102
|
+
export { getFailMessage, RetriableSummaryError, SummarizeReason } from "./summaryGenerator";
|
|
100
103
|
export {
|
|
101
104
|
IConnectedEvents,
|
|
102
105
|
IConnectedState,
|
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/* eslint-disable @rushstack/no-new-null */
|
|
6
|
-
import { IEvent, IEventProvider } from "@fluidframework/
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { IEvent, IEventProvider, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
|
+
import {
|
|
8
|
+
ITelemetryLoggerExt,
|
|
9
|
+
createChildLogger,
|
|
10
|
+
UsageError,
|
|
11
|
+
} from "@fluidframework/telemetry-utils";
|
|
12
|
+
import { assert } from "@fluidframework/core-utils";
|
|
13
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
9
14
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
10
|
-
import { UsageError } from "@fluidframework/container-utils";
|
|
11
15
|
import { IClient, IQuorumClients, ISequencedClient } from "@fluidframework/protocol-definitions";
|
|
12
16
|
import { summarizerClientType } from "./summarizerClientElection";
|
|
13
17
|
|
|
@@ -101,12 +105,12 @@ export class OrderedClientCollection
|
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
constructor(
|
|
104
|
-
logger:
|
|
108
|
+
logger: ITelemetryBaseLogger,
|
|
105
109
|
deltaManager: Pick<IDeltaManager<unknown, unknown>, "lastSequenceNumber">,
|
|
106
110
|
quorum: Pick<IQuorumClients, "getMembers" | "on">,
|
|
107
111
|
) {
|
|
108
112
|
super();
|
|
109
|
-
this.logger =
|
|
113
|
+
this.logger = createChildLogger({ logger, namespace: "OrderedClientCollection" });
|
|
110
114
|
const members = quorum.getMembers();
|
|
111
115
|
for (const [clientId, client] of members) {
|
|
112
116
|
this.addClient(clientId, client);
|