@fluidframework/container-runtime 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191457
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 +123 -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 +10 -16
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +184 -172
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +25 -16
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +161 -35
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +697 -449
- 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 +3 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +83 -87
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +1 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +8 -9
- 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 +22 -6
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +123 -81
- 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 +61 -53
- 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 -4
- 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.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/opLifecycle/batchManager.js +10 -6
- package/dist/opLifecycle/batchManager.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 +23 -20
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +19 -9
- 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 +22 -19
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +7 -5
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +22 -31
- 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 +19 -7
- 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 +18 -8
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +73 -51
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +36 -32
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/index.d.ts +3 -3
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +2 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +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 +10 -19
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +57 -130
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
- 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 +4 -14
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +15 -101
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +38 -25
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -3
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +12 -13
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +3 -0
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +6 -4
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +10 -4
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +106 -57
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +8 -8
- 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 +10 -16
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +159 -147
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +15 -6
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +161 -35
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +651 -402
- 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 +3 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +47 -51
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +1 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +3 -4
- 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 +22 -6
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +107 -65
- 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 -53
- 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 -4
- 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.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/opLifecycle/batchManager.js +10 -6
- package/lib/opLifecycle/batchManager.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 +15 -12
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +17 -7
- 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 +13 -10
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +7 -5
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +13 -22
- 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 +20 -8
- 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 +18 -8
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +62 -40
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +18 -14
- package/lib/scheduleManager.js.map +1 -1
- package/lib/summary/index.d.ts +3 -3
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +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 +10 -19
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +42 -115
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
- 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 +4 -14
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +14 -100
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +38 -25
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -3
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +5 -6
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +3 -0
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +5 -3
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +10 -4
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +100 -51
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +8 -8
- 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 +28 -31
- package/src/batchTracker.ts +7 -5
- package/src/blobManager.ts +188 -166
- package/src/connectionTelemetry.ts +9 -4
- package/src/containerRuntime.ts +806 -441
- package/src/dataStore.ts +12 -4
- package/src/dataStoreContext.ts +39 -43
- package/src/dataStoreContexts.ts +4 -6
- package/src/dataStoreRegistry.ts +1 -1
- package/src/dataStores.ts +114 -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 -52
- package/src/gc/gcConfigs.ts +4 -2
- package/src/gc/gcDefinitions.ts +17 -20
- 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 +14 -12
- 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 +7 -2
- package/src/opLifecycle/opCompressor.ts +6 -5
- package/src/opLifecycle/opDecompressor.ts +6 -4
- package/src/opLifecycle/opGroupingManager.ts +9 -6
- package/src/opLifecycle/opSplitter.ts +7 -6
- package/src/opLifecycle/outbox.ts +23 -32
- package/src/opLifecycle/remoteMessageProcessor.ts +27 -8
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +72 -42
- package/src/scheduleManager.ts +7 -5
- package/src/summary/index.ts +4 -3
- 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 +1 -2
- package/src/summary/summarizerNode/summarizerNode.ts +36 -160
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +7 -38
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +11 -130
- package/src/summary/summarizerTypes.ts +40 -25
- package/src/summary/summaryCollection.ts +3 -3
- package/src/summary/summaryFormat.ts +4 -1
- package/src/summary/summaryGenerator.ts +52 -52
- package/src/summary/summaryManager.ts +44 -17
- 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 -28
- package/dist/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/dist/id-compressor/uuidUtilities.js +0 -104
- package/dist/id-compressor/uuidUtilities.js.map +0 -1
- package/lib/id-compressor/idRange.d.ts +0 -11
- package/lib/id-compressor/idRange.d.ts.map +0 -1
- package/lib/id-compressor/idRange.js +0 -25
- package/lib/id-compressor/idRange.js.map +0 -1
- package/lib/id-compressor/numericUuid.d.ts +0 -59
- package/lib/id-compressor/numericUuid.d.ts.map +0 -1
- package/lib/id-compressor/numericUuid.js +0 -315
- package/lib/id-compressor/numericUuid.js.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/lib/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.js +0 -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 -28
- package/lib/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/lib/id-compressor/uuidUtilities.js +0 -96
- package/lib/id-compressor/uuidUtilities.js.map +0 -1
- package/src/id-compressor/idRange.ts +0 -35
- package/src/id-compressor/numericUuid.ts +0 -383
- package/src/id-compressor/sessionIdNormalizer.ts +0 -609
- package/src/id-compressor/utils.ts +0 -114
- package/src/id-compressor/uuidUtilities.ts +0 -120
|
@@ -7,13 +7,11 @@ import {
|
|
|
7
7
|
ITelemetryLoggerExt,
|
|
8
8
|
LoggingError,
|
|
9
9
|
TelemetryDataTag,
|
|
10
|
+
tagCodeArtifacts,
|
|
10
11
|
} from "@fluidframework/telemetry-utils";
|
|
11
|
-
import { assert } from "@fluidframework/
|
|
12
|
-
import { LazyPromise } from "@fluidframework/core-utils";
|
|
13
|
-
import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
12
|
+
import { assert, LazyPromise } from "@fluidframework/core-utils";
|
|
14
13
|
import {
|
|
15
14
|
CreateChildSummarizerNodeParam,
|
|
16
|
-
gcTreeKey,
|
|
17
15
|
IGarbageCollectionData,
|
|
18
16
|
IGarbageCollectionDetailsBase,
|
|
19
17
|
ISummarizeInternalResult,
|
|
@@ -24,20 +22,15 @@ import {
|
|
|
24
22
|
ITelemetryContext,
|
|
25
23
|
IExperimentalIncrementalSummaryContext,
|
|
26
24
|
} from "@fluidframework/runtime-definitions";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
getGCDataFromSnapshot,
|
|
31
|
-
runGarbageCollection,
|
|
32
|
-
unpackChildNodesGCDetails,
|
|
33
|
-
} from "../../gc";
|
|
25
|
+
import { unpackChildNodesUsedRoutes } from "@fluidframework/runtime-utils";
|
|
26
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
27
|
+
import { cloneGCData, unpackChildNodesGCDetails } from "../../gc";
|
|
34
28
|
import { SummarizerNode } from "./summarizerNode";
|
|
35
29
|
import {
|
|
36
30
|
EscapedPath,
|
|
37
31
|
ICreateChildDetails,
|
|
38
32
|
IInitialSummary,
|
|
39
33
|
ISummarizerNodeRootContract,
|
|
40
|
-
parseSummaryForSubtrees,
|
|
41
34
|
SummaryNode,
|
|
42
35
|
ValidateSummaryResult,
|
|
43
36
|
} from "./summarizerNodeUtils";
|
|
@@ -107,7 +100,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
107
100
|
* Use createRootSummarizerNodeWithGC to create root node, or createChild to create child nodes.
|
|
108
101
|
*/
|
|
109
102
|
public constructor(
|
|
110
|
-
logger:
|
|
103
|
+
logger: ITelemetryBaseLogger,
|
|
111
104
|
private readonly summarizeFn: (
|
|
112
105
|
fullTree: boolean,
|
|
113
106
|
trackState: boolean,
|
|
@@ -119,7 +112,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
119
112
|
/** Undefined means created without summary */
|
|
120
113
|
latestSummary?: SummaryNode,
|
|
121
114
|
initialSummary?: IInitialSummary,
|
|
122
|
-
wipSummaryLogger?:
|
|
115
|
+
wipSummaryLogger?: ITelemetryBaseLogger,
|
|
123
116
|
private readonly getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
124
117
|
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,
|
|
125
118
|
/** A unique id of this node to be logged when sending telemetry. */
|
|
@@ -370,10 +363,9 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
370
363
|
const error = new LoggingError("MissingGCStateInPendingSummary", {
|
|
371
364
|
proposalHandle,
|
|
372
365
|
referenceSequenceNumber,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
},
|
|
366
|
+
...tagCodeArtifacts({
|
|
367
|
+
id: this.telemetryNodeId,
|
|
368
|
+
}),
|
|
377
369
|
});
|
|
378
370
|
this.logger.sendErrorEvent(
|
|
379
371
|
{
|
|
@@ -390,117 +382,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
390
382
|
return super.refreshLatestSummaryFromPending(proposalHandle, referenceSequenceNumber);
|
|
391
383
|
}
|
|
392
384
|
|
|
393
|
-
/**
|
|
394
|
-
* Called when we need to upload the reference state from the given summary.
|
|
395
|
-
*/
|
|
396
|
-
protected async refreshLatestSummaryFromSnapshot(
|
|
397
|
-
referenceSequenceNumber: number,
|
|
398
|
-
snapshotTree: ISnapshotTree,
|
|
399
|
-
basePath: EscapedPath | undefined,
|
|
400
|
-
localPath: EscapedPath,
|
|
401
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
402
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
403
|
-
): Promise<void> {
|
|
404
|
-
await this.refreshGCStateFromSnapshot(
|
|
405
|
-
referenceSequenceNumber,
|
|
406
|
-
snapshotTree,
|
|
407
|
-
readAndParseBlob,
|
|
408
|
-
);
|
|
409
|
-
return super.refreshLatestSummaryFromSnapshot(
|
|
410
|
-
referenceSequenceNumber,
|
|
411
|
-
snapshotTree,
|
|
412
|
-
basePath,
|
|
413
|
-
localPath,
|
|
414
|
-
correlatedSummaryLogger,
|
|
415
|
-
readAndParseBlob,
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Updates GC state from the given snapshot if GC is enabled and the snapshot is newer than the one this node
|
|
421
|
-
* is tracking.
|
|
422
|
-
*/
|
|
423
|
-
private async refreshGCStateFromSnapshot(
|
|
424
|
-
referenceSequenceNumber: number,
|
|
425
|
-
snapshotTree: ISnapshotTree,
|
|
426
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
427
|
-
): Promise<void> {
|
|
428
|
-
// If GC is disabled or we have seen a newer summary, skip updating GC state.
|
|
429
|
-
if (this.gcDisabled || this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
// Load the base GC details before proceeding because if that happens later it can overwrite the GC details
|
|
434
|
-
// written by the following code.
|
|
435
|
-
await this.loadBaseGCDetails();
|
|
436
|
-
|
|
437
|
-
// Possible re-entrancy. We may already have processed this while loading base GC details.
|
|
438
|
-
if (this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
439
|
-
return;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* GC data is written at root of the snapshot tree under "gc" sub-tree. This data needs to be propagated to
|
|
444
|
-
* all the nodes in the container.
|
|
445
|
-
* The root summarizer node reads the GC data from the "gc" sub-tree, runs GC on it to get used routes in
|
|
446
|
-
* the container and updates its GC data and referenced used routes. It then gets the GC data and used
|
|
447
|
-
* routes of all its children and adds it to their snapshot tree.
|
|
448
|
-
* All the other nodes gets the GC data and used routes from their snapshot tree and updates their state.
|
|
449
|
-
* They get the GC data and used routes of their children and add it to their snapshot tree and so on.
|
|
450
|
-
*
|
|
451
|
-
* Note that if the snapshot does not have GC tree, GC data will be set to undefined and used routes will be
|
|
452
|
-
* set to self-route (meaning referenced) for all nodes. This is important because the GC data needs to be
|
|
453
|
-
* regenerated in the next summary.
|
|
454
|
-
*/
|
|
455
|
-
let gcDetails: IGarbageCollectionDetailsBase | undefined;
|
|
456
|
-
const gcSnapshotTree = snapshotTree.trees[gcTreeKey];
|
|
457
|
-
if (gcSnapshotTree !== undefined) {
|
|
458
|
-
// If there is a GC tree in the snapshot, this is the root summarizer node. Read GC data from the tree
|
|
459
|
-
// process it as explained above.
|
|
460
|
-
const gcSnapshotData = await getGCDataFromSnapshot(gcSnapshotTree, readAndParseBlob);
|
|
461
|
-
|
|
462
|
-
if (gcSnapshotData.gcState !== undefined) {
|
|
463
|
-
const gcNodes: { [id: string]: string[] } = {};
|
|
464
|
-
for (const [nodeId, nodeData] of Object.entries(gcSnapshotData.gcState.gcNodes)) {
|
|
465
|
-
gcNodes[nodeId] = Array.from(nodeData.outboundRoutes);
|
|
466
|
-
}
|
|
467
|
-
// Run GC on the nodes in the snapshot to get the used routes for each node in the container.
|
|
468
|
-
const usedRoutes = runGarbageCollection(gcNodes, ["/"]).referencedNodeIds;
|
|
469
|
-
gcDetails = { gcData: { gcNodes }, usedRoutes };
|
|
470
|
-
}
|
|
471
|
-
} else {
|
|
472
|
-
// If there is a GC blob in the snapshot, it's a non-root summarizer nodes - The root summarizer node
|
|
473
|
-
// writes GC blob in the snapshot of child nodes. Get GC data and used routes from the blob.
|
|
474
|
-
const gcDetailsBlob = snapshotTree.blobs[gcTreeKey];
|
|
475
|
-
if (gcDetailsBlob !== undefined) {
|
|
476
|
-
gcDetails = JSON.parse(gcDetailsBlob) as IGarbageCollectionDetailsBase;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
// Update this node to the same GC state it was when the ack corresponding to this summary was processed.
|
|
481
|
-
this.gcData = gcDetails?.gcData !== undefined ? cloneGCData(gcDetails.gcData) : undefined;
|
|
482
|
-
this.referenceUsedRoutes =
|
|
483
|
-
gcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : undefined;
|
|
484
|
-
// If there are no used routes in the GC details, set it to have self route which will make the node
|
|
485
|
-
// referenced. This scenario can only happen if the snapshot is from a client where GC was not run or
|
|
486
|
-
// disabled. In both the cases, the node should be referenced.
|
|
487
|
-
this.usedRoutes =
|
|
488
|
-
gcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : [""];
|
|
489
|
-
|
|
490
|
-
if (gcDetails === undefined) {
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
// Generate the GC data and used routes of children GC nodes and add it to their snapshot tree.
|
|
495
|
-
const gcDetailsMap = unpackChildNodesGCDetails(gcDetails);
|
|
496
|
-
const { childrenTree } = parseSummaryForSubtrees(snapshotTree);
|
|
497
|
-
gcDetailsMap.forEach((childGCDetails: IGarbageCollectionDetailsBase, childId: string) => {
|
|
498
|
-
if (childrenTree.trees[childId] !== undefined) {
|
|
499
|
-
childrenTree.trees[childId].blobs[gcTreeKey] = JSON.stringify(childGCDetails);
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
|
|
504
385
|
/**
|
|
505
386
|
* Override the createChild method to return an instance of SummarizerNodeWithGC.
|
|
506
387
|
*/
|
|
@@ -666,7 +547,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
666
547
|
* @param baseGCDetailsP - Function to get the initial GC details of this node
|
|
667
548
|
*/
|
|
668
549
|
export const createRootSummarizerNodeWithGC = (
|
|
669
|
-
logger:
|
|
550
|
+
logger: ITelemetryBaseLogger,
|
|
670
551
|
summarizeInternalFn: SummarizeInternalFn,
|
|
671
552
|
changeSequenceNumber: number,
|
|
672
553
|
referenceSequenceNumber: number | undefined,
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IEvent, IEventProvider } from "@fluidframework/
|
|
7
|
-
import { ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { IEvent, IEventProvider, ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
8
7
|
import { ITelemetryLoggerExt, ITelemetryLoggerPropertyBag } from "@fluidframework/telemetry-utils";
|
|
9
8
|
import { ContainerWarning, IDeltaManager } from "@fluidframework/container-definitions";
|
|
10
9
|
import {
|
|
@@ -34,6 +33,20 @@ export interface ICancellationToken<T> {
|
|
|
34
33
|
/* Similar to AbortSignal, but using promise instead of events */
|
|
35
34
|
export type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;
|
|
36
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Data required to update internal tracking state after receiving a Summary Ack.
|
|
38
|
+
*/
|
|
39
|
+
export interface IRefreshSummaryAckOptions {
|
|
40
|
+
/** Handle from the ack's summary op. */
|
|
41
|
+
readonly proposalHandle: string | undefined;
|
|
42
|
+
/** Handle from the summary ack just received */
|
|
43
|
+
readonly ackHandle: string;
|
|
44
|
+
/** Reference sequence number from the ack's summary op */
|
|
45
|
+
readonly summaryRefSeq: number;
|
|
46
|
+
/** Telemetry logger to which telemetry events will be forwarded. */
|
|
47
|
+
readonly summaryLogger: ITelemetryLoggerExt;
|
|
48
|
+
}
|
|
49
|
+
|
|
37
50
|
export interface ISummarizerInternalsProvider {
|
|
38
51
|
/** Encapsulates the work to walk the internals of the running container to generate a summary */
|
|
39
52
|
submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
|
|
@@ -88,29 +101,21 @@ export interface ISummarizerRuntime extends IConnectableRuntime {
|
|
|
88
101
|
export interface ISummarizeOptions {
|
|
89
102
|
/** True to generate the full tree with no handle reuse optimizations; defaults to false */
|
|
90
103
|
readonly fullTree?: boolean;
|
|
91
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* True to ask the server what the latest summary is first; defaults to false
|
|
106
|
+
*
|
|
107
|
+
* @deprecated - Summarize will not refresh latest snapshot state anymore.
|
|
108
|
+
*/
|
|
92
109
|
readonly refreshLatestAck?: boolean;
|
|
93
110
|
}
|
|
94
111
|
|
|
95
|
-
/**
|
|
96
|
-
* Data required to update internal tracking state after receiving a Summary Ack.
|
|
97
|
-
*/
|
|
98
|
-
export interface IRefreshSummaryAckOptions {
|
|
99
|
-
/** Handle from the ack's summary op. */
|
|
100
|
-
readonly proposalHandle: string | undefined;
|
|
101
|
-
/** Handle from the summary ack just received */
|
|
102
|
-
readonly ackHandle: string;
|
|
103
|
-
/** Reference sequence number from the ack's summary op */
|
|
104
|
-
readonly summaryRefSeq: number;
|
|
105
|
-
/** Telemetry logger to which telemetry events will be forwarded. */
|
|
106
|
-
readonly summaryLogger: ITelemetryLoggerExt;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
112
|
export interface ISubmitSummaryOptions extends ISummarizeOptions {
|
|
110
113
|
/** Logger to use for correlated summary events */
|
|
111
114
|
readonly summaryLogger: ITelemetryLoggerExt;
|
|
112
115
|
/** Tells when summary process should be cancelled */
|
|
113
116
|
readonly cancellationToken: ISummaryCancellationToken;
|
|
117
|
+
/** Summarization may be attempted multiple times. This tells whether this is the final summarization attempt. */
|
|
118
|
+
readonly finalAttempt?: boolean;
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
export interface IOnDemandSummarizeOptions extends ISummarizeOptions {
|
|
@@ -216,8 +221,14 @@ export type SubmitSummaryResult =
|
|
|
216
221
|
|
|
217
222
|
/** The stages of Summarize, used to describe how far progress succeeded in case of a failure at a later stage. */
|
|
218
223
|
export type SummaryStage = SubmitSummaryResult["stage"] | "unknown";
|
|
224
|
+
|
|
225
|
+
/** Type for summarization failures that are retriable. */
|
|
226
|
+
export interface IRetriableFailureResult {
|
|
227
|
+
readonly retryAfterSeconds?: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
219
230
|
/** The data in summarizer result when submit summary stage fails. */
|
|
220
|
-
export interface SubmitSummaryFailureData {
|
|
231
|
+
export interface SubmitSummaryFailureData extends IRetriableFailureResult {
|
|
221
232
|
stage: SummaryStage;
|
|
222
233
|
}
|
|
223
234
|
|
|
@@ -231,7 +242,7 @@ export interface IAckSummaryResult {
|
|
|
231
242
|
readonly ackNackDuration: number;
|
|
232
243
|
}
|
|
233
244
|
|
|
234
|
-
export interface INackSummaryResult {
|
|
245
|
+
export interface INackSummaryResult extends IRetriableFailureResult {
|
|
235
246
|
readonly summaryNackOp: ISummaryNackMessage;
|
|
236
247
|
readonly ackNackDuration: number;
|
|
237
248
|
}
|
|
@@ -246,7 +257,6 @@ export type SummarizeResultPart<TSuccess, TFailure = undefined> =
|
|
|
246
257
|
data: TFailure | undefined;
|
|
247
258
|
message: string;
|
|
248
259
|
error: any;
|
|
249
|
-
retryAfterSeconds?: number;
|
|
250
260
|
};
|
|
251
261
|
|
|
252
262
|
export interface ISummarizeResults {
|
|
@@ -315,11 +325,14 @@ export type SummarizerStopReason =
|
|
|
315
325
|
*/
|
|
316
326
|
| "latestSummaryStateStale";
|
|
317
327
|
|
|
328
|
+
export interface ISummarizeEventProps {
|
|
329
|
+
result: "success" | "failure" | "canceled";
|
|
330
|
+
currentAttempt: number;
|
|
331
|
+
maxAttempts: number;
|
|
332
|
+
error?: any;
|
|
333
|
+
}
|
|
318
334
|
export interface ISummarizerEvents extends IEvent {
|
|
319
|
-
|
|
320
|
-
* An event indicating that the Summarizer is having problems summarizing
|
|
321
|
-
*/
|
|
322
|
-
(event: "summarizingError", listener: (error: ISummarizingWarning) => void);
|
|
335
|
+
(event: "summarize", listener: (props: ISummarizeEventProps) => void);
|
|
323
336
|
}
|
|
324
337
|
|
|
325
338
|
export interface ISummarizer extends IEventProvider<ISummarizerEvents> {
|
|
@@ -437,7 +450,7 @@ export interface ISummarizeHeuristicRunner {
|
|
|
437
450
|
|
|
438
451
|
type ISummarizeTelemetryRequiredProperties =
|
|
439
452
|
/** Reason code for attempting to summarize */
|
|
440
|
-
"
|
|
453
|
+
"summarizeReason";
|
|
441
454
|
|
|
442
455
|
type ISummarizeTelemetryOptionalProperties =
|
|
443
456
|
/** Number of attempts within the last time window, used for calculating the throttle delay. */
|
|
@@ -446,6 +459,8 @@ type ISummarizeTelemetryOptionalProperties =
|
|
|
446
459
|
| "summaryAttemptsPerPhase"
|
|
447
460
|
/** One-based count of phases we've attempted (used to index into an array of ISummarizeOptions */
|
|
448
461
|
| "summaryAttemptPhase"
|
|
462
|
+
/** Summarization may be attempted multiple times. This tells whether this is the final summarization attempt */
|
|
463
|
+
| "finalAttempt"
|
|
449
464
|
| keyof ISummarizeOptions;
|
|
450
465
|
|
|
451
466
|
export type ISummarizeTelemetryProperties = Pick<
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IEvent } from "@fluidframework/
|
|
7
|
-
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { IDisposable, IEvent } from "@fluidframework/core-interfaces";
|
|
8
7
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
9
|
-
import { Deferred, assert
|
|
8
|
+
import { Deferred, assert } from "@fluidframework/core-utils";
|
|
9
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
10
10
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
11
11
|
import {
|
|
12
12
|
IDocumentMessage,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/
|
|
6
|
+
import { assert } from "@fluidframework/core-utils";
|
|
7
7
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
8
8
|
import {
|
|
9
9
|
readAndParse,
|
|
@@ -187,7 +187,9 @@ export const dataStoreAttributesBlobName = ".component";
|
|
|
187
187
|
* @param summarizeResult - Summary tree and stats to modify
|
|
188
188
|
*
|
|
189
189
|
* @example
|
|
190
|
+
*
|
|
190
191
|
* Converts from:
|
|
192
|
+
*
|
|
191
193
|
* ```typescript
|
|
192
194
|
* {
|
|
193
195
|
* type: SummaryType.Tree,
|
|
@@ -208,6 +210,7 @@ export const dataStoreAttributesBlobName = ".component";
|
|
|
208
210
|
* },
|
|
209
211
|
* }
|
|
210
212
|
* ```
|
|
213
|
+
*
|
|
211
214
|
* And adds +1 to treeNodeCount in stats.
|
|
212
215
|
*/
|
|
213
216
|
export function wrapSummaryInChannelsTree(summarizeResult: ISummaryTreeWithStats): void {
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
ITelemetryLoggerExt,
|
|
8
8
|
PerformanceEvent,
|
|
9
9
|
LoggingError,
|
|
10
|
-
ChildLogger,
|
|
11
10
|
} from "@fluidframework/telemetry-utils";
|
|
12
11
|
import { ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
13
12
|
|
|
@@ -17,14 +16,13 @@ import {
|
|
|
17
16
|
IPromiseTimer,
|
|
18
17
|
IPromiseTimerResult,
|
|
19
18
|
Timer,
|
|
20
|
-
} from "@fluidframework/
|
|
19
|
+
} from "@fluidframework/core-utils";
|
|
21
20
|
import { MessageType } from "@fluidframework/protocol-definitions";
|
|
22
21
|
import { getRetryDelaySecondsFromError } from "@fluidframework/driver-utils";
|
|
23
|
-
import {
|
|
22
|
+
import { DriverErrorTypes } from "@fluidframework/driver-definitions";
|
|
24
23
|
import {
|
|
25
24
|
IAckSummaryResult,
|
|
26
25
|
INackSummaryResult,
|
|
27
|
-
ISummarizeOptions,
|
|
28
26
|
IBroadcastSummaryResult,
|
|
29
27
|
ISummarizeResults,
|
|
30
28
|
ISummarizeHeuristicData,
|
|
@@ -32,9 +30,7 @@ import {
|
|
|
32
30
|
SubmitSummaryResult,
|
|
33
31
|
SummarizeResultPart,
|
|
34
32
|
ISummaryCancellationToken,
|
|
35
|
-
ISummarizeTelemetryProperties,
|
|
36
33
|
SummaryGeneratorTelemetry,
|
|
37
|
-
SummaryStage,
|
|
38
34
|
SubmitSummaryFailureData,
|
|
39
35
|
} from "./summarizerTypes";
|
|
40
36
|
import { IClientSummaryWatcher } from "./summaryCollection";
|
|
@@ -143,12 +139,17 @@ export class SummarizeResultBuilder {
|
|
|
143
139
|
SummarizeResultPart<IAckSummaryResult, INackSummaryResult>
|
|
144
140
|
>();
|
|
145
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Fails one or more of the three results as per the passed params.
|
|
144
|
+
* If submit fails, all three results fail.
|
|
145
|
+
* If op broadcast fails, only op broadcast result and ack nack result fails.
|
|
146
|
+
* If ack nack fails, only ack nack result fails.
|
|
147
|
+
*/
|
|
146
148
|
public fail(
|
|
147
149
|
message: string,
|
|
148
150
|
error: any,
|
|
149
|
-
|
|
151
|
+
submitFailureResult?: SubmitSummaryFailureData,
|
|
150
152
|
nackSummaryResult?: INackSummaryResult,
|
|
151
|
-
retryAfterSeconds?: number,
|
|
152
153
|
) {
|
|
153
154
|
assert(
|
|
154
155
|
!this.receivedSummaryAckOrNack.isCompleted,
|
|
@@ -160,9 +161,11 @@ export class SummarizeResultBuilder {
|
|
|
160
161
|
message,
|
|
161
162
|
data: undefined,
|
|
162
163
|
error,
|
|
163
|
-
retryAfterSeconds,
|
|
164
164
|
} as const;
|
|
165
|
-
|
|
165
|
+
|
|
166
|
+
// Note that if any of these are already resolved, it will be a no-op. For example, if ack nack failed but
|
|
167
|
+
// submit summary and op broadcast has already been resolved as passed, only ack nack result will get modified.
|
|
168
|
+
this.summarySubmitted.resolve({ ...result, data: submitFailureResult });
|
|
166
169
|
this.summaryOpBroadcasted.resolve(result);
|
|
167
170
|
this.receivedSummaryAckOrNack.resolve({ ...result, data: nackSummaryResult });
|
|
168
171
|
}
|
|
@@ -217,30 +220,23 @@ export class SummaryGenerator {
|
|
|
217
220
|
* fullTree to generate tree without any summary handles even if unchanged
|
|
218
221
|
*/
|
|
219
222
|
public summarize(
|
|
220
|
-
|
|
221
|
-
options: ISummarizeOptions,
|
|
222
|
-
cancellationToken: ISummaryCancellationToken,
|
|
223
|
+
summaryOptions: ISubmitSummaryOptions,
|
|
223
224
|
resultsBuilder = new SummarizeResultBuilder(),
|
|
224
225
|
): ISummarizeResults {
|
|
225
|
-
this.summarizeCore(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
},
|
|
231
|
-
);
|
|
226
|
+
this.summarizeCore(summaryOptions, resultsBuilder).catch((error) => {
|
|
227
|
+
const message = "UnexpectedSummarizeError";
|
|
228
|
+
summaryOptions.summaryLogger.sendErrorEvent({ eventName: message }, error);
|
|
229
|
+
resultsBuilder.fail(message, error);
|
|
230
|
+
});
|
|
232
231
|
|
|
233
232
|
return resultsBuilder.build();
|
|
234
233
|
}
|
|
235
234
|
|
|
236
235
|
private async summarizeCore(
|
|
237
|
-
|
|
238
|
-
options: ISummarizeOptions,
|
|
236
|
+
submitSummaryOptions: ISubmitSummaryOptions,
|
|
239
237
|
resultsBuilder: SummarizeResultBuilder,
|
|
240
|
-
cancellationToken: ISummaryCancellationToken,
|
|
241
238
|
): Promise<void> {
|
|
242
|
-
const {
|
|
243
|
-
const logger = ChildLogger.create(this.logger, undefined, { all: summarizeProps });
|
|
239
|
+
const { summaryLogger, cancellationToken, ...summarizeOptions } = submitSummaryOptions;
|
|
244
240
|
|
|
245
241
|
// Note: timeSinceLastAttempt and timeSinceLastSummary for the
|
|
246
242
|
// first summary are basically the time since the summarizer was loaded.
|
|
@@ -248,37 +244,40 @@ export class SummaryGenerator {
|
|
|
248
244
|
const timeSinceLastSummary =
|
|
249
245
|
Date.now() - this.heuristicData.lastSuccessfulSummary.summaryTime;
|
|
250
246
|
let summarizeTelemetryProps: SummaryGeneratorTelemetry = {
|
|
251
|
-
|
|
247
|
+
...summarizeOptions,
|
|
248
|
+
fullTree: summarizeOptions.fullTree ?? false,
|
|
252
249
|
timeSinceLastAttempt,
|
|
253
250
|
timeSinceLastSummary,
|
|
254
251
|
};
|
|
255
252
|
|
|
256
253
|
const summarizeEvent = PerformanceEvent.start(
|
|
257
|
-
|
|
254
|
+
summaryLogger,
|
|
258
255
|
{
|
|
259
256
|
eventName: "Summarize",
|
|
260
|
-
refreshLatestAck,
|
|
261
257
|
...summarizeTelemetryProps,
|
|
262
258
|
},
|
|
263
259
|
{ start: true, end: true, cancel: "generic" },
|
|
264
260
|
);
|
|
265
261
|
|
|
266
262
|
let summaryData: SubmitSummaryResult | undefined;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Summarization can fail during submit, during op broadcast or during nack.
|
|
266
|
+
* For submit failures, submitFailureResult should be provided. For nack failures, nackSummaryResult should
|
|
267
|
+
* be provided. For op broadcast failures, only errors / properties should be provided.
|
|
268
|
+
*/
|
|
267
269
|
const fail = (
|
|
268
270
|
errorCode: keyof typeof summarizeErrors,
|
|
269
271
|
error?: any,
|
|
270
272
|
properties?: SummaryGeneratorTelemetry,
|
|
273
|
+
submitFailureResult?: SubmitSummaryFailureData,
|
|
271
274
|
nackSummaryResult?: INackSummaryResult,
|
|
272
275
|
) => {
|
|
273
|
-
// UploadSummary may fail with 429 and retryAfter - respect that
|
|
274
|
-
// Summary Nack also can have retryAfter, it's parsed below and comes as a property.
|
|
275
|
-
const retryAfterSeconds = getRetryDelaySecondsFromError(error);
|
|
276
|
-
|
|
277
276
|
// Report any failure as an error unless it was due to cancellation (like "disconnected" error)
|
|
278
277
|
// If failure happened on upload, we may not yet realized that socket disconnected, so check
|
|
279
278
|
// offlineError too.
|
|
280
279
|
const category =
|
|
281
|
-
cancellationToken.cancelled || error?.errorType ===
|
|
280
|
+
cancellationToken.cancelled || error?.errorType === DriverErrorTypes.offlineError
|
|
282
281
|
? "generic"
|
|
283
282
|
: "error";
|
|
284
283
|
|
|
@@ -288,15 +287,14 @@ export class SummaryGenerator {
|
|
|
288
287
|
...properties,
|
|
289
288
|
reason,
|
|
290
289
|
category,
|
|
291
|
-
retryAfterSeconds
|
|
290
|
+
retryAfterSeconds:
|
|
291
|
+
submitFailureResult?.retryAfterSeconds ??
|
|
292
|
+
nackSummaryResult?.retryAfterSeconds,
|
|
292
293
|
},
|
|
293
294
|
error ?? reason,
|
|
294
295
|
); // disconnect & summaryAckTimeout do not have proper error.
|
|
295
296
|
|
|
296
|
-
|
|
297
|
-
// unknown.
|
|
298
|
-
const stage = summaryData?.stage ?? "unknown";
|
|
299
|
-
resultsBuilder.fail(reason, error, stage, nackSummaryResult, retryAfterSeconds);
|
|
297
|
+
resultsBuilder.fail(reason, error, submitFailureResult, nackSummaryResult);
|
|
300
298
|
};
|
|
301
299
|
|
|
302
300
|
// Wait to generate and send summary
|
|
@@ -305,12 +303,7 @@ export class SummaryGenerator {
|
|
|
305
303
|
// Need to save refSeqNum before we record new attempt (happens as part of submitSummaryCallback)
|
|
306
304
|
const lastAttemptRefSeqNum = this.heuristicData.lastAttempt.refSequenceNumber;
|
|
307
305
|
|
|
308
|
-
summaryData = await this.submitSummaryCallback(
|
|
309
|
-
fullTree,
|
|
310
|
-
refreshLatestAck,
|
|
311
|
-
summaryLogger: logger,
|
|
312
|
-
cancellationToken,
|
|
313
|
-
});
|
|
306
|
+
summaryData = await this.submitSummaryCallback(submitSummaryOptions);
|
|
314
307
|
|
|
315
308
|
// Cumulatively add telemetry properties based on how far generateSummary went.
|
|
316
309
|
const referenceSequenceNumber = summaryData.referenceSequenceNumber;
|
|
@@ -330,7 +323,10 @@ export class SummaryGenerator {
|
|
|
330
323
|
);
|
|
331
324
|
|
|
332
325
|
if (summaryData.stage !== "submit") {
|
|
333
|
-
return fail("submitSummaryFailure", summaryData.error, summarizeTelemetryProps
|
|
326
|
+
return fail("submitSummaryFailure", summaryData.error, summarizeTelemetryProps, {
|
|
327
|
+
stage: summaryData.stage,
|
|
328
|
+
retryAfterSeconds: getRetryDelaySecondsFromError(summaryData.error),
|
|
329
|
+
});
|
|
334
330
|
}
|
|
335
331
|
|
|
336
332
|
/**
|
|
@@ -343,14 +339,14 @@ export class SummaryGenerator {
|
|
|
343
339
|
* state change of multiple data stores. So, the total number of data stores that are summarized should not
|
|
344
340
|
* exceed the number of ops since last summary + number of data store whose reference state changed.
|
|
345
341
|
*/
|
|
346
|
-
if (!fullTree && !summaryData.forcedFullTree) {
|
|
342
|
+
if (!submitSummaryOptions.fullTree && !summaryData.forcedFullTree) {
|
|
347
343
|
const { summarizedDataStoreCount, gcStateUpdatedDataStoreCount = 0 } =
|
|
348
344
|
summaryData.summaryStats;
|
|
349
345
|
if (
|
|
350
346
|
summarizedDataStoreCount >
|
|
351
347
|
gcStateUpdatedDataStoreCount + this.heuristicData.opsSinceLastSummary
|
|
352
348
|
) {
|
|
353
|
-
|
|
349
|
+
summaryLogger.sendErrorEvent({
|
|
354
350
|
eventName: "IncrementalSummaryViolation",
|
|
355
351
|
summarizedDataStoreCount,
|
|
356
352
|
gcStateUpdatedDataStoreCount,
|
|
@@ -363,7 +359,10 @@ export class SummaryGenerator {
|
|
|
363
359
|
summarizeEvent.reportEvent("generate", { ...summarizeTelemetryProps });
|
|
364
360
|
resultsBuilder.summarySubmitted.resolve({ success: true, data: summaryData });
|
|
365
361
|
} catch (error) {
|
|
366
|
-
return fail("submitSummaryFailure", error
|
|
362
|
+
return fail("submitSummaryFailure", error, undefined /* properties */, {
|
|
363
|
+
stage: "unknown",
|
|
364
|
+
retryAfterSeconds: getRetryDelaySecondsFromError(error),
|
|
365
|
+
});
|
|
367
366
|
} finally {
|
|
368
367
|
if (summaryData === undefined) {
|
|
369
368
|
this.heuristicData.recordAttempt();
|
|
@@ -382,10 +381,10 @@ export class SummaryGenerator {
|
|
|
382
381
|
cancellationToken,
|
|
383
382
|
);
|
|
384
383
|
if (waitBroadcastResult.result === "cancelled") {
|
|
385
|
-
return fail("disconnect"
|
|
384
|
+
return fail("disconnect");
|
|
386
385
|
}
|
|
387
386
|
if (waitBroadcastResult.result !== "done") {
|
|
388
|
-
return fail("summaryOpWaitTimeout"
|
|
387
|
+
return fail("summaryOpWaitTimeout");
|
|
389
388
|
}
|
|
390
389
|
const summarizeOp = waitBroadcastResult.value;
|
|
391
390
|
|
|
@@ -396,7 +395,7 @@ export class SummaryGenerator {
|
|
|
396
395
|
});
|
|
397
396
|
|
|
398
397
|
this.heuristicData.lastAttempt.summarySequenceNumber = summarizeOp.sequenceNumber;
|
|
399
|
-
|
|
398
|
+
summaryLogger.sendTelemetryEvent({
|
|
400
399
|
eventName: "Summarize_Op",
|
|
401
400
|
duration: broadcastDuration,
|
|
402
401
|
referenceSequenceNumber: summarizeOp.referenceSequenceNumber,
|
|
@@ -465,7 +464,8 @@ export class SummaryGenerator {
|
|
|
465
464
|
"summaryNack",
|
|
466
465
|
error,
|
|
467
466
|
{ ...summarizeTelemetryProps, nackRetryAfter: retryAfterSeconds },
|
|
468
|
-
|
|
467
|
+
undefined /* submitFailureResult */,
|
|
468
|
+
{ summaryNackOp: ackNackOp, ackNackDuration, retryAfterSeconds },
|
|
469
469
|
);
|
|
470
470
|
}
|
|
471
471
|
} finally {
|