@fluidframework/container-runtime 2.0.0-dev.3.1.0.125672 → 2.0.0-dev.4.1.0.148229
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/dist/blobManager.d.ts +24 -11
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +112 -55
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +60 -75
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +295 -256
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +39 -13
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +112 -49
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +28 -4
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +107 -41
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts +19 -0
- package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -0
- package/dist/deltaManagerSummarizerProxy.js +40 -0
- package/dist/deltaManagerSummarizerProxy.js.map +1 -0
- package/dist/gc/garbageCollection.d.ts +204 -0
- package/dist/gc/garbageCollection.d.ts.map +1 -0
- package/dist/{garbageCollection.js → gc/garbageCollection.js} +190 -554
- package/dist/gc/garbageCollection.js.map +1 -0
- package/dist/gc/gcConfigs.d.ts +22 -0
- package/dist/gc/gcConfigs.d.ts.map +1 -0
- package/dist/gc/gcConfigs.js +143 -0
- package/dist/gc/gcConfigs.js.map +1 -0
- package/dist/gc/gcDefinitions.d.ts +320 -0
- package/dist/gc/gcDefinitions.d.ts.map +1 -0
- package/dist/gc/gcDefinitions.js +81 -0
- package/dist/gc/gcDefinitions.js.map +1 -0
- package/dist/gc/gcHelpers.d.ts +86 -0
- package/dist/gc/gcHelpers.d.ts.map +1 -0
- package/dist/gc/gcHelpers.js +268 -0
- package/dist/gc/gcHelpers.js.map +1 -0
- package/dist/gc/gcReferenceGraphAlgorithm.d.ts +16 -0
- package/dist/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -0
- package/dist/gc/gcReferenceGraphAlgorithm.js +49 -0
- package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -0
- package/dist/gc/gcSummaryDefinitions.d.ts +52 -0
- package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -0
- package/dist/gc/gcSummaryDefinitions.js +7 -0
- package/dist/gc/gcSummaryDefinitions.js.map +1 -0
- package/dist/gc/gcSummaryStateTracker.d.ts +93 -0
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -0
- package/dist/gc/gcSummaryStateTracker.js +239 -0
- package/dist/gc/gcSummaryStateTracker.js.map +1 -0
- package/dist/gc/gcSweepReadyUsageDetection.d.ts.map +1 -0
- package/dist/{gcSweepReadyUsageDetection.js → gc/gcSweepReadyUsageDetection.js} +2 -2
- package/dist/gc/gcSweepReadyUsageDetection.js.map +1 -0
- package/dist/gc/gcUnreferencedStateTracker.d.ts +34 -0
- package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -0
- package/dist/gc/gcUnreferencedStateTracker.js +94 -0
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -0
- package/dist/gc/index.d.ts +13 -0
- package/dist/gc/index.d.ts.map +1 -0
- package/dist/gc/index.js +50 -0
- package/dist/gc/index.js.map +1 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -9
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +11 -13
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +26 -38
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +4 -0
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +1 -1
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +2 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +25 -10
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +4 -0
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +42 -4
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +15 -3
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +35 -10
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +19 -3
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +88 -49
- package/dist/opLifecycle/outbox.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 +3 -3
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +20 -21
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/storageServiceWithAttachBlobs.d.ts +17 -0
- package/dist/storageServiceWithAttachBlobs.d.ts.map +1 -0
- package/dist/storageServiceWithAttachBlobs.js +32 -0
- package/dist/storageServiceWithAttachBlobs.js.map +1 -0
- package/dist/summary/index.d.ts +17 -0
- package/dist/summary/index.d.ts.map +1 -0
- package/dist/summary/index.js +46 -0
- package/dist/summary/index.js.map +1 -0
- package/dist/summary/orderedClientElection.d.ts.map +1 -0
- package/dist/summary/orderedClientElection.js.map +1 -0
- package/dist/{runWhileConnectedCoordinator.d.ts → summary/runWhileConnectedCoordinator.d.ts} +3 -2
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -0
- package/dist/{runWhileConnectedCoordinator.js → summary/runWhileConnectedCoordinator.js} +5 -4
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -0
- package/{lib → dist/summary}/runningSummarizer.d.ts +19 -18
- package/dist/summary/runningSummarizer.d.ts.map +1 -0
- package/dist/{runningSummarizer.js → summary/runningSummarizer.js} +158 -56
- package/dist/summary/runningSummarizer.js.map +1 -0
- package/dist/{summarizer.d.ts → summary/summarizer.d.ts} +4 -9
- package/dist/summary/summarizer.d.ts.map +1 -0
- package/dist/{summarizer.js → summary/summarizer.js} +9 -74
- package/dist/summary/summarizer.js.map +1 -0
- package/dist/summary/summarizerClientElection.d.ts.map +1 -0
- package/dist/summary/summarizerClientElection.js.map +1 -0
- package/{lib → dist/summary}/summarizerHeuristics.d.ts +1 -1
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -0
- package/dist/{summarizerHeuristics.js → summary/summarizerHeuristics.js} +3 -3
- package/dist/summary/summarizerHeuristics.js.map +1 -0
- package/dist/summary/summarizerNode/index.d.ts +8 -0
- package/dist/summary/summarizerNode/index.d.ts.map +1 -0
- package/dist/summary/summarizerNode/index.js +12 -0
- package/dist/summary/summarizerNode/index.js.map +1 -0
- package/dist/summary/summarizerNode/summarizerNode.d.ts +149 -0
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
- package/dist/summary/summarizerNode/summarizerNode.js +531 -0
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -0
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +125 -0
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +132 -0
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +22 -0
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +423 -0
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
- package/{lib → dist/summary}/summarizerTypes.d.ts +7 -17
- package/dist/summary/summarizerTypes.d.ts.map +1 -0
- package/dist/{summarizerTypes.js → summary/summarizerTypes.js} +0 -5
- package/dist/summary/summarizerTypes.js.map +1 -0
- package/dist/summary/summaryCollection.d.ts.map +1 -0
- package/dist/summary/summaryCollection.js.map +1 -0
- package/{lib → dist/summary}/summaryFormat.d.ts +3 -21
- package/dist/summary/summaryFormat.d.ts.map +1 -0
- package/dist/{summaryFormat.js → summary/summaryFormat.js} +1 -10
- package/dist/summary/summaryFormat.js.map +1 -0
- package/dist/summary/summaryGenerator.d.ts.map +1 -0
- package/dist/{summaryGenerator.js → summary/summaryGenerator.js} +4 -4
- package/dist/summary/summaryGenerator.js.map +1 -0
- package/dist/{summaryManager.d.ts → summary/summaryManager.d.ts} +1 -1
- package/dist/summary/summaryManager.d.ts.map +1 -0
- package/dist/summary/summaryManager.js.map +1 -0
- package/lib/blobManager.d.ts +24 -11
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +109 -52
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +60 -75
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +267 -228
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +39 -13
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +101 -38
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.d.ts +28 -4
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +100 -34
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerSummarizerProxy.d.ts +19 -0
- package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -0
- package/lib/deltaManagerSummarizerProxy.js +36 -0
- package/lib/deltaManagerSummarizerProxy.js.map +1 -0
- package/lib/gc/garbageCollection.d.ts +204 -0
- package/lib/gc/garbageCollection.d.ts.map +1 -0
- package/lib/{garbageCollection.js → gc/garbageCollection.js} +172 -535
- package/lib/gc/garbageCollection.js.map +1 -0
- package/lib/gc/gcConfigs.d.ts +22 -0
- package/lib/gc/gcConfigs.d.ts.map +1 -0
- package/lib/gc/gcConfigs.js +139 -0
- package/lib/gc/gcConfigs.js.map +1 -0
- package/lib/gc/gcDefinitions.d.ts +320 -0
- package/lib/gc/gcDefinitions.d.ts.map +1 -0
- package/lib/gc/gcDefinitions.js +78 -0
- package/lib/gc/gcDefinitions.js.map +1 -0
- package/lib/gc/gcHelpers.d.ts +86 -0
- package/lib/gc/gcHelpers.d.ts.map +1 -0
- package/lib/gc/gcHelpers.js +254 -0
- package/lib/gc/gcHelpers.js.map +1 -0
- package/lib/gc/gcReferenceGraphAlgorithm.d.ts +16 -0
- package/lib/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -0
- package/lib/gc/gcReferenceGraphAlgorithm.js +45 -0
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -0
- package/lib/gc/gcSummaryDefinitions.d.ts +52 -0
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -0
- package/lib/gc/gcSummaryDefinitions.js +6 -0
- package/lib/gc/gcSummaryDefinitions.js.map +1 -0
- package/lib/gc/gcSummaryStateTracker.d.ts +93 -0
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -0
- package/lib/gc/gcSummaryStateTracker.js +235 -0
- package/lib/gc/gcSummaryStateTracker.js.map +1 -0
- package/lib/gc/gcSweepReadyUsageDetection.d.ts.map +1 -0
- package/lib/{gcSweepReadyUsageDetection.js → gc/gcSweepReadyUsageDetection.js} +1 -1
- package/lib/gc/gcSweepReadyUsageDetection.js.map +1 -0
- package/lib/gc/gcUnreferencedStateTracker.d.ts +34 -0
- package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -0
- package/lib/gc/gcUnreferencedStateTracker.js +90 -0
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -0
- package/lib/gc/index.d.ts +13 -0
- package/lib/gc/index.d.ts.map +1 -0
- package/lib/gc/index.js +12 -0
- package/lib/gc/index.js.map +1 -0
- package/lib/index.d.ts +3 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -4
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +11 -13
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +24 -37
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +4 -0
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +1 -1
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js +1 -1
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +26 -11
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +4 -0
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +42 -4
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +15 -3
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +35 -10
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +19 -3
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +90 -51
- package/lib/opLifecycle/outbox.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 +3 -3
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +20 -21
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/storageServiceWithAttachBlobs.d.ts +17 -0
- package/lib/storageServiceWithAttachBlobs.d.ts.map +1 -0
- package/lib/storageServiceWithAttachBlobs.js +28 -0
- package/lib/storageServiceWithAttachBlobs.js.map +1 -0
- package/lib/summary/index.d.ts +17 -0
- package/lib/summary/index.d.ts.map +1 -0
- package/lib/summary/index.js +15 -0
- package/lib/summary/index.js.map +1 -0
- package/lib/summary/orderedClientElection.d.ts.map +1 -0
- package/lib/summary/orderedClientElection.js.map +1 -0
- package/lib/{runWhileConnectedCoordinator.d.ts → summary/runWhileConnectedCoordinator.d.ts} +3 -2
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -0
- package/lib/{runWhileConnectedCoordinator.js → summary/runWhileConnectedCoordinator.js} +5 -4
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -0
- package/{dist → lib/summary}/runningSummarizer.d.ts +19 -18
- package/lib/summary/runningSummarizer.d.ts.map +1 -0
- package/lib/{runningSummarizer.js → summary/runningSummarizer.js} +159 -57
- package/lib/summary/runningSummarizer.js.map +1 -0
- package/lib/{summarizer.d.ts → summary/summarizer.d.ts} +4 -9
- package/lib/summary/summarizer.d.ts.map +1 -0
- package/lib/{summarizer.js → summary/summarizer.js} +11 -76
- package/lib/summary/summarizer.js.map +1 -0
- package/lib/summary/summarizerClientElection.d.ts.map +1 -0
- package/lib/summary/summarizerClientElection.js.map +1 -0
- package/{dist → lib/summary}/summarizerHeuristics.d.ts +1 -1
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -0
- package/lib/{summarizerHeuristics.js → summary/summarizerHeuristics.js} +3 -3
- package/lib/summary/summarizerHeuristics.js.map +1 -0
- package/lib/summary/summarizerNode/index.d.ts +8 -0
- package/lib/summary/summarizerNode/index.d.ts.map +1 -0
- package/lib/summary/summarizerNode/index.js +7 -0
- package/lib/summary/summarizerNode/index.js.map +1 -0
- package/lib/summary/summarizerNode/summarizerNode.d.ts +149 -0
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
- package/lib/summary/summarizerNode/summarizerNode.js +526 -0
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -0
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +125 -0
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +125 -0
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +22 -0
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +419 -0
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
- package/{dist → lib/summary}/summarizerTypes.d.ts +7 -17
- package/lib/summary/summarizerTypes.d.ts.map +1 -0
- package/lib/summary/summarizerTypes.js +6 -0
- package/{dist → lib/summary}/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts.map +1 -0
- package/lib/summary/summaryCollection.js.map +1 -0
- package/{dist → lib/summary}/summaryFormat.d.ts +3 -21
- package/lib/summary/summaryFormat.d.ts.map +1 -0
- package/lib/{summaryFormat.js → summary/summaryFormat.js} +0 -8
- package/lib/summary/summaryFormat.js.map +1 -0
- package/lib/summary/summaryGenerator.d.ts.map +1 -0
- package/lib/{summaryGenerator.js → summary/summaryGenerator.js} +4 -4
- package/lib/summary/summaryGenerator.js.map +1 -0
- package/lib/{summaryManager.d.ts → summary/summaryManager.d.ts} +1 -1
- package/lib/summary/summaryManager.d.ts.map +1 -0
- package/lib/summary/summaryManager.js.map +1 -0
- package/package.json +63 -60
- package/src/blobManager.ts +132 -69
- package/src/containerRuntime.ts +421 -382
- package/src/dataStoreContext.ts +140 -49
- package/src/dataStores.ts +139 -41
- package/src/deltaManagerSummarizerProxy.ts +46 -0
- package/{garbageCollection.md → src/gc/garbageCollection.md} +2 -2
- package/src/{garbageCollection.ts → gc/garbageCollection.ts} +245 -890
- package/src/gc/gcConfigs.ts +193 -0
- package/src/gc/gcDefinitions.ts +387 -0
- package/src/gc/gcHelpers.ts +332 -0
- package/src/gc/gcReferenceGraphAlgorithm.ts +52 -0
- package/src/gc/gcSummaryDefinitions.ts +54 -0
- package/src/gc/gcSummaryStateTracker.ts +329 -0
- package/src/{gcSweepReadyUsageDetection.ts → gc/gcSweepReadyUsageDetection.ts} +1 -1
- package/src/gc/gcUnreferencedStateTracker.ts +114 -0
- package/src/gc/index.ts +65 -0
- package/src/index.ts +10 -22
- package/src/opLifecycle/README.md +157 -0
- package/src/opLifecycle/batchManager.ts +26 -55
- package/src/opLifecycle/definitions.ts +4 -0
- package/src/opLifecycle/index.ts +1 -1
- package/src/opLifecycle/opCompressor.ts +32 -12
- package/src/opLifecycle/opDecompressor.ts +49 -5
- package/src/opLifecycle/opSplitter.ts +55 -12
- package/src/opLifecycle/outbox.ts +120 -60
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +34 -27
- package/src/storageServiceWithAttachBlobs.ts +38 -0
- package/src/summary/index.ts +105 -0
- package/src/{runWhileConnectedCoordinator.ts → summary/runWhileConnectedCoordinator.ts} +7 -7
- package/src/{runningSummarizer.ts → summary/runningSummarizer.ts} +279 -139
- package/src/{summarizer.ts → summary/summarizer.ts} +12 -97
- package/src/{summarizerHeuristics.ts → summary/summarizerHeuristics.ts} +9 -4
- package/src/summary/summarizerNode/index.ts +12 -0
- package/src/summary/summarizerNode/summarizerNode.ts +766 -0
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +214 -0
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +644 -0
- package/src/{summarizerTypes.ts → summary/summarizerTypes.ts} +8 -22
- package/src/{summaryFormat.ts → summary/summaryFormat.ts} +3 -29
- package/src/{summaryGenerator.ts → summary/summaryGenerator.ts} +12 -11
- package/src/{summaryManager.ts → summary/summaryManager.ts} +1 -1
- package/dist/garbageCollection.d.ts +0 -411
- package/dist/garbageCollection.d.ts.map +0 -1
- package/dist/garbageCollection.js.map +0 -1
- package/dist/garbageCollectionConstants.d.ts +0 -23
- package/dist/garbageCollectionConstants.d.ts.map +0 -1
- package/dist/garbageCollectionConstants.js +0 -36
- package/dist/garbageCollectionConstants.js.map +0 -1
- package/dist/garbageCollectionHelpers.d.ts +0 -15
- package/dist/garbageCollectionHelpers.d.ts.map +0 -1
- package/dist/garbageCollectionHelpers.js +0 -27
- package/dist/garbageCollectionHelpers.js.map +0 -1
- package/dist/gcSweepReadyUsageDetection.d.ts.map +0 -1
- package/dist/gcSweepReadyUsageDetection.js.map +0 -1
- package/dist/orderedClientElection.d.ts.map +0 -1
- package/dist/orderedClientElection.js.map +0 -1
- package/dist/runWhileConnectedCoordinator.d.ts.map +0 -1
- package/dist/runWhileConnectedCoordinator.js.map +0 -1
- package/dist/runningSummarizer.d.ts.map +0 -1
- package/dist/runningSummarizer.js.map +0 -1
- package/dist/serializedSnapshotStorage.d.ts +0 -58
- package/dist/serializedSnapshotStorage.d.ts.map +0 -1
- package/dist/serializedSnapshotStorage.js +0 -110
- package/dist/serializedSnapshotStorage.js.map +0 -1
- package/dist/summarizer.d.ts.map +0 -1
- package/dist/summarizer.js.map +0 -1
- package/dist/summarizerClientElection.d.ts.map +0 -1
- package/dist/summarizerClientElection.js.map +0 -1
- package/dist/summarizerHandle.d.ts +0 -12
- package/dist/summarizerHandle.d.ts.map +0 -1
- package/dist/summarizerHandle.js +0 -22
- package/dist/summarizerHandle.js.map +0 -1
- package/dist/summarizerHeuristics.d.ts.map +0 -1
- package/dist/summarizerHeuristics.js.map +0 -1
- package/dist/summarizerTypes.d.ts.map +0 -1
- package/dist/summaryCollection.d.ts.map +0 -1
- package/dist/summaryCollection.js.map +0 -1
- package/dist/summaryFormat.d.ts.map +0 -1
- package/dist/summaryFormat.js.map +0 -1
- package/dist/summaryGenerator.d.ts.map +0 -1
- package/dist/summaryGenerator.js.map +0 -1
- package/dist/summaryManager.d.ts.map +0 -1
- package/dist/summaryManager.js.map +0 -1
- package/lib/garbageCollection.d.ts +0 -411
- package/lib/garbageCollection.d.ts.map +0 -1
- package/lib/garbageCollection.js.map +0 -1
- package/lib/garbageCollectionConstants.d.ts +0 -23
- package/lib/garbageCollectionConstants.d.ts.map +0 -1
- package/lib/garbageCollectionConstants.js +0 -33
- package/lib/garbageCollectionConstants.js.map +0 -1
- package/lib/garbageCollectionHelpers.d.ts +0 -15
- package/lib/garbageCollectionHelpers.d.ts.map +0 -1
- package/lib/garbageCollectionHelpers.js +0 -23
- package/lib/garbageCollectionHelpers.js.map +0 -1
- package/lib/gcSweepReadyUsageDetection.d.ts.map +0 -1
- package/lib/gcSweepReadyUsageDetection.js.map +0 -1
- package/lib/orderedClientElection.d.ts.map +0 -1
- package/lib/orderedClientElection.js.map +0 -1
- package/lib/runWhileConnectedCoordinator.d.ts.map +0 -1
- package/lib/runWhileConnectedCoordinator.js.map +0 -1
- package/lib/runningSummarizer.d.ts.map +0 -1
- package/lib/runningSummarizer.js.map +0 -1
- package/lib/serializedSnapshotStorage.d.ts +0 -58
- package/lib/serializedSnapshotStorage.d.ts.map +0 -1
- package/lib/serializedSnapshotStorage.js +0 -106
- package/lib/serializedSnapshotStorage.js.map +0 -1
- package/lib/summarizer.d.ts.map +0 -1
- package/lib/summarizer.js.map +0 -1
- package/lib/summarizerClientElection.d.ts.map +0 -1
- package/lib/summarizerClientElection.js.map +0 -1
- package/lib/summarizerHandle.d.ts +0 -12
- package/lib/summarizerHandle.d.ts.map +0 -1
- package/lib/summarizerHandle.js +0 -18
- package/lib/summarizerHandle.js.map +0 -1
- package/lib/summarizerHeuristics.d.ts.map +0 -1
- package/lib/summarizerHeuristics.js.map +0 -1
- package/lib/summarizerTypes.d.ts.map +0 -1
- package/lib/summarizerTypes.js +0 -9
- package/lib/summarizerTypes.js.map +0 -1
- package/lib/summaryCollection.d.ts.map +0 -1
- package/lib/summaryCollection.js.map +0 -1
- package/lib/summaryFormat.d.ts.map +0 -1
- package/lib/summaryFormat.js.map +0 -1
- package/lib/summaryGenerator.d.ts.map +0 -1
- package/lib/summaryGenerator.js.map +0 -1
- package/lib/summaryManager.d.ts.map +0 -1
- package/lib/summaryManager.js.map +0 -1
- package/src/garbageCollectionConstants.ts +0 -38
- package/src/garbageCollectionHelpers.ts +0 -37
- package/src/serializedSnapshotStorage.ts +0 -151
- package/src/summarizerHandle.ts +0 -23
- /package/dist/{gcSweepReadyUsageDetection.d.ts → gc/gcSweepReadyUsageDetection.d.ts} +0 -0
- /package/dist/{orderedClientElection.d.ts → summary/orderedClientElection.d.ts} +0 -0
- /package/dist/{orderedClientElection.js → summary/orderedClientElection.js} +0 -0
- /package/dist/{summarizerClientElection.d.ts → summary/summarizerClientElection.d.ts} +0 -0
- /package/dist/{summarizerClientElection.js → summary/summarizerClientElection.js} +0 -0
- /package/dist/{summaryCollection.d.ts → summary/summaryCollection.d.ts} +0 -0
- /package/dist/{summaryCollection.js → summary/summaryCollection.js} +0 -0
- /package/dist/{summaryGenerator.d.ts → summary/summaryGenerator.d.ts} +0 -0
- /package/dist/{summaryManager.js → summary/summaryManager.js} +0 -0
- /package/lib/{gcSweepReadyUsageDetection.d.ts → gc/gcSweepReadyUsageDetection.d.ts} +0 -0
- /package/lib/{orderedClientElection.d.ts → summary/orderedClientElection.d.ts} +0 -0
- /package/lib/{orderedClientElection.js → summary/orderedClientElection.js} +0 -0
- /package/lib/{summarizerClientElection.d.ts → summary/summarizerClientElection.d.ts} +0 -0
- /package/lib/{summarizerClientElection.js → summary/summarizerClientElection.js} +0 -0
- /package/lib/{summaryCollection.d.ts → summary/summaryCollection.d.ts} +0 -0
- /package/lib/{summaryCollection.js → summary/summaryCollection.js} +0 -0
- /package/lib/{summaryGenerator.d.ts → summary/summaryGenerator.d.ts} +0 -0
- /package/lib/{summaryManager.js → summary/summaryManager.js} +0 -0
- /package/src/{orderedClientElection.ts → summary/orderedClientElection.ts} +0 -0
- /package/src/{summarizerClientElection.ts → summary/summarizerClientElection.ts} +0 -0
- /package/src/{summaryCollection.ts → summary/summaryCollection.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.4.1.0.148229",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -14,34 +14,6 @@
|
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"module": "lib/index.js",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "npm run build:genver && concurrently npm:build:compile npm:lint && npm run build:docs",
|
|
19
|
-
"build:commonjs": "npm run tsc && npm run typetests:gen && npm run build:test",
|
|
20
|
-
"build:compile": "concurrently npm:build:commonjs npm:build:esnext",
|
|
21
|
-
"build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
|
|
22
|
-
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
23
|
-
"build:full": "npm run build",
|
|
24
|
-
"build:full:compile": "npm run build:compile",
|
|
25
|
-
"build:genver": "gen-version",
|
|
26
|
-
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
27
|
-
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
|
|
28
|
-
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
|
|
29
|
-
"eslint": "eslint --format stylish src",
|
|
30
|
-
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
31
|
-
"format": "npm run prettier:fix",
|
|
32
|
-
"lint": "npm run prettier && npm run eslint",
|
|
33
|
-
"lint:fix": "npm run prettier:fix &&npm run eslint:fix",
|
|
34
|
-
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
|
|
35
|
-
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
36
|
-
"test": "npm run test:mocha",
|
|
37
|
-
"test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml",
|
|
38
|
-
"test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
|
|
39
|
-
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
40
|
-
"tsc": "tsc",
|
|
41
|
-
"tsc:watch": "tsc --watch",
|
|
42
|
-
"typetests:gen": "flub generate typetests --generate --dir .",
|
|
43
|
-
"typetests:prepare": "flub generate typetests --prepare --dir . --pin"
|
|
44
|
-
},
|
|
45
17
|
"nyc": {
|
|
46
18
|
"all": true,
|
|
47
19
|
"cache-dir": "nyc/.cache",
|
|
@@ -64,56 +36,87 @@
|
|
|
64
36
|
},
|
|
65
37
|
"dependencies": {
|
|
66
38
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
67
|
-
"@fluidframework/common-utils": "^1.
|
|
68
|
-
"@fluidframework/container-definitions": "
|
|
69
|
-
"@fluidframework/container-runtime-definitions": "
|
|
70
|
-
"@fluidframework/container-utils": "
|
|
71
|
-
"@fluidframework/core-interfaces": "
|
|
72
|
-
"@fluidframework/datastore": "
|
|
73
|
-
"@fluidframework/driver-definitions": "
|
|
74
|
-
"@fluidframework/driver-utils": "
|
|
75
|
-
"@fluidframework/garbage-collector": "
|
|
76
|
-
"@fluidframework/protocol-base": "^0.
|
|
39
|
+
"@fluidframework/common-utils": "^1.1.1",
|
|
40
|
+
"@fluidframework/container-definitions": "2.0.0-dev.4.1.0.148229",
|
|
41
|
+
"@fluidframework/container-runtime-definitions": "2.0.0-dev.4.1.0.148229",
|
|
42
|
+
"@fluidframework/container-utils": "2.0.0-dev.4.1.0.148229",
|
|
43
|
+
"@fluidframework/core-interfaces": "2.0.0-dev.4.1.0.148229",
|
|
44
|
+
"@fluidframework/datastore": "2.0.0-dev.4.1.0.148229",
|
|
45
|
+
"@fluidframework/driver-definitions": "2.0.0-dev.4.1.0.148229",
|
|
46
|
+
"@fluidframework/driver-utils": "2.0.0-dev.4.1.0.148229",
|
|
47
|
+
"@fluidframework/garbage-collector": "2.0.0-dev.4.1.0.148229",
|
|
48
|
+
"@fluidframework/protocol-base": "^0.1039.1000",
|
|
77
49
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
78
|
-
"@fluidframework/runtime-definitions": "
|
|
79
|
-
"@fluidframework/runtime-utils": "
|
|
80
|
-
"@fluidframework/telemetry-utils": "
|
|
50
|
+
"@fluidframework/runtime-definitions": "2.0.0-dev.4.1.0.148229",
|
|
51
|
+
"@fluidframework/runtime-utils": "2.0.0-dev.4.1.0.148229",
|
|
52
|
+
"@fluidframework/telemetry-utils": "2.0.0-dev.4.1.0.148229",
|
|
81
53
|
"double-ended-queue": "^2.1.0-0",
|
|
82
54
|
"events": "^3.1.0",
|
|
83
55
|
"lz4js": "^0.2.0",
|
|
84
56
|
"uuid": "^8.3.1"
|
|
85
57
|
},
|
|
86
58
|
"devDependencies": {
|
|
87
|
-
"@fluid-tools/build-cli": "^0.
|
|
59
|
+
"@fluid-tools/build-cli": "^0.13.1",
|
|
88
60
|
"@fluidframework/build-common": "^1.1.0",
|
|
89
|
-
"@fluidframework/build-tools": "^0.
|
|
90
|
-
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.
|
|
61
|
+
"@fluidframework/build-tools": "^0.13.1",
|
|
62
|
+
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.4.0.0",
|
|
91
63
|
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
92
|
-
"@fluidframework/mocha-test-setup": "
|
|
93
|
-
"@fluidframework/test-runtime-utils": "
|
|
94
|
-
"@microsoft/api-extractor": "^7.
|
|
95
|
-
"@rushstack/eslint-config": "^2.5.1",
|
|
64
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.4.1.0.148229",
|
|
65
|
+
"@fluidframework/test-runtime-utils": "2.0.0-dev.4.1.0.148229",
|
|
66
|
+
"@microsoft/api-extractor": "^7.34.4",
|
|
96
67
|
"@types/double-ended-queue": "^2.1.0",
|
|
97
68
|
"@types/events": "^3.0.0",
|
|
98
69
|
"@types/mocha": "^9.1.1",
|
|
99
70
|
"@types/sinon": "^7.0.13",
|
|
100
71
|
"@types/uuid": "^8.3.0",
|
|
101
|
-
"concurrently": "^6.
|
|
72
|
+
"concurrently": "^7.6.0",
|
|
102
73
|
"copyfiles": "^2.4.1",
|
|
103
|
-
"cross-env": "^7.0.
|
|
74
|
+
"cross-env": "^7.0.3",
|
|
104
75
|
"eslint": "~8.6.0",
|
|
105
|
-
"mocha": "^10.
|
|
106
|
-
"
|
|
76
|
+
"mocha": "^10.2.0",
|
|
77
|
+
"mocha-json-output-reporter": "^2.0.1",
|
|
78
|
+
"mocha-multi-reporters": "^1.5.1",
|
|
79
|
+
"moment": "^2.21.0",
|
|
80
|
+
"nyc": "^15.1.0",
|
|
107
81
|
"prettier": "~2.6.2",
|
|
108
|
-
"rimraf": "^
|
|
82
|
+
"rimraf": "^4.4.0",
|
|
109
83
|
"sinon": "^7.4.2",
|
|
110
84
|
"typescript": "~4.5.5"
|
|
111
85
|
},
|
|
112
86
|
"typeValidation": {
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
87
|
+
"broken": {
|
|
88
|
+
"ClassDeclaration_ContainerRuntime": {
|
|
89
|
+
"forwardCompat": false
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"scripts": {
|
|
94
|
+
"build": "npm run build:genver && concurrently npm:build:compile npm:lint && npm run build:docs",
|
|
95
|
+
"build:commonjs": "npm run tsc && npm run typetests:gen && npm run build:test",
|
|
96
|
+
"build:compile": "concurrently npm:build:commonjs npm:build:esnext",
|
|
97
|
+
"build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
|
|
98
|
+
"build:esnext": "tsc --project ./tsconfig.esnext.json",
|
|
99
|
+
"build:full": "npm run build",
|
|
100
|
+
"build:full:compile": "npm run build:compile",
|
|
101
|
+
"build:genver": "gen-version",
|
|
102
|
+
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
103
|
+
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
|
|
104
|
+
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
|
|
105
|
+
"eslint": "eslint --format stylish src",
|
|
106
|
+
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
107
|
+
"format": "npm run prettier:fix",
|
|
108
|
+
"lint": "npm run prettier && npm run eslint",
|
|
109
|
+
"lint:fix": "npm run prettier:fix &&npm run eslint:fix",
|
|
110
|
+
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
|
|
111
|
+
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
112
|
+
"test": "npm run test:mocha",
|
|
113
|
+
"test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml",
|
|
114
|
+
"test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
|
|
115
|
+
"test:mocha:multireport": "cross-env FLUID_TEST_MULTIREPORT=1 npm run test:mocha",
|
|
116
|
+
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
117
|
+
"tsc": "tsc",
|
|
118
|
+
"tsc:watch": "tsc --watch",
|
|
119
|
+
"typetests:gen": "fluid-type-test-generator",
|
|
120
|
+
"typetests:prepare": "flub generate typetests --prepare --dir . --pin"
|
|
118
121
|
}
|
|
119
|
-
}
|
|
122
|
+
}
|
package/src/blobManager.ts
CHANGED
|
@@ -40,11 +40,10 @@ import {
|
|
|
40
40
|
ISummaryTreeWithStats,
|
|
41
41
|
ITelemetryContext,
|
|
42
42
|
} from "@fluidframework/runtime-definitions";
|
|
43
|
-
import { TombstoneResponseHeaderKey } from "./containerRuntime";
|
|
43
|
+
import { ContainerRuntime, TombstoneResponseHeaderKey } from "./containerRuntime";
|
|
44
|
+
import { sendGCUnexpectedUsageEvent, sweepAttachmentBlobsKey, throwOnTombstoneLoadKey } from "./gc";
|
|
44
45
|
import { Throttler, formExponentialFn, IThrottler } from "./throttler";
|
|
45
|
-
import { summarizerClientType } from "./
|
|
46
|
-
import { throwOnTombstoneLoadKey } from "./garbageCollectionConstants";
|
|
47
|
-
import { sendGCUnexpectedUsageEvent } from "./garbageCollectionHelpers";
|
|
46
|
+
import { summarizerClientType } from "./summary";
|
|
48
47
|
|
|
49
48
|
/**
|
|
50
49
|
* This class represents blob (long string)
|
|
@@ -114,6 +113,7 @@ export type IBlobManagerRuntime = Pick<
|
|
|
114
113
|
IContainerRuntime,
|
|
115
114
|
"attachState" | "connected" | "logger" | "clientDetails"
|
|
116
115
|
> &
|
|
116
|
+
Pick<ContainerRuntime, "gcTombstoneEnforcementAllowed"> &
|
|
117
117
|
TypedEventEmitter<IContainerRuntimeEvents>;
|
|
118
118
|
|
|
119
119
|
// Note that while offline we "submit" an op before uploading the blob, but we always
|
|
@@ -209,10 +209,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
209
209
|
// Called when a blob node is requested. blobPath is the path of the blob's node in GC's graph.
|
|
210
210
|
// blobPath's format - `/<BlobManager.basePath>/<blobId>`.
|
|
211
211
|
private readonly blobRequested: (blobPath: string) => void,
|
|
212
|
-
// Called when a reference is added to a blob. For instance, when creating a localId / storageId to storageId
|
|
213
|
-
// mapping in the redirect table.
|
|
214
|
-
// Node path formats - `/<BlobManager.basePath>/<blobId>`.
|
|
215
|
-
private readonly addedBlobReference: (fromNodePath: string, toNodePath: string) => void,
|
|
216
212
|
// Called to check if a blob has been deleted by GC.
|
|
217
213
|
// blobPath's format - `/<BlobManager.basePath>/<blobId>`.
|
|
218
214
|
private readonly isBlobDeleted: (blobPath: string) => boolean,
|
|
@@ -225,6 +221,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
225
221
|
// Read the feature flag that tells whether to throw when a tombstone blob is requested.
|
|
226
222
|
this.throwOnTombstoneLoad =
|
|
227
223
|
this.mc.config.getBoolean(throwOnTombstoneLoadKey) === true &&
|
|
224
|
+
this.runtime.gcTombstoneEnforcementAllowed &&
|
|
228
225
|
this.runtime.clientDetails.type !== summarizerClientType;
|
|
229
226
|
|
|
230
227
|
this.runtime.on("disconnected", () => this.onDisconnected());
|
|
@@ -290,15 +287,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
290
287
|
}
|
|
291
288
|
}
|
|
292
289
|
|
|
293
|
-
/**
|
|
294
|
-
* For a blobId, returns its path in GC's graph. The node path is of the format `/<BlobManager.basePath>/<blobId>`
|
|
295
|
-
* This path must match the path of the blob handle returned by the createBlob API because blobs are marked
|
|
296
|
-
* referenced by storing these handles in a referenced DDS.
|
|
297
|
-
*/
|
|
298
|
-
private getBlobGCNodePath(blobId: string) {
|
|
299
|
-
return `/${BlobManager.basePath}/${blobId}`;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
290
|
/**
|
|
303
291
|
* Set of actual storage IDs (i.e., IDs that can be requested from storage). This will be empty if the container is
|
|
304
292
|
* detached or there are no (non-pending) attachment blobs in the document
|
|
@@ -343,7 +331,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
343
331
|
}
|
|
344
332
|
|
|
345
333
|
// Let runtime know that the corresponding GC node was requested.
|
|
346
|
-
this.blobRequested(
|
|
334
|
+
this.blobRequested(getGCNodePathFromBlobId(blobId));
|
|
347
335
|
|
|
348
336
|
return PerformanceEvent.timedExecAsync(
|
|
349
337
|
this.mc.logger,
|
|
@@ -421,11 +409,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
421
409
|
*/
|
|
422
410
|
private setRedirection(fromId: string, toId: string | undefined) {
|
|
423
411
|
this.redirectTable.set(fromId, toId);
|
|
424
|
-
// Notify runtime of a reference added if toId is not undefined. It can be undefined when a blob is uploaded in
|
|
425
|
-
// detached mode. In this case, the entry will be updated when the blob is updated.
|
|
426
|
-
if (toId !== undefined) {
|
|
427
|
-
this.addedBlobReference(this.getBlobGCNodePath(fromId), this.getBlobGCNodePath(toId));
|
|
428
|
-
}
|
|
429
412
|
}
|
|
430
413
|
|
|
431
414
|
private deleteAndEmitsIfEmpty(id: string) {
|
|
@@ -678,6 +661,33 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
678
661
|
return table;
|
|
679
662
|
}
|
|
680
663
|
|
|
664
|
+
public summarize(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
|
|
665
|
+
// if storageIds is empty, it means we are detached and have only local IDs, or that there are no blobs attached
|
|
666
|
+
const blobIds =
|
|
667
|
+
this.storageIds.size > 0
|
|
668
|
+
? Array.from(this.storageIds)
|
|
669
|
+
: Array.from(this.redirectTable.keys());
|
|
670
|
+
const builder = new SummaryTreeBuilder();
|
|
671
|
+
blobIds.forEach((blobId) => {
|
|
672
|
+
builder.addAttachment(blobId);
|
|
673
|
+
});
|
|
674
|
+
|
|
675
|
+
// Any non-identity entries in the table need to be saved in the summary
|
|
676
|
+
if (this.redirectTable.size > blobIds.length) {
|
|
677
|
+
builder.addBlob(
|
|
678
|
+
BlobManager.redirectTableBlobName,
|
|
679
|
+
// filter out identity entries
|
|
680
|
+
JSON.stringify(
|
|
681
|
+
Array.from(this.redirectTable.entries()).filter(
|
|
682
|
+
([localId, storageId]) => localId !== storageId,
|
|
683
|
+
),
|
|
684
|
+
),
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
return builder.getSummaryTree();
|
|
689
|
+
}
|
|
690
|
+
|
|
681
691
|
/**
|
|
682
692
|
* Generates data used for garbage collection. Each blob uploaded represents a node in the GC graph as it can be
|
|
683
693
|
* individually referenced by storing its handle in a referenced DDS. Returns the list of blob ids as GC nodes.
|
|
@@ -688,27 +698,90 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
688
698
|
const gcData: IGarbageCollectionData = { gcNodes: {} };
|
|
689
699
|
for (const [localId, storageId] of this.redirectTable) {
|
|
690
700
|
assert(!!storageId, 0x390 /* Must be attached to get GC data */);
|
|
691
|
-
|
|
701
|
+
// Only return local ids as GC nodes because a blob can only be referenced via its local id. The storage
|
|
702
|
+
// id entries have the same key and value, ignore them.
|
|
703
|
+
// The outbound routes are empty because a blob node cannot reference other nodes. It can only be referenced
|
|
704
|
+
// by adding its handle to a referenced DDS.
|
|
705
|
+
if (localId !== storageId) {
|
|
706
|
+
gcData.gcNodes[getGCNodePathFromBlobId(localId)] = [];
|
|
707
|
+
}
|
|
692
708
|
}
|
|
693
709
|
return gcData;
|
|
694
710
|
}
|
|
695
711
|
|
|
696
712
|
/**
|
|
697
713
|
* This is called to update blobs whose routes are unused. The unused blobs are deleted.
|
|
698
|
-
* @param unusedRoutes - The routes of the blob nodes that are unused.
|
|
714
|
+
* @param unusedRoutes - The routes of the blob nodes that are unused. These routes will be based off of local ids.
|
|
699
715
|
*/
|
|
700
716
|
public updateUnusedRoutes(unusedRoutes: string[]): void {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
717
|
+
this.deleteBlobsFromRedirectTable(unusedRoutes);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Delete attachment blobs that are sweep ready.
|
|
722
|
+
* @param sweepReadyBlobRoutes - The routes of blobs that are sweep ready and should be deleted. These routes will
|
|
723
|
+
* be based off of local ids.
|
|
724
|
+
* @returns - The routes of blobs that were deleted.
|
|
725
|
+
*/
|
|
726
|
+
public deleteSweepReadyNodes(sweepReadyBlobRoutes: string[]): string[] {
|
|
727
|
+
// If sweep for attachment blobs is not enabled, return empty list indicating nothing is deleted.
|
|
728
|
+
if (this.mc.config.getBoolean(sweepAttachmentBlobsKey) !== true) {
|
|
729
|
+
return [];
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
this.deleteBlobsFromRedirectTable(sweepReadyBlobRoutes);
|
|
733
|
+
return Array.from(sweepReadyBlobRoutes);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Delete blobs with the given routes from the redirect table.
|
|
738
|
+
* The routes are GC nodes paths of format -`/<BlobManager.basePath>/<blobId>`. The blob ids are all local ids.
|
|
739
|
+
* Deleting the blobs involves 2 steps:
|
|
740
|
+
* 1. The redirect table entry for the local ids are deleted.
|
|
741
|
+
* 2. If the storage ids corresponding to the deleted local ids are not in-use anymore, the redirect table entries
|
|
742
|
+
* for the storage ids are deleted as well.
|
|
743
|
+
*
|
|
744
|
+
* Note that this does not delete the blobs from storage service immediately. Deleting the blobs from redirect table
|
|
745
|
+
* will remove them the next summary. The service would them delete them some time in the future.
|
|
746
|
+
*/
|
|
747
|
+
private deleteBlobsFromRedirectTable(blobRoutes: string[]) {
|
|
748
|
+
if (blobRoutes.length === 0) {
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// This tracks the storage ids of local ids that are deleted. After the local ids have been deleted, if any of
|
|
753
|
+
// these storage ids are unused, they will be deleted as well.
|
|
754
|
+
const maybeUnusedStorageIds: Set<string> = new Set();
|
|
755
|
+
for (const route of blobRoutes) {
|
|
756
|
+
const blobId = getBlobIdFromGCNodePath(route);
|
|
757
|
+
if (!this.redirectTable.has(blobId)) {
|
|
758
|
+
this.mc.logger.sendErrorEvent({
|
|
759
|
+
eventName: "DeletedAttachmentBlobNotFound",
|
|
760
|
+
blobId,
|
|
761
|
+
});
|
|
762
|
+
continue;
|
|
763
|
+
}
|
|
764
|
+
const storageId = this.redirectTable.get(blobId);
|
|
765
|
+
assert(!!storageId, 0x5bb /* Must be attached to run GC */);
|
|
766
|
+
maybeUnusedStorageIds.add(storageId);
|
|
710
767
|
this.redirectTable.delete(blobId);
|
|
711
768
|
}
|
|
769
|
+
|
|
770
|
+
// Find out storage ids that are in-use and remove them from maybeUnusedStorageIds. A storage id is in-use if
|
|
771
|
+
// the redirect table has a local id -> storage id entry for it.
|
|
772
|
+
for (const [localId, storageId] of this.redirectTable.entries()) {
|
|
773
|
+
assert(!!storageId, 0x5bc /* Must be attached to run GC */);
|
|
774
|
+
// For every storage id, the redirect table has a id -> id entry. These do not make the storage id in-use.
|
|
775
|
+
if (maybeUnusedStorageIds.has(storageId) && localId !== storageId) {
|
|
776
|
+
maybeUnusedStorageIds.delete(storageId);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// For unused storage ids, delete their id -> id entries from the redirect table.
|
|
781
|
+
// This way they'll be absent from the next summary, and the service is free to delete them from storage.
|
|
782
|
+
for (const storageId of maybeUnusedStorageIds) {
|
|
783
|
+
this.redirectTable.delete(storageId);
|
|
784
|
+
}
|
|
712
785
|
}
|
|
713
786
|
|
|
714
787
|
/**
|
|
@@ -721,12 +794,8 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
721
794
|
// The routes or blob node paths are in the same format as returned in getGCData -
|
|
722
795
|
// `/<BlobManager.basePath>/<blobId>`.
|
|
723
796
|
for (const route of tombstonedRoutes) {
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
pathParts.length === 3 && pathParts[1] === BlobManager.basePath,
|
|
727
|
-
0x50f /* Invalid blob node id in tombstoned routes. */,
|
|
728
|
-
);
|
|
729
|
-
tombstonedBlobsSet.add(pathParts[2]);
|
|
797
|
+
const blobId = getBlobIdFromGCNodePath(route);
|
|
798
|
+
tombstonedBlobsSet.add(blobId);
|
|
730
799
|
}
|
|
731
800
|
|
|
732
801
|
// Remove blobs from the tombstone list that were tombstoned but aren't anymore as per the tombstoneRoutes.
|
|
@@ -754,7 +823,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
754
823
|
* 3. "valid" - It has not been deleted or tombstoned.
|
|
755
824
|
*/
|
|
756
825
|
let state: "valid" | "tombstoned" | "deleted" = "valid";
|
|
757
|
-
if (this.isBlobDeleted(
|
|
826
|
+
if (this.isBlobDeleted(getGCNodePathFromBlobId(blobId))) {
|
|
758
827
|
state = "deleted";
|
|
759
828
|
} else if (this.tombstonedBlobs.has(blobId)) {
|
|
760
829
|
state = "tombstoned";
|
|
@@ -785,7 +854,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
785
854
|
? "GC_Tombstone_Blob_Requested"
|
|
786
855
|
: "GC_Deleted_Blob_Requested",
|
|
787
856
|
category: shouldFail ? "error" : "generic",
|
|
788
|
-
|
|
857
|
+
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
789
858
|
},
|
|
790
859
|
[BlobManager.basePath],
|
|
791
860
|
error,
|
|
@@ -795,33 +864,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
795
864
|
}
|
|
796
865
|
}
|
|
797
866
|
|
|
798
|
-
public summarize(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
|
|
799
|
-
// if storageIds is empty, it means we are detached and have only local IDs, or that there are no blobs attached
|
|
800
|
-
const blobIds =
|
|
801
|
-
this.storageIds.size > 0
|
|
802
|
-
? Array.from(this.storageIds)
|
|
803
|
-
: Array.from(this.redirectTable.keys());
|
|
804
|
-
const builder = new SummaryTreeBuilder();
|
|
805
|
-
blobIds.forEach((blobId) => {
|
|
806
|
-
builder.addAttachment(blobId);
|
|
807
|
-
});
|
|
808
|
-
|
|
809
|
-
// Any non-identity entries in the table need to be saved in the summary
|
|
810
|
-
if (this.redirectTable.size > blobIds.length) {
|
|
811
|
-
builder.addBlob(
|
|
812
|
-
BlobManager.redirectTableBlobName,
|
|
813
|
-
// filter out identity entries
|
|
814
|
-
JSON.stringify(
|
|
815
|
-
Array.from(this.redirectTable.entries()).filter(
|
|
816
|
-
([localId, storageId]) => localId !== storageId,
|
|
817
|
-
),
|
|
818
|
-
),
|
|
819
|
-
);
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
return builder.getSummaryTree();
|
|
823
|
-
}
|
|
824
|
-
|
|
825
867
|
public setRedirectTable(table: Map<string, string>) {
|
|
826
868
|
assert(
|
|
827
869
|
this.runtime.attachState === AttachState.Detached,
|
|
@@ -850,3 +892,24 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
850
892
|
return blobs;
|
|
851
893
|
}
|
|
852
894
|
}
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* For a blobId, returns its path in GC's graph. The node path is of the format `/<BlobManager.basePath>/<blobId>`.
|
|
898
|
+
* This path must match the path of the blob handle returned by the createBlob API because blobs are marked
|
|
899
|
+
* referenced by storing these handles in a referenced DDS.
|
|
900
|
+
*/
|
|
901
|
+
function getGCNodePathFromBlobId(blobId: string) {
|
|
902
|
+
return `/${BlobManager.basePath}/${blobId}`;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* For a given GC node path, return the blobId. The node path is of the format `/<BlobManager.basePath>/<blobId>`.
|
|
907
|
+
*/
|
|
908
|
+
function getBlobIdFromGCNodePath(nodePath: string) {
|
|
909
|
+
const pathParts = nodePath.split("/");
|
|
910
|
+
assert(
|
|
911
|
+
pathParts.length === 3 && pathParts[1] === BlobManager.basePath,
|
|
912
|
+
0x5bd /* Invalid blob node path */,
|
|
913
|
+
);
|
|
914
|
+
return pathParts[2];
|
|
915
|
+
}
|