@fluidframework/container-runtime 2.0.0-internal.6.1.1 → 2.0.0-internal.6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +4 -3
- package/dist/batchTracker.d.ts +1 -1
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +5 -4
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +4 -21
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +119 -185
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +13 -12
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +99 -16
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +380 -242
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +4 -5
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +2 -1
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +40 -41
- 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 +7 -8
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.js +2 -2
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +23 -25
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerProxyBase.d.ts +1 -1
- package/dist/deltaManagerProxyBase.js +2 -2
- package/dist/deltaManagerProxyBase.js.map +1 -1
- package/dist/deltaScheduler.js +6 -6
- 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 +4 -6
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +26 -25
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +5 -3
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +4 -2
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.js +7 -7
- 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 +15 -52
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +2 -0
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +4 -4
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +1 -1
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +1 -2
- 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 +387 -1150
- package/dist/id-compressor/idCompressor.js.map +1 -1
- package/dist/id-compressor/identifiers.d.ts +32 -0
- package/dist/id-compressor/identifiers.d.ts.map +1 -0
- package/dist/id-compressor/identifiers.js +15 -0
- package/dist/id-compressor/identifiers.js.map +1 -0
- package/dist/id-compressor/index.d.ts +5 -6
- package/dist/id-compressor/index.d.ts.map +1 -1
- package/dist/id-compressor/index.js +20 -26
- package/dist/id-compressor/index.js.map +1 -1
- package/dist/id-compressor/persistanceUtilities.d.ts +22 -0
- package/dist/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/dist/id-compressor/persistanceUtilities.js +43 -0
- package/dist/id-compressor/persistanceUtilities.js.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js +80 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/dist/id-compressor/sessions.d.ts +115 -0
- package/dist/id-compressor/sessions.d.ts.map +1 -0
- package/dist/id-compressor/sessions.js +305 -0
- package/dist/id-compressor/sessions.js.map +1 -0
- package/dist/id-compressor/utilities.d.ts +49 -0
- package/dist/id-compressor/utilities.d.ts.map +1 -0
- package/dist/id-compressor/utilities.js +166 -0
- package/dist/id-compressor/utilities.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.js +5 -5
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +11 -10
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +3 -3
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +14 -15
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +1 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +16 -17
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +11 -5
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +12 -5
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +36 -23
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +23 -23
- 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 +2 -3
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +8 -8
- 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 +27 -4
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +246 -74
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +6 -5
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +73 -69
- 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 +2 -2
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.js +2 -2
- 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 +5 -14
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +32 -109
- 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.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +0 -11
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +5 -88
- 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 +9 -8
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.js +2 -2
- 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 +52 -48
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +7 -6
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +30 -22
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +3 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +4 -21
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +91 -157
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +2 -1
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +99 -16
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +332 -192
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +2 -3
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +2 -1
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +3 -4
- 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 +1 -2
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.js +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +2 -4
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerProxyBase.d.ts +1 -1
- package/lib/deltaManagerProxyBase.js +1 -1
- package/lib/deltaManagerProxyBase.js.map +1 -1
- package/lib/deltaScheduler.js +1 -1
- 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 +4 -6
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +26 -25
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +3 -1
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +4 -2
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.js +1 -1
- 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 +16 -53
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +2 -0
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +1 -1
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -1
- 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 +382 -1139
- package/lib/id-compressor/idCompressor.js.map +1 -1
- package/lib/id-compressor/identifiers.d.ts +32 -0
- package/lib/id-compressor/identifiers.d.ts.map +1 -0
- package/lib/id-compressor/identifiers.js +11 -0
- package/lib/id-compressor/identifiers.js.map +1 -0
- package/lib/id-compressor/index.d.ts +5 -6
- package/lib/id-compressor/index.d.ts.map +1 -1
- package/lib/id-compressor/index.js +5 -6
- package/lib/id-compressor/index.js.map +1 -1
- package/lib/id-compressor/persistanceUtilities.d.ts +22 -0
- package/lib/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/lib/id-compressor/persistanceUtilities.js +34 -0
- package/lib/id-compressor/persistanceUtilities.js.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js +76 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/lib/id-compressor/sessions.d.ts +115 -0
- package/lib/id-compressor/sessions.d.ts.map +1 -0
- package/lib/id-compressor/sessions.js +290 -0
- package/lib/id-compressor/sessions.js.map +1 -0
- package/lib/id-compressor/utilities.d.ts +49 -0
- package/lib/id-compressor/utilities.d.ts.map +1 -0
- package/lib/id-compressor/utilities.js +148 -0
- package/lib/id-compressor/utilities.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/opCompressor.js +3 -3
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +2 -1
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +1 -1
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +2 -3
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +1 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +7 -8
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +12 -6
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +12 -5
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +21 -8
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +3 -3
- 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 +2 -3
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +3 -3
- 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 +27 -4
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +240 -68
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +6 -5
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +69 -65
- 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 +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.js +1 -1
- 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 +5 -14
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +16 -93
- 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.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +0 -11
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +3 -86
- 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 +2 -1
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.js +1 -1
- 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 +46 -42
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +7 -6
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +26 -18
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +30 -29
- package/src/batchTracker.ts +3 -2
- package/src/blobManager.ts +105 -185
- package/src/connectionTelemetry.ts +2 -1
- package/src/containerRuntime.ts +481 -267
- package/src/dataStore.ts +2 -3
- package/src/dataStoreContext.ts +5 -8
- package/src/dataStoreContexts.ts +2 -4
- package/src/dataStoreRegistry.ts +1 -1
- package/src/dataStores.ts +4 -7
- package/src/deltaManagerProxyBase.ts +1 -1
- package/src/deltaScheduler.ts +1 -1
- package/src/error.ts +18 -0
- package/src/gc/garbageCollection.ts +39 -41
- package/src/gc/gcConfigs.ts +4 -2
- package/src/gc/gcDefinitions.ts +4 -6
- package/src/gc/gcHelpers.ts +1 -1
- package/src/gc/gcSummaryStateTracker.ts +19 -65
- package/src/gc/gcTelemetry.ts +2 -0
- package/src/gc/gcUnreferencedStateTracker.ts +1 -1
- package/src/gc/index.ts +0 -1
- package/src/id-compressor/appendOnlySortedMap.ts +26 -87
- package/src/id-compressor/finalSpace.ts +67 -0
- package/src/id-compressor/idCompressor.ts +456 -1681
- package/src/id-compressor/identifiers.ts +42 -0
- package/src/id-compressor/index.ts +11 -20
- package/src/id-compressor/persistanceUtilities.ts +58 -0
- package/src/id-compressor/sessionSpaceNormalizer.ts +83 -0
- package/src/id-compressor/sessions.ts +405 -0
- package/src/id-compressor/utilities.ts +187 -0
- package/src/index.ts +7 -1
- package/src/opLifecycle/opCompressor.ts +3 -3
- package/src/opLifecycle/opDecompressor.ts +2 -1
- package/src/opLifecycle/opGroupingManager.ts +1 -1
- package/src/opLifecycle/opSplitter.ts +4 -4
- package/src/opLifecycle/outbox.ts +14 -11
- package/src/opLifecycle/remoteMessageProcessor.ts +19 -6
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +50 -29
- package/src/scheduleManager.ts +6 -4
- package/src/summary/index.ts +4 -3
- package/src/summary/orderedClientElection.ts +8 -5
- package/src/summary/runWhileConnectedCoordinator.ts +1 -1
- package/src/summary/runningSummarizer.ts +273 -97
- package/src/summary/summarizer.ts +23 -12
- 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 +23 -145
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +7 -38
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +3 -123
- package/src/summary/summarizerTypes.ts +40 -25
- package/src/summary/summaryCollection.ts +3 -3
- package/src/summary/summaryFormat.ts +1 -1
- package/src/summary/summaryGenerator.ts +52 -55
- package/src/summary/summaryManager.ts +36 -13
- package/dist/id-compressor/idRange.d.ts +0 -11
- package/dist/id-compressor/idRange.d.ts.map +0 -1
- package/dist/id-compressor/idRange.js +0 -29
- package/dist/id-compressor/idRange.js.map +0 -1
- package/dist/id-compressor/numericUuid.d.ts +0 -59
- package/dist/id-compressor/numericUuid.d.ts.map +0 -1
- package/dist/id-compressor/numericUuid.js +0 -325
- package/dist/id-compressor/numericUuid.js.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/dist/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.js +0 -483
- package/dist/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/dist/id-compressor/utils.d.ts +0 -57
- package/dist/id-compressor/utils.d.ts.map +0 -1
- package/dist/id-compressor/utils.js +0 -90
- package/dist/id-compressor/utils.js.map +0 -1
- package/dist/id-compressor/uuidUtilities.d.ts +0 -28
- package/dist/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/dist/id-compressor/uuidUtilities.js +0 -104
- package/dist/id-compressor/uuidUtilities.js.map +0 -1
- package/lib/id-compressor/idRange.d.ts +0 -11
- package/lib/id-compressor/idRange.d.ts.map +0 -1
- package/lib/id-compressor/idRange.js +0 -25
- package/lib/id-compressor/idRange.js.map +0 -1
- package/lib/id-compressor/numericUuid.d.ts +0 -59
- package/lib/id-compressor/numericUuid.d.ts.map +0 -1
- package/lib/id-compressor/numericUuid.js +0 -315
- package/lib/id-compressor/numericUuid.js.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/lib/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.js +0 -479
- package/lib/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/lib/id-compressor/utils.d.ts +0 -57
- package/lib/id-compressor/utils.d.ts.map +0 -1
- package/lib/id-compressor/utils.js +0 -79
- package/lib/id-compressor/utils.js.map +0 -1
- package/lib/id-compressor/uuidUtilities.d.ts +0 -28
- package/lib/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/lib/id-compressor/uuidUtilities.js +0 -96
- package/lib/id-compressor/uuidUtilities.js.map +0 -1
- package/src/id-compressor/idRange.ts +0 -35
- package/src/id-compressor/numericUuid.ts +0 -383
- package/src/id-compressor/sessionIdNormalizer.ts +0 -609
- package/src/id-compressor/utils.ts +0 -114
- package/src/id-compressor/uuidUtilities.ts +0 -120
|
@@ -29,22 +29,16 @@ import {
|
|
|
29
29
|
TelemetryDataTag,
|
|
30
30
|
tagCodeArtifacts,
|
|
31
31
|
} from "@fluidframework/telemetry-utils";
|
|
32
|
-
import { assert, unreachableCase } from "@fluidframework/
|
|
33
|
-
import {
|
|
34
|
-
convertToSummaryTree,
|
|
35
|
-
calculateStats,
|
|
36
|
-
mergeStats,
|
|
37
|
-
ReadAndParseBlob,
|
|
38
|
-
} from "@fluidframework/runtime-utils";
|
|
32
|
+
import { assert, unreachableCase } from "@fluidframework/core-utils";
|
|
33
|
+
import { convertToSummaryTree, calculateStats, mergeStats } from "@fluidframework/runtime-utils";
|
|
39
34
|
import {
|
|
40
35
|
EscapedPath,
|
|
41
36
|
ICreateChildDetails,
|
|
42
|
-
IFetchSnapshotResult,
|
|
43
37
|
IInitialSummary,
|
|
38
|
+
IRefreshSummaryResult,
|
|
44
39
|
ISummarizerNodeRootContract,
|
|
45
40
|
parseSummaryForSubtrees,
|
|
46
41
|
parseSummaryTreeForSubtrees,
|
|
47
|
-
RefreshSummaryResult,
|
|
48
42
|
SummaryNode,
|
|
49
43
|
ValidateSummaryResult,
|
|
50
44
|
} from "./summarizerNodeUtils";
|
|
@@ -371,31 +365,21 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
371
365
|
|
|
372
366
|
/**
|
|
373
367
|
* Refreshes the latest summary tracked by this node. If we have a pending summary for the given proposal handle,
|
|
374
|
-
* it becomes the latest summary. If the current summary is already ahead
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
* @returns A RefreshSummaryResult type which returns information based on the following three scenarios:
|
|
378
|
-
*
|
|
379
|
-
* 1. The latest summary was not updated.
|
|
368
|
+
* it becomes the latest summary. If the current summary is already ahead, we skip the update.
|
|
369
|
+
* If the current summary is behind, then we do not refresh.
|
|
380
370
|
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
* 3. The latest summary was updated but the summary corresponding to the params was not tracked. In this
|
|
384
|
-
* case, the latest summary is updated based on the downloaded snapshot which is also returned.
|
|
371
|
+
* @returns true if the summary is tracked by this node, false otherwise.
|
|
385
372
|
*/
|
|
386
373
|
public async refreshLatestSummary(
|
|
387
|
-
proposalHandle: string
|
|
374
|
+
proposalHandle: string,
|
|
388
375
|
summaryRefSeq: number,
|
|
389
|
-
|
|
390
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
391
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
392
|
-
): Promise<RefreshSummaryResult> {
|
|
376
|
+
): Promise<IRefreshSummaryResult> {
|
|
393
377
|
const eventProps: {
|
|
394
378
|
proposalHandle: string | undefined;
|
|
395
379
|
summaryRefSeq: number;
|
|
396
380
|
referenceSequenceNumber: number;
|
|
397
|
-
|
|
398
|
-
|
|
381
|
+
isSummaryTracked?: boolean;
|
|
382
|
+
pendingSummaryFound?: boolean;
|
|
399
383
|
} = {
|
|
400
384
|
proposalHandle,
|
|
401
385
|
summaryRefSeq,
|
|
@@ -416,75 +400,22 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
416
400
|
});
|
|
417
401
|
}
|
|
418
402
|
|
|
419
|
-
|
|
420
|
-
|
|
403
|
+
let isSummaryTracked = false;
|
|
404
|
+
let isSummaryNewer = false;
|
|
421
405
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
proposalHandle,
|
|
425
|
-
maybeSummaryNode.referenceSequenceNumber,
|
|
426
|
-
);
|
|
427
|
-
eventProps.wasSummaryTracked = true;
|
|
428
|
-
eventProps.latestSummaryUpdated = true;
|
|
429
|
-
event.end(eventProps);
|
|
430
|
-
return {
|
|
431
|
-
latestSummaryUpdated: true,
|
|
432
|
-
wasSummaryTracked: true,
|
|
433
|
-
summaryRefSeq,
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
const props = {
|
|
438
|
-
summaryRefSeq,
|
|
439
|
-
pendingSize: this.pendingSummaries.size ?? undefined,
|
|
440
|
-
};
|
|
441
|
-
this.logger.sendTelemetryEvent({
|
|
442
|
-
eventName: "PendingSummaryNotFound",
|
|
443
|
-
proposalHandle,
|
|
444
|
-
referenceSequenceNumber: this.referenceSequenceNumber,
|
|
445
|
-
details: JSON.stringify(props),
|
|
446
|
-
});
|
|
406
|
+
if (summaryRefSeq > this.referenceSequenceNumber) {
|
|
407
|
+
isSummaryNewer = true;
|
|
447
408
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
// Fetch the latest snapshot and refresh state from it. Note that we need to use the reference sequence number
|
|
457
|
-
// of the fetched snapshot and not the "summaryRefSeq" that was passed in.
|
|
458
|
-
const { snapshotTree, snapshotRefSeq: fetchedSnapshotRefSeq } =
|
|
459
|
-
await fetchLatestSnapshot();
|
|
460
|
-
|
|
461
|
-
// Possible re-entrancy. We may have updated latest summary state while fetching the snapshot. If the fetched
|
|
462
|
-
// snapshot is older than the latest tracked summary, ignore it.
|
|
463
|
-
if (this.referenceSequenceNumber >= fetchedSnapshotRefSeq) {
|
|
464
|
-
eventProps.latestSummaryUpdated = false;
|
|
465
|
-
event.end(eventProps);
|
|
466
|
-
return { latestSummaryUpdated: false };
|
|
409
|
+
const maybeSummaryNode = this.pendingSummaries.get(proposalHandle);
|
|
410
|
+
if (maybeSummaryNode !== undefined) {
|
|
411
|
+
this.refreshLatestSummaryFromPending(
|
|
412
|
+
proposalHandle,
|
|
413
|
+
maybeSummaryNode.referenceSequenceNumber,
|
|
414
|
+
);
|
|
415
|
+
isSummaryTracked = true;
|
|
467
416
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
fetchedSnapshotRefSeq,
|
|
471
|
-
snapshotTree,
|
|
472
|
-
undefined,
|
|
473
|
-
EscapedPath.create(""),
|
|
474
|
-
correlatedSummaryLogger,
|
|
475
|
-
readAndParseBlob,
|
|
476
|
-
);
|
|
477
|
-
|
|
478
|
-
eventProps.latestSummaryUpdated = true;
|
|
479
|
-
eventProps.wasSummaryTracked = false;
|
|
480
|
-
eventProps.summaryRefSeq = fetchedSnapshotRefSeq;
|
|
481
|
-
event.end(eventProps);
|
|
482
|
-
return {
|
|
483
|
-
latestSummaryUpdated: true,
|
|
484
|
-
wasSummaryTracked: false,
|
|
485
|
-
snapshotTree,
|
|
486
|
-
summaryRefSeq: fetchedSnapshotRefSeq,
|
|
487
|
-
};
|
|
417
|
+
event.end({ ...eventProps, isSummaryNewer, pendingSummaryFound: isSummaryTracked });
|
|
418
|
+
return { isSummaryTracked, isSummaryNewer };
|
|
488
419
|
},
|
|
489
420
|
{ start: true, end: true, cancel: "error" },
|
|
490
421
|
);
|
|
@@ -526,59 +457,6 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
526
457
|
}
|
|
527
458
|
}
|
|
528
459
|
|
|
529
|
-
protected async refreshLatestSummaryFromSnapshot(
|
|
530
|
-
referenceSequenceNumber: number,
|
|
531
|
-
snapshotTree: ISnapshotTree,
|
|
532
|
-
basePath: EscapedPath | undefined,
|
|
533
|
-
localPath: EscapedPath,
|
|
534
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
535
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
536
|
-
): Promise<void> {
|
|
537
|
-
// Possible re-entrancy. If we have already seen a summary later than this one, ignore it.
|
|
538
|
-
if (this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
this.refreshLatestSummaryCore(referenceSequenceNumber);
|
|
543
|
-
|
|
544
|
-
this._latestSummary = new SummaryNode({
|
|
545
|
-
referenceSequenceNumber,
|
|
546
|
-
basePath,
|
|
547
|
-
localPath,
|
|
548
|
-
});
|
|
549
|
-
|
|
550
|
-
const pathParts: string[] = [];
|
|
551
|
-
const { childrenTree, childrenPathPart } = parseSummaryForSubtrees(snapshotTree);
|
|
552
|
-
if (childrenPathPart !== undefined) {
|
|
553
|
-
pathParts.push(childrenPathPart);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
if (pathParts.length > 0) {
|
|
557
|
-
this._latestSummary.additionalPath = EscapedPath.createAndConcat(pathParts);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
// Propagate update to all child nodes
|
|
561
|
-
const pathForChildren = this._latestSummary.fullPathForChildren;
|
|
562
|
-
await Promise.all(
|
|
563
|
-
Array.from(this.children)
|
|
564
|
-
.filter(([id]) => {
|
|
565
|
-
// Assuming subtrees missing from snapshot are newer than the snapshot,
|
|
566
|
-
// but might be nice to assert this using earliest seq for node.
|
|
567
|
-
return childrenTree.trees[id] !== undefined;
|
|
568
|
-
})
|
|
569
|
-
.map(async ([id, child]) => {
|
|
570
|
-
return child.refreshLatestSummaryFromSnapshot(
|
|
571
|
-
referenceSequenceNumber,
|
|
572
|
-
childrenTree.trees[id],
|
|
573
|
-
pathForChildren,
|
|
574
|
-
EscapedPath.create(id),
|
|
575
|
-
correlatedSummaryLogger,
|
|
576
|
-
readAndParseBlob,
|
|
577
|
-
);
|
|
578
|
-
}),
|
|
579
|
-
);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
460
|
private refreshLatestSummaryCore(referenceSequenceNumber: number): void {
|
|
583
461
|
for (const [key, value] of this.pendingSummaries) {
|
|
584
462
|
if (value.referenceSequenceNumber < referenceSequenceNumber) {
|
|
@@ -6,40 +6,12 @@
|
|
|
6
6
|
import { ITelemetryLoggerExt, TelemetryDataTag } from "@fluidframework/telemetry-utils";
|
|
7
7
|
import { ISnapshotTree, ISummaryTree, SummaryObject } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { channelsTreeName, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
9
|
-
import { ReadAndParseBlob } from "@fluidframework/runtime-utils";
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* 2. The latest summary was updated and the summary corresponding to the params was tracked by this client.
|
|
17
|
-
*
|
|
18
|
-
* 3. The latest summary was updated but the summary corresponding to the params was not tracked. In this case, the
|
|
19
|
-
* latest snapshot is fetched and the latest summary state is updated based on it.
|
|
20
|
-
*/
|
|
21
|
-
export type RefreshSummaryResult =
|
|
22
|
-
| {
|
|
23
|
-
latestSummaryUpdated: false;
|
|
24
|
-
}
|
|
25
|
-
| {
|
|
26
|
-
latestSummaryUpdated: true;
|
|
27
|
-
wasSummaryTracked: true;
|
|
28
|
-
summaryRefSeq: number;
|
|
29
|
-
}
|
|
30
|
-
| {
|
|
31
|
-
latestSummaryUpdated: true;
|
|
32
|
-
wasSummaryTracked: false;
|
|
33
|
-
snapshotTree: ISnapshotTree;
|
|
34
|
-
summaryRefSeq: number;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Result of snapshot fetch during refreshing latest summary state.
|
|
39
|
-
*/
|
|
40
|
-
export interface IFetchSnapshotResult {
|
|
41
|
-
snapshotTree: ISnapshotTree;
|
|
42
|
-
snapshotRefSeq: number;
|
|
10
|
+
export interface IRefreshSummaryResult {
|
|
11
|
+
/** Tells whether this summary is tracked by this client. */
|
|
12
|
+
isSummaryTracked: boolean;
|
|
13
|
+
/** Tells whether this summary is newer than the latest one tracked by this client. */
|
|
14
|
+
isSummaryNewer: boolean;
|
|
43
15
|
}
|
|
44
16
|
|
|
45
17
|
/**
|
|
@@ -70,12 +42,9 @@ export interface ISummarizerNodeRootContract {
|
|
|
70
42
|
completeSummary(proposalHandle: string, validate: boolean): void;
|
|
71
43
|
clearSummary(): void;
|
|
72
44
|
refreshLatestSummary(
|
|
73
|
-
proposalHandle: string
|
|
45
|
+
proposalHandle: string,
|
|
74
46
|
summaryRefSeq: number,
|
|
75
|
-
|
|
76
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
77
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
78
|
-
): Promise<RefreshSummaryResult>;
|
|
47
|
+
): Promise<IRefreshSummaryResult>;
|
|
79
48
|
}
|
|
80
49
|
|
|
81
50
|
/** Path for nodes in a tree with escaped special characters */
|
|
@@ -9,12 +9,9 @@ import {
|
|
|
9
9
|
TelemetryDataTag,
|
|
10
10
|
tagCodeArtifacts,
|
|
11
11
|
} from "@fluidframework/telemetry-utils";
|
|
12
|
-
import { assert } from "@fluidframework/
|
|
13
|
-
import { LazyPromise } from "@fluidframework/core-utils";
|
|
14
|
-
import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
12
|
+
import { assert, LazyPromise } from "@fluidframework/core-utils";
|
|
15
13
|
import {
|
|
16
14
|
CreateChildSummarizerNodeParam,
|
|
17
|
-
gcTreeKey,
|
|
18
15
|
IGarbageCollectionData,
|
|
19
16
|
IGarbageCollectionDetailsBase,
|
|
20
17
|
ISummarizeInternalResult,
|
|
@@ -25,21 +22,15 @@ import {
|
|
|
25
22
|
ITelemetryContext,
|
|
26
23
|
IExperimentalIncrementalSummaryContext,
|
|
27
24
|
} from "@fluidframework/runtime-definitions";
|
|
28
|
-
import {
|
|
25
|
+
import { unpackChildNodesUsedRoutes } from "@fluidframework/runtime-utils";
|
|
29
26
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
30
|
-
import {
|
|
31
|
-
cloneGCData,
|
|
32
|
-
getGCDataFromSnapshot,
|
|
33
|
-
runGarbageCollection,
|
|
34
|
-
unpackChildNodesGCDetails,
|
|
35
|
-
} from "../../gc";
|
|
27
|
+
import { cloneGCData, unpackChildNodesGCDetails } from "../../gc";
|
|
36
28
|
import { SummarizerNode } from "./summarizerNode";
|
|
37
29
|
import {
|
|
38
30
|
EscapedPath,
|
|
39
31
|
ICreateChildDetails,
|
|
40
32
|
IInitialSummary,
|
|
41
33
|
ISummarizerNodeRootContract,
|
|
42
|
-
parseSummaryForSubtrees,
|
|
43
34
|
SummaryNode,
|
|
44
35
|
ValidateSummaryResult,
|
|
45
36
|
} from "./summarizerNodeUtils";
|
|
@@ -391,117 +382,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
391
382
|
return super.refreshLatestSummaryFromPending(proposalHandle, referenceSequenceNumber);
|
|
392
383
|
}
|
|
393
384
|
|
|
394
|
-
/**
|
|
395
|
-
* Called when we need to upload the reference state from the given summary.
|
|
396
|
-
*/
|
|
397
|
-
protected async refreshLatestSummaryFromSnapshot(
|
|
398
|
-
referenceSequenceNumber: number,
|
|
399
|
-
snapshotTree: ISnapshotTree,
|
|
400
|
-
basePath: EscapedPath | undefined,
|
|
401
|
-
localPath: EscapedPath,
|
|
402
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
403
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
404
|
-
): Promise<void> {
|
|
405
|
-
await this.refreshGCStateFromSnapshot(
|
|
406
|
-
referenceSequenceNumber,
|
|
407
|
-
snapshotTree,
|
|
408
|
-
readAndParseBlob,
|
|
409
|
-
);
|
|
410
|
-
return super.refreshLatestSummaryFromSnapshot(
|
|
411
|
-
referenceSequenceNumber,
|
|
412
|
-
snapshotTree,
|
|
413
|
-
basePath,
|
|
414
|
-
localPath,
|
|
415
|
-
correlatedSummaryLogger,
|
|
416
|
-
readAndParseBlob,
|
|
417
|
-
);
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Updates GC state from the given snapshot if GC is enabled and the snapshot is newer than the one this node
|
|
422
|
-
* is tracking.
|
|
423
|
-
*/
|
|
424
|
-
private async refreshGCStateFromSnapshot(
|
|
425
|
-
referenceSequenceNumber: number,
|
|
426
|
-
snapshotTree: ISnapshotTree,
|
|
427
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
428
|
-
): Promise<void> {
|
|
429
|
-
// If GC is disabled or we have seen a newer summary, skip updating GC state.
|
|
430
|
-
if (this.gcDisabled || this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
// Load the base GC details before proceeding because if that happens later it can overwrite the GC details
|
|
435
|
-
// written by the following code.
|
|
436
|
-
await this.loadBaseGCDetails();
|
|
437
|
-
|
|
438
|
-
// Possible re-entrancy. We may already have processed this while loading base GC details.
|
|
439
|
-
if (this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* GC data is written at root of the snapshot tree under "gc" sub-tree. This data needs to be propagated to
|
|
445
|
-
* all the nodes in the container.
|
|
446
|
-
* The root summarizer node reads the GC data from the "gc" sub-tree, runs GC on it to get used routes in
|
|
447
|
-
* the container and updates its GC data and referenced used routes. It then gets the GC data and used
|
|
448
|
-
* routes of all its children and adds it to their snapshot tree.
|
|
449
|
-
* All the other nodes gets the GC data and used routes from their snapshot tree and updates their state.
|
|
450
|
-
* They get the GC data and used routes of their children and add it to their snapshot tree and so on.
|
|
451
|
-
*
|
|
452
|
-
* Note that if the snapshot does not have GC tree, GC data will be set to undefined and used routes will be
|
|
453
|
-
* set to self-route (meaning referenced) for all nodes. This is important because the GC data needs to be
|
|
454
|
-
* regenerated in the next summary.
|
|
455
|
-
*/
|
|
456
|
-
let gcDetails: IGarbageCollectionDetailsBase | undefined;
|
|
457
|
-
const gcSnapshotTree = snapshotTree.trees[gcTreeKey];
|
|
458
|
-
if (gcSnapshotTree !== undefined) {
|
|
459
|
-
// If there is a GC tree in the snapshot, this is the root summarizer node. Read GC data from the tree
|
|
460
|
-
// process it as explained above.
|
|
461
|
-
const gcSnapshotData = await getGCDataFromSnapshot(gcSnapshotTree, readAndParseBlob);
|
|
462
|
-
|
|
463
|
-
if (gcSnapshotData.gcState !== undefined) {
|
|
464
|
-
const gcNodes: { [id: string]: string[] } = {};
|
|
465
|
-
for (const [nodeId, nodeData] of Object.entries(gcSnapshotData.gcState.gcNodes)) {
|
|
466
|
-
gcNodes[nodeId] = Array.from(nodeData.outboundRoutes);
|
|
467
|
-
}
|
|
468
|
-
// Run GC on the nodes in the snapshot to get the used routes for each node in the container.
|
|
469
|
-
const usedRoutes = runGarbageCollection(gcNodes, ["/"]).referencedNodeIds;
|
|
470
|
-
gcDetails = { gcData: { gcNodes }, usedRoutes };
|
|
471
|
-
}
|
|
472
|
-
} else {
|
|
473
|
-
// If there is a GC blob in the snapshot, it's a non-root summarizer nodes - The root summarizer node
|
|
474
|
-
// writes GC blob in the snapshot of child nodes. Get GC data and used routes from the blob.
|
|
475
|
-
const gcDetailsBlob = snapshotTree.blobs[gcTreeKey];
|
|
476
|
-
if (gcDetailsBlob !== undefined) {
|
|
477
|
-
gcDetails = JSON.parse(gcDetailsBlob) as IGarbageCollectionDetailsBase;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// Update this node to the same GC state it was when the ack corresponding to this summary was processed.
|
|
482
|
-
this.gcData = gcDetails?.gcData !== undefined ? cloneGCData(gcDetails.gcData) : undefined;
|
|
483
|
-
this.referenceUsedRoutes =
|
|
484
|
-
gcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : undefined;
|
|
485
|
-
// If there are no used routes in the GC details, set it to have self route which will make the node
|
|
486
|
-
// referenced. This scenario can only happen if the snapshot is from a client where GC was not run or
|
|
487
|
-
// disabled. In both the cases, the node should be referenced.
|
|
488
|
-
this.usedRoutes =
|
|
489
|
-
gcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : [""];
|
|
490
|
-
|
|
491
|
-
if (gcDetails === undefined) {
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
// Generate the GC data and used routes of children GC nodes and add it to their snapshot tree.
|
|
496
|
-
const gcDetailsMap = unpackChildNodesGCDetails(gcDetails);
|
|
497
|
-
const { childrenTree } = parseSummaryForSubtrees(snapshotTree);
|
|
498
|
-
gcDetailsMap.forEach((childGCDetails: IGarbageCollectionDetailsBase, childId: string) => {
|
|
499
|
-
if (childrenTree.trees[childId] !== undefined) {
|
|
500
|
-
childrenTree.trees[childId].blobs[gcTreeKey] = JSON.stringify(childGCDetails);
|
|
501
|
-
}
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
|
|
505
385
|
/**
|
|
506
386
|
* Override the createChild method to return an instance of SummarizerNodeWithGC.
|
|
507
387
|
*/
|
|
@@ -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,
|