@fluidframework/container-runtime 2.13.0 → 2.21.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/.eslintrc.cjs +71 -5
- package/CHANGELOG.md +84 -0
- package/api-report/container-runtime.legacy.alpha.api.md +38 -232
- package/dist/batchTracker.d.ts +1 -2
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager/blobManager.d.ts +5 -1
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +30 -13
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.d.ts +1 -0
- package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.js +7 -5
- package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
- package/dist/channelCollection.d.ts +23 -12
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +85 -53
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +2 -2
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +10 -6
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.d.ts +1 -1
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +87 -94
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +312 -226
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +7 -3
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +8 -4
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +41 -25
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +47 -29
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +6 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +7 -2
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +1 -17
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +9 -6
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +95 -89
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +21 -7
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +48 -19
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +11 -0
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +5 -2
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +218 -70
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +40 -13
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +6 -2
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +14 -7
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +18 -6
- package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +2 -1
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +33 -11
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +35 -17
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.d.ts +42 -13
- package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +27 -9
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +1 -0
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +3 -1
- package/dist/gc/index.js.map +1 -1
- package/dist/inboundBatchAggregator.d.ts +34 -0
- package/dist/inboundBatchAggregator.d.ts.map +1 -0
- package/dist/inboundBatchAggregator.js +185 -0
- package/dist/inboundBatchAggregator.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layerCompatState.d.ts +19 -0
- package/dist/layerCompatState.d.ts.map +1 -0
- package/dist/layerCompatState.js +64 -0
- package/dist/layerCompatState.js.map +1 -0
- package/dist/legacy.d.ts +0 -4
- package/dist/messageTypes.d.ts +14 -5
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/metadata.d.ts +12 -4
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +6 -2
- package/dist/metadata.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +9 -3
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +3 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.d.ts +9 -3
- package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.js +11 -5
- package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +3 -2
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +13 -19
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +6 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +16 -8
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +1 -2
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +9 -6
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +13 -10
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +16 -11
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +4 -4
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +17 -16
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +9 -3
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +3 -1
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/package.json +2 -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 +22 -11
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +24 -15
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +7 -0
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +8 -4
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +1 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +94 -31
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +28 -16
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -0
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +7 -2
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +17 -6
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +48 -19
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +10 -5
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +26 -11
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +1 -0
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +6 -2
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js +13 -5
- package/dist/summary/summarizerHeuristics.js.map +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 +24 -8
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +45 -36
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +13 -5
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +15 -7
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +253 -135
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +3 -4
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +10 -8
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +28 -9
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +3 -2
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +9 -3
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +22 -9
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +8 -4
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +20 -9
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/throttler.d.ts +26 -10
- package/dist/throttler.d.ts.map +1 -1
- package/dist/throttler.js +12 -4
- package/dist/throttler.js.map +1 -1
- package/lib/batchTracker.d.ts +1 -2
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +2 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts +5 -1
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +30 -13
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.d.ts +1 -0
- package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.js +7 -5
- package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
- package/lib/channelCollection.d.ts +23 -12
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +88 -54
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +2 -2
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +11 -7
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts +1 -1
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +87 -94
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +319 -228
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +7 -3
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +8 -4
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +41 -25
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +47 -29
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +6 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +7 -2
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +1 -1
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +1 -17
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +9 -6
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +96 -90
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +21 -7
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +51 -20
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +11 -0
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +4 -2
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +218 -70
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +40 -13
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +6 -2
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +14 -7
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +18 -6
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +2 -1
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +33 -11
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +38 -18
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.d.ts +42 -13
- package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +27 -9
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +1 -0
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -0
- package/lib/gc/index.js.map +1 -1
- package/lib/inboundBatchAggregator.d.ts +34 -0
- package/lib/inboundBatchAggregator.d.ts.map +1 -0
- package/lib/inboundBatchAggregator.js +181 -0
- package/lib/inboundBatchAggregator.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/layerCompatState.d.ts +19 -0
- package/lib/layerCompatState.d.ts.map +1 -0
- package/lib/layerCompatState.js +60 -0
- package/lib/layerCompatState.js.map +1 -0
- package/lib/legacy.d.ts +0 -4
- package/lib/messageTypes.d.ts +14 -5
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/metadata.d.ts +12 -4
- package/lib/metadata.d.ts.map +1 -1
- package/lib/metadata.js +6 -2
- package/lib/metadata.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +9 -3
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +3 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.d.ts +9 -3
- package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.js +11 -5
- package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +3 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +14 -20
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +6 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +17 -9
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +1 -2
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +10 -7
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +13 -10
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +16 -11
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +4 -4
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +17 -16
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +9 -3
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +3 -1
- 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 +22 -11
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +25 -16
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +7 -0
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +8 -4
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +1 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +94 -31
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +28 -16
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -0
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +7 -2
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +17 -6
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +48 -19
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +10 -5
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +26 -11
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +1 -0
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +6 -2
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js +13 -5
- package/lib/summary/summarizerHeuristics.js.map +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 +24 -8
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +45 -36
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +3 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +13 -5
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +15 -7
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +253 -135
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +3 -4
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +10 -8
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +28 -9
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +2 -2
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +9 -3
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +22 -9
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +8 -4
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +20 -9
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/throttler.d.ts +26 -10
- package/lib/throttler.d.ts.map +1 -1
- package/lib/throttler.js +12 -4
- package/lib/throttler.js.map +1 -1
- package/package.json +22 -31
- package/src/batchTracker.ts +34 -36
- package/src/blobManager/blobManager.ts +54 -33
- package/src/blobManager/blobManagerSnapSum.ts +10 -10
- package/src/channelCollection.ts +108 -82
- package/src/connectionTelemetry.ts +43 -19
- package/src/containerHandleContext.ts +2 -2
- package/src/containerRuntime.ts +492 -364
- package/src/dataStore.ts +17 -9
- package/src/dataStoreContext.ts +94 -73
- package/src/dataStoreContexts.ts +17 -12
- package/src/dataStoreRegistry.ts +1 -1
- package/src/deltaManagerProxies.ts +5 -5
- package/src/deltaScheduler.ts +24 -18
- package/src/gc/garbageCollection.ts +89 -40
- package/src/gc/gcConfigs.ts +13 -5
- package/src/gc/gcDefinitions.ts +224 -70
- package/src/gc/gcHelpers.ts +22 -11
- package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
- package/src/gc/gcSummaryDefinitions.ts +18 -6
- package/src/gc/gcSummaryStateTracker.ts +7 -3
- package/src/gc/gcTelemetry.ts +73 -30
- package/src/gc/gcUnreferencedStateTracker.ts +40 -16
- package/src/gc/index.ts +1 -0
- package/src/{scheduleManager.ts → inboundBatchAggregator.ts} +55 -122
- package/src/index.ts +0 -3
- package/src/layerCompatState.ts +75 -0
- package/src/messageTypes.ts +16 -5
- package/src/metadata.ts +12 -4
- package/src/opLifecycle/README.md +43 -34
- package/src/opLifecycle/batchManager.ts +12 -6
- package/src/opLifecycle/duplicateBatchDetector.ts +12 -6
- package/src/opLifecycle/opCompressor.ts +22 -25
- package/src/opLifecycle/opDecompressor.ts +23 -11
- package/src/opLifecycle/opGroupingManager.ts +16 -11
- package/src/opLifecycle/opSplitter.ts +24 -18
- package/src/opLifecycle/outbox.ts +35 -33
- package/src/opLifecycle/remoteMessageProcessor.ts +13 -5
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +49 -26
- package/src/summary/documentSchema.ts +41 -22
- package/src/summary/index.ts +0 -3
- package/src/summary/orderedClientElection.ts +114 -49
- package/src/summary/runWhileConnectedCoordinator.ts +12 -3
- package/src/summary/runningSummarizer.ts +79 -36
- package/src/summary/summarizer.ts +51 -25
- package/src/summary/summarizerClientElection.ts +4 -2
- package/src/summary/summarizerHeuristics.ts +23 -12
- package/src/summary/summarizerNode/index.ts +1 -0
- package/src/summary/summarizerNode/summarizerNode.ts +54 -43
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +48 -16
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +25 -15
- package/src/summary/summarizerTypes.ts +253 -139
- package/src/summary/summaryCollection.ts +41 -31
- package/src/summary/summaryFormat.ts +34 -13
- package/src/summary/summaryGenerator.ts +39 -18
- package/src/summary/summaryManager.ts +36 -24
- package/src/throttler.ts +23 -11
- package/container-runtime.test-files.tar +0 -0
- package/dist/scheduleManager.d.ts +0 -28
- package/dist/scheduleManager.d.ts.map +0 -1
- package/dist/scheduleManager.js +0 -233
- package/dist/scheduleManager.js.map +0 -1
- package/lib/scheduleManager.d.ts +0 -28
- package/lib/scheduleManager.d.ts.map +0 -1
- package/lib/scheduleManager.js +0 -229
- package/lib/scheduleManager.js.map +0 -1
package/src/gc/gcDefinitions.ts
CHANGED
|
@@ -21,7 +21,9 @@ import {
|
|
|
21
21
|
import { RuntimeHeaderData } from "../containerRuntime.js";
|
|
22
22
|
import { ContainerRuntimeGCMessage } from "../messageTypes.js";
|
|
23
23
|
import {
|
|
24
|
+
// eslint-disable-next-line import/no-deprecated
|
|
24
25
|
IContainerRuntimeMetadata,
|
|
26
|
+
// eslint-disable-next-line import/no-deprecated
|
|
25
27
|
ICreateContainerMetadata,
|
|
26
28
|
IRefreshSummaryResult,
|
|
27
29
|
} from "../summary/index.js";
|
|
@@ -29,12 +31,17 @@ import {
|
|
|
29
31
|
/**
|
|
30
32
|
* @legacy
|
|
31
33
|
* @alpha
|
|
34
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
32
35
|
*/
|
|
33
36
|
export type GCVersion = number;
|
|
34
37
|
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The stable/default version of GC Data
|
|
40
|
+
*/
|
|
36
41
|
export const stableGCVersion: GCVersion = 3;
|
|
37
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The next version of GC Data, to bump to in case we need to regenerate all GC Data across all files.
|
|
44
|
+
*/
|
|
38
45
|
export const nextGCVersion: GCVersion = 4;
|
|
39
46
|
|
|
40
47
|
/**
|
|
@@ -50,14 +57,22 @@ export const nextGCVersion: GCVersion = 4;
|
|
|
50
57
|
*/
|
|
51
58
|
export const gcGenerationOptionName = "gcGeneration";
|
|
52
59
|
|
|
53
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Config key to turn GC test mode on / off.
|
|
62
|
+
*/
|
|
54
63
|
export const gcTestModeKey = "Fluid.GarbageCollection.GCTestMode";
|
|
55
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Config key to expire a session after a set period of time. Defaults to true.
|
|
66
|
+
*/
|
|
56
67
|
export const runSessionExpiryKey = "Fluid.GarbageCollection.RunSessionExpiry";
|
|
57
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Config key to disable throwing an error when tombstone object is loaded (requested).
|
|
70
|
+
*/
|
|
58
71
|
export const disableThrowOnTombstoneLoadKey =
|
|
59
72
|
"Fluid.GarbageCollection.DisableThrowOnTombstoneLoad";
|
|
60
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Config key to enable GC version upgrade.
|
|
75
|
+
*/
|
|
61
76
|
export const gcVersionUpgradeToV4Key = "Fluid.GarbageCollection.GCVersionUpgradeToV4";
|
|
62
77
|
|
|
63
78
|
// One day in milliseconds.
|
|
@@ -79,6 +94,7 @@ export const defaultSweepGracePeriodMs = 1 * oneDayMs; // 1 day
|
|
|
79
94
|
* @see IGCMetadata.gcFeatureMatrix and @see gcGenerationOptionName
|
|
80
95
|
* @legacy
|
|
81
96
|
* @alpha
|
|
97
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
82
98
|
*/
|
|
83
99
|
export type GCFeatureMatrix =
|
|
84
100
|
| {
|
|
@@ -88,7 +104,9 @@ export type GCFeatureMatrix =
|
|
|
88
104
|
* Provided via Container Runtime Options.
|
|
89
105
|
*/
|
|
90
106
|
gcGeneration?: number;
|
|
91
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Deprecated property from legacy type. Will not be set concurrently with gcGeneration
|
|
109
|
+
*/
|
|
92
110
|
tombstoneGeneration?: undefined;
|
|
93
111
|
}
|
|
94
112
|
| {
|
|
@@ -117,6 +135,7 @@ export interface IGCMetadata_Deprecated {
|
|
|
117
135
|
*
|
|
118
136
|
* @legacy
|
|
119
137
|
* @alpha
|
|
138
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
120
139
|
*/
|
|
121
140
|
export interface IGCMetadata {
|
|
122
141
|
/**
|
|
@@ -148,7 +167,9 @@ export interface IGCMetadata {
|
|
|
148
167
|
* @deprecated use GCFeatureMatrix.gcGeneration instead. @see GCFeatureMatrix.gcGeneration
|
|
149
168
|
*/
|
|
150
169
|
readonly sweepEnabled?: boolean;
|
|
151
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* If this is present, the session for this container will expire after this time and the container will close
|
|
172
|
+
*/
|
|
152
173
|
readonly sessionExpiryTimeoutMs?: number;
|
|
153
174
|
/**
|
|
154
175
|
* How long to wait after an object is unreferenced before it becomes a Tombstone.
|
|
@@ -165,25 +186,44 @@ export interface IGCMetadata {
|
|
|
165
186
|
* The statistics of the system state after a garbage collection mark phase run.
|
|
166
187
|
* @legacy
|
|
167
188
|
* @alpha
|
|
189
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
168
190
|
*/
|
|
169
191
|
export interface IMarkPhaseStats {
|
|
170
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* The number of nodes in the container.
|
|
194
|
+
*/
|
|
171
195
|
nodeCount: number;
|
|
172
|
-
/**
|
|
196
|
+
/**
|
|
197
|
+
* The number of data stores in the container.
|
|
198
|
+
*/
|
|
173
199
|
dataStoreCount: number;
|
|
174
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* The number of attachment blobs in the container.
|
|
202
|
+
*/
|
|
175
203
|
attachmentBlobCount: number;
|
|
176
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* The number of unreferenced nodes in the container.
|
|
206
|
+
*/
|
|
177
207
|
unrefNodeCount: number;
|
|
178
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* The number of unreferenced data stores in the container.
|
|
210
|
+
*/
|
|
179
211
|
unrefDataStoreCount: number;
|
|
180
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* The number of unreferenced attachment blobs in the container.
|
|
214
|
+
*/
|
|
181
215
|
unrefAttachmentBlobCount: number;
|
|
182
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* The number of nodes whose reference state updated since last GC run.
|
|
218
|
+
*/
|
|
183
219
|
updatedNodeCount: number;
|
|
184
|
-
/**
|
|
220
|
+
/**
|
|
221
|
+
* The number of data stores whose reference state updated since last GC run.
|
|
222
|
+
*/
|
|
185
223
|
updatedDataStoreCount: number;
|
|
186
|
-
/**
|
|
224
|
+
/**
|
|
225
|
+
* The number of attachment blobs whose reference state updated since last GC run.
|
|
226
|
+
*/
|
|
187
227
|
updatedAttachmentBlobCount: number;
|
|
188
228
|
}
|
|
189
229
|
|
|
@@ -191,19 +231,32 @@ export interface IMarkPhaseStats {
|
|
|
191
231
|
* The statistics of the system state after a garbage collection sweep phase run.
|
|
192
232
|
* @legacy
|
|
193
233
|
* @alpha
|
|
234
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
194
235
|
*/
|
|
195
236
|
export interface ISweepPhaseStats {
|
|
196
|
-
/**
|
|
237
|
+
/**
|
|
238
|
+
* The number of nodes in the lifetime of the container.
|
|
239
|
+
*/
|
|
197
240
|
lifetimeNodeCount: number;
|
|
198
|
-
/**
|
|
241
|
+
/**
|
|
242
|
+
* The number of data stores in the lifetime of the container.
|
|
243
|
+
*/
|
|
199
244
|
lifetimeDataStoreCount: number;
|
|
200
|
-
/**
|
|
245
|
+
/**
|
|
246
|
+
* The number of attachment blobs in the lifetime of the container.
|
|
247
|
+
*/
|
|
201
248
|
lifetimeAttachmentBlobCount: number;
|
|
202
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* The number of deleted nodes in the container.
|
|
251
|
+
*/
|
|
203
252
|
deletedNodeCount: number;
|
|
204
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* The number of deleted data stores in the container.
|
|
255
|
+
*/
|
|
205
256
|
deletedDataStoreCount: number;
|
|
206
|
-
/**
|
|
257
|
+
/**
|
|
258
|
+
* The number of deleted attachment blobs in the container.
|
|
259
|
+
*/
|
|
207
260
|
deletedAttachmentBlobCount: number;
|
|
208
261
|
}
|
|
209
262
|
|
|
@@ -211,6 +264,7 @@ export interface ISweepPhaseStats {
|
|
|
211
264
|
* The statistics of the system state after a garbage collection run.
|
|
212
265
|
* @legacy
|
|
213
266
|
* @alpha
|
|
267
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
214
268
|
*/
|
|
215
269
|
export interface IGCStats extends IMarkPhaseStats, ISweepPhaseStats {}
|
|
216
270
|
|
|
@@ -218,6 +272,7 @@ export interface IGCStats extends IMarkPhaseStats, ISweepPhaseStats {}
|
|
|
218
272
|
* The types of GC nodes in the GC reference graph.
|
|
219
273
|
* @legacy
|
|
220
274
|
* @alpha
|
|
275
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
221
276
|
*/
|
|
222
277
|
export const GCNodeType = {
|
|
223
278
|
// Nodes that are for data stores.
|
|
@@ -233,6 +288,7 @@ export const GCNodeType = {
|
|
|
233
288
|
/**
|
|
234
289
|
* @legacy
|
|
235
290
|
* @alpha
|
|
291
|
+
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
236
292
|
*/
|
|
237
293
|
export type GCNodeType = (typeof GCNodeType)[keyof typeof GCNodeType];
|
|
238
294
|
|
|
@@ -241,9 +297,13 @@ export type GCNodeType = (typeof GCNodeType)[keyof typeof GCNodeType];
|
|
|
241
297
|
* @internal
|
|
242
298
|
*/
|
|
243
299
|
export const GarbageCollectionMessageType = {
|
|
244
|
-
/**
|
|
300
|
+
/**
|
|
301
|
+
* Message sent directing GC to delete the given nodes
|
|
302
|
+
*/
|
|
245
303
|
Sweep: "Sweep",
|
|
246
|
-
/**
|
|
304
|
+
/**
|
|
305
|
+
* Message sent notifying GC that a Tombstoned object was Loaded
|
|
306
|
+
*/
|
|
247
307
|
TombstoneLoaded: "TombstoneLoaded",
|
|
248
308
|
} as const;
|
|
249
309
|
|
|
@@ -258,9 +318,13 @@ export type GarbageCollectionMessageType =
|
|
|
258
318
|
* @internal
|
|
259
319
|
*/
|
|
260
320
|
export interface ISweepMessage {
|
|
261
|
-
/**
|
|
321
|
+
/**
|
|
322
|
+
* @see GarbageCollectionMessageType.Sweep
|
|
323
|
+
*/
|
|
262
324
|
type: typeof GarbageCollectionMessageType.Sweep;
|
|
263
|
-
/**
|
|
325
|
+
/**
|
|
326
|
+
* The ids of nodes that are deleted.
|
|
327
|
+
*/
|
|
264
328
|
deletedNodeIds: string[];
|
|
265
329
|
}
|
|
266
330
|
|
|
@@ -269,9 +333,13 @@ export interface ISweepMessage {
|
|
|
269
333
|
* @internal
|
|
270
334
|
*/
|
|
271
335
|
export interface ITombstoneLoadedMessage {
|
|
272
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* @see GarbageCollectionMessageType.TombstoneLoaded
|
|
338
|
+
*/
|
|
273
339
|
type: typeof GarbageCollectionMessageType.TombstoneLoaded;
|
|
274
|
-
/**
|
|
340
|
+
/**
|
|
341
|
+
* The id of Tombstoned node that was loaded.
|
|
342
|
+
*/
|
|
275
343
|
nodePath: string;
|
|
276
344
|
}
|
|
277
345
|
|
|
@@ -285,9 +353,13 @@ export type GarbageCollectionMessage = ISweepMessage | ITombstoneLoadedMessage;
|
|
|
285
353
|
* Defines the APIs for the runtime object to be passed to the garbage collector.
|
|
286
354
|
*/
|
|
287
355
|
export interface IGarbageCollectionRuntime {
|
|
288
|
-
/**
|
|
356
|
+
/**
|
|
357
|
+
* Returns the garbage collection data of the runtime.
|
|
358
|
+
*/
|
|
289
359
|
getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
|
|
290
|
-
/**
|
|
360
|
+
/**
|
|
361
|
+
* After GC has run, called to notify the runtime of routes that are used in it.
|
|
362
|
+
*/
|
|
291
363
|
updateUsedRoutes(usedRoutes: readonly string[]): void;
|
|
292
364
|
/**
|
|
293
365
|
* After GC has run and identified nodes that are sweep ready, called to delete the sweep ready nodes. The runtime
|
|
@@ -295,17 +367,27 @@ export interface IGarbageCollectionRuntime {
|
|
|
295
367
|
* @param sweepReadyRoutes - The routes of nodes that are sweep ready and should be deleted.
|
|
296
368
|
*/
|
|
297
369
|
deleteSweepReadyNodes(sweepReadyRoutes: readonly string[]): readonly string[];
|
|
298
|
-
/**
|
|
370
|
+
/**
|
|
371
|
+
* Called to notify the runtime of routes that are tombstones.
|
|
372
|
+
*/
|
|
299
373
|
updateTombstonedRoutes(tombstoneRoutes: readonly string[]): void;
|
|
300
|
-
/**
|
|
374
|
+
/**
|
|
375
|
+
* Returns a referenced timestamp to be used to track unreferenced nodes.
|
|
376
|
+
*/
|
|
301
377
|
getCurrentReferenceTimestampMs(): number | undefined;
|
|
302
|
-
/**
|
|
378
|
+
/**
|
|
379
|
+
* Returns the type of the GC node.
|
|
380
|
+
*/
|
|
303
381
|
getNodeType(nodePath: string): GCNodeType;
|
|
304
|
-
/**
|
|
382
|
+
/**
|
|
383
|
+
* Called when the runtime should close because of an error.
|
|
384
|
+
*/
|
|
305
385
|
closeFn: (error?: ICriticalContainerError) => void;
|
|
306
386
|
}
|
|
307
387
|
|
|
308
|
-
/**
|
|
388
|
+
/**
|
|
389
|
+
* Defines the contract for the garbage collector.
|
|
390
|
+
*/
|
|
309
391
|
export interface IGarbageCollector {
|
|
310
392
|
/**
|
|
311
393
|
* Tells the time at which session expiry timer started in a previous container.
|
|
@@ -313,13 +395,21 @@ export interface IGarbageCollector {
|
|
|
313
395
|
* original container's local client time when it was loaded (and started the session expiry timer).
|
|
314
396
|
*/
|
|
315
397
|
readonly sessionExpiryTimerStarted: number | undefined;
|
|
316
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Tells whether GC should run or not.
|
|
400
|
+
*/
|
|
317
401
|
readonly shouldRunGC: boolean;
|
|
318
|
-
/**
|
|
402
|
+
/**
|
|
403
|
+
* The count of data stores whose GC state updated since the last summary.
|
|
404
|
+
*/
|
|
319
405
|
readonly updatedDSCountSinceLastSummary: number;
|
|
320
|
-
/**
|
|
406
|
+
/**
|
|
407
|
+
* Initialize the state from the base snapshot after its creation.
|
|
408
|
+
*/
|
|
321
409
|
initializeBaseState(): Promise<void>;
|
|
322
|
-
/**
|
|
410
|
+
/**
|
|
411
|
+
* Run garbage collection and update the reference / used state of the system.
|
|
412
|
+
*/
|
|
323
413
|
collectGarbage(
|
|
324
414
|
options: {
|
|
325
415
|
logger?: ITelemetryLoggerExt;
|
|
@@ -328,37 +418,51 @@ export interface IGarbageCollector {
|
|
|
328
418
|
},
|
|
329
419
|
telemetryContext?: ITelemetryContext,
|
|
330
420
|
): Promise<IGCStats | undefined>;
|
|
331
|
-
/**
|
|
421
|
+
/**
|
|
422
|
+
* Summarizes the GC data and returns it as a summary tree.
|
|
423
|
+
*/
|
|
332
424
|
summarize(
|
|
333
425
|
fullTree: boolean,
|
|
334
426
|
trackState: boolean,
|
|
335
427
|
telemetryContext?: ITelemetryContext,
|
|
336
428
|
): ISummarizeResult | undefined;
|
|
337
|
-
/**
|
|
429
|
+
/**
|
|
430
|
+
* Returns the garbage collector specific metadata to be written into the summary.
|
|
431
|
+
*/
|
|
338
432
|
getMetadata(): IGCMetadata;
|
|
339
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* Returns the GC details generated from the base snapshot.
|
|
435
|
+
*/
|
|
340
436
|
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
341
|
-
/**
|
|
437
|
+
/**
|
|
438
|
+
* Called when the latest summary of the system has been refreshed.
|
|
439
|
+
*/
|
|
342
440
|
refreshLatestSummary(result: IRefreshSummaryResult): Promise<void>;
|
|
343
441
|
/**
|
|
344
442
|
* Called when a node with the given path is updated. If the node is inactive or tombstoned, this will log an error
|
|
345
443
|
* or throw an error if failing on incorrect usage is configured.
|
|
346
444
|
*/
|
|
347
445
|
nodeUpdated(props: IGCNodeUpdatedProps): void;
|
|
348
|
-
/**
|
|
446
|
+
/**
|
|
447
|
+
* Called when a reference is added to a node. Used to identify nodes that were referenced between summaries.
|
|
448
|
+
*/
|
|
349
449
|
addedOutboundReference(
|
|
350
450
|
fromNodePath: string,
|
|
351
451
|
toNodePath: string,
|
|
352
452
|
timestampMs: number,
|
|
353
453
|
autorecovery?: true,
|
|
354
454
|
): void;
|
|
355
|
-
/**
|
|
455
|
+
/**
|
|
456
|
+
* Called to process garbage collection messages
|
|
457
|
+
*/
|
|
356
458
|
processMessages(
|
|
357
459
|
messageContents: GarbageCollectionMessage[],
|
|
358
460
|
messageTimestampMs: number,
|
|
359
461
|
local: boolean,
|
|
360
462
|
): void;
|
|
361
|
-
/**
|
|
463
|
+
/**
|
|
464
|
+
* Returns true if this node has been deleted by GC during sweep phase.
|
|
465
|
+
*/
|
|
362
466
|
isNodeDeleted(nodePath: string): boolean;
|
|
363
467
|
setConnectionState(connected: boolean, clientId?: string): void;
|
|
364
468
|
dispose(): void;
|
|
@@ -369,32 +473,48 @@ export interface IGarbageCollector {
|
|
|
369
473
|
* @internal
|
|
370
474
|
*/
|
|
371
475
|
export interface IGCNodeUpdatedProps {
|
|
372
|
-
/**
|
|
476
|
+
/**
|
|
477
|
+
* Type and path of the updated node
|
|
478
|
+
*/
|
|
373
479
|
node: { type: (typeof GCNodeType)["DataStore" | "Blob"]; path: string };
|
|
374
|
-
/**
|
|
480
|
+
/**
|
|
481
|
+
* Whether the node (or a subpath) was loaded or changed.
|
|
482
|
+
*/
|
|
375
483
|
reason: "Loaded" | "Changed" | "Realized";
|
|
376
484
|
/**
|
|
377
485
|
* The op-based timestamp when the node changed. If the update is from receiving an op, this should
|
|
378
486
|
* be the timestamp of the op. If not, this should be the timestamp of the last op processed.
|
|
379
487
|
*/
|
|
380
488
|
timestampMs: number | undefined;
|
|
381
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* The package path of the node. This may not be available if the node hasn't been loaded yet
|
|
491
|
+
*/
|
|
382
492
|
packagePath?: readonly string[];
|
|
383
|
-
/**
|
|
493
|
+
/**
|
|
494
|
+
* The original request for loads to preserve it in telemetry
|
|
495
|
+
*/
|
|
384
496
|
request?: IRequest;
|
|
385
|
-
/**
|
|
497
|
+
/**
|
|
498
|
+
* If the node was loaded via request path, the header data. May be modified from the original request
|
|
499
|
+
*/
|
|
386
500
|
headerData?: RuntimeHeaderData;
|
|
387
|
-
/**
|
|
501
|
+
/**
|
|
502
|
+
* Any other properties to be logged.
|
|
503
|
+
*/
|
|
388
504
|
additionalProps?: ITelemetryPropertiesExt;
|
|
389
505
|
}
|
|
390
506
|
|
|
391
|
-
/**
|
|
507
|
+
/**
|
|
508
|
+
* Parameters necessary for creating a GarbageCollector.
|
|
509
|
+
*/
|
|
392
510
|
export interface IGarbageCollectorCreateParams {
|
|
393
511
|
readonly runtime: IGarbageCollectionRuntime;
|
|
394
512
|
readonly gcOptions: IGCRuntimeOptions;
|
|
395
513
|
readonly baseLogger: ITelemetryLoggerExt;
|
|
396
514
|
readonly existing: boolean;
|
|
515
|
+
// eslint-disable-next-line import/no-deprecated
|
|
397
516
|
readonly metadata: IContainerRuntimeMetadata | undefined;
|
|
517
|
+
// eslint-disable-next-line import/no-deprecated
|
|
398
518
|
readonly createContainerMetadata: ICreateContainerMetadata;
|
|
399
519
|
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
400
520
|
readonly isSummarizerClient: boolean;
|
|
@@ -444,6 +564,8 @@ export interface IGCRuntimeOptions {
|
|
|
444
564
|
/**
|
|
445
565
|
* Allows additional GC options to be passed.
|
|
446
566
|
*/
|
|
567
|
+
// TODO: Use unknown (breaking change)
|
|
568
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
447
569
|
[key: string]: any;
|
|
448
570
|
}
|
|
449
571
|
|
|
@@ -461,44 +583,72 @@ export interface IGarbageCollectorConfigs {
|
|
|
461
583
|
* flag defined below.
|
|
462
584
|
*/
|
|
463
585
|
readonly sweepAllowed: boolean;
|
|
464
|
-
/**
|
|
586
|
+
/**
|
|
587
|
+
* Tracks if sweep phase is enabled to run in this session or not
|
|
588
|
+
*/
|
|
465
589
|
readonly sweepEnabled: boolean;
|
|
466
590
|
/**
|
|
467
591
|
* If true, bypass optimizations and generate GC data for all nodes irrespective of whether a node changed or not.
|
|
468
592
|
*/
|
|
469
593
|
readonly runFullGC: boolean | undefined;
|
|
470
|
-
/**
|
|
594
|
+
/**
|
|
595
|
+
* The time in ms to expire a session for a client for gc.
|
|
596
|
+
*/
|
|
471
597
|
readonly sessionExpiryTimeoutMs: number | undefined;
|
|
472
|
-
/**
|
|
598
|
+
/**
|
|
599
|
+
* The time after which an unreferenced node can be Tombstoned - i.e. GC knows it can't be referenced again (revived).
|
|
600
|
+
*/
|
|
473
601
|
readonly tombstoneTimeoutMs: number | undefined;
|
|
474
602
|
/**
|
|
475
603
|
* The delay between tombstone and sweep. Not persisted, so concurrent sessions may use different values.
|
|
476
604
|
* Sweep is implemented in an eventually-consistent way so this is acceptable.
|
|
477
605
|
*/
|
|
478
606
|
readonly sweepGracePeriodMs: number;
|
|
479
|
-
/**
|
|
607
|
+
/**
|
|
608
|
+
* The time after which an unreferenced node is inactive.
|
|
609
|
+
*/
|
|
480
610
|
readonly inactiveTimeoutMs: number;
|
|
481
|
-
/**
|
|
611
|
+
/**
|
|
612
|
+
* Tracks whether GC should run in test mode. In this mode, unreferenced objects are deleted immediately.
|
|
613
|
+
*/
|
|
482
614
|
readonly testMode: boolean;
|
|
483
|
-
/**
|
|
615
|
+
/**
|
|
616
|
+
* @see GCFeatureMatrix.
|
|
617
|
+
*/
|
|
484
618
|
readonly persistedGcFeatureMatrix: GCFeatureMatrix | undefined;
|
|
485
|
-
/**
|
|
619
|
+
/**
|
|
620
|
+
* The version of GC in the base snapshot.
|
|
621
|
+
*/
|
|
486
622
|
readonly gcVersionInBaseSnapshot: GCVersion | undefined;
|
|
487
|
-
/**
|
|
623
|
+
/**
|
|
624
|
+
* The current version of GC data in the running code
|
|
625
|
+
*/
|
|
488
626
|
readonly gcVersionInEffect: GCVersion;
|
|
489
|
-
/**
|
|
627
|
+
/**
|
|
628
|
+
* If true, throw an error when a tombstone data store is retrieved
|
|
629
|
+
*/
|
|
490
630
|
readonly throwOnTombstoneLoad: boolean;
|
|
491
631
|
}
|
|
492
632
|
|
|
493
|
-
/**
|
|
633
|
+
/**
|
|
634
|
+
* The state of node that is unreferenced.
|
|
635
|
+
*/
|
|
494
636
|
export const UnreferencedState = {
|
|
495
|
-
/**
|
|
637
|
+
/**
|
|
638
|
+
* The node is active, i.e., it can become referenced again.
|
|
639
|
+
*/
|
|
496
640
|
Active: "Active",
|
|
497
|
-
/**
|
|
641
|
+
/**
|
|
642
|
+
* The node is inactive, i.e., it should not become referenced.
|
|
643
|
+
*/
|
|
498
644
|
Inactive: "Inactive",
|
|
499
|
-
/**
|
|
645
|
+
/**
|
|
646
|
+
* The node is ready to be tombstoned
|
|
647
|
+
*/
|
|
500
648
|
TombstoneReady: "TombstoneReady",
|
|
501
|
-
/**
|
|
649
|
+
/**
|
|
650
|
+
* The node is ready to be deleted by the sweep phase.
|
|
651
|
+
*/
|
|
502
652
|
SweepReady: "SweepReady",
|
|
503
653
|
} as const;
|
|
504
654
|
export type UnreferencedState = (typeof UnreferencedState)[keyof typeof UnreferencedState];
|
|
@@ -507,8 +657,12 @@ export type UnreferencedState = (typeof UnreferencedState)[keyof typeof Unrefere
|
|
|
507
657
|
* Represents the result of a GC run.
|
|
508
658
|
*/
|
|
509
659
|
export interface IGCResult {
|
|
510
|
-
/**
|
|
660
|
+
/**
|
|
661
|
+
* The ids of nodes that are referenced in the referenced graph
|
|
662
|
+
*/
|
|
511
663
|
referencedNodeIds: string[];
|
|
512
|
-
/**
|
|
664
|
+
/**
|
|
665
|
+
* The ids of nodes that are not-referenced or deleted in the referenced graph
|
|
666
|
+
*/
|
|
513
667
|
deletedNodeIds: string[];
|
|
514
668
|
}
|
package/src/gc/gcHelpers.ts
CHANGED
|
@@ -15,8 +15,11 @@ import {
|
|
|
15
15
|
import type { IConfigProvider } from "@fluidframework/telemetry-utils/internal";
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
// eslint-disable-next-line import/no-deprecated
|
|
18
19
|
GCFeatureMatrix,
|
|
20
|
+
// eslint-disable-next-line import/no-deprecated
|
|
19
21
|
GCVersion,
|
|
22
|
+
// eslint-disable-next-line import/no-deprecated
|
|
20
23
|
IGCMetadata,
|
|
21
24
|
gcVersionUpgradeToV4Key,
|
|
22
25
|
nextGCVersion,
|
|
@@ -28,6 +31,7 @@ import {
|
|
|
28
31
|
IGarbageCollectionState,
|
|
29
32
|
} from "./gcSummaryDefinitions.js";
|
|
30
33
|
|
|
34
|
+
// eslint-disable-next-line import/no-deprecated
|
|
31
35
|
export function getGCVersion(metadata?: IGCMetadata): GCVersion {
|
|
32
36
|
if (!metadata) {
|
|
33
37
|
// Force to 0/disallowed in prior versions
|
|
@@ -36,7 +40,9 @@ export function getGCVersion(metadata?: IGCMetadata): GCVersion {
|
|
|
36
40
|
return metadata.gcFeature ?? 0;
|
|
37
41
|
}
|
|
38
42
|
|
|
39
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Indicates what GC version is in effect for new GC data being written in this session
|
|
45
|
+
*/
|
|
40
46
|
export function getGCVersionInEffect(configProvider: IConfigProvider): number {
|
|
41
47
|
// If version upgrade is not enabled, fall back to the stable GC version.
|
|
42
48
|
return configProvider.getBoolean(gcVersionUpgradeToV4Key) === true
|
|
@@ -61,6 +67,7 @@ export function getGCVersionInEffect(configProvider: IConfigProvider): number {
|
|
|
61
67
|
* @returns true if GC Sweep should be allowed for this document
|
|
62
68
|
*/
|
|
63
69
|
export function shouldAllowGcSweep(
|
|
70
|
+
// eslint-disable-next-line import/no-deprecated
|
|
64
71
|
featureMatrix: GCFeatureMatrix,
|
|
65
72
|
currentGeneration: number | undefined,
|
|
66
73
|
): boolean {
|
|
@@ -103,16 +110,16 @@ export function concatGarbageCollectionStates(
|
|
|
103
110
|
const combinedGCNodes: { [id: string]: IGarbageCollectionNodeData } = {};
|
|
104
111
|
for (const [nodeId, nodeData] of Object.entries(gcState1.gcNodes)) {
|
|
105
112
|
combinedGCNodes[nodeId] = {
|
|
106
|
-
outboundRoutes:
|
|
113
|
+
outboundRoutes: [...nodeData.outboundRoutes],
|
|
107
114
|
unreferencedTimestampMs: nodeData.unreferencedTimestampMs,
|
|
108
115
|
};
|
|
109
116
|
}
|
|
110
117
|
|
|
111
118
|
for (const [nodeId, nodeData] of Object.entries(gcState2.gcNodes)) {
|
|
112
|
-
let combineNodeData
|
|
119
|
+
let combineNodeData = combinedGCNodes[nodeId];
|
|
113
120
|
if (combineNodeData === undefined) {
|
|
114
121
|
combineNodeData = {
|
|
115
|
-
outboundRoutes:
|
|
122
|
+
outboundRoutes: [...nodeData.outboundRoutes],
|
|
116
123
|
unreferencedTimestampMs: nodeData.unreferencedTimestampMs,
|
|
117
124
|
};
|
|
118
125
|
} else {
|
|
@@ -147,7 +154,7 @@ export function concatGarbageCollectionStates(
|
|
|
147
154
|
export function cloneGCData(gcData: IGarbageCollectionData): IGarbageCollectionData {
|
|
148
155
|
const clonedGCNodes: { [id: string]: string[] } = {};
|
|
149
156
|
for (const [id, outboundRoutes] of Object.entries(gcData.gcNodes)) {
|
|
150
|
-
clonedGCNodes[id] =
|
|
157
|
+
clonedGCNodes[id] = [...outboundRoutes];
|
|
151
158
|
}
|
|
152
159
|
return {
|
|
153
160
|
gcNodes: clonedGCNodes,
|
|
@@ -160,11 +167,11 @@ export function cloneGCData(gcData: IGarbageCollectionData): IGarbageCollectionD
|
|
|
160
167
|
export function concatGarbageCollectionData(
|
|
161
168
|
gcData1: IGarbageCollectionData,
|
|
162
169
|
gcData2: IGarbageCollectionData,
|
|
163
|
-
) {
|
|
170
|
+
): IGarbageCollectionData {
|
|
164
171
|
const combinedGCData: IGarbageCollectionData = cloneGCData(gcData1);
|
|
165
172
|
for (const [id, routes] of Object.entries(gcData2.gcNodes)) {
|
|
166
173
|
if (combinedGCData.gcNodes[id] === undefined) {
|
|
167
|
-
combinedGCData.gcNodes[id] =
|
|
174
|
+
combinedGCData.gcNodes[id] = [...routes];
|
|
168
175
|
} else {
|
|
169
176
|
const combinedRoutes = [...routes, ...combinedGCData.gcNodes[id]];
|
|
170
177
|
combinedGCData.gcNodes[id] = [...new Set(combinedRoutes)];
|
|
@@ -202,7 +209,7 @@ export async function getGCDataFromSnapshot(
|
|
|
202
209
|
continue;
|
|
203
210
|
}
|
|
204
211
|
|
|
205
|
-
const blobId
|
|
212
|
+
const blobId = gcSnapshotTree.blobs[key];
|
|
206
213
|
if (blobId === undefined) {
|
|
207
214
|
continue;
|
|
208
215
|
}
|
|
@@ -219,7 +226,9 @@ export async function getGCDataFromSnapshot(
|
|
|
219
226
|
* @param gcDetails - The GC details of a node.
|
|
220
227
|
* @returns A map of GC details of each children of the the given node.
|
|
221
228
|
*/
|
|
222
|
-
export function unpackChildNodesGCDetails(
|
|
229
|
+
export function unpackChildNodesGCDetails(
|
|
230
|
+
gcDetails: IGarbageCollectionDetailsBase,
|
|
231
|
+
): Map<string, IGarbageCollectionDetailsBase> {
|
|
223
232
|
const childGCDetailsMap: Map<string, IGarbageCollectionDetailsBase> = new Map();
|
|
224
233
|
|
|
225
234
|
// If GC data is not available, bail out.
|
|
@@ -290,11 +299,13 @@ export function unpackChildNodesGCDetails(gcDetails: IGarbageCollectionDetailsBa
|
|
|
290
299
|
* @param str - A string that may contain leading and / or trailing slashes.
|
|
291
300
|
* @returns A new string without leading and trailing slashes.
|
|
292
301
|
*/
|
|
293
|
-
function trimLeadingAndTrailingSlashes(str: string) {
|
|
302
|
+
function trimLeadingAndTrailingSlashes(str: string): string {
|
|
294
303
|
return str.replace(/^\/+|\/+$/g, "");
|
|
295
304
|
}
|
|
296
305
|
|
|
297
|
-
/**
|
|
306
|
+
/**
|
|
307
|
+
* Reformats a request URL to match expected format for a GC node path
|
|
308
|
+
*/
|
|
298
309
|
export function urlToGCNodePath(url: string): string {
|
|
299
310
|
return `/${trimLeadingAndTrailingSlashes(url.split("?")[0])}`;
|
|
300
311
|
}
|
|
@@ -31,7 +31,7 @@ export function runGarbageCollection(
|
|
|
31
31
|
|
|
32
32
|
// Get the node for the referenced id and add its outbound routes to referencedIds since they are
|
|
33
33
|
// also referenced.
|
|
34
|
-
const routes
|
|
34
|
+
const routes = referenceGraph[id];
|
|
35
35
|
if (routes !== undefined) {
|
|
36
36
|
referencedIds.push(...routes);
|
|
37
37
|
}
|