@fluidframework/container-runtime 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +123 -0
- package/README.md +4 -3
- package/dist/batchTracker.d.ts +3 -2
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +6 -5
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +10 -16
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +184 -172
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +25 -16
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +161 -35
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +697 -449
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +15 -7
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +3 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +83 -87
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +1 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +8 -9
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.js +2 -2
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/dataStores.d.ts +22 -6
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +123 -81
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerProxyBase.d.ts +35 -0
- package/dist/deltaManagerProxyBase.d.ts.map +1 -0
- package/dist/deltaManagerProxyBase.js +77 -0
- package/dist/deltaManagerProxyBase.js.map +1 -0
- package/dist/deltaManagerSummarizerProxy.d.ts +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/dist/deltaManagerSummarizerProxy.js +4 -2
- package/dist/deltaManagerSummarizerProxy.js.map +1 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +10 -10
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/error.d.ts +14 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +21 -0
- package/dist/error.js.map +1 -0
- package/dist/gc/garbageCollection.d.ts +10 -9
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +61 -53
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +18 -14
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +17 -4
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +14 -15
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +0 -8
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +11 -24
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +4 -7
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +19 -58
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +45 -35
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +4 -4
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +2 -2
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +3 -5
- package/dist/gc/index.js.map +1 -1
- package/dist/id-compressor/appendOnlySortedMap.d.ts +8 -30
- package/dist/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/appendOnlySortedMap.js +26 -68
- package/dist/id-compressor/appendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/finalSpace.d.ts +29 -0
- package/dist/id-compressor/finalSpace.d.ts.map +1 -0
- package/dist/id-compressor/finalSpace.js +62 -0
- package/dist/id-compressor/finalSpace.js.map +1 -0
- package/dist/id-compressor/idCompressor.d.ts +25 -250
- package/dist/id-compressor/idCompressor.d.ts.map +1 -1
- package/dist/id-compressor/idCompressor.js +390 -1153
- package/dist/id-compressor/idCompressor.js.map +1 -1
- package/dist/id-compressor/identifiers.d.ts +32 -0
- package/dist/id-compressor/identifiers.d.ts.map +1 -0
- package/dist/id-compressor/identifiers.js +15 -0
- package/dist/id-compressor/identifiers.js.map +1 -0
- package/dist/id-compressor/index.d.ts +5 -6
- package/dist/id-compressor/index.d.ts.map +1 -1
- package/dist/id-compressor/index.js +20 -26
- package/dist/id-compressor/index.js.map +1 -1
- package/dist/id-compressor/persistanceUtilities.d.ts +22 -0
- package/dist/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/dist/id-compressor/persistanceUtilities.js +43 -0
- package/dist/id-compressor/persistanceUtilities.js.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js +80 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/dist/id-compressor/sessions.d.ts +115 -0
- package/dist/id-compressor/sessions.d.ts.map +1 -0
- package/dist/id-compressor/sessions.js +305 -0
- package/dist/id-compressor/sessions.js.map +1 -0
- package/dist/id-compressor/utilities.d.ts +49 -0
- package/dist/id-compressor/utilities.d.ts.map +1 -0
- package/dist/id-compressor/utilities.js +166 -0
- package/dist/id-compressor/utilities.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/batchManager.js +10 -6
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +2 -2
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +12 -7
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +2 -2
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +23 -20
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +19 -9
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +2 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +22 -19
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +7 -5
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +22 -31
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +19 -7
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.js +1 -2
- package/dist/opProperties.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +18 -8
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +73 -51
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +36 -32
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/index.d.ts +3 -3
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +2 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +3 -3
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +26 -27
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +3 -3
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +31 -10
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +271 -139
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +8 -7
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +79 -78
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +2 -2
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +7 -11
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.js +10 -14
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/index.d.ts +1 -1
- package/dist/summary/summarizerNode/index.d.ts.map +1 -1
- package/dist/summary/summarizerNode/index.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +10 -19
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +57 -130
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +2 -4
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -14
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +15 -101
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +38 -25
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -3
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +12 -13
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +3 -0
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +6 -4
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +10 -4
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +106 -57
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +8 -8
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +38 -28
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts +3 -2
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +5 -4
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +10 -16
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +159 -147
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +15 -6
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +161 -35
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +651 -402
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +13 -5
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +3 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +47 -51
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +1 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +3 -4
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.js +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/dataStores.d.ts +22 -6
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +107 -65
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerProxyBase.d.ts +35 -0
- package/lib/deltaManagerProxyBase.d.ts.map +1 -0
- package/lib/deltaManagerProxyBase.js +73 -0
- package/lib/deltaManagerProxyBase.js.map +1 -0
- package/lib/deltaManagerSummarizerProxy.d.ts +1 -1
- package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/lib/deltaManagerSummarizerProxy.js +3 -1
- package/lib/deltaManagerSummarizerProxy.js.map +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +7 -7
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/error.d.ts +14 -0
- package/lib/error.d.ts.map +1 -0
- package/lib/error.js +17 -0
- package/lib/error.js.map +1 -0
- package/lib/gc/garbageCollection.d.ts +10 -9
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +61 -53
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +16 -12
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +17 -4
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +13 -14
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +0 -8
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +5 -17
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +4 -7
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +20 -59
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +46 -36
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +2 -2
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +2 -2
- package/lib/gc/index.js.map +1 -1
- package/lib/id-compressor/appendOnlySortedMap.d.ts +8 -30
- package/lib/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/appendOnlySortedMap.js +25 -66
- package/lib/id-compressor/appendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/finalSpace.d.ts +29 -0
- package/lib/id-compressor/finalSpace.d.ts.map +1 -0
- package/lib/id-compressor/finalSpace.js +58 -0
- package/lib/id-compressor/finalSpace.js.map +1 -0
- package/lib/id-compressor/idCompressor.d.ts +25 -250
- package/lib/id-compressor/idCompressor.d.ts.map +1 -1
- package/lib/id-compressor/idCompressor.js +385 -1142
- package/lib/id-compressor/idCompressor.js.map +1 -1
- package/lib/id-compressor/identifiers.d.ts +32 -0
- package/lib/id-compressor/identifiers.d.ts.map +1 -0
- package/lib/id-compressor/identifiers.js +11 -0
- package/lib/id-compressor/identifiers.js.map +1 -0
- package/lib/id-compressor/index.d.ts +5 -6
- package/lib/id-compressor/index.d.ts.map +1 -1
- package/lib/id-compressor/index.js +5 -6
- package/lib/id-compressor/index.js.map +1 -1
- package/lib/id-compressor/persistanceUtilities.d.ts +22 -0
- package/lib/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/lib/id-compressor/persistanceUtilities.js +34 -0
- package/lib/id-compressor/persistanceUtilities.js.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js +76 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/lib/id-compressor/sessions.d.ts +115 -0
- package/lib/id-compressor/sessions.d.ts.map +1 -0
- package/lib/id-compressor/sessions.js +290 -0
- package/lib/id-compressor/sessions.js.map +1 -0
- package/lib/id-compressor/utilities.d.ts +49 -0
- package/lib/id-compressor/utilities.d.ts.map +1 -0
- package/lib/id-compressor/utilities.js +148 -0
- package/lib/id-compressor/utilities.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/batchManager.js +10 -6
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +2 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +10 -5
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +2 -2
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +15 -12
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +17 -7
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +2 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +13 -10
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +7 -5
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +13 -22
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +20 -8
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.js +1 -2
- package/lib/opProperties.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +18 -8
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +62 -40
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +18 -14
- package/lib/scheduleManager.js.map +1 -1
- package/lib/summary/index.d.ts +3 -3
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +3 -3
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +21 -22
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +31 -10
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +265 -133
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +8 -7
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +75 -74
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +2 -2
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +6 -10
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.js +9 -13
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/index.d.ts +1 -1
- package/lib/summary/summarizerNode/index.d.ts.map +1 -1
- package/lib/summary/summarizerNode/index.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +10 -19
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +42 -115
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +2 -4
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -14
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +14 -100
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +38 -25
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -3
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +5 -6
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +3 -0
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +5 -3
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +10 -4
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +100 -51
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +8 -8
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +35 -25
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +28 -31
- package/src/batchTracker.ts +7 -5
- package/src/blobManager.ts +188 -166
- package/src/connectionTelemetry.ts +9 -4
- package/src/containerRuntime.ts +806 -441
- package/src/dataStore.ts +12 -4
- package/src/dataStoreContext.ts +39 -43
- package/src/dataStoreContexts.ts +4 -6
- package/src/dataStoreRegistry.ts +1 -1
- package/src/dataStores.ts +114 -80
- package/src/deltaManagerProxyBase.ts +111 -0
- package/src/deltaManagerSummarizerProxy.ts +4 -1
- package/src/deltaScheduler.ts +7 -11
- package/src/error.ts +18 -0
- package/src/gc/garbageCollection.md +53 -5
- package/src/gc/garbageCollection.ts +58 -52
- package/src/gc/gcConfigs.ts +4 -2
- package/src/gc/gcDefinitions.ts +17 -20
- package/src/gc/gcEarlyAdoption.md +145 -0
- package/src/gc/gcHelpers.ts +1 -12
- package/src/gc/gcSummaryStateTracker.ts +19 -65
- package/src/gc/gcTelemetry.ts +14 -12
- package/src/gc/gcUnreferencedStateTracker.ts +1 -1
- package/src/gc/index.ts +2 -4
- package/src/id-compressor/appendOnlySortedMap.ts +26 -87
- package/src/id-compressor/finalSpace.ts +67 -0
- package/src/id-compressor/idCompressor.ts +458 -1682
- package/src/id-compressor/identifiers.ts +42 -0
- package/src/id-compressor/index.ts +11 -20
- package/src/id-compressor/persistanceUtilities.ts +58 -0
- package/src/id-compressor/sessionSpaceNormalizer.ts +83 -0
- package/src/id-compressor/sessions.ts +405 -0
- package/src/id-compressor/utilities.ts +187 -0
- package/src/index.ts +7 -2
- package/src/opLifecycle/opCompressor.ts +6 -5
- package/src/opLifecycle/opDecompressor.ts +6 -4
- package/src/opLifecycle/opGroupingManager.ts +9 -6
- package/src/opLifecycle/opSplitter.ts +7 -6
- package/src/opLifecycle/outbox.ts +23 -32
- package/src/opLifecycle/remoteMessageProcessor.ts +27 -8
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +72 -42
- package/src/scheduleManager.ts +7 -5
- package/src/summary/index.ts +4 -3
- package/src/summary/orderedClientElection.ts +10 -6
- package/src/summary/runWhileConnectedCoordinator.ts +1 -1
- package/src/summary/runningSummarizer.ts +291 -163
- package/src/summary/summarizer.ts +27 -16
- package/src/summary/summarizerClientElection.ts +2 -2
- package/src/summary/summarizerHeuristics.ts +1 -1
- package/src/summary/summarizerNode/index.ts +1 -2
- package/src/summary/summarizerNode/summarizerNode.ts +36 -160
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +7 -38
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +11 -130
- package/src/summary/summarizerTypes.ts +40 -25
- package/src/summary/summaryCollection.ts +3 -3
- package/src/summary/summaryFormat.ts +4 -1
- package/src/summary/summaryGenerator.ts +52 -52
- package/src/summary/summaryManager.ts +44 -17
- package/dist/id-compressor/idRange.d.ts +0 -11
- package/dist/id-compressor/idRange.d.ts.map +0 -1
- package/dist/id-compressor/idRange.js +0 -29
- package/dist/id-compressor/idRange.js.map +0 -1
- package/dist/id-compressor/numericUuid.d.ts +0 -59
- package/dist/id-compressor/numericUuid.d.ts.map +0 -1
- package/dist/id-compressor/numericUuid.js +0 -325
- package/dist/id-compressor/numericUuid.js.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/dist/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.js +0 -488
- package/dist/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/dist/id-compressor/utils.d.ts +0 -57
- package/dist/id-compressor/utils.d.ts.map +0 -1
- package/dist/id-compressor/utils.js +0 -90
- package/dist/id-compressor/utils.js.map +0 -1
- package/dist/id-compressor/uuidUtilities.d.ts +0 -28
- package/dist/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/dist/id-compressor/uuidUtilities.js +0 -104
- package/dist/id-compressor/uuidUtilities.js.map +0 -1
- package/lib/id-compressor/idRange.d.ts +0 -11
- package/lib/id-compressor/idRange.d.ts.map +0 -1
- package/lib/id-compressor/idRange.js +0 -25
- package/lib/id-compressor/idRange.js.map +0 -1
- package/lib/id-compressor/numericUuid.d.ts +0 -59
- package/lib/id-compressor/numericUuid.d.ts.map +0 -1
- package/lib/id-compressor/numericUuid.js +0 -315
- package/lib/id-compressor/numericUuid.js.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/lib/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.js +0 -484
- package/lib/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/lib/id-compressor/utils.d.ts +0 -57
- package/lib/id-compressor/utils.d.ts.map +0 -1
- package/lib/id-compressor/utils.js +0 -79
- package/lib/id-compressor/utils.js.map +0 -1
- package/lib/id-compressor/uuidUtilities.d.ts +0 -28
- package/lib/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/lib/id-compressor/uuidUtilities.js +0 -96
- package/lib/id-compressor/uuidUtilities.js.map +0 -1
- package/src/id-compressor/idRange.ts +0 -35
- package/src/id-compressor/numericUuid.ts +0 -383
- package/src/id-compressor/sessionIdNormalizer.ts +0 -609
- package/src/id-compressor/utils.ts +0 -114
- package/src/id-compressor/uuidUtilities.ts +0 -120
package/src/deltaScheduler.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryLoggerExt,
|
|
7
|
-
import { performance } from "@
|
|
6
|
+
import { ITelemetryLoggerExt, formatTick } from "@fluidframework/telemetry-utils";
|
|
7
|
+
import { performance } from "@fluid-internal/client-utils";
|
|
8
8
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
9
9
|
import { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
10
10
|
|
|
@@ -111,20 +111,16 @@ export class DeltaScheduler {
|
|
|
111
111
|
if (this.schedulingLog) {
|
|
112
112
|
this.logger.sendTelemetryEvent({
|
|
113
113
|
eventName: "InboundOpsPartialProcessingTime",
|
|
114
|
-
duration:
|
|
114
|
+
duration: formatTick(elapsedTime),
|
|
115
115
|
opsProcessed:
|
|
116
116
|
this.schedulingLog.lastSequenceNumber -
|
|
117
117
|
this.schedulingLog.firstSequenceNumber +
|
|
118
118
|
1,
|
|
119
119
|
opsRemainingToProcess: this.deltaManager.inbound.length,
|
|
120
|
-
processingTime:
|
|
121
|
-
this.schedulingLog.totalProcessingTime,
|
|
122
|
-
),
|
|
120
|
+
processingTime: formatTick(this.schedulingLog.totalProcessingTime),
|
|
123
121
|
numberOfTurns: this.schedulingLog.numberOfTurns,
|
|
124
122
|
batchesProcessed: this.schedulingLog.numberOfBatchesProcessed,
|
|
125
|
-
timeToResume:
|
|
126
|
-
performance.now() - currentTime,
|
|
127
|
-
),
|
|
123
|
+
timeToResume: formatTick(performance.now() - currentTime),
|
|
128
124
|
});
|
|
129
125
|
}
|
|
130
126
|
this.deltaManager.inbound.resume();
|
|
@@ -147,13 +143,13 @@ export class DeltaScheduler {
|
|
|
147
143
|
eventName: "InboundOpsProcessingTime",
|
|
148
144
|
opsRemainingToProcess: this.schedulingLog.opsRemainingToProcess,
|
|
149
145
|
numberOfTurns: this.schedulingLog.numberOfTurns,
|
|
150
|
-
processingTime:
|
|
146
|
+
processingTime: formatTick(this.schedulingLog.totalProcessingTime),
|
|
151
147
|
opsProcessed:
|
|
152
148
|
this.schedulingLog.lastSequenceNumber -
|
|
153
149
|
this.schedulingLog.firstSequenceNumber +
|
|
154
150
|
1,
|
|
155
151
|
batchesProcessed: this.schedulingLog.numberOfBatchesProcessed,
|
|
156
|
-
duration:
|
|
152
|
+
duration: formatTick(currentTime - this.schedulingLog.startTime),
|
|
157
153
|
schedulingCount: this.schedulingCount,
|
|
158
154
|
});
|
|
159
155
|
|
package/src/error.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ContainerErrorTypes } from "@fluidframework/container-definitions";
|
|
7
|
+
import { IFluidErrorBase, LoggingError } from "@fluidframework/telemetry-utils";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Error indicating that a client's session has reached its time limit and is closed.
|
|
11
|
+
*/
|
|
12
|
+
export class ClientSessionExpiredError extends LoggingError implements IFluidErrorBase {
|
|
13
|
+
readonly errorType = ContainerErrorTypes.clientSessionExpiredError;
|
|
14
|
+
|
|
15
|
+
constructor(message: string, readonly expiryMs: number) {
|
|
16
|
+
super(message, { timeoutMs: expiryMs });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -48,12 +48,60 @@ In this phase, the GC algorithm identifies all Fluid objects that are unreferenc
|
|
|
48
48
|
|
|
49
49
|
Mark phase is enabled by default for a container. It is enabled during creation of the container runtime and remains enabled throughout its lifetime. Basically, this setting is persisted in the summary and cannot be changed.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
### Sweep phase
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
In this phase, the GC algorithm identifies all Fluid objects that have been unreferenced for a specific amount of time (typically 30-40 days) and deletes them.
|
|
54
|
+
Objects are only swept once the GC system is sure that they could never be referenced again by any active clients, i.e., clients that have the object in memory and could reference it.
|
|
55
|
+
The Fluid Runtime enforces a maximum session length (configurable) in order to guarantee an object is safe to delete after sufficient time has elapsed.
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
GC sweep phase has not been enabled by default yet. A "soft" version of Sweep called "Tombstone Mode" is enabled by default
|
|
58
|
+
as part of the Mark Phase when Sweep is disabled. In this mode, any object that GC determines is ready to be deleted is
|
|
59
|
+
marked as a "Tombstone", which triggers certain logging events and/or behavior changes if/when that Tombstoned object is
|
|
60
|
+
accessed by the application.
|
|
61
|
+
|
|
62
|
+
Tombstone is intended for use by early adopters of GC and is documented in more detail [here](./gcEarlyAdoption.md).
|
|
63
|
+
|
|
64
|
+
## GC Configuration
|
|
65
|
+
|
|
66
|
+
The default configuration for GC today is:
|
|
67
|
+
|
|
68
|
+
- GC Mark Phase is **enabled**, including Tombstone Mode
|
|
69
|
+
- Session Expiry is **enabled**
|
|
70
|
+
- GC Sweep Phase is **disabled**
|
|
71
|
+
- Note: Once enabled, Sweep will only run for documents created from that point forward
|
|
72
|
+
|
|
73
|
+
### Techniques used for configuration
|
|
74
|
+
|
|
75
|
+
There are two ways to configure the Fluid Framework's GC behavior, referred to by name throughout these documents:
|
|
76
|
+
|
|
77
|
+
1. **"GC Options"**: `ContainerRuntime.loadRuntime` takes an options value of type `IContainerRuntimeOptions`.
|
|
78
|
+
This type includes a sub-object `gcOptions`, for GC-specific options.
|
|
79
|
+
2. **"Config Settings"**: The `Loader`'s constructor takes in `ILoaderProps`, which includes `configProvider?: IConfigProviderBase`
|
|
80
|
+
This configProvider can be used to inject config settings.
|
|
81
|
+
|
|
82
|
+
Typically GC Options are used for more "official" and stable configuration, whereas Config Settings provide a mechanism
|
|
83
|
+
for apps to override settings easily, e.g. by backing their `IConfigProviderBase` with a configuration/flighting service.
|
|
84
|
+
In cases where a behavior is controlled by both a Config Setting and GC Option, you may experiment at first using Config Settings
|
|
85
|
+
and then later update the passed-in GC Options to finalize the configuration in your code.
|
|
86
|
+
|
|
87
|
+
### Disabling Mark Phase
|
|
88
|
+
|
|
89
|
+
If you wish to disable Mark Phase for newly-created documents, set the `gcAllowed` GC Option to `false`.
|
|
90
|
+
Note that this will disable GC permanently (including the sweep phase) for the container during its lifetime.
|
|
91
|
+
|
|
92
|
+
Mark Phase can also be disabled just for the session, among other behaviors,
|
|
93
|
+
covered in the [Advanced Configuration](./gcEarlyAdoption.md#more-advanced-configurations) docs.
|
|
94
|
+
|
|
95
|
+
### Enabling Sweep Phase
|
|
96
|
+
|
|
97
|
+
To enable Sweep Phase for new documents, you must set the `gcSweepGeneration` GC Option to a number, e.g. 0 to start.
|
|
98
|
+
The full semantics of this GC Option are discussed [here](./gcEarlyAdoption.md#more-about-gcsweepgeneration-and-gctombstonegeneration).
|
|
99
|
+
Note that this will disabled Tombstone Mode.
|
|
100
|
+
|
|
101
|
+
A full treatment of Tombstone and Sweep configuration can be found in
|
|
102
|
+
[this companion document geared towards early adopters of GC](./gcEarlyAdoption.md).
|
|
56
103
|
|
|
57
|
-
|
|
104
|
+
### More Advanced Configuration
|
|
58
105
|
|
|
59
|
-
|
|
106
|
+
For additional behaviors that can be configured (e.g. for testing), please see these
|
|
107
|
+
[Advanced Configuration](./gcEarlyAdoption.md#more-advanced-configurations) docs.
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { Timer } from "@fluidframework/
|
|
7
|
-
import {
|
|
8
|
-
import { ClientSessionExpiredError, DataProcessingError } from "@fluidframework/container-utils";
|
|
9
|
-
import { IRequestHeader } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { LazyPromise, Timer } from "@fluidframework/core-utils";
|
|
7
|
+
import { IRequest, IRequestHeader } from "@fluidframework/core-interfaces";
|
|
10
8
|
import {
|
|
11
9
|
gcTreeKey,
|
|
12
10
|
IGarbageCollectionData,
|
|
@@ -14,17 +12,23 @@ import {
|
|
|
14
12
|
ISummarizeResult,
|
|
15
13
|
ITelemetryContext,
|
|
16
14
|
} from "@fluidframework/runtime-definitions";
|
|
17
|
-
import {
|
|
15
|
+
import { createResponseError, responseToException } from "@fluidframework/runtime-utils";
|
|
18
16
|
import {
|
|
19
|
-
|
|
17
|
+
createChildLogger,
|
|
18
|
+
createChildMonitoringContext,
|
|
19
|
+
DataProcessingError,
|
|
20
20
|
ITelemetryLoggerExt,
|
|
21
|
-
loggerToMonitoringContext,
|
|
22
21
|
MonitoringContext,
|
|
23
22
|
PerformanceEvent,
|
|
24
23
|
} from "@fluidframework/telemetry-utils";
|
|
25
24
|
|
|
26
|
-
import {
|
|
27
|
-
|
|
25
|
+
import {
|
|
26
|
+
AllowInactiveRequestHeaderKey,
|
|
27
|
+
InactiveResponseHeaderKey,
|
|
28
|
+
RuntimeHeaders,
|
|
29
|
+
} from "../containerRuntime";
|
|
30
|
+
import { ClientSessionExpiredError } from "../error";
|
|
31
|
+
import { IRefreshSummaryResult } from "../summary";
|
|
28
32
|
import { generateGCConfigs } from "./gcConfigs";
|
|
29
33
|
import {
|
|
30
34
|
GCNodeType,
|
|
@@ -137,11 +141,13 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
137
141
|
const baseSnapshot = createParams.baseSnapshot;
|
|
138
142
|
const readAndParseBlob = createParams.readAndParseBlob;
|
|
139
143
|
|
|
140
|
-
this.mc =
|
|
141
|
-
|
|
144
|
+
this.mc = createChildMonitoringContext({
|
|
145
|
+
logger: createParams.baseLogger,
|
|
146
|
+
namespace: "GarbageCollector",
|
|
147
|
+
properties: {
|
|
142
148
|
all: { completedGCRuns: () => this.completedRuns },
|
|
143
|
-
}
|
|
144
|
-
);
|
|
149
|
+
},
|
|
150
|
+
});
|
|
145
151
|
|
|
146
152
|
this.configs = generateGCConfigs(this.mc, createParams);
|
|
147
153
|
|
|
@@ -466,8 +472,11 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
466
472
|
});
|
|
467
473
|
|
|
468
474
|
const logger = options.logger
|
|
469
|
-
?
|
|
470
|
-
|
|
475
|
+
? createChildLogger({
|
|
476
|
+
logger: options.logger,
|
|
477
|
+
properties: {
|
|
478
|
+
all: { completedGCRuns: () => this.completedRuns },
|
|
479
|
+
},
|
|
471
480
|
})
|
|
472
481
|
: this.mc.logger;
|
|
473
482
|
|
|
@@ -570,14 +579,17 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
570
579
|
|
|
571
580
|
/**
|
|
572
581
|
* Runs the GC Mark phase. It does the following:
|
|
582
|
+
*
|
|
573
583
|
* 1. Marks all referenced nodes in this run by clearing tracking for them.
|
|
584
|
+
*
|
|
574
585
|
* 2. Marks unreferenced nodes in this run by starting tracking for them.
|
|
586
|
+
*
|
|
575
587
|
* 3. Calls the runtime to update nodes that were marked referenced.
|
|
576
588
|
*
|
|
577
589
|
* @param gcResult - The result of the GC run on the gcData.
|
|
578
590
|
* @param allReferencedNodeIds - Nodes referenced in this GC run + referenced between previous and current GC run.
|
|
579
591
|
* @param currentReferenceTimestampMs - The timestamp to be used for unreferenced nodes' timestamp.
|
|
580
|
-
* @returns
|
|
592
|
+
* @returns A list of sweep ready nodes, i.e., nodes that ready to be deleted.
|
|
581
593
|
*/
|
|
582
594
|
private runMarkPhase(
|
|
583
595
|
gcResult: IGCResult,
|
|
@@ -636,7 +648,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
636
648
|
* @param sweepReadyNodes - List of nodes that are sweep ready.
|
|
637
649
|
* @param currentReferenceTimestampMs - The timestamp to be used for unreferenced nodes' timestamp.
|
|
638
650
|
* @param logger - The logger to be used to log any telemetry.
|
|
639
|
-
* @returns
|
|
651
|
+
* @returns A list of nodes that have been deleted.
|
|
640
652
|
*/
|
|
641
653
|
private runSweepPhase(
|
|
642
654
|
gcResult: IGCResult,
|
|
@@ -715,7 +727,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
715
727
|
* This function identifies nodes that were referenced since the last run.
|
|
716
728
|
* If these nodes are currently unreferenced, they will be assigned new unreferenced state by the current run.
|
|
717
729
|
*
|
|
718
|
-
* @returns
|
|
730
|
+
* @returns A list of all nodes referenced from the last local summary until now.
|
|
719
731
|
*/
|
|
720
732
|
private findAllNodesReferencedBetweenGCs(
|
|
721
733
|
currentGCData: IGarbageCollectionData,
|
|
@@ -833,45 +845,15 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
833
845
|
}
|
|
834
846
|
|
|
835
847
|
/**
|
|
836
|
-
* Called to refresh the latest summary state. This happens when either a pending summary is acked
|
|
837
|
-
* is downloaded and should be used to update the state.
|
|
848
|
+
* Called to refresh the latest summary state. This happens when either a pending summary is acked.
|
|
838
849
|
*/
|
|
839
|
-
public async refreshLatestSummary(
|
|
840
|
-
|
|
841
|
-
result: RefreshSummaryResult,
|
|
842
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
843
|
-
): Promise<void> {
|
|
844
|
-
const latestSnapshotData = await this.summaryStateTracker.refreshLatestSummary(
|
|
845
|
-
proposalHandle,
|
|
846
|
-
result,
|
|
847
|
-
readAndParseBlob,
|
|
848
|
-
);
|
|
849
|
-
|
|
850
|
-
// If the latest summary was updated but it was not tracked by this client, our state needs to be updated from
|
|
851
|
-
// this snapshot data.
|
|
852
|
-
if (this.shouldRunGC && result.latestSummaryUpdated && !result.wasSummaryTracked) {
|
|
853
|
-
// The current reference timestamp should be available if we are refreshing state from a snapshot. There has
|
|
854
|
-
// to be at least one op (summary op / ack, if nothing else) if a snapshot was taken.
|
|
855
|
-
const currentReferenceTimestampMs = this.runtime.getCurrentReferenceTimestampMs();
|
|
856
|
-
if (currentReferenceTimestampMs === undefined) {
|
|
857
|
-
throw DataProcessingError.create(
|
|
858
|
-
"No reference timestamp when updating GC state from snapshot",
|
|
859
|
-
"refreshLatestSummary",
|
|
860
|
-
undefined,
|
|
861
|
-
{
|
|
862
|
-
proposalHandle,
|
|
863
|
-
summaryRefSeq: result.summaryRefSeq,
|
|
864
|
-
gcConfigs: JSON.stringify(this.configs),
|
|
865
|
-
},
|
|
866
|
-
);
|
|
867
|
-
}
|
|
868
|
-
this.updateStateFromSnapshotData(latestSnapshotData, currentReferenceTimestampMs);
|
|
869
|
-
}
|
|
850
|
+
public async refreshLatestSummary(result: IRefreshSummaryResult): Promise<void> {
|
|
851
|
+
return this.summaryStateTracker.refreshLatestSummary(result);
|
|
870
852
|
}
|
|
871
853
|
|
|
872
854
|
/**
|
|
873
855
|
* Called when a node with the given id is updated. If the node is inactive, log an error.
|
|
874
|
-
* @param nodePath - The
|
|
856
|
+
* @param nodePath - The path of the node that changed.
|
|
875
857
|
* @param reason - Whether the node was loaded or changed.
|
|
876
858
|
* @param timestampMs - The timestamp when the node changed.
|
|
877
859
|
* @param packagePath - The package path of the node. This may not be available if the node hasn't been loaded yet.
|
|
@@ -888,6 +870,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
888
870
|
return;
|
|
889
871
|
}
|
|
890
872
|
|
|
873
|
+
// This will log if appropriate
|
|
891
874
|
this.telemetryTracker.nodeUsed({
|
|
892
875
|
id: nodePath,
|
|
893
876
|
usageType: reason,
|
|
@@ -899,6 +882,29 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
899
882
|
lastSummaryTime: this.getLastSummaryTimestampMs(),
|
|
900
883
|
viaHandle: requestHeaders?.[RuntimeHeaders.viaHandle],
|
|
901
884
|
});
|
|
885
|
+
|
|
886
|
+
// Unless this is a Loaded event, we're done after telemetry tracking
|
|
887
|
+
if (reason !== "Loaded") {
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// We may throw when loading an Inactive object, depending on these preconditions
|
|
892
|
+
const shouldThrowOnInactiveLoad =
|
|
893
|
+
!this.isSummarizerClient &&
|
|
894
|
+
this.configs.throwOnInactiveLoad === true &&
|
|
895
|
+
requestHeaders?.[AllowInactiveRequestHeaderKey] !== true;
|
|
896
|
+
const state = this.unreferencedNodesState.get(nodePath)?.state;
|
|
897
|
+
|
|
898
|
+
if (shouldThrowOnInactiveLoad && state === "Inactive") {
|
|
899
|
+
const request: IRequest = { url: nodePath };
|
|
900
|
+
const error = responseToException(
|
|
901
|
+
createResponseError(404, "Object is inactive", request, {
|
|
902
|
+
[InactiveResponseHeaderKey]: true,
|
|
903
|
+
}),
|
|
904
|
+
request,
|
|
905
|
+
);
|
|
906
|
+
throw error;
|
|
907
|
+
}
|
|
902
908
|
}
|
|
903
909
|
|
|
904
910
|
/**
|
package/src/gc/gcConfigs.ts
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { UsageError } from "@fluidframework/
|
|
7
|
-
import { MonitoringContext } from "@fluidframework/telemetry-utils";
|
|
6
|
+
import { MonitoringContext, UsageError } from "@fluidframework/telemetry-utils";
|
|
8
7
|
import { IContainerRuntimeMetadata } from "../summary";
|
|
9
8
|
import {
|
|
10
9
|
currentGCVersion,
|
|
@@ -153,6 +152,8 @@ export function generateGCConfigs(
|
|
|
153
152
|
throw new UsageError("inactive timeout should not be greater than the sweep timeout");
|
|
154
153
|
}
|
|
155
154
|
|
|
155
|
+
const throwOnInactiveLoad: boolean | undefined = createParams.gcOptions.throwOnInactiveLoad;
|
|
156
|
+
|
|
156
157
|
// Whether we are running in test mode. In this mode, unreferenced nodes are immediately deleted.
|
|
157
158
|
const testMode =
|
|
158
159
|
mc.config.getBoolean(gcTestModeKey) ?? createParams.gcOptions.runGCInTestMode === true;
|
|
@@ -172,6 +173,7 @@ export function generateGCConfigs(
|
|
|
172
173
|
sessionExpiryTimeoutMs,
|
|
173
174
|
sweepTimeoutMs,
|
|
174
175
|
inactiveTimeoutMs,
|
|
176
|
+
throwOnInactiveLoad,
|
|
175
177
|
persistedGcFeatureMatrix,
|
|
176
178
|
gcVersionInBaseSnapshot,
|
|
177
179
|
gcVersionInEffect,
|
package/src/gc/gcDefinitions.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
|
17
17
|
import {
|
|
18
18
|
IContainerRuntimeMetadata,
|
|
19
19
|
ICreateContainerMetadata,
|
|
20
|
-
|
|
20
|
+
IRefreshSummaryResult,
|
|
21
21
|
} from "../summary";
|
|
22
22
|
|
|
23
23
|
export type GCVersion = number;
|
|
@@ -43,29 +43,28 @@ export const gcTombstoneGenerationOptionName = "gcTombstoneGeneration";
|
|
|
43
43
|
*/
|
|
44
44
|
export const gcSweepGenerationOptionName = "gcSweepGeneration";
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
/** Config key to turn GC on / off. */
|
|
47
47
|
export const runGCKey = "Fluid.GarbageCollection.RunGC";
|
|
48
|
-
|
|
48
|
+
/** Config key to turn GC sweep on / off. */
|
|
49
49
|
export const runSweepKey = "Fluid.GarbageCollection.RunSweep";
|
|
50
|
-
|
|
50
|
+
/** Config key to turn GC test mode on / off. */
|
|
51
51
|
export const gcTestModeKey = "Fluid.GarbageCollection.GCTestMode";
|
|
52
|
-
|
|
52
|
+
/** Config key to expire a session after a set period of time. Defaults to true. */
|
|
53
53
|
export const runSessionExpiryKey = "Fluid.GarbageCollection.RunSessionExpiry";
|
|
54
|
-
|
|
54
|
+
/** Config key to turn GC sweep log off. */
|
|
55
55
|
export const disableSweepLogKey = "Fluid.GarbageCollection.DisableSweepLog";
|
|
56
|
-
|
|
56
|
+
/** Config key to disable the tombstone feature, i.e., tombstone information is not read / written into summary. */
|
|
57
57
|
export const disableTombstoneKey = "Fluid.GarbageCollection.DisableTombstone";
|
|
58
|
-
|
|
58
|
+
/** Config key to enable throwing an error when tombstone object is loaded (requested). */
|
|
59
59
|
export const throwOnTombstoneLoadKey = "Fluid.GarbageCollection.ThrowOnTombstoneLoad";
|
|
60
|
-
|
|
60
|
+
/** Config key to enable throwing an error when tombstone object is used (e.g. outgoing or incoming ops). */
|
|
61
61
|
export const throwOnTombstoneUsageKey = "Fluid.GarbageCollection.ThrowOnTombstoneUsage";
|
|
62
|
-
|
|
62
|
+
/** Config key to enable GC version upgrade. */
|
|
63
63
|
export const gcVersionUpgradeToV3Key = "Fluid.GarbageCollection.GCVersionUpgradeToV3";
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
export const sweepAttachmentBlobsKey = "Fluid.GarbageCollection.Test.SweepAttachmentBlobs";
|
|
64
|
+
/** Config key to disable GC sweep for datastores. */
|
|
65
|
+
export const disableDatastoreSweepKey = "Fluid.GarbageCollection.DisableDataStoreSweep";
|
|
66
|
+
/** Config key to disable GC sweep for attachment blobs. */
|
|
67
|
+
export const disableAttachmentBlobSweepKey = "Fluid.GarbageCollection.DisableAttachmentBlobSweep";
|
|
69
68
|
|
|
70
69
|
// One day in milliseconds.
|
|
71
70
|
export const oneDayMs = 1 * 24 * 60 * 60 * 1000;
|
|
@@ -228,11 +227,7 @@ export interface IGarbageCollector {
|
|
|
228
227
|
/** Returns the GC details generated from the base snapshot. */
|
|
229
228
|
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
230
229
|
/** Called when the latest summary of the system has been refreshed. */
|
|
231
|
-
refreshLatestSummary(
|
|
232
|
-
proposalHandle: string | undefined,
|
|
233
|
-
result: RefreshSummaryResult,
|
|
234
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
235
|
-
): Promise<void>;
|
|
230
|
+
refreshLatestSummary(result: IRefreshSummaryResult): Promise<void>;
|
|
236
231
|
/** Called when a node is updated. Used to detect and log when an inactive node is changed or loaded. */
|
|
237
232
|
nodeUpdated(
|
|
238
233
|
nodePath: string,
|
|
@@ -349,6 +344,8 @@ export interface IGarbageCollectorConfigs {
|
|
|
349
344
|
readonly sweepTimeoutMs: number | undefined;
|
|
350
345
|
/** The time after which an unreferenced node is inactive. */
|
|
351
346
|
readonly inactiveTimeoutMs: number;
|
|
347
|
+
/** It is easier for users to diagnose InactiveObject usage if we throw on load, which this option enables */
|
|
348
|
+
readonly throwOnInactiveLoad: boolean | undefined;
|
|
352
349
|
/** Tracks whether GC should run in test mode. In this mode, unreferenced objects are deleted immediately. */
|
|
353
350
|
readonly testMode: boolean;
|
|
354
351
|
/**
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Garbage Collection: Advanced configuration for early adopters
|
|
2
|
+
|
|
3
|
+
_For a technical overview of Garbage Collection, start with [GarbageCollection.md](./garbageCollection.md)_
|
|
4
|
+
|
|
5
|
+
GC Sweep is not yet enabled by default, and until that time early adopters have several configuration options available
|
|
6
|
+
for how to enable GC and monitor for any GC-impacting bugs that would need to be mitigated.
|
|
7
|
+
|
|
8
|
+
Please refer to the section [Techniques Used for Configuration](./garbageCollection.md#techniques-used-for-configuration)
|
|
9
|
+
before continuing, to ensure you're familiar with using "GC Options" and "Config Settings" for configuring GC.
|
|
10
|
+
|
|
11
|
+
## What's on by default
|
|
12
|
+
|
|
13
|
+
GC Mark Phase is enabled by default, which includes marking objects that are ready to be deleted as Tombstones.
|
|
14
|
+
FF will log an informational event if/when a Tombstoned object is loaded - a scenario that would represent data loss if Sweep were enabled.
|
|
15
|
+
The eventName for the Tombstone log ends with `GC_Tombstone_DataStore_Requested`.
|
|
16
|
+
|
|
17
|
+
There's a similar event logged long before an object is Tombstoned. Ater only 7 days (configurable), an unreferenced object is considered
|
|
18
|
+
"Inactive", and FF will log if an Inactive object is loaded as well.
|
|
19
|
+
The eventName for the Inactive log ends with `InactiveObject_Loaded`.
|
|
20
|
+
|
|
21
|
+
## Getting earlier signals: Shortening the InactiveObject timeout
|
|
22
|
+
|
|
23
|
+
The default timeout for an unreferenced object to become "Inactive" is 7 days. This is intended to be long enough such that
|
|
24
|
+
it's very unlikely to hit a legitimate case where an object is revived within the same session it was deleted (e.g. delete then undo).
|
|
25
|
+
Based on your application's user experience, you may choose to shorten this timeout to get an earlier signal (but beware of false positives).
|
|
26
|
+
|
|
27
|
+
To override the default InactiveObject timeout, use the `inactiveTimeoutMs` GC Option.
|
|
28
|
+
There's also a Config Setting which can be used for testing (if the Config Provider allows overriding via localStorage/sessionStorage):
|
|
29
|
+
`Fluid.GarbageCollection.TestOverride.InactiveTimeoutMs`
|
|
30
|
+
|
|
31
|
+
## Enabling Tombstone Enforcement
|
|
32
|
+
|
|
33
|
+
By default, GC is marking objects as Tombstoned, but merely logging if they're used after that point.
|
|
34
|
+
You can enable enforcement of Tombstone objects to simulate real Sweep while having the peace of mind
|
|
35
|
+
that the data is not yet deleted from the user's file, and can be recovered.
|
|
36
|
+
|
|
37
|
+
The first step is to prevent the Fluid Framework from loading a Tombstoned object (via `handle.get()` as described previously),
|
|
38
|
+
by using this Config Setting:
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
"Fluid.GarbageCollection.ThrowOnTombstoneLoad": true
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Now, even with `Fluid.GarbageCollection.ThrowOnTombstoneLoad` set to true, changes to a Tombstoned object will be allowed.
|
|
45
|
+
This is required for the advanced recovery options to work, explained [below](#advanced-back-door-recovering-and-reviving-tombstoned-objects).
|
|
46
|
+
|
|
47
|
+
To instruct FF to treat Tombstoned objects as if they are truly not present in the document, use this Config Setting:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
"Fluid.GarbageCollection.ThrowOnTombstoneUsage": true
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### In case of emergency: Bumping the gcTombstoneGeneration
|
|
54
|
+
|
|
55
|
+
GC includes a mechanism for Tombstone by which all new documents may be stamped with a "Generation" number,
|
|
56
|
+
and if set then Tombstone is only enforceable for documents of the latest Generation. This number is specified
|
|
57
|
+
via the `gcTombstoneGeneration` GC Option, and will not change over the lifetime of a given document.
|
|
58
|
+
|
|
59
|
+
In case a bug is released that is found to cause GC errors, a bump to the gcTombstoneGeneration can be incuded
|
|
60
|
+
with the fix, which will prevent any user pain for those potentially affected documents that were exposed to the bug.
|
|
61
|
+
|
|
62
|
+
If gcTombstoneGeneration is unset, Tombstone enforcement will be enabled/disabled as otherwise configured.
|
|
63
|
+
In other words, until you start using this, Tombstone enforcement will apply to all documents.
|
|
64
|
+
|
|
65
|
+
### Advanced "Back door": Recovering and reviving Tombstoned objects
|
|
66
|
+
|
|
67
|
+
If your application has Tombstone enabled and your users are encountering Tombstones - even at the point where
|
|
68
|
+
Tombstone enforcement is enabled - there is a way to still access these objects to recover them and property
|
|
69
|
+
reference them ("revival"). However, please understand that this is an advanced and unsupported path that may
|
|
70
|
+
be immediately deprecated at any time.
|
|
71
|
+
|
|
72
|
+
As mentioned above, bumping the gcTombstoneGeneration will free up impacted documents, but that's a permanent
|
|
73
|
+
mitigation - those documents will never be exposed to GC Tombstone or Sweep.
|
|
74
|
+
|
|
75
|
+
If there's a particular codepath in your application where objects being loaded may be Tombstoned,
|
|
76
|
+
you may use this advanced "back door" to recover them and then properly reference them, thus restoring the document.
|
|
77
|
+
For this to work, you must disable the `Fluid.GarbageCollection.ThrowOnTombstoneUsage` Config Setting.
|
|
78
|
+
|
|
79
|
+
When a Tombstoned object (via `handle.get()`) fails to load, the 404 response error object has an `underlyingResponseHeaders` with the
|
|
80
|
+
`isTombstoned` flag set to true: i.e. `error.underlyingResponseHeaders?.isTombstoned === true`. In this case,
|
|
81
|
+
you may turn around and use `IContainerRuntime.resolveHandle` with `allowTombstone: true` in `IRequest.headers` to request
|
|
82
|
+
the object again - this time it will succeed.
|
|
83
|
+
|
|
84
|
+
To be very clear once again - This path uses deprecated APIs (`resolveHandle`) and comes with no guarantees of support.
|
|
85
|
+
|
|
86
|
+
### Tombstones and the Summarizer Client
|
|
87
|
+
|
|
88
|
+
Note: The Summarizer client will _never_ throw on usage or load of a Tombstoned object.
|
|
89
|
+
|
|
90
|
+
## Enabling Sweep
|
|
91
|
+
|
|
92
|
+
To enable Sweep for the first time, set this GC Option:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
gcSweepGeneration: 0;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This will enable sweep for all documents moving forward _as well as_ any documents created with `gcTombstoneGeneration: 0`
|
|
99
|
+
(this is a special case in the code).
|
|
100
|
+
|
|
101
|
+
### A caveat...
|
|
102
|
+
|
|
103
|
+
If you used `gcTombstoneGeneration` **and ever bumped it**, you should skip 0 here to avoid enabling Sweep for old / at-risk documents:
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
gcSweepGeneration: 1;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Remember, you can always bump `gcSweepGeneration` to disable Sweep for all existing documents and start fresh,
|
|
110
|
+
in case a major bug is discovered and fixed.
|
|
111
|
+
|
|
112
|
+
### More about gcSweepGeneration and gcTombstoneGeneration
|
|
113
|
+
|
|
114
|
+
`gcSweepGeneration` is persisted and immutable in the document, just like `gcTombstoneGeneration`.
|
|
115
|
+
However, behavior differs in a few important ways.
|
|
116
|
+
|
|
117
|
+
For Tombstone, if `gcTombstoneGeneration` is not set, Tombstone enforcement will be **enabled**.
|
|
118
|
+
For Sweep however, if `gcSweepGeneration` is not set, Sweep enforcement will be **disabled**.
|
|
119
|
+
|
|
120
|
+
This means that until the `gcSweepGeneration` GC Option is set, _no existing document will be eligible for Sweep, ever_.
|
|
121
|
+
So all documents created since the most recent bump to the gcSweepGeneration will have Sweep enabled.
|
|
122
|
+
Note that if `gcSweepGeneration` is set and matches, Tombstone Mode is off for the session and `gcTombstoneGeneration` is ignored.
|
|
123
|
+
|
|
124
|
+
And as mentioned above, there is a special case when `gcSweepGeneration === 0`: Any document with `gcTombstoneGeneration: 0` will
|
|
125
|
+
be eligible for Sweep as well. This was done for historical reasons due to circumstances during GC's development.
|
|
126
|
+
|
|
127
|
+
## More Advanced Configurations
|
|
128
|
+
|
|
129
|
+
There are a handful of other configuration options/settings that can be used to tweak GC's behavior,
|
|
130
|
+
mostly for testing. Please refer to the function [`generateGCConfigs` in gcConfigs.ts](./gcConfigs.ts) and the
|
|
131
|
+
[setting/option names listed in gcDefinitions.ts](./gcDefinitions.ts) for the full story.
|
|
132
|
+
|
|
133
|
+
Examples of available advanced configuration include:
|
|
134
|
+
|
|
135
|
+
- Disabling GC permanently for new files
|
|
136
|
+
- Overriding GC Mark/Sweep enablement for this session:
|
|
137
|
+
- Disabling running GC Mark and/or Sweep phases for this session
|
|
138
|
+
- Forcing GC Mark and/or Sweep to run for this session even if otherwise it would be disabled
|
|
139
|
+
- Disabling Tombstone Mode (don't even mark objects as Tombstones)
|
|
140
|
+
- Disabling the deletion of either DataStores or AttachmentBlobs independent of one another (when Sweep is enabled)
|
|
141
|
+
- Overriding the default Session Expiry for new files (or disabling it altogether, which will also disable Tombstone/Sweep)
|
|
142
|
+
- Overriding the Sweep Timeout, _independent of Session Expiry_, so use with care (for testing purposes only - data loss could occur)
|
|
143
|
+
- Running in "Test Mode", where objects are deleted as soon as they're unreferenced
|
|
144
|
+
- Force "Full GC" to run, which ignores incremental optimizations based on previously computed GC Data
|
|
145
|
+
- Treat InactiveObjects like Tombstones: throw an error on load (with the same back door to follow-up with a successful request)
|
package/src/gc/gcHelpers.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/
|
|
6
|
+
import { assert } from "@fluidframework/core-utils";
|
|
7
7
|
import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import {
|
|
9
9
|
gcBlobPrefix,
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
IGarbageCollectionData,
|
|
13
13
|
IGarbageCollectionDetailsBase,
|
|
14
14
|
} from "@fluidframework/runtime-definitions";
|
|
15
|
-
import { TelemetryDataTag } from "@fluidframework/telemetry-utils";
|
|
16
15
|
import { GCFeatureMatrix, GCVersion, IGCMetadata } from "./gcDefinitions";
|
|
17
16
|
import {
|
|
18
17
|
IGarbageCollectionNodeData,
|
|
@@ -304,13 +303,3 @@ export function unpackChildNodesGCDetails(gcDetails: IGarbageCollectionDetailsBa
|
|
|
304
303
|
export function trimLeadingAndTrailingSlashes(str: string) {
|
|
305
304
|
return str.replace(/^\/+|\/+$/g, "");
|
|
306
305
|
}
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Tags the passed value as a CodeArtifact and returns the tagged value.
|
|
310
|
-
*/
|
|
311
|
-
export function tagAsCodeArtifact(value: string) {
|
|
312
|
-
return {
|
|
313
|
-
value,
|
|
314
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
315
|
-
};
|
|
316
|
-
}
|