@fluidframework/container-runtime 2.53.1 → 2.61.0-355054
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/.mocharc.cjs +1 -2
- package/CHANGELOG.md +4 -0
- package/api-report/{container-runtime.legacy.alpha.api.md → container-runtime.legacy.beta.api.md} +55 -55
- package/container-runtime.test-files.tar +0 -0
- package/dist/batchTracker.d.ts +1 -1
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager/blobManager.d.ts +29 -17
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +150 -135
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.d.ts +4 -4
- package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.js +30 -33
- package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
- package/dist/blobManager/index.d.ts +2 -2
- package/dist/blobManager/index.d.ts.map +1 -1
- package/dist/blobManager/index.js.map +1 -1
- package/dist/channelCollection.d.ts +9 -11
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +2 -3
- package/dist/channelCollection.js.map +1 -1
- package/dist/compressionDefinitions.d.ts +3 -6
- package/dist/compressionDefinitions.d.ts.map +1 -1
- package/dist/compressionDefinitions.js +2 -4
- package/dist/compressionDefinitions.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +3 -4
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.d.ts +2 -2
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +13 -20
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +4 -7
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +3 -3
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +8 -8
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +2 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +2 -3
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +2 -2
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +4 -4
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +3 -3
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +10 -11
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +4 -4
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.d.ts +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +4 -4
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +6 -6
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/index.d.ts +3 -3
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js.map +1 -1
- package/dist/inboundBatchAggregator.d.ts +2 -2
- package/dist/inboundBatchAggregator.d.ts.map +1 -1
- package/dist/inboundBatchAggregator.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +2 -1
- package/dist/messageTypes.d.ts +7 -8
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js +1 -2
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +2 -2
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +1 -1
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.d.ts +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +5 -5
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.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.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.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +3 -3
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +4 -4
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +9 -9
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +4 -4
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.d.ts +1 -1
- package/dist/opProperties.d.ts.map +1 -1
- package/dist/opProperties.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +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.map +1 -1
- package/dist/storageServiceWithAttachBlobs.d.ts +1 -1
- package/dist/storageServiceWithAttachBlobs.d.ts.map +1 -1
- package/dist/storageServiceWithAttachBlobs.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +1 -2
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +10 -10
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +4 -4
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +5 -5
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerNode/index.d.ts +3 -3
- package/dist/summary/summarizerNode/index.d.ts.map +1 -1
- package/dist/summary/summarizerNode/index.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +5 -6
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +3 -3
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -3
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +25 -44
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summarizerUtils.d.ts +3 -3
- package/dist/summary/summarizerUtils.d.ts.map +1 -1
- package/dist/summary/summarizerUtils.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +13 -23
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +1 -2
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/index.d.ts +2 -2
- package/dist/summary/summaryDelayLoadedModule/index.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/index.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts +1 -1
- package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/runningSummarizer.d.ts +3 -3
- package/dist/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summarizer.d.ts +5 -5
- package/dist/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summarizer.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts +3 -4
- package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +3 -3
- package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts +1 -1
- package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.js.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts +5 -10
- package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts.map +1 -1
- package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +9 -14
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryHelpers.d.ts +1 -2
- package/dist/summary/summaryHelpers.d.ts.map +1 -1
- package/dist/summary/summaryHelpers.js +1 -2
- package/dist/summary/summaryHelpers.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +3 -3
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js.map +1 -1
- package/internal.d.ts +1 -1
- package/legacy.d.ts +1 -1
- package/lib/batchTracker.d.ts +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts +29 -17
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +142 -127
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.d.ts +4 -4
- package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.js +26 -29
- package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
- package/lib/blobManager/index.d.ts +2 -2
- package/lib/blobManager/index.d.ts.map +1 -1
- package/lib/blobManager/index.js.map +1 -1
- package/lib/channelCollection.d.ts +9 -11
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +2 -3
- package/lib/channelCollection.js.map +1 -1
- package/lib/compressionDefinitions.d.ts +3 -6
- package/lib/compressionDefinitions.d.ts.map +1 -1
- package/lib/compressionDefinitions.js +2 -4
- package/lib/compressionDefinitions.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +3 -4
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts +2 -2
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +13 -20
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +4 -7
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +3 -3
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +8 -8
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +2 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +1 -1
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +2 -3
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +2 -2
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +1 -1
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/error.d.ts +1 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +4 -4
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +3 -3
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +10 -11
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +4 -4
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.d.ts +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +4 -4
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +6 -6
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/index.d.ts +3 -3
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js.map +1 -1
- package/lib/inboundBatchAggregator.d.ts +2 -2
- package/lib/inboundBatchAggregator.d.ts.map +1 -1
- package/lib/inboundBatchAggregator.js.map +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +2 -1
- package/lib/messageTypes.d.ts +7 -8
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js +1 -2
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +2 -2
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +1 -1
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.d.ts +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +5 -5
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.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.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.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +3 -3
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +4 -4
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +1 -1
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +9 -9
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +4 -4
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.d.ts +1 -1
- package/lib/opProperties.d.ts.map +1 -1
- package/lib/opProperties.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +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.map +1 -1
- package/lib/storageServiceWithAttachBlobs.d.ts +1 -1
- package/lib/storageServiceWithAttachBlobs.d.ts.map +1 -1
- package/lib/storageServiceWithAttachBlobs.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +1 -2
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +10 -10
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +4 -4
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +5 -5
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerNode/index.d.ts +3 -3
- package/lib/summary/summarizerNode/index.d.ts.map +1 -1
- package/lib/summary/summarizerNode/index.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +5 -6
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +3 -3
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +25 -44
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summarizerUtils.d.ts +3 -3
- package/lib/summary/summarizerUtils.d.ts.map +1 -1
- package/lib/summary/summarizerUtils.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +13 -23
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -2
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/index.d.ts +2 -2
- package/lib/summary/summaryDelayLoadedModule/index.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/index.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts +1 -1
- package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/runningSummarizer.d.ts +3 -3
- package/lib/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summarizer.d.ts +5 -5
- package/lib/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summarizer.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts +3 -4
- package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +3 -3
- package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts +1 -1
- package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.js.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts +5 -10
- package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts.map +1 -1
- package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +9 -14
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryHelpers.d.ts +1 -2
- package/lib/summary/summaryHelpers.d.ts.map +1 -1
- package/lib/summary/summaryHelpers.js +1 -2
- package/lib/summary/summaryHelpers.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +3 -3
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +27 -27
- package/src/batchTracker.ts +3 -3
- package/src/blobManager/blobManager.ts +165 -174
- package/src/blobManager/blobManagerSnapSum.ts +31 -53
- package/src/blobManager/index.ts +4 -4
- package/src/channelCollection.ts +28 -29
- package/src/compressionDefinitions.ts +3 -6
- package/src/connectionTelemetry.ts +8 -9
- package/src/containerHandleContext.ts +2 -2
- package/src/containerRuntime.ts +43 -50
- package/src/dataStore.ts +6 -6
- package/src/dataStoreContext.ts +33 -33
- package/src/dataStoreContexts.ts +3 -3
- package/src/dataStoreRegistry.ts +1 -1
- package/src/deltaManagerProxies.ts +3 -3
- package/src/deltaScheduler.ts +6 -3
- package/src/error.ts +1 -1
- package/src/gc/garbageCollection.ts +18 -18
- package/src/gc/gcConfigs.ts +7 -7
- package/src/gc/gcDefinitions.ts +11 -12
- package/src/gc/gcHelpers.ts +7 -7
- package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
- package/src/gc/gcSummaryDefinitions.ts +1 -1
- package/src/gc/gcSummaryStateTracker.ts +5 -5
- package/src/gc/gcTelemetry.ts +8 -8
- package/src/gc/index.ts +18 -18
- package/src/inboundBatchAggregator.ts +4 -4
- package/src/index.ts +79 -79
- package/src/messageTypes.ts +9 -10
- package/src/opLifecycle/batchManager.ts +2 -2
- package/src/opLifecycle/definitions.ts +1 -1
- package/src/opLifecycle/duplicateBatchDetector.ts +1 -1
- package/src/opLifecycle/index.ts +9 -9
- package/src/opLifecycle/opCompressor.ts +2 -2
- package/src/opLifecycle/opDecompressor.ts +3 -3
- package/src/opLifecycle/opGroupingManager.ts +6 -6
- package/src/opLifecycle/opSplitter.ts +10 -7
- package/src/opLifecycle/outbox.ts +17 -14
- package/src/opLifecycle/remoteMessageProcessor.ts +4 -4
- package/src/opProperties.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +10 -10
- package/src/storageServiceWithAttachBlobs.ts +11 -11
- package/src/summary/documentSchema.ts +1 -2
- package/src/summary/index.ts +69 -69
- package/src/summary/orderedClientElection.ts +12 -4
- package/src/summary/summarizerClientElection.ts +5 -5
- package/src/summary/summarizerNode/index.ts +3 -3
- package/src/summary/summarizerNode/summarizerNode.ts +14 -12
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +3 -3
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +3 -3
- package/src/summary/summarizerTypes.ts +25 -44
- package/src/summary/summarizerUtils.ts +3 -3
- package/src/summary/summaryCollection.ts +19 -29
- package/src/summary/summaryDelayLoadedModule/index.ts +2 -2
- package/src/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.ts +1 -1
- package/src/summary/summaryDelayLoadedModule/runningSummarizer.ts +4 -4
- package/src/summary/summaryDelayLoadedModule/summarizer.ts +8 -8
- package/src/summary/summaryDelayLoadedModule/summarizerHeuristics.ts +4 -4
- package/src/summary/summaryDelayLoadedModule/summaryGenerator.ts +3 -3
- package/src/summary/summaryDelayLoadedModule/summaryResultBuilder.ts +3 -3
- package/src/summary/summaryDelayLoadedModule/summaryResultTypes.ts +5 -10
- package/src/summary/summaryFormat.ts +9 -14
- package/src/summary/summaryHelpers.ts +1 -2
- package/src/summary/summaryManager.ts +4 -4
|
@@ -8,9 +8,8 @@ exports.isBlobPath = exports.BlobManager = exports.blobManagerBasePath = exports
|
|
|
8
8
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
9
9
|
const internal_1 = require("@fluidframework/container-definitions/internal");
|
|
10
10
|
const internal_2 = require("@fluidframework/core-utils/internal");
|
|
11
|
-
const internal_3 = require("@fluidframework/
|
|
12
|
-
const internal_4 = require("@fluidframework/
|
|
13
|
-
const internal_5 = require("@fluidframework/telemetry-utils/internal");
|
|
11
|
+
const internal_3 = require("@fluidframework/runtime-utils/internal");
|
|
12
|
+
const internal_4 = require("@fluidframework/telemetry-utils/internal");
|
|
14
13
|
const uuid_1 = require("uuid");
|
|
15
14
|
const metadata_js_1 = require("../metadata.js");
|
|
16
15
|
const blobManagerSnapSum_js_1 = require("./blobManagerSnapSum.js");
|
|
@@ -21,7 +20,7 @@ const blobManagerSnapSum_js_1 = require("./blobManagerSnapSum.js");
|
|
|
21
20
|
* DataObject.request() recognizes requests in the form of `/blobs/<id>`
|
|
22
21
|
* and loads blob.
|
|
23
22
|
*/
|
|
24
|
-
class BlobHandle extends
|
|
23
|
+
class BlobHandle extends internal_3.FluidHandleBase {
|
|
25
24
|
get isAttached() {
|
|
26
25
|
return this.routeContext.isAttached && this.attached;
|
|
27
26
|
}
|
|
@@ -51,7 +50,7 @@ class BlobHandle extends internal_4.FluidHandleBase {
|
|
|
51
50
|
this._payloadShareError = error;
|
|
52
51
|
this._events?.emit("payloadShareFailed", error);
|
|
53
52
|
};
|
|
54
|
-
this.absolutePath = (0,
|
|
53
|
+
this.absolutePath = (0, internal_3.generateHandleContextPath)(path, this.routeContext);
|
|
55
54
|
}
|
|
56
55
|
attachGraph() {
|
|
57
56
|
if (!this.attached) {
|
|
@@ -79,20 +78,20 @@ class BlobManager {
|
|
|
79
78
|
* because we know that the server will not delete the blob corresponding to that storage ID.
|
|
80
79
|
*/
|
|
81
80
|
this.opsInFlight = new Map();
|
|
82
|
-
const { routeContext, blobManagerLoadInfo, storage, sendBlobAttachOp, blobRequested, isBlobDeleted, runtime,
|
|
81
|
+
const { routeContext, blobManagerLoadInfo, storage, sendBlobAttachOp, blobRequested, isBlobDeleted, runtime, localIdGenerator, createBlobPayloadPending, } = props;
|
|
83
82
|
this.routeContext = routeContext;
|
|
84
83
|
this.storage = storage;
|
|
85
84
|
this.blobRequested = blobRequested;
|
|
86
85
|
this.isBlobDeleted = isBlobDeleted;
|
|
87
86
|
this.runtime = runtime;
|
|
88
|
-
this.
|
|
87
|
+
this.localIdGenerator = localIdGenerator ?? uuid_1.v4;
|
|
89
88
|
this.createBlobPayloadPending = createBlobPayloadPending;
|
|
90
|
-
this.mc = (0,
|
|
89
|
+
this.mc = (0, internal_4.createChildMonitoringContext)({
|
|
91
90
|
logger: this.runtime.baseLogger,
|
|
92
91
|
namespace: "BlobManager",
|
|
93
92
|
});
|
|
94
|
-
this.redirectTable = (0, blobManagerSnapSum_js_1.toRedirectTable)(blobManagerLoadInfo, this.mc.logger
|
|
95
|
-
this.sendBlobAttachOp = (localId,
|
|
93
|
+
this.redirectTable = (0, blobManagerSnapSum_js_1.toRedirectTable)(blobManagerLoadInfo, this.mc.logger);
|
|
94
|
+
this.sendBlobAttachOp = (localId, storageId) => {
|
|
96
95
|
const pendingEntry = this.pendingBlobs.get(localId);
|
|
97
96
|
(0, internal_2.assert)(pendingEntry !== undefined, 0x725 /* Must have pending blob entry for upcoming op */);
|
|
98
97
|
if (pendingEntry?.uploadTime && pendingEntry?.minTTLInSeconds) {
|
|
@@ -118,7 +117,7 @@ class BlobManager {
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
pendingEntry.opsent = true;
|
|
121
|
-
sendBlobAttachOp(localId,
|
|
120
|
+
sendBlobAttachOp(localId, storageId);
|
|
122
121
|
};
|
|
123
122
|
}
|
|
124
123
|
get allBlobsAttached() {
|
|
@@ -134,63 +133,53 @@ class BlobManager {
|
|
|
134
133
|
this.pendingBlobs.size > 0);
|
|
135
134
|
}
|
|
136
135
|
createAbortError(pending) {
|
|
137
|
-
return new
|
|
136
|
+
return new internal_4.LoggingError("uploadBlob aborted", {
|
|
138
137
|
acked: pending?.acked,
|
|
139
138
|
uploadTime: pending?.uploadTime,
|
|
140
139
|
});
|
|
141
140
|
}
|
|
142
|
-
hasBlob(
|
|
143
|
-
return this.redirectTable.get(
|
|
141
|
+
hasBlob(localId) {
|
|
142
|
+
return this.redirectTable.get(localId) !== undefined;
|
|
144
143
|
}
|
|
145
144
|
/**
|
|
146
145
|
* Retrieve the blob with the given local blob id.
|
|
147
|
-
* @param
|
|
146
|
+
* @param localId - The local blob id. Likely coming from a handle.
|
|
148
147
|
* @param payloadPending - Whether we suspect the payload may be pending and not available yet.
|
|
149
148
|
* @returns A promise which resolves to the blob contents
|
|
150
149
|
*/
|
|
151
|
-
async getBlob(
|
|
150
|
+
async getBlob(localId, payloadPending) {
|
|
152
151
|
// Verify that the blob is not deleted, i.e., it has not been garbage collected. If it is, this will throw
|
|
153
152
|
// an error, failing the call.
|
|
154
|
-
this.verifyBlobNotDeleted(
|
|
153
|
+
this.verifyBlobNotDeleted(localId);
|
|
155
154
|
// Let runtime know that the corresponding GC node was requested.
|
|
156
155
|
// Note that this will throw if the blob is inactive or tombstoned and throwing on incorrect usage
|
|
157
156
|
// is configured.
|
|
158
|
-
this.blobRequested(
|
|
159
|
-
const pending = this.pendingBlobs.get(
|
|
157
|
+
this.blobRequested(getGCNodePathFromLocalId(localId));
|
|
158
|
+
const pending = this.pendingBlobs.get(localId);
|
|
160
159
|
if (pending) {
|
|
161
160
|
return pending.blob;
|
|
162
161
|
}
|
|
163
|
-
let storageId;
|
|
164
|
-
if (
|
|
165
|
-
|
|
166
|
-
//
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
attachedStorageId ??
|
|
183
|
-
(await new Promise((resolve) => {
|
|
184
|
-
const onProcessBlobAttach = (localId, _storageId) => {
|
|
185
|
-
if (localId === blobId) {
|
|
186
|
-
this.internalEvents.off("processedBlobAttach", onProcessBlobAttach);
|
|
187
|
-
resolve(_storageId);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
this.internalEvents.on("processedBlobAttach", onProcessBlobAttach);
|
|
191
|
-
}));
|
|
162
|
+
let storageId = this.redirectTable.get(localId);
|
|
163
|
+
if (storageId === undefined) {
|
|
164
|
+
// Only blob handles explicitly marked with pending payload are permitted to exist without
|
|
165
|
+
// yet knowing their storage id. Otherwise they must already be associated with a storage id.
|
|
166
|
+
// Handles for detached blobs are not payload pending.
|
|
167
|
+
(0, internal_2.assert)(payloadPending, 0x11f /* "requesting unknown blobs" */);
|
|
168
|
+
// If we didn't find it in the redirectTable and it's payloadPending, assume the attach op is coming
|
|
169
|
+
// eventually and wait. We do this even if the local client doesn't have the blob payloadPending flag
|
|
170
|
+
// enabled, in case a remote client does have it enabled. This wait may be infinite if the uploading
|
|
171
|
+
// client failed the upload and doesn't exist anymore.
|
|
172
|
+
storageId = await new Promise((resolve) => {
|
|
173
|
+
const onProcessBlobAttach = (_localId, _storageId) => {
|
|
174
|
+
if (_localId === localId) {
|
|
175
|
+
this.internalEvents.off("processedBlobAttach", onProcessBlobAttach);
|
|
176
|
+
resolve(_storageId);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
this.internalEvents.on("processedBlobAttach", onProcessBlobAttach);
|
|
180
|
+
});
|
|
192
181
|
}
|
|
193
|
-
return
|
|
182
|
+
return internal_4.PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "AttachmentReadBlob", id: storageId }, async (event) => {
|
|
194
183
|
return this.storage.readBlob(storageId).catch((error) => {
|
|
195
184
|
if (this.runtime.disposed) {
|
|
196
185
|
// If the runtime is disposed, this is not an error we care to track, it's expected behavior.
|
|
@@ -212,15 +201,17 @@ class BlobManager {
|
|
|
212
201
|
this.deletePendingBlobMaybe(localId);
|
|
213
202
|
}
|
|
214
203
|
: undefined;
|
|
215
|
-
return new BlobHandle(
|
|
204
|
+
return new BlobHandle(getGCNodePathFromLocalId(localId), this.routeContext, async () => this.getBlob(localId, false), false, // payloadPending
|
|
216
205
|
callback);
|
|
217
206
|
}
|
|
218
207
|
async createBlobDetached(blob) {
|
|
208
|
+
const localId = this.localIdGenerator();
|
|
219
209
|
// Blobs created while the container is detached are stored in IDetachedBlobStorage.
|
|
220
|
-
// The 'IContainerStorageService.createBlob()' call below will respond with a
|
|
221
|
-
|
|
222
|
-
this.
|
|
223
|
-
|
|
210
|
+
// The 'IContainerStorageService.createBlob()' call below will respond with a pseudo storage ID.
|
|
211
|
+
// That pseudo storage ID will be replaced with the real storage ID at attach time.
|
|
212
|
+
const { id: detachedStorageId } = await this.storage.createBlob(blob);
|
|
213
|
+
this.setRedirection(localId, detachedStorageId);
|
|
214
|
+
return this.getBlobHandle(localId);
|
|
224
215
|
}
|
|
225
216
|
async createBlob(blob, signal) {
|
|
226
217
|
if (this.runtime.attachState === internal_1.AttachState.Detached) {
|
|
@@ -242,7 +233,7 @@ class BlobManager {
|
|
|
242
233
|
}
|
|
243
234
|
// Create a local ID for the blob. After uploading it to storage and before returning it, a local ID to
|
|
244
235
|
// storage ID mapping is created.
|
|
245
|
-
const localId = this.
|
|
236
|
+
const localId = this.localIdGenerator();
|
|
246
237
|
const pendingEntry = {
|
|
247
238
|
blob,
|
|
248
239
|
handleP: new internal_2.Deferred(),
|
|
@@ -264,8 +255,8 @@ class BlobManager {
|
|
|
264
255
|
});
|
|
265
256
|
}
|
|
266
257
|
createBlobWithPayloadPending(blob) {
|
|
267
|
-
const localId = this.
|
|
268
|
-
const blobHandle = new BlobHandle(
|
|
258
|
+
const localId = this.localIdGenerator();
|
|
259
|
+
const blobHandle = new BlobHandle(getGCNodePathFromLocalId(localId), this.routeContext, async () => blob, true, // payloadPending
|
|
269
260
|
() => {
|
|
270
261
|
const pendingEntry = {
|
|
271
262
|
blob,
|
|
@@ -293,36 +284,49 @@ class BlobManager {
|
|
|
293
284
|
this.internalEvents.on("uploadFailed", onUploadFailed);
|
|
294
285
|
return blobHandle;
|
|
295
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Upload a blob to the storage service.
|
|
289
|
+
* @returns A promise that resolves when the upload is complete and a blob attach op has been sent (but not ack'd).
|
|
290
|
+
*
|
|
291
|
+
* @privateRemarks This method must not reject, as there is no error handling for it in current tracking.
|
|
292
|
+
*/
|
|
296
293
|
async uploadBlob(localId, blob) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
(0, internal_2.assert)(!!entry, 0x387 /* Must have pending blob entry for blob which failed to upload */);
|
|
304
|
-
if (entry.opsent && !(0, internal_3.canRetryOnError)(error)) {
|
|
305
|
-
throw (0, internal_5.wrapError)(error, () => new internal_5.LoggingError(`uploadBlob error`, { canRetry: true }));
|
|
306
|
-
}
|
|
307
|
-
throw error;
|
|
308
|
-
}
|
|
309
|
-
}, "createBlob", this.mc.logger, {
|
|
310
|
-
cancel: this.pendingBlobs.get(localId)?.abortSignal,
|
|
311
|
-
}).then((response) => this.onUploadResolve(localId, response), (error) => {
|
|
294
|
+
let response;
|
|
295
|
+
try {
|
|
296
|
+
response = await this.storage.createBlob(blob);
|
|
297
|
+
}
|
|
298
|
+
catch (error) {
|
|
299
|
+
const entry = this.pendingBlobs.get(localId);
|
|
312
300
|
this.mc.logger.sendTelemetryEvent({
|
|
313
301
|
eventName: "UploadBlobReject",
|
|
314
302
|
// TODO: better typing
|
|
315
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
316
|
-
error,
|
|
303
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
|
|
304
|
+
error: error,
|
|
305
|
+
message: entry === undefined ? "Missing pendingBlob" : undefined,
|
|
317
306
|
localId,
|
|
318
307
|
});
|
|
319
|
-
//
|
|
320
|
-
//
|
|
321
|
-
//
|
|
322
|
-
|
|
323
|
-
|
|
308
|
+
// We probably should assert the pendingBlobs entry here, but we don't currently have any error handling
|
|
309
|
+
// for the uploadP - a promise rejection would be unhandled anyway. For now we can detect this with the
|
|
310
|
+
// message on the UploadBlobReject telemetry.
|
|
311
|
+
if (entry !== undefined) {
|
|
312
|
+
entry.handleP.reject(error);
|
|
313
|
+
this.deletePendingBlob(localId);
|
|
314
|
+
}
|
|
324
315
|
this.internalEvents.emit("uploadFailed", localId, error);
|
|
325
|
-
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
try {
|
|
319
|
+
this.onUploadResolve(localId, response);
|
|
320
|
+
}
|
|
321
|
+
catch (error) {
|
|
322
|
+
this.mc.logger.sendTelemetryEvent({
|
|
323
|
+
eventName: "OnUploadResolveError",
|
|
324
|
+
// TODO: better typing
|
|
325
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
|
|
326
|
+
error: error,
|
|
327
|
+
localId,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
326
330
|
}
|
|
327
331
|
/**
|
|
328
332
|
* Set up a mapping in the redirect table from fromId to toId. Also, notify the runtime that a reference is added
|
|
@@ -367,7 +371,7 @@ class BlobManager {
|
|
|
367
371
|
if (!entry.opsent) {
|
|
368
372
|
this.sendBlobAttachOp(localId, response.id);
|
|
369
373
|
}
|
|
370
|
-
const storageIds = (0, blobManagerSnapSum_js_1.getStorageIds)(this.redirectTable
|
|
374
|
+
const storageIds = (0, blobManagerSnapSum_js_1.getStorageIds)(this.redirectTable);
|
|
371
375
|
if (storageIds.has(response.id)) {
|
|
372
376
|
// The blob is de-duped. Set up a local ID to storage ID mapping and return the blob. Since this is
|
|
373
377
|
// an existing blob, we don't have to wait for the op to be ack'd since this step has already
|
|
@@ -400,7 +404,7 @@ class BlobManager {
|
|
|
400
404
|
*/
|
|
401
405
|
reSubmit(metadata) {
|
|
402
406
|
(0, internal_2.assert)((0, metadata_js_1.isBlobMetadata)(metadata), 0xc01 /* Expected blob metadata for a BlobAttach op */);
|
|
403
|
-
const { localId, blobId } = metadata;
|
|
407
|
+
const { localId, blobId: storageId } = metadata;
|
|
404
408
|
// Any blob that we're actively trying to advance to attached state must have a
|
|
405
409
|
// pendingBlobs entry. Decline to resubmit for anything else.
|
|
406
410
|
// For example, we might be asked to resubmit stashed ops for blobs that never had
|
|
@@ -408,22 +412,22 @@ class BlobManager {
|
|
|
408
412
|
// try to attach them since they won't be accessible to the customer and would just
|
|
409
413
|
// be considered garbage immediately.
|
|
410
414
|
if (this.pendingBlobs.has(localId)) {
|
|
411
|
-
this.sendBlobAttachOp(localId,
|
|
415
|
+
this.sendBlobAttachOp(localId, storageId);
|
|
412
416
|
}
|
|
413
417
|
}
|
|
414
418
|
processBlobAttachMessage(message, local) {
|
|
415
419
|
(0, internal_2.assert)((0, metadata_js_1.isBlobMetadata)(message.metadata), 0xc02 /* Expected blob metadata for a BlobAttach op */);
|
|
416
|
-
const { localId, blobId } = message.metadata;
|
|
420
|
+
const { localId, blobId: storageId } = message.metadata;
|
|
417
421
|
const pendingEntry = this.pendingBlobs.get(localId);
|
|
418
422
|
if (pendingEntry?.abortSignal?.aborted) {
|
|
419
423
|
this.deletePendingBlob(localId);
|
|
420
424
|
return;
|
|
421
425
|
}
|
|
422
|
-
this.setRedirection(localId,
|
|
426
|
+
this.setRedirection(localId, storageId);
|
|
423
427
|
// set identity (id -> id) entry
|
|
424
|
-
this.setRedirection(
|
|
428
|
+
this.setRedirection(storageId, storageId);
|
|
425
429
|
if (local) {
|
|
426
|
-
const waitingBlobs = this.opsInFlight.get(
|
|
430
|
+
const waitingBlobs = this.opsInFlight.get(storageId);
|
|
427
431
|
if (waitingBlobs !== undefined) {
|
|
428
432
|
// For each op corresponding to this storage ID that we are waiting for, resolve the pending blob.
|
|
429
433
|
// This is safe because the server will keep the blob alive and the op containing the local ID to
|
|
@@ -431,14 +435,14 @@ class BlobManager {
|
|
|
431
435
|
for (const pendingLocalId of waitingBlobs) {
|
|
432
436
|
const entry = this.pendingBlobs.get(pendingLocalId);
|
|
433
437
|
(0, internal_2.assert)(entry !== undefined, 0x38f /* local online BlobAttach op with no pending blob entry */);
|
|
434
|
-
this.setRedirection(pendingLocalId,
|
|
438
|
+
this.setRedirection(pendingLocalId, storageId);
|
|
435
439
|
entry.acked = true;
|
|
436
440
|
const blobHandle = this.getBlobHandle(pendingLocalId);
|
|
437
441
|
blobHandle.notifyShared();
|
|
438
442
|
entry.handleP.resolve(blobHandle);
|
|
439
443
|
this.deletePendingBlobMaybe(pendingLocalId);
|
|
440
444
|
}
|
|
441
|
-
this.opsInFlight.delete(
|
|
445
|
+
this.opsInFlight.delete(storageId);
|
|
442
446
|
}
|
|
443
447
|
const localEntry = this.pendingBlobs.get(localId);
|
|
444
448
|
if (localEntry) {
|
|
@@ -449,10 +453,10 @@ class BlobManager {
|
|
|
449
453
|
this.deletePendingBlobMaybe(localId);
|
|
450
454
|
}
|
|
451
455
|
}
|
|
452
|
-
this.internalEvents.emit("processedBlobAttach", localId,
|
|
456
|
+
this.internalEvents.emit("processedBlobAttach", localId, storageId);
|
|
453
457
|
}
|
|
454
458
|
summarize(telemetryContext) {
|
|
455
|
-
return (0, blobManagerSnapSum_js_1.summarizeBlobManagerState)(this.redirectTable
|
|
459
|
+
return (0, blobManagerSnapSum_js_1.summarizeBlobManagerState)(this.redirectTable);
|
|
456
460
|
}
|
|
457
461
|
/**
|
|
458
462
|
* Generates data used for garbage collection. Each blob uploaded represents a node in the GC graph as it can be
|
|
@@ -463,13 +467,12 @@ class BlobManager {
|
|
|
463
467
|
getGCData(fullGC = false) {
|
|
464
468
|
const gcData = { gcNodes: {} };
|
|
465
469
|
for (const [localId, storageId] of this.redirectTable) {
|
|
466
|
-
|
|
467
|
-
//
|
|
468
|
-
// id entries have the same key and value, ignore them.
|
|
469
|
-
// The outbound routes are empty because a blob node cannot reference other nodes. It can only be referenced
|
|
470
|
-
// by adding its handle to a referenced DDS.
|
|
470
|
+
// Don't report the identity mappings to GC - these exist to service old handles that referenced the storage
|
|
471
|
+
// IDs directly. We'll implicitly clean them up if all of their localId references get GC'd first.
|
|
471
472
|
if (localId !== storageId) {
|
|
472
|
-
|
|
473
|
+
// The outbound routes are empty because a blob node cannot reference other nodes. It can only be referenced
|
|
474
|
+
// by adding its handle to a referenced DDS.
|
|
475
|
+
gcData.gcNodes[getGCNodePathFromLocalId(localId)] = [];
|
|
473
476
|
}
|
|
474
477
|
}
|
|
475
478
|
return gcData;
|
|
@@ -488,55 +491,53 @@ class BlobManager {
|
|
|
488
491
|
* Delete blobs with the given routes from the redirect table.
|
|
489
492
|
*
|
|
490
493
|
* @remarks
|
|
491
|
-
* The routes are GC nodes paths of format -`/<blobManagerBasePath>/<
|
|
494
|
+
* The routes are GC nodes paths of format -`/<blobManagerBasePath>/<localId>`.
|
|
492
495
|
* Deleting the blobs involves 2 steps:
|
|
493
496
|
*
|
|
494
497
|
* 1. The redirect table entry for the local ids are deleted.
|
|
495
498
|
*
|
|
496
|
-
* 2. If the storage ids corresponding to the deleted local ids are not
|
|
497
|
-
*
|
|
499
|
+
* 2. If the storage ids corresponding to the deleted local ids are not referenced by any further local ids, the
|
|
500
|
+
* identity mappings in the redirect table are deleted as well.
|
|
498
501
|
*
|
|
499
502
|
* Note that this does not delete the blobs from storage service immediately. Deleting the blobs from redirect table
|
|
500
|
-
* will
|
|
503
|
+
* will ensure we don't create an attachment blob for them at the next summary. The service would then delete them
|
|
504
|
+
* some time in the future.
|
|
501
505
|
*/
|
|
502
506
|
deleteBlobsFromRedirectTable(blobRoutes) {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
// This tracks the storage ids of local ids that are deleted. After the local ids have been deleted, if any of
|
|
507
|
-
// these storage ids are unused, they will be deleted as well.
|
|
507
|
+
// maybeUnusedStorageIds is used to compute the set of storage IDs that *used to have a local ID*, but that
|
|
508
|
+
// local ID is being deleted.
|
|
508
509
|
const maybeUnusedStorageIds = new Set();
|
|
509
510
|
for (const route of blobRoutes) {
|
|
510
|
-
const
|
|
511
|
+
const localId = getLocalIdFromGCNodePath(route);
|
|
511
512
|
// If the blob hasn't already been deleted, log an error because this should never happen.
|
|
512
513
|
// If the blob has already been deleted, log a telemetry event. This can happen because multiple GC
|
|
513
514
|
// sweep ops can contain the same data store. It would be interesting to track how often this happens.
|
|
514
515
|
const alreadyDeleted = this.isBlobDeleted(route);
|
|
515
|
-
|
|
516
|
+
const storageId = this.redirectTable.get(localId);
|
|
517
|
+
if (storageId === undefined) {
|
|
516
518
|
this.mc.logger.sendTelemetryEvent({
|
|
517
519
|
eventName: "DeletedAttachmentBlobNotFound",
|
|
518
520
|
category: alreadyDeleted ? "generic" : "error",
|
|
519
|
-
blobId,
|
|
521
|
+
blobId: localId,
|
|
520
522
|
details: { alreadyDeleted },
|
|
521
523
|
});
|
|
522
524
|
continue;
|
|
523
525
|
}
|
|
524
|
-
const storageId = this.redirectTable.get(blobId);
|
|
525
|
-
(0, internal_2.assert)(!!storageId, 0x5bb /* Must be attached to run GC */);
|
|
526
526
|
maybeUnusedStorageIds.add(storageId);
|
|
527
|
-
this.redirectTable.delete(
|
|
527
|
+
this.redirectTable.delete(localId);
|
|
528
528
|
}
|
|
529
|
-
//
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
(0, internal_2.assert)(!!storageId, 0x5bc /* Must be attached to run GC */);
|
|
533
|
-
// For every storage id, the redirect table has a id -> id entry. These do not make the storage id in-use.
|
|
534
|
-
if (maybeUnusedStorageIds.has(storageId) && localId !== storageId) {
|
|
529
|
+
// Remove any storage IDs that still have local IDs referring to them (excluding the identity mapping).
|
|
530
|
+
for (const [localId, storageId] of this.redirectTable) {
|
|
531
|
+
if (localId !== storageId) {
|
|
535
532
|
maybeUnusedStorageIds.delete(storageId);
|
|
536
533
|
}
|
|
537
534
|
}
|
|
538
|
-
//
|
|
539
|
-
// This way they'll be absent from the next summary, and the service
|
|
535
|
+
// Now delete any identity mappings (storage ID -> storage ID) from the redirect table that used to be
|
|
536
|
+
// referenced by a distinct local ID. This way they'll be absent from the next summary, and the service
|
|
537
|
+
// is free to delete them from storage.
|
|
538
|
+
// WARNING: This can potentially delete identity mappings that are still referenced, if storage deduping
|
|
539
|
+
// has let us add a local ID -> storage ID mapping that is later deleted. AB#47337 tracks this issue
|
|
540
|
+
// and possible solutions.
|
|
540
541
|
for (const storageId of maybeUnusedStorageIds) {
|
|
541
542
|
this.redirectTable.delete(storageId);
|
|
542
543
|
}
|
|
@@ -545,12 +546,12 @@ class BlobManager {
|
|
|
545
546
|
* Verifies that the blob with given id is not deleted, i.e., it has not been garbage collected. If the blob is GC'd,
|
|
546
547
|
* log an error and throw if necessary.
|
|
547
548
|
*/
|
|
548
|
-
verifyBlobNotDeleted(
|
|
549
|
-
if (!this.isBlobDeleted(
|
|
549
|
+
verifyBlobNotDeleted(localId) {
|
|
550
|
+
if (!this.isBlobDeleted(getGCNodePathFromLocalId(localId))) {
|
|
550
551
|
return;
|
|
551
552
|
}
|
|
552
|
-
const request = { url:
|
|
553
|
-
const error = (0,
|
|
553
|
+
const request = { url: localId };
|
|
554
|
+
const error = (0, internal_3.responseToException)((0, internal_3.createResponseError)(404, `Blob was deleted`, request), request);
|
|
554
555
|
// Only log deleted events. Tombstone events are logged by garbage collector.
|
|
555
556
|
this.mc.logger.sendErrorEvent({
|
|
556
557
|
eventName: "GC_Deleted_Blob_Requested",
|
|
@@ -558,14 +559,28 @@ class BlobManager {
|
|
|
558
559
|
}, error);
|
|
559
560
|
throw error;
|
|
560
561
|
}
|
|
561
|
-
|
|
562
|
+
/**
|
|
563
|
+
* Called in detached state just prior to attaching, this will update the redirect table by
|
|
564
|
+
* converting the pseudo storage IDs into real storage IDs using the provided detachedStorageTable.
|
|
565
|
+
* The provided table must have exactly the same set of pseudo storage IDs as are found in the redirect table.
|
|
566
|
+
* @param detachedStorageTable - A map of pseudo storage IDs to real storage IDs.
|
|
567
|
+
*/
|
|
568
|
+
patchRedirectTable(detachedStorageTable) {
|
|
562
569
|
(0, internal_2.assert)(this.runtime.attachState === internal_1.AttachState.Detached, 0x252 /* "redirect table can only be set in detached container" */);
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
570
|
+
// The values of the redirect table are the pseudo storage IDs, which are the keys of the
|
|
571
|
+
// detachedStorageTable. We expect to have a many:1 mapping from local IDs to pseudo
|
|
572
|
+
// storage IDs (many in the case that the storage dedupes the blob).
|
|
573
|
+
(0, internal_2.assert)(new Set(this.redirectTable.values()).size === detachedStorageTable.size, 0x391 /* Redirect table size must match BlobManager's local ID count */);
|
|
574
|
+
// Taking a snapshot of the redirect table entries before iterating, because
|
|
575
|
+
// we will be adding identity mappings to the the redirect table as we iterate
|
|
576
|
+
// and we don't want to include those in the iteration.
|
|
577
|
+
const redirectTableEntries = [...this.redirectTable.entries()];
|
|
578
|
+
for (const [localId, detachedStorageId] of redirectTableEntries) {
|
|
579
|
+
const newStorageId = detachedStorageTable.get(detachedStorageId);
|
|
580
|
+
(0, internal_2.assert)(newStorageId !== undefined, "Couldn't find a matching storage ID");
|
|
581
|
+
this.setRedirection(localId, newStorageId);
|
|
567
582
|
// set identity (id -> id) entry
|
|
568
|
-
this.setRedirection(
|
|
583
|
+
this.setRedirection(newStorageId, newStorageId);
|
|
569
584
|
}
|
|
570
585
|
}
|
|
571
586
|
/**
|
|
@@ -593,20 +608,20 @@ class BlobManager {
|
|
|
593
608
|
* or undefined if no blobs were processed.
|
|
594
609
|
*/
|
|
595
610
|
async attachAndGetPendingBlobs(stopBlobAttachingSignal) {
|
|
596
|
-
throw new
|
|
611
|
+
throw new internal_4.UsageError("attachAndGetPendingBlobs is no longer supported");
|
|
597
612
|
}
|
|
598
613
|
}
|
|
599
614
|
exports.BlobManager = BlobManager;
|
|
600
615
|
/**
|
|
601
|
-
* For a
|
|
616
|
+
* For a localId, returns its path in GC's graph. The node path is of the format `/<blobManagerBasePath>/<localId>`.
|
|
602
617
|
* This path must match the path of the blob handle returned by the createBlob API because blobs are marked
|
|
603
618
|
* referenced by storing these handles in a referenced DDS.
|
|
604
619
|
*/
|
|
605
|
-
const
|
|
620
|
+
const getGCNodePathFromLocalId = (localId) => `/${exports.blobManagerBasePath}/${localId}`;
|
|
606
621
|
/**
|
|
607
|
-
* For a given GC node path, return the
|
|
622
|
+
* For a given GC node path, return the localId. The node path is of the format `/<basePath>/<localId>`.
|
|
608
623
|
*/
|
|
609
|
-
const
|
|
624
|
+
const getLocalIdFromGCNodePath = (nodePath) => {
|
|
610
625
|
const pathParts = nodePath.split("/");
|
|
611
626
|
(0, internal_2.assert)(areBlobPathParts(pathParts), 0x5bd /* Invalid blob node path */);
|
|
612
627
|
return pathParts[2];
|