@fluidframework/container-runtime 2.0.0-rc.1.0.3 → 2.0.0-rc.2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.eslintrc.js → .eslintrc.cjs} +5 -5
- package/{.mocharc.js → .mocharc.cjs} +1 -1
- package/CHANGELOG.md +54 -0
- package/README.md +45 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/container-runtime.api.md +68 -30
- package/dist/batchTracker.d.ts +1 -2
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +223 -0
- package/dist/channelCollection.d.ts.map +1 -0
- package/dist/{dataStores.js → channelCollection.js} +399 -83
- package/dist/channelCollection.js.map +1 -0
- package/dist/connectionTelemetry.d.ts +11 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +42 -4
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/container-runtime-alpha.d.ts +98 -40
- package/dist/container-runtime-beta.d.ts +27 -9
- package/dist/container-runtime-public.d.ts +27 -9
- package/dist/container-runtime-untrimmed.d.ts +123 -40
- package/dist/containerHandleContext.d.ts +1 -1
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +79 -55
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +541 -411
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +2 -3
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +12 -11
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +71 -30
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +182 -141
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +1 -1
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts +29 -4
- package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/dist/deltaManagerSummarizerProxy.js +91 -5
- package/dist/deltaManagerSummarizerProxy.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +22 -5
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +134 -75
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +2 -2
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +21 -21
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +29 -6
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +5 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +2 -2
- 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/gcSummaryStateTracker.d.ts +12 -5
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +18 -6
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +7 -7
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +20 -20
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.d.ts +6 -1
- package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +22 -11
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +8 -8
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +40 -38
- package/dist/gc/index.js.map +1 -1
- package/dist/index.d.ts +8 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -40
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +4 -4
- package/dist/messageTypes.d.ts.map +1 -1
- 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 +2 -2
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +8 -8
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +18 -18
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +1 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +4 -4
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +3 -3
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +1 -10
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +1 -1
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +5 -5
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +7 -7
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +20 -12
- 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 +2 -2
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/package.json +3 -0
- 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 +2 -1
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +18 -10
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts +1 -2
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +5 -5
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/index.d.ts +12 -12
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +43 -43
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.js +8 -8
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +11 -10
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +114 -81
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +4 -4
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +6 -6
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +2 -2
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +3 -3
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.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 +4 -4
- package/dist/summary/summarizerNode/index.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +17 -7
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +45 -57
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +10 -19
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +1 -21
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +5 -6
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +16 -16
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +10 -21
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +15 -2
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +6 -5
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +10 -1
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +5 -6
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +4 -5
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/{batchTracker.d.mts → batchTracker.d.ts} +2 -3
- package/lib/batchTracker.d.ts.map +1 -0
- package/lib/{batchTracker.mjs → batchTracker.js} +1 -1
- package/lib/batchTracker.js.map +1 -0
- package/lib/{blobManager.d.mts → blobManager.d.ts} +1 -1
- package/lib/blobManager.d.ts.map +1 -0
- package/lib/{blobManager.mjs → blobManager.js} +1 -1
- package/lib/blobManager.js.map +1 -0
- package/lib/channelCollection.d.ts +223 -0
- package/lib/channelCollection.d.ts.map +1 -0
- package/lib/{dataStores.mjs → channelCollection.js} +384 -71
- package/lib/channelCollection.js.map +1 -0
- package/lib/{connectionTelemetry.d.mts → connectionTelemetry.d.ts} +12 -2
- package/lib/connectionTelemetry.d.ts.map +1 -0
- package/lib/{connectionTelemetry.mjs → connectionTelemetry.js} +43 -5
- package/lib/connectionTelemetry.js.map +1 -0
- package/lib/{container-runtime-alpha.d.mts → container-runtime-alpha.d.ts} +98 -40
- package/lib/{container-runtime-public.d.mts → container-runtime-beta.d.ts} +27 -9
- package/lib/{container-runtime-beta.d.mts → container-runtime-public.d.ts} +27 -9
- package/lib/{container-runtime-untrimmed.d.mts → container-runtime-untrimmed.d.ts} +123 -40
- package/lib/{containerHandleContext.d.mts → containerHandleContext.d.ts} +2 -2
- package/lib/containerHandleContext.d.ts.map +1 -0
- package/lib/{containerHandleContext.mjs → containerHandleContext.js} +1 -1
- package/lib/containerHandleContext.js.map +1 -0
- package/lib/{containerRuntime.d.mts → containerRuntime.d.ts} +84 -56
- package/lib/containerRuntime.d.ts.map +1 -0
- package/lib/{containerRuntime.mjs → containerRuntime.js} +460 -332
- package/lib/containerRuntime.js.map +1 -0
- package/lib/{dataStore.d.mts → dataStore.d.ts} +3 -4
- package/lib/dataStore.d.ts.map +1 -0
- package/lib/{dataStore.mjs → dataStore.js} +13 -12
- package/lib/dataStore.js.map +1 -0
- package/lib/{dataStoreContext.d.mts → dataStoreContext.d.ts} +72 -31
- package/lib/dataStoreContext.d.ts.map +1 -0
- package/lib/{dataStoreContext.mjs → dataStoreContext.js} +174 -133
- package/lib/dataStoreContext.js.map +1 -0
- package/lib/{dataStoreContexts.d.mts → dataStoreContexts.d.ts} +2 -2
- package/lib/dataStoreContexts.d.ts.map +1 -0
- package/lib/{dataStoreContexts.mjs → dataStoreContexts.js} +1 -1
- package/lib/dataStoreContexts.js.map +1 -0
- package/lib/{dataStoreRegistry.d.mts → dataStoreRegistry.d.ts} +1 -1
- package/lib/dataStoreRegistry.d.ts.map +1 -0
- package/lib/{dataStoreRegistry.mjs → dataStoreRegistry.js} +5 -1
- package/lib/dataStoreRegistry.js.map +1 -0
- package/{dist/deltaManagerProxyBase.d.ts → lib/deltaManagerSummarizerProxy.d.ts} +16 -7
- package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -0
- package/lib/deltaManagerSummarizerProxy.js +124 -0
- package/lib/deltaManagerSummarizerProxy.js.map +1 -0
- package/lib/{deltaScheduler.d.mts → deltaScheduler.d.ts} +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -0
- package/lib/{deltaScheduler.mjs → deltaScheduler.js} +1 -1
- package/lib/deltaScheduler.js.map +1 -0
- package/lib/{error.d.mts → error.d.ts} +1 -1
- package/lib/error.d.ts.map +1 -0
- package/lib/{error.mjs → error.js} +1 -1
- package/lib/error.js.map +1 -0
- package/lib/gc/{garbageCollection.d.mts → garbageCollection.d.ts} +23 -6
- package/lib/gc/garbageCollection.d.ts.map +1 -0
- package/lib/gc/{garbageCollection.mjs → garbageCollection.js} +103 -44
- package/lib/gc/garbageCollection.js.map +1 -0
- package/lib/gc/{gcConfigs.d.mts → gcConfigs.d.ts} +3 -3
- package/lib/gc/gcConfigs.d.ts.map +1 -0
- package/lib/gc/{gcConfigs.mjs → gcConfigs.js} +3 -3
- package/lib/gc/gcConfigs.js.map +1 -0
- package/lib/gc/{gcDefinitions.d.mts → gcDefinitions.d.ts} +30 -7
- package/lib/gc/gcDefinitions.d.ts.map +1 -0
- package/lib/gc/{gcDefinitions.mjs → gcDefinitions.js} +5 -1
- package/lib/gc/gcDefinitions.js.map +1 -0
- package/lib/gc/{gcHelpers.d.mts → gcHelpers.d.ts} +3 -3
- package/lib/gc/{gcHelpers.d.mts.map → gcHelpers.d.ts.map} +1 -1
- package/lib/gc/{gcHelpers.mjs → gcHelpers.js} +1 -1
- package/lib/gc/gcHelpers.js.map +1 -0
- package/lib/gc/{gcReferenceGraphAlgorithm.d.mts → gcReferenceGraphAlgorithm.d.ts} +2 -2
- package/lib/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -0
- package/lib/gc/{gcReferenceGraphAlgorithm.mjs → gcReferenceGraphAlgorithm.js} +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -0
- package/lib/gc/{gcSummaryDefinitions.d.mts → gcSummaryDefinitions.d.ts} +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -0
- package/lib/gc/{gcSummaryDefinitions.mjs → gcSummaryDefinitions.js} +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -0
- package/lib/gc/{gcSummaryStateTracker.d.mts → gcSummaryStateTracker.d.ts} +13 -6
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -0
- package/lib/gc/{gcSummaryStateTracker.mjs → gcSummaryStateTracker.js} +17 -5
- package/lib/gc/gcSummaryStateTracker.js.map +1 -0
- package/lib/gc/{gcTelemetry.d.mts → gcTelemetry.d.ts} +8 -8
- package/lib/gc/gcTelemetry.d.ts.map +1 -0
- package/lib/gc/{gcTelemetry.mjs → gcTelemetry.js} +5 -5
- package/lib/gc/gcTelemetry.js.map +1 -0
- package/lib/gc/{gcUnreferencedStateTracker.d.mts → gcUnreferencedStateTracker.d.ts} +7 -2
- package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -0
- package/lib/gc/{gcUnreferencedStateTracker.mjs → gcUnreferencedStateTracker.js} +12 -2
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -0
- package/lib/gc/{index.d.mts → index.d.ts} +9 -9
- package/lib/gc/index.d.ts.map +1 -0
- package/lib/gc/{index.mjs → index.js} +8 -8
- package/lib/gc/index.js.map +1 -0
- package/lib/{index.d.mts → index.d.ts} +9 -21
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -0
- package/lib/{messageTypes.d.mts → messageTypes.d.ts} +5 -5
- package/lib/messageTypes.d.ts.map +1 -0
- package/lib/{messageTypes.mjs → messageTypes.js} +1 -1
- package/lib/messageTypes.js.map +1 -0
- package/lib/{metadata.d.mts → metadata.d.ts} +1 -1
- package/lib/metadata.d.ts.map +1 -0
- package/lib/{metadata.mjs → metadata.js} +1 -1
- package/lib/metadata.js.map +1 -0
- package/lib/opLifecycle/{batchManager.d.mts → batchManager.d.ts} +3 -3
- package/lib/opLifecycle/batchManager.d.ts.map +1 -0
- package/lib/opLifecycle/{batchManager.mjs → batchManager.js} +1 -1
- package/lib/opLifecycle/batchManager.js.map +1 -0
- package/lib/opLifecycle/{definitions.d.mts → definitions.d.ts} +3 -3
- package/lib/opLifecycle/definitions.d.ts.map +1 -0
- package/lib/opLifecycle/{definitions.mjs → definitions.js} +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -0
- package/lib/opLifecycle/index.d.ts +13 -0
- package/lib/opLifecycle/index.d.ts.map +1 -0
- package/lib/opLifecycle/index.js +12 -0
- package/lib/opLifecycle/index.js.map +1 -0
- package/lib/opLifecycle/{opCompressor.d.mts → opCompressor.d.ts} +2 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -0
- package/lib/opLifecycle/{opCompressor.mjs → opCompressor.js} +3 -3
- package/lib/opLifecycle/opCompressor.js.map +1 -0
- package/lib/opLifecycle/{opDecompressor.d.mts → opDecompressor.d.ts} +2 -2
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -0
- package/lib/opLifecycle/{opDecompressor.mjs → opDecompressor.js} +2 -2
- package/lib/opLifecycle/opDecompressor.js.map +1 -0
- package/lib/opLifecycle/{opGroupingManager.d.mts → opGroupingManager.d.ts} +2 -2
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -0
- package/lib/opLifecycle/{opGroupingManager.mjs → opGroupingManager.js} +2 -11
- package/lib/opLifecycle/opGroupingManager.js.map +1 -0
- package/lib/opLifecycle/{opSplitter.d.mts → opSplitter.d.ts} +2 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -0
- package/lib/opLifecycle/{opSplitter.mjs → opSplitter.js} +3 -3
- package/lib/opLifecycle/opSplitter.js.map +1 -0
- package/lib/opLifecycle/{outbox.d.mts → outbox.d.ts} +8 -8
- package/lib/opLifecycle/outbox.d.ts.map +1 -0
- package/lib/opLifecycle/{outbox.mjs → outbox.js} +12 -4
- package/lib/opLifecycle/outbox.js.map +1 -0
- package/lib/opLifecycle/{remoteMessageProcessor.d.mts → remoteMessageProcessor.d.ts} +5 -5
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -0
- package/lib/opLifecycle/{remoteMessageProcessor.mjs → remoteMessageProcessor.js} +2 -2
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -0
- package/lib/{opProperties.d.mts → opProperties.d.ts} +1 -1
- package/lib/opProperties.d.ts.map +1 -0
- package/lib/{opProperties.mjs → opProperties.js} +1 -1
- package/lib/opProperties.js.map +1 -0
- package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
- package/lib/packageVersion.js.map +1 -0
- package/lib/{pendingStateManager.d.mts → pendingStateManager.d.ts} +3 -2
- package/lib/pendingStateManager.d.ts.map +1 -0
- package/lib/{pendingStateManager.mjs → pendingStateManager.js} +18 -10
- package/lib/pendingStateManager.js.map +1 -0
- package/lib/{scheduleManager.d.mts → scheduleManager.d.ts} +6 -3
- package/lib/scheduleManager.d.ts.map +1 -0
- package/lib/{scheduleManager.mjs → scheduleManager.js} +3 -3
- package/lib/scheduleManager.js.map +1 -0
- package/lib/{storageServiceWithAttachBlobs.d.mts → storageServiceWithAttachBlobs.d.ts} +1 -1
- package/lib/storageServiceWithAttachBlobs.d.ts.map +1 -0
- package/lib/{storageServiceWithAttachBlobs.mjs → storageServiceWithAttachBlobs.js} +1 -1
- package/lib/storageServiceWithAttachBlobs.js.map +1 -0
- package/lib/summary/{index.d.mts → index.d.ts} +13 -13
- package/lib/summary/index.d.ts.map +1 -0
- package/lib/summary/{index.mjs → index.js} +12 -12
- package/lib/summary/index.js.map +1 -0
- package/lib/summary/{orderedClientElection.d.mts → orderedClientElection.d.ts} +5 -1
- package/lib/summary/orderedClientElection.d.ts.map +1 -0
- package/lib/summary/{orderedClientElection.mjs → orderedClientElection.js} +2 -2
- package/lib/summary/orderedClientElection.js.map +1 -0
- package/lib/summary/{runWhileConnectedCoordinator.d.mts → runWhileConnectedCoordinator.d.ts} +2 -2
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -0
- package/lib/summary/{runWhileConnectedCoordinator.mjs → runWhileConnectedCoordinator.js} +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -0
- package/lib/summary/{runningSummarizer.d.mts → runningSummarizer.d.ts} +12 -11
- package/lib/summary/runningSummarizer.d.ts.map +1 -0
- package/lib/summary/{runningSummarizer.mjs → runningSummarizer.js} +108 -75
- package/lib/summary/runningSummarizer.js.map +1 -0
- package/lib/summary/{summarizer.d.mts → summarizer.d.ts} +5 -5
- package/lib/summary/summarizer.d.ts.map +1 -0
- package/lib/summary/{summarizer.mjs → summarizer.js} +4 -4
- package/lib/summary/summarizer.js.map +1 -0
- package/lib/summary/{summarizerClientElection.d.mts → summarizerClientElection.d.ts} +3 -3
- package/lib/summary/summarizerClientElection.d.ts.map +1 -0
- package/lib/summary/{summarizerClientElection.mjs → summarizerClientElection.js} +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -0
- package/lib/summary/{summarizerHeuristics.d.mts → summarizerHeuristics.d.ts} +4 -4
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -0
- package/lib/summary/{summarizerHeuristics.mjs → summarizerHeuristics.js} +1 -1
- package/lib/summary/summarizerHeuristics.js.map +1 -0
- package/lib/summary/summarizerNode/{index.d.mts → index.d.ts} +4 -4
- 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.mts → summarizerNode.d.ts} +18 -8
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNode.mjs → summarizerNode.js} +41 -53
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeUtils.d.mts → summarizerNodeUtils.d.ts} +11 -20
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeUtils.mjs → summarizerNodeUtils.js} +1 -20
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeWithGc.d.mts → summarizerNodeWithGc.d.ts} +6 -7
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeWithGc.mjs → summarizerNodeWithGc.js} +12 -12
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
- package/lib/summary/{summarizerTypes.d.mts → summarizerTypes.d.ts} +11 -22
- package/lib/summary/summarizerTypes.d.ts.map +1 -0
- package/lib/summary/{summarizerTypes.mjs → summarizerTypes.js} +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -0
- package/lib/summary/{summaryCollection.d.mts → summaryCollection.d.ts} +1 -1
- package/lib/summary/summaryCollection.d.ts.map +1 -0
- package/lib/summary/{summaryCollection.mjs → summaryCollection.js} +1 -1
- package/lib/summary/summaryCollection.js.map +1 -0
- package/lib/summary/{summaryFormat.d.mts → summaryFormat.d.ts} +16 -3
- package/lib/summary/summaryFormat.d.ts.map +1 -0
- package/lib/summary/{summaryFormat.mjs → summaryFormat.js} +1 -1
- package/lib/summary/summaryFormat.js.map +1 -0
- package/lib/summary/{summaryGenerator.d.mts → summaryGenerator.d.ts} +7 -6
- package/lib/summary/summaryGenerator.d.ts.map +1 -0
- package/lib/summary/{summaryGenerator.mjs → summaryGenerator.js} +11 -2
- package/lib/summary/summaryGenerator.js.map +1 -0
- package/lib/summary/{summaryManager.d.mts → summaryManager.d.ts} +6 -7
- package/lib/summary/summaryManager.d.ts.map +1 -0
- package/lib/summary/{summaryManager.mjs → summaryManager.js} +4 -5
- package/lib/summary/summaryManager.js.map +1 -0
- package/lib/test/batchTracker.spec.js +88 -0
- package/lib/test/batchTracker.spec.js.map +1 -0
- package/lib/test/blobManager.spec.js +835 -0
- package/lib/test/blobManager.spec.js.map +1 -0
- package/lib/test/channelCollection.spec.js +141 -0
- package/lib/test/channelCollection.spec.js.map +1 -0
- package/lib/test/containerRuntime.spec.js +1748 -0
- package/lib/test/containerRuntime.spec.js.map +1 -0
- package/lib/test/dataStoreContext.spec.js +801 -0
- package/lib/test/dataStoreContext.spec.js.map +1 -0
- package/lib/test/dataStoreCreation.spec.js +312 -0
- package/lib/test/dataStoreCreation.spec.js.map +1 -0
- package/lib/test/dataStoreRegistry.spec.js +26 -0
- package/lib/test/dataStoreRegistry.spec.js.map +1 -0
- package/lib/test/fuzz/fuzzUtils.js +66 -0
- package/lib/test/fuzz/fuzzUtils.js.map +1 -0
- package/lib/test/fuzz/summarizer.fuzz.spec.js +31 -0
- package/lib/test/fuzz/summarizer.fuzz.spec.js.map +1 -0
- package/lib/test/fuzz/summarizerFuzzMocks.js +162 -0
- package/lib/test/fuzz/summarizerFuzzMocks.js.map +1 -0
- package/lib/test/fuzz/summarizerFuzzSuite.js +106 -0
- package/lib/test/fuzz/summarizerFuzzSuite.js.map +1 -0
- package/lib/test/gc/garbageCollection.spec.js +1465 -0
- package/lib/test/gc/garbageCollection.spec.js.map +1 -0
- package/lib/test/gc/gcConfigs.spec.js +690 -0
- package/lib/test/gc/gcConfigs.spec.js.map +1 -0
- package/lib/test/gc/gcHelpers.spec.js +110 -0
- package/lib/test/gc/gcHelpers.spec.js.map +1 -0
- package/lib/test/gc/gcReferenceGraphAlgorithm.spec.js +68 -0
- package/lib/test/gc/gcReferenceGraphAlgorithm.spec.js.map +1 -0
- package/lib/test/gc/gcStats.spec.js +391 -0
- package/lib/test/gc/gcStats.spec.js.map +1 -0
- package/lib/test/gc/gcSummaryStateTracker.spec.js +228 -0
- package/lib/test/gc/gcSummaryStateTracker.spec.js.map +1 -0
- package/lib/test/gc/gcTelemetry.spec.js +530 -0
- package/lib/test/gc/gcTelemetry.spec.js.map +1 -0
- package/lib/test/gc/gcUnitTestHelpers.js +29 -0
- package/lib/test/gc/gcUnitTestHelpers.js.map +1 -0
- package/lib/test/gc/gcUnreferencedStateTracker.spec.js +192 -0
- package/lib/test/gc/gcUnreferencedStateTracker.spec.js.map +1 -0
- package/lib/test/getPendingBlobs.spec.js +193 -0
- package/lib/test/getPendingBlobs.spec.js.map +1 -0
- package/lib/test/hardwareStats.spec.js +93 -0
- package/lib/test/hardwareStats.spec.js.map +1 -0
- package/lib/test/index.js +6 -0
- package/lib/test/index.js.map +1 -0
- package/lib/test/opLifecycle/OpGroupingManager.spec.js +225 -0
- package/lib/test/opLifecycle/OpGroupingManager.spec.js.map +1 -0
- package/lib/test/opLifecycle/batchManager.spec.js +189 -0
- package/lib/test/opLifecycle/batchManager.spec.js.map +1 -0
- package/lib/test/opLifecycle/opCompressor.spec.js +74 -0
- package/lib/test/opLifecycle/opCompressor.spec.js.map +1 -0
- package/lib/test/opLifecycle/opDecompressor.spec.js +218 -0
- package/lib/test/opLifecycle/opDecompressor.spec.js.map +1 -0
- package/lib/test/opLifecycle/opSplitter.spec.js +272 -0
- package/lib/test/opLifecycle/opSplitter.spec.js.map +1 -0
- package/lib/test/opLifecycle/outbox.spec.js +675 -0
- package/lib/test/opLifecycle/outbox.spec.js.map +1 -0
- package/lib/test/opLifecycle/remoteMessageProcessor.spec.js +196 -0
- package/lib/test/opLifecycle/remoteMessageProcessor.spec.js.map +1 -0
- package/lib/test/pendingStateManager.spec.js +329 -0
- package/lib/test/pendingStateManager.spec.js.map +1 -0
- package/lib/test/scheduleManager.spec.js +270 -0
- package/lib/test/scheduleManager.spec.js.map +1 -0
- package/lib/test/summarizerNode.spec.js +326 -0
- package/lib/test/summarizerNode.spec.js.map +1 -0
- package/lib/test/summarizerNodeWithGc.spec.js +318 -0
- package/lib/test/summarizerNodeWithGc.spec.js.map +1 -0
- package/lib/test/summary/orderedClientElection.spec.js +535 -0
- package/lib/test/summary/orderedClientElection.spec.js.map +1 -0
- package/lib/test/summary/runningSummarizer.spec.js +1349 -0
- package/lib/test/summary/runningSummarizer.spec.js.map +1 -0
- package/lib/test/summary/summarizer.spec.js +29 -0
- package/lib/test/summary/summarizer.spec.js.map +1 -0
- package/lib/test/summary/summarizerClientElection.spec.js +436 -0
- package/lib/test/summary/summarizerClientElection.spec.js.map +1 -0
- package/lib/test/summary/summarizerHeuristics.spec.js +289 -0
- package/lib/test/summary/summarizerHeuristics.spec.js.map +1 -0
- package/lib/test/summary/summaryCollection.spec.js +200 -0
- package/lib/test/summary/summaryCollection.spec.js.map +1 -0
- package/lib/test/summary/summaryManager.spec.js +430 -0
- package/lib/test/summary/summaryManager.spec.js.map +1 -0
- package/lib/test/summary/testQuorumClients.js +34 -0
- package/lib/test/summary/testQuorumClients.js.map +1 -0
- package/lib/test/throttler.spec.js +175 -0
- package/lib/test/throttler.spec.js.map +1 -0
- package/lib/test/types/validateContainerRuntimePrevious.generated.js +180 -0
- package/lib/test/types/validateContainerRuntimePrevious.generated.js.map +1 -0
- package/lib/{throttler.d.mts → throttler.d.ts} +1 -1
- package/lib/throttler.d.ts.map +1 -0
- package/lib/{throttler.mjs → throttler.js} +1 -1
- package/lib/throttler.js.map +1 -0
- package/package.json +99 -88
- package/src/batchTracker.ts +1 -1
- package/src/blobManager.ts +1 -1
- package/src/{dataStores.ts → channelCollection.ts} +520 -84
- package/src/connectionTelemetry.ts +42 -3
- package/src/containerHandleContext.ts +1 -1
- package/src/containerRuntime.ts +661 -464
- package/src/dataStore.ts +13 -15
- package/src/dataStoreContext.ts +257 -184
- package/src/dataStoreContexts.ts +1 -1
- package/src/deltaManagerSummarizerProxy.ts +132 -7
- package/src/gc/garbageCollection.ts +121 -46
- package/src/gc/gcConfigs.ts +3 -3
- package/src/gc/gcDefinitions.ts +30 -7
- package/src/gc/gcHelpers.ts +2 -2
- package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
- package/src/gc/gcSummaryStateTracker.ts +19 -7
- package/src/gc/gcTelemetry.ts +10 -9
- package/src/gc/gcUnreferencedStateTracker.ts +12 -1
- package/src/gc/index.ts +10 -8
- package/src/index.ts +16 -27
- package/src/messageTypes.ts +4 -4
- package/src/opLifecycle/README.md +2 -4
- package/src/opLifecycle/batchManager.ts +2 -2
- package/src/opLifecycle/definitions.ts +2 -2
- package/src/opLifecycle/index.ts +8 -8
- package/src/opLifecycle/opCompressor.ts +3 -3
- package/src/opLifecycle/opDecompressor.ts +3 -3
- package/src/opLifecycle/opGroupingManager.ts +3 -12
- package/src/opLifecycle/opSplitter.ts +3 -3
- package/src/opLifecycle/outbox.ts +29 -9
- package/src/opLifecycle/remoteMessageProcessor.ts +4 -4
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +19 -13
- package/src/scheduleManager.ts +4 -4
- package/src/summary/index.ts +13 -12
- package/src/summary/orderedClientElection.ts +1 -1
- package/src/summary/runWhileConnectedCoordinator.ts +1 -1
- package/src/summary/runningSummarizer.ts +141 -93
- package/src/summary/summarizer.ts +7 -7
- package/src/summary/summarizerClientElection.ts +2 -2
- package/src/summary/summarizerHeuristics.ts +3 -3
- package/src/summary/summarizerNode/index.ts +6 -3
- package/src/summary/summarizerNode/summarizerNode.ts +54 -69
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +16 -34
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +11 -17
- package/src/summary/summarizerTypes.ts +12 -24
- package/src/summary/summaryFormat.ts +16 -2
- package/src/summary/summaryGenerator.ts +16 -4
- package/src/summary/summaryManager.ts +6 -7
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/dist/dataStores.d.ts +0 -149
- package/dist/dataStores.d.ts.map +0 -1
- package/dist/dataStores.js.map +0 -1
- package/dist/deltaManagerProxyBase.d.ts.map +0 -1
- package/dist/deltaManagerProxyBase.js +0 -77
- package/dist/deltaManagerProxyBase.js.map +0 -1
- package/lib/batchTracker.d.mts.map +0 -1
- package/lib/batchTracker.mjs.map +0 -1
- package/lib/blobManager.d.mts.map +0 -1
- package/lib/blobManager.mjs.map +0 -1
- package/lib/connectionTelemetry.d.mts.map +0 -1
- package/lib/connectionTelemetry.mjs.map +0 -1
- package/lib/containerHandleContext.d.mts.map +0 -1
- package/lib/containerHandleContext.mjs.map +0 -1
- package/lib/containerRuntime.d.mts.map +0 -1
- package/lib/containerRuntime.mjs.map +0 -1
- package/lib/dataStore.d.mts.map +0 -1
- package/lib/dataStore.mjs.map +0 -1
- package/lib/dataStoreContext.d.mts.map +0 -1
- package/lib/dataStoreContext.mjs.map +0 -1
- package/lib/dataStoreContexts.d.mts.map +0 -1
- package/lib/dataStoreContexts.mjs.map +0 -1
- package/lib/dataStoreRegistry.d.mts.map +0 -1
- package/lib/dataStoreRegistry.mjs.map +0 -1
- package/lib/dataStores.d.mts +0 -149
- package/lib/dataStores.d.mts.map +0 -1
- package/lib/dataStores.mjs.map +0 -1
- package/lib/deltaManagerProxyBase.d.mts +0 -35
- package/lib/deltaManagerProxyBase.d.mts.map +0 -1
- package/lib/deltaManagerProxyBase.mjs +0 -73
- package/lib/deltaManagerProxyBase.mjs.map +0 -1
- package/lib/deltaManagerSummarizerProxy.d.mts +0 -19
- package/lib/deltaManagerSummarizerProxy.d.mts.map +0 -1
- package/lib/deltaManagerSummarizerProxy.mjs +0 -38
- package/lib/deltaManagerSummarizerProxy.mjs.map +0 -1
- package/lib/deltaScheduler.d.mts.map +0 -1
- package/lib/deltaScheduler.mjs.map +0 -1
- package/lib/error.d.mts.map +0 -1
- package/lib/error.mjs.map +0 -1
- package/lib/gc/garbageCollection.d.mts.map +0 -1
- package/lib/gc/garbageCollection.mjs.map +0 -1
- package/lib/gc/gcConfigs.d.mts.map +0 -1
- package/lib/gc/gcConfigs.mjs.map +0 -1
- package/lib/gc/gcDefinitions.d.mts.map +0 -1
- package/lib/gc/gcDefinitions.mjs.map +0 -1
- package/lib/gc/gcHelpers.mjs.map +0 -1
- package/lib/gc/gcReferenceGraphAlgorithm.d.mts.map +0 -1
- package/lib/gc/gcReferenceGraphAlgorithm.mjs.map +0 -1
- package/lib/gc/gcSummaryDefinitions.d.mts.map +0 -1
- package/lib/gc/gcSummaryDefinitions.mjs.map +0 -1
- package/lib/gc/gcSummaryStateTracker.d.mts.map +0 -1
- package/lib/gc/gcSummaryStateTracker.mjs.map +0 -1
- package/lib/gc/gcTelemetry.d.mts.map +0 -1
- package/lib/gc/gcTelemetry.mjs.map +0 -1
- package/lib/gc/gcUnreferencedStateTracker.d.mts.map +0 -1
- package/lib/gc/gcUnreferencedStateTracker.mjs.map +0 -1
- package/lib/gc/index.d.mts.map +0 -1
- package/lib/gc/index.mjs.map +0 -1
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs +0 -24
- package/lib/index.mjs.map +0 -1
- package/lib/messageTypes.d.mts.map +0 -1
- package/lib/messageTypes.mjs.map +0 -1
- package/lib/metadata.d.mts.map +0 -1
- package/lib/metadata.mjs.map +0 -1
- package/lib/opLifecycle/batchManager.d.mts.map +0 -1
- package/lib/opLifecycle/batchManager.mjs.map +0 -1
- package/lib/opLifecycle/definitions.d.mts.map +0 -1
- package/lib/opLifecycle/definitions.mjs.map +0 -1
- package/lib/opLifecycle/index.d.mts +0 -13
- package/lib/opLifecycle/index.d.mts.map +0 -1
- package/lib/opLifecycle/index.mjs +0 -12
- package/lib/opLifecycle/index.mjs.map +0 -1
- package/lib/opLifecycle/opCompressor.d.mts.map +0 -1
- package/lib/opLifecycle/opCompressor.mjs.map +0 -1
- package/lib/opLifecycle/opDecompressor.d.mts.map +0 -1
- package/lib/opLifecycle/opDecompressor.mjs.map +0 -1
- package/lib/opLifecycle/opGroupingManager.d.mts.map +0 -1
- package/lib/opLifecycle/opGroupingManager.mjs.map +0 -1
- package/lib/opLifecycle/opSplitter.d.mts.map +0 -1
- package/lib/opLifecycle/opSplitter.mjs.map +0 -1
- package/lib/opLifecycle/outbox.d.mts.map +0 -1
- package/lib/opLifecycle/outbox.mjs.map +0 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.mts.map +0 -1
- package/lib/opLifecycle/remoteMessageProcessor.mjs.map +0 -1
- package/lib/opProperties.d.mts.map +0 -1
- package/lib/opProperties.mjs.map +0 -1
- package/lib/packageVersion.d.mts.map +0 -1
- package/lib/packageVersion.mjs.map +0 -1
- package/lib/pendingStateManager.d.mts.map +0 -1
- package/lib/pendingStateManager.mjs.map +0 -1
- package/lib/scheduleManager.d.mts.map +0 -1
- package/lib/scheduleManager.mjs.map +0 -1
- package/lib/storageServiceWithAttachBlobs.d.mts.map +0 -1
- package/lib/storageServiceWithAttachBlobs.mjs.map +0 -1
- package/lib/summary/index.d.mts.map +0 -1
- package/lib/summary/index.mjs.map +0 -1
- package/lib/summary/orderedClientElection.d.mts.map +0 -1
- package/lib/summary/orderedClientElection.mjs.map +0 -1
- package/lib/summary/runWhileConnectedCoordinator.d.mts.map +0 -1
- package/lib/summary/runWhileConnectedCoordinator.mjs.map +0 -1
- package/lib/summary/runningSummarizer.d.mts.map +0 -1
- package/lib/summary/runningSummarizer.mjs.map +0 -1
- package/lib/summary/summarizer.d.mts.map +0 -1
- package/lib/summary/summarizer.mjs.map +0 -1
- package/lib/summary/summarizerClientElection.d.mts.map +0 -1
- package/lib/summary/summarizerClientElection.mjs.map +0 -1
- package/lib/summary/summarizerHeuristics.d.mts.map +0 -1
- package/lib/summary/summarizerHeuristics.mjs.map +0 -1
- package/lib/summary/summarizerNode/index.d.mts.map +0 -1
- package/lib/summary/summarizerNode/index.mjs +0 -7
- package/lib/summary/summarizerNode/index.mjs.map +0 -1
- package/lib/summary/summarizerNode/summarizerNode.d.mts.map +0 -1
- package/lib/summary/summarizerNode/summarizerNode.mjs.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.mts.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.mjs.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.mts.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.mjs.map +0 -1
- package/lib/summary/summarizerTypes.d.mts.map +0 -1
- package/lib/summary/summarizerTypes.mjs.map +0 -1
- package/lib/summary/summaryCollection.d.mts.map +0 -1
- package/lib/summary/summaryCollection.mjs.map +0 -1
- package/lib/summary/summaryFormat.d.mts.map +0 -1
- package/lib/summary/summaryFormat.mjs.map +0 -1
- package/lib/summary/summaryGenerator.d.mts.map +0 -1
- package/lib/summary/summaryGenerator.mjs.map +0 -1
- package/lib/summary/summaryManager.d.mts.map +0 -1
- package/lib/summary/summaryManager.mjs.map +0 -1
- package/lib/throttler.d.mts.map +0 -1
- package/lib/throttler.mjs.map +0 -1
- package/src/deltaManagerProxyBase.ts +0 -111
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContext.mjs","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAUI,EAGN,WAAW,GAEX,MAAM,uCAAuC;OACvC,EAAE,iBAAiB,EAAE,MAAM,8BAA8B;OACzD,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,4BAA4B;OAEnE,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8BAA8B;OAUnE,EACN,gBAAgB,EAqBhB,eAAe,GACf,MAAM,qCAAqC;OACrC,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,+BAA+B;OACpF,EACN,4BAA4B,EAC5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,CAAC,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1D,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,OAAO,EAAE,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAErF,MAAM,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACvF,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAE/B,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QAEpC,6GAA6G;QAC7G,yGAAyG;QACzG,+FAA+F;QAC/F,2GAA2G;QAC3G,6GAA6G;QAC7G,yGAAyG;QACzG,qCAAqC;QACrC,MAAM,gBAAgB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAExC,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE;YACxB,gBAAgB,CAAC,yBAAyB,EAAE,CAAC;SAC7C;IACF,CAAC;IAEM,KAAK,CAAC,yBAAyB;QACrC,IAAI,IAAI,CAAC,uBAAuB,EAAE;YACjC,MAAM,IAAI,KAAK,CACd,mFAAmF,CACnF,CAAC;SACF;QACD,OAAO,KAAK,CAAC,yBAAyB,EAAE,CAAC;IAC1C,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDisposable,\n\tFluidObject,\n\tIRequest,\n\tIResponse,\n\tIFluidHandle,\n\tITelemetryProperties,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { assert, Deferred, LazyPromise } from \"@fluidframework/core-utils\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { BlobTreeEntry, readAndParse } from \"@fluidframework/driver-utils\";\nimport {\n\tIClientDetails,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tITreeEntry,\n} from \"@fluidframework/protocol-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport {\n\tchannelsTreeName,\n\tCreateChildSummarizerNodeFn,\n\tCreateChildSummarizerNodeParam,\n\tFluidDataStoreRegistryEntry,\n\tIAttachMessage,\n\tIFluidDataStoreChannel,\n\tIFluidDataStoreContext,\n\tIFluidDataStoreContextDetached,\n\tIFluidDataStoreContextEvents,\n\tIFluidDataStoreRegistry,\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n\tIInboundSignalMessage,\n\tIProvideFluidDataStoreFactory,\n\tISummarizeInternalResult,\n\tISummarizeResult,\n\tISummarizerNodeWithGC,\n\tSummarizeInternalFn,\n\tITelemetryContext,\n\tIIdCompressor,\n\tIIdCompressorCore,\n\tVisibilityState,\n} from \"@fluidframework/runtime-definitions\";\nimport { addBlobToSummary, convertSummaryTreeToITree } from \"@fluidframework/runtime-utils\";\nimport {\n\tcreateChildMonitoringContext,\n\tDataCorruptionError,\n\tDataProcessingError,\n\textractSafePropertiesFromMessage,\n\tgenerateStack,\n\tITelemetryLoggerExt,\n\tLoggingError,\n\tMonitoringContext,\n\ttagCodeArtifacts,\n\tThresholdCounter,\n} from \"@fluidframework/telemetry-utils\";\nimport {\n\tdataStoreAttributesBlobName,\n\thasIsolatedChannels,\n\twrapSummaryInChannelsTree,\n\tReadFluidDataStoreAttributes,\n\tWriteFluidDataStoreAttributes,\n\tgetAttributesFormatVersion,\n\tgetFluidDataStoreAttributes,\n\tsummarizerClientType,\n} from \"./summary\";\nimport { ContainerRuntime } from \"./containerRuntime\";\nimport { detectOutboundRoutesViaDDSKey, sendGCUnexpectedUsageEvent } from \"./gc\";\n\nfunction createAttributes(\n\tpkg: readonly string[],\n\tisRootDataStore: boolean,\n): WriteFluidDataStoreAttributes {\n\tconst stringifiedPkg = JSON.stringify(pkg);\n\treturn {\n\t\tpkg: stringifiedPkg,\n\t\tsummaryFormatVersion: 2,\n\t\tisRootDataStore,\n\t};\n}\nexport function createAttributesBlob(pkg: readonly string[], isRootDataStore: boolean): ITreeEntry {\n\tconst attributes = createAttributes(pkg, isRootDataStore);\n\treturn new BlobTreeEntry(dataStoreAttributesBlobName, JSON.stringify(attributes));\n}\n\ninterface ISnapshotDetails {\n\tpkg: readonly string[];\n\tisRootDataStore: boolean;\n\tsnapshot?: ISnapshotTree;\n}\n\ninterface FluidDataStoreMessage {\n\tcontent: any;\n\ttype: string;\n}\n\n/** Properties necessary for creating a FluidDataStoreContext */\nexport interface IFluidDataStoreContextProps {\n\treadonly id: string;\n\treadonly runtime: ContainerRuntime;\n\treadonly storage: IDocumentStorageService;\n\treadonly scope: FluidObject;\n\treadonly createSummarizerNodeFn: CreateChildSummarizerNodeFn;\n\treadonly pkg?: Readonly<string[]>;\n}\n\n/** Properties necessary for creating a local FluidDataStoreContext */\nexport interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContextProps {\n\treadonly pkg: Readonly<string[]> | undefined;\n\treadonly snapshotTree: ISnapshotTree | undefined;\n\treadonly isRootDataStore: boolean | undefined;\n\treadonly makeLocallyVisibleFn: () => void;\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\treadonly createProps?: any;\n}\n\n/** Properties necessary for creating a remote FluidDataStoreContext */\nexport interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContextProps {\n\treadonly snapshotTree: ISnapshotTree | undefined;\n}\n\n/**\n * Represents the context for the store. This context is passed to the store runtime.\n */\nexport abstract class FluidDataStoreContext\n\textends TypedEventEmitter<IFluidDataStoreContextEvents>\n\timplements IFluidDataStoreContext, IDisposable\n{\n\tpublic get packagePath(): readonly string[] {\n\t\tassert(this.pkg !== undefined, 0x139 /* \"Undefined package path\" */);\n\t\treturn this.pkg;\n\t}\n\n\tpublic get options(): ILoaderOptions {\n\t\treturn this._containerRuntime.options;\n\t}\n\n\tpublic get clientId(): string | undefined {\n\t\treturn this._containerRuntime.clientId;\n\t}\n\n\tpublic get clientDetails(): IClientDetails {\n\t\treturn this._containerRuntime.clientDetails;\n\t}\n\n\tpublic get logger(): ITelemetryLoggerExt {\n\t\treturn this._containerRuntime.logger;\n\t}\n\n\tpublic get deltaManager(): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {\n\t\treturn this._containerRuntime.deltaManager;\n\t}\n\n\tpublic get connected(): boolean {\n\t\treturn this._containerRuntime.connected;\n\t}\n\n\tpublic get IFluidHandleContext() {\n\t\treturn this._containerRuntime.IFluidHandleContext;\n\t}\n\n\tpublic get containerRuntime(): IContainerRuntime {\n\t\treturn this._containerRuntime;\n\t}\n\n\tpublic ensureNoDataModelChanges<T>(callback: () => T): T {\n\t\treturn this._containerRuntime.ensureNoDataModelChanges(callback);\n\t}\n\n\tpublic get isLoaded(): boolean {\n\t\treturn this.loaded;\n\t}\n\n\tpublic get baseSnapshot(): ISnapshotTree | undefined {\n\t\treturn this._baseSnapshot;\n\t}\n\n\tpublic get idCompressor(): (IIdCompressorCore & IIdCompressor) | undefined {\n\t\treturn this._containerRuntime.idCompressor;\n\t}\n\n\tprivate _disposed = false;\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\n\t/**\n\t * A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.\n\t * Tombstoned objects are eventually deleted by GC.\n\t */\n\tprivate _tombstoned = false;\n\tpublic get tombstoned() {\n\t\treturn this._tombstoned;\n\t}\n\t/** If true, throw an error when a tombstone data store is used. */\n\tprivate readonly throwOnTombstoneUsage: boolean;\n\n\t/** If true, this means that this data store context and its children have been removed from the runtime */\n\tprivate deleted: boolean = false;\n\n\tpublic get attachState(): AttachState {\n\t\treturn this._attachState;\n\t}\n\n\tpublic get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined {\n\t\treturn this.registry;\n\t}\n\n\t/**\n\t * A datastore is considered as root if it\n\t * 1. is root in memory - see isInMemoryRoot\n\t * 2. is root as part of the base snapshot that the datastore loaded from\n\t * @returns whether a datastore is root\n\t */\n\tpublic async isRoot(): Promise<boolean> {\n\t\treturn this.isInMemoryRoot() || (await this.getInitialSnapshotDetails()).isRootDataStore;\n\t}\n\n\t/**\n\t * There are 3 states where isInMemoryRoot needs to be true\n\t * 1. when a datastore becomes aliased. This can happen for both remote and local datastores\n\t * 2. when a datastore is created locally as root\n\t * 3. when a datastore is created locally as root and is rehydrated\n\t * @returns whether a datastore is root in memory\n\t */\n\tprotected isInMemoryRoot(): boolean {\n\t\treturn this._isInMemoryRoot;\n\t}\n\n\tprotected registry: IFluidDataStoreRegistry | undefined;\n\n\tprotected detachedRuntimeCreation = false;\n\tprotected channel: IFluidDataStoreChannel | undefined;\n\tprivate loaded = false;\n\tprotected pending: ISequencedDocumentMessage[] | undefined = [];\n\tprotected channelDeferred: Deferred<IFluidDataStoreChannel> | undefined;\n\tprivate _baseSnapshot: ISnapshotTree | undefined;\n\tprotected _attachState: AttachState;\n\tprivate _isInMemoryRoot: boolean = false;\n\tprotected readonly summarizerNode: ISummarizerNodeWithGC;\n\tprotected readonly mc: MonitoringContext;\n\tprivate readonly thresholdOpsCounter: ThresholdCounter;\n\tprivate static readonly pendingOpsCountThreshold = 1000;\n\n\t/**\n\t * If the summarizer makes local changes, a telemetry event is logged. This has the potential to be very noisy.\n\t * So, adding a count of how many telemetry events are logged per data store context. This can be\n\t * controlled via feature flags.\n\t */\n\tprivate localChangesTelemetryCount: number;\n\n\t// The used routes of this node as per the last GC run. This is used to update the used routes of the channel\n\t// if it realizes after GC is run.\n\tprivate lastUsedRoutes: string[] | undefined;\n\n\tpublic readonly id: string;\n\tprivate readonly _containerRuntime: ContainerRuntime;\n\tpublic readonly storage: IDocumentStorageService;\n\tpublic readonly scope: FluidObject;\n\tprotected pkg?: readonly string[];\n\n\tconstructor(\n\t\tprops: IFluidDataStoreContextProps,\n\t\tprivate readonly existing: boolean,\n\t\tpublic readonly isLocalDataStore: boolean,\n\t\tprivate readonly makeLocallyVisibleFn: () => void,\n\t) {\n\t\tsuper();\n\n\t\tthis._containerRuntime = props.runtime;\n\t\tthis.id = props.id;\n\t\tthis.storage = props.storage;\n\t\tthis.scope = props.scope;\n\t\tthis.pkg = props.pkg;\n\n\t\t// URIs use slashes as delimiters. Handles use URIs.\n\t\t// Thus having slashes in types almost guarantees trouble down the road!\n\t\tassert(!this.id.includes(\"/\"), 0x13a /* Data store ID contains slash */);\n\n\t\tthis._attachState =\n\t\t\tthis.containerRuntime.attachState !== AttachState.Detached && this.existing\n\t\t\t\t? this.containerRuntime.attachState\n\t\t\t\t: AttachState.Detached;\n\n\t\tconst thisSummarizeInternal = async (\n\t\t\tfullTree: boolean,\n\t\t\ttrackState: boolean,\n\t\t\ttelemetryContext?: ITelemetryContext,\n\t\t) => this.summarizeInternal(fullTree, trackState, telemetryContext);\n\n\t\tthis.summarizerNode = props.createSummarizerNodeFn(\n\t\t\tthisSummarizeInternal,\n\t\t\tasync (fullGC?: boolean) => this.getGCDataInternal(fullGC),\n\t\t);\n\n\t\tthis.mc = createChildMonitoringContext({\n\t\t\tlogger: this.logger,\n\t\t\tnamespace: \"FluidDataStoreContext\",\n\t\t\tproperties: {\n\t\t\t\tall: tagCodeArtifacts({\n\t\t\t\t\tfluidDataStoreId: this.id,\n\t\t\t\t\t// The package name is a getter because `this.pkg` may not be initialized during construction.\n\t\t\t\t\t// For data stores loaded from summary, it is initialized during data store realization.\n\t\t\t\t\tfullPackageName: () => this.pkg?.join(\"/\"),\n\t\t\t\t}),\n\t\t\t},\n\t\t});\n\t\tthis.thresholdOpsCounter = new ThresholdCounter(\n\t\t\tFluidDataStoreContext.pendingOpsCountThreshold,\n\t\t\tthis.mc.logger,\n\t\t);\n\n\t\tthis.throwOnTombstoneUsage = this._containerRuntime.gcThrowOnTombstoneUsage;\n\n\t\t// By default, a data store can log maximum 10 local changes telemetry in summarizer.\n\t\tthis.localChangesTelemetryCount =\n\t\t\tthis.mc.config.getNumber(\"Fluid.Telemetry.LocalChangesTelemetryCount\") ?? 10;\n\t}\n\n\tpublic dispose(): void {\n\t\tif (this._disposed) {\n\t\t\treturn;\n\t\t}\n\t\tthis._disposed = true;\n\n\t\t// Dispose any pending runtime after it gets fulfilled\n\t\t// Errors are logged where this.channelDeferred is consumed/generated (realizeCore(), bindRuntime())\n\t\tif (this.channelDeferred) {\n\t\t\tthis.channelDeferred.promise\n\t\t\t\t.then((runtime) => {\n\t\t\t\t\truntime.dispose();\n\t\t\t\t})\n\t\t\t\t.catch((error) => {});\n\t\t}\n\t}\n\n\t/**\n\t * When delete is called, that means that the data store is permanently removed from the runtime, and will not show up in future summaries\n\t * This function is called to prevent ops from being generated from this data store once it has been deleted. Furthermore, this data store\n\t * should not receive any ops/signals.\n\t */\n\tpublic delete() {\n\t\tthis.deleted = true;\n\t}\n\n\tpublic setTombstone(tombstone: boolean) {\n\t\tif (this.tombstoned === tombstone) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._tombstoned = tombstone;\n\t}\n\n\tprivate rejectDeferredRealize(\n\t\treason: string,\n\t\tfailedPkgPath?: string,\n\t\tfullPackageName?: readonly string[],\n\t): never {\n\t\tthrow new LoggingError(\n\t\t\treason,\n\t\t\ttagCodeArtifacts({\n\t\t\t\tfailedPkgPath,\n\t\t\t\tpackagePath: fullPackageName?.join(\"/\"),\n\t\t\t}),\n\t\t);\n\t}\n\n\tpublic async realize(): Promise<IFluidDataStoreChannel> {\n\t\tassert(!this.detachedRuntimeCreation, 0x13d /* \"Detached runtime creation on realize()\" */);\n\t\tif (!this.channelDeferred) {\n\t\t\tthis.channelDeferred = new Deferred<IFluidDataStoreChannel>();\n\t\t\tthis.realizeCore(this.existing).catch((error) => {\n\t\t\t\tconst errorWrapped = DataProcessingError.wrapIfUnrecognized(\n\t\t\t\t\terror,\n\t\t\t\t\t\"realizeFluidDataStoreContext\",\n\t\t\t\t);\n\t\t\t\terrorWrapped.addTelemetryProperties(\n\t\t\t\t\ttagCodeArtifacts({\n\t\t\t\t\t\tfullPackageName: this.pkg?.join(\"/\"),\n\t\t\t\t\t\tfluidDataStoreId: this.id,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\tthis.channelDeferred?.reject(errorWrapped);\n\t\t\t\tthis.mc.logger.sendErrorEvent({ eventName: \"RealizeError\" }, errorWrapped);\n\t\t\t});\n\t\t}\n\t\treturn this.channelDeferred.promise;\n\t}\n\n\tprotected async factoryFromPackagePath(packages?: readonly string[]) {\n\t\tassert(this.pkg === packages, 0x13e /* \"Unexpected package path\" */);\n\t\tif (packages === undefined) {\n\t\t\tthis.rejectDeferredRealize(\"packages is undefined\");\n\t\t}\n\n\t\tlet entry: FluidDataStoreRegistryEntry | undefined;\n\t\tlet registry: IFluidDataStoreRegistry | undefined =\n\t\t\tthis._containerRuntime.IFluidDataStoreRegistry;\n\t\tlet lastPkg: string | undefined;\n\t\tfor (const pkg of packages) {\n\t\t\tif (!registry) {\n\t\t\t\tthis.rejectDeferredRealize(\"No registry for package\", lastPkg, packages);\n\t\t\t}\n\t\t\tlastPkg = pkg;\n\t\t\tentry = await registry.get(pkg);\n\t\t\tif (!entry) {\n\t\t\t\tthis.rejectDeferredRealize(\n\t\t\t\t\t\"Registry does not contain entry for the package\",\n\t\t\t\t\tpkg,\n\t\t\t\t\tpackages,\n\t\t\t\t);\n\t\t\t}\n\t\t\tregistry = entry.IFluidDataStoreRegistry;\n\t\t}\n\t\tconst factory = entry?.IFluidDataStoreFactory;\n\t\tif (factory === undefined) {\n\t\t\tthis.rejectDeferredRealize(\"Can't find factory for package\", lastPkg, packages);\n\t\t}\n\n\t\treturn { factory, registry };\n\t}\n\n\tprivate async realizeCore(existing: boolean): Promise<void> {\n\t\tconst details = await this.getInitialSnapshotDetails();\n\t\t// Base snapshot is the baseline where pending ops are applied to.\n\t\t// It is important that this be in sync with the pending ops, and also\n\t\t// that it is set here, before bindRuntime is called.\n\t\tthis._baseSnapshot = details.snapshot;\n\t\tconst packages = details.pkg;\n\n\t\tconst { factory, registry } = await this.factoryFromPackagePath(packages);\n\n\t\tassert(\n\t\t\tthis.registry === undefined,\n\t\t\t0x13f /* \"datastore context registry is already set\" */,\n\t\t);\n\t\tthis.registry = registry;\n\n\t\tconst channel = await factory.instantiateDataStore(this, existing);\n\t\tassert(channel !== undefined, 0x140 /* \"undefined channel on datastore context\" */);\n\t\tthis.bindRuntime(channel);\n\t\t// This data store may have been disposed before the channel is created during realization. If so,\n\t\t// dispose the channel now.\n\t\tif (this.disposed) {\n\t\t\tchannel.dispose();\n\t\t}\n\t}\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. Its old ID when in disconnected state and\n\t * its new client ID when we are connecting or connected.\n\t */\n\tpublic setConnectionState(connected: boolean, clientId?: string) {\n\t\t// ConnectionState should not fail in tombstone mode as this is internally run\n\t\tthis.verifyNotClosed(\"setConnectionState\", false /* checkTombstone */);\n\n\t\t// Connection events are ignored if the store is not yet loaded\n\t\tif (!this.loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tassert(this.connected === connected, 0x141 /* \"Unexpected connected state\" */);\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tthis.channel!.setConnectionState(connected, clientId);\n\t}\n\n\tpublic process(\n\t\tmessageArg: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t): void {\n\t\tconst safeTelemetryProps = extractSafePropertiesFromMessage(messageArg);\n\t\t// On op process, tombstone error is logged in garbage collector. So, set \"checkTombstone\" to false when calling\n\t\t// \"verifyNotClosed\" which logs tombstone errors. Throw error if tombstoned and throwing on load is configured.\n\t\tthis.verifyNotClosed(\"process\", false /* checkTombstone */, safeTelemetryProps);\n\t\tif (this.tombstoned && this.throwOnTombstoneUsage) {\n\t\t\tthrow new DataCorruptionError(\n\t\t\t\t\"Context is tombstoned! Call site [process]\",\n\t\t\t\tsafeTelemetryProps,\n\t\t\t);\n\t\t}\n\n\t\tconst innerContents = messageArg.contents as FluidDataStoreMessage;\n\t\tconst message = {\n\t\t\t...messageArg,\n\t\t\ttype: innerContents.type,\n\t\t\tcontents: innerContents.content,\n\t\t};\n\n\t\tthis.summarizerNode.recordChange(message);\n\n\t\tif (this.loaded) {\n\t\t\treturn this.channel?.process(message, local, localOpMetadata);\n\t\t} else {\n\t\t\tassert(!local, 0x142 /* \"local store channel is not loaded\" */);\n\t\t\tassert(this.pending !== undefined, 0x23d /* \"pending is undefined\" */);\n\t\t\tthis.pending.push(message);\n\t\t\tthis.thresholdOpsCounter.sendIfMultiple(\"StorePendingOps\", this.pending.length);\n\t\t}\n\t}\n\n\tpublic processSignal(message: IInboundSignalMessage, local: boolean): void {\n\t\tthis.verifyNotClosed(\"processSignal\");\n\n\t\t// Signals are ignored if the store is not yet loaded\n\t\tif (!this.loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.channel?.processSignal(message, local);\n\t}\n\n\tpublic getQuorum(): IQuorumClients {\n\t\treturn this._containerRuntime.getQuorum();\n\t}\n\n\tpublic getAudience(): IAudience {\n\t\treturn this._containerRuntime.getAudience();\n\t}\n\n\t/**\n\t * Returns a summary at the current sequence number.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree\n\t * @param trackState - This tells whether we should track state from this summary.\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tpublic async summarize(\n\t\tfullTree: boolean = false,\n\t\ttrackState: boolean = true,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult> {\n\t\treturn this.summarizerNode.summarize(fullTree, trackState, telemetryContext);\n\t}\n\n\tprivate async summarizeInternal(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeInternalResult> {\n\t\tawait this.realize();\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tconst summarizeResult = await this.channel!.summarize(\n\t\t\tfullTree,\n\t\t\ttrackState,\n\t\t\ttelemetryContext,\n\t\t);\n\n\t\t// Wrap dds summaries in .channels subtree.\n\t\twrapSummaryInChannelsTree(summarizeResult);\n\t\tconst pathPartsForChildren = [channelsTreeName];\n\n\t\t// Add data store's attributes to the summary.\n\t\tconst { pkg } = await this.getInitialSnapshotDetails();\n\t\tconst isRoot = await this.isRoot();\n\t\tconst attributes = createAttributes(pkg, isRoot);\n\t\taddBlobToSummary(summarizeResult, dataStoreAttributesBlobName, JSON.stringify(attributes));\n\n\t\t// If we are not referenced, mark the summary tree as unreferenced. Also, update unreferenced blob\n\t\t// size in the summary stats with the blobs size of this data store.\n\t\tif (!this.summarizerNode.isReferenced()) {\n\t\t\tsummarizeResult.summary.unreferenced = true;\n\t\t\tsummarizeResult.stats.unreferencedBlobSize = summarizeResult.stats.totalBlobSize;\n\t\t}\n\n\t\treturn {\n\t\t\t...summarizeResult,\n\t\t\tid: this.id,\n\t\t\tpathPartsForChildren,\n\t\t};\n\t}\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this data store\n\t * including any of its child channel contexts. Each node has a set of outbound routes to other GC nodes in the\n\t * document.\n\t * If there is no new data in this data store since the last summary, previous GC data is used.\n\t * If there is new data, the GC data is generated again (by calling getGCDataInternal).\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tpublic async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\treturn this.summarizerNode.getGCData(fullGC);\n\t}\n\n\t/**\n\t * Generates data used for garbage collection. This is called when there is new data since last summary. It\n\t * realizes the data store and calls into each channel context to get its GC data.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tprivate async getGCDataInternal(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\tawait this.realize();\n\t\tassert(\n\t\t\tthis.channel !== undefined,\n\t\t\t0x143 /* \"Channel should not be undefined when running GC\" */,\n\t\t);\n\n\t\treturn this.channel.getGCData(fullGC);\n\t}\n\n\t/**\n\t * After GC has run, called to notify the data store of routes used in it. These are used for the following:\n\t *\n\t * 1. To identify if this data store is being referenced in the document or not.\n\t *\n\t * 2. To determine if it needs to re-summarize in case used routes changed since last summary.\n\t *\n\t * 3. These are added to the summary generated by the data store.\n\t *\n\t * 4. To notify child contexts of their used routes. This is done immediately if the data store is loaded.\n\t * Else, it is done when realizing the data store.\n\t *\n\t * 5. To update the timestamp when this data store or any children are marked as unreferenced.\n\t *\n\t * @param usedRoutes - The routes that are used in this data store.\n\t */\n\tpublic updateUsedRoutes(usedRoutes: string[]) {\n\t\t// Update the used routes in this data store's summarizer node.\n\t\tthis.summarizerNode.updateUsedRoutes(usedRoutes);\n\n\t\t/**\n\t\t * Store the used routes to update the channel if the data store is not loaded yet. If the used routes changed\n\t\t * since the previous run, the data store will be loaded during summarize since the used state changed. So, it's\n\t\t * safe to only store the last used routes.\n\t\t */\n\t\tthis.lastUsedRoutes = usedRoutes;\n\n\t\t// If we are loaded, call the channel so it can update the used routes of the child contexts.\n\t\t// If we are not loaded, we will update this when we are realized.\n\t\tif (this.loaded) {\n\t\t\tthis.updateChannelUsedRoutes();\n\t\t}\n\t}\n\n\t/**\n\t * @deprecated There is no replacement for this, its functionality is no longer needed.\n\t * It will be removed in a future release, sometime after 2.0.0-internal.8.0.0\n\t *\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t * @param srcHandle - The handle of the node that added the reference.\n\t * @param outboundHandle - The handle of the outbound node that is referenced.\n\t */\n\tpublic addedGCOutboundReference(srcHandle: IFluidHandle, outboundHandle: IFluidHandle) {\n\t\t// By default, skip this call since the ContainerRuntime will detect the outbound route directly.\n\t\tif (this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) === true) {\n\t\t\t// Note: The ContainerRuntime code will check this same setting to avoid double counting.\n\t\t\tthis._containerRuntime.addedGCOutboundReference(srcHandle, outboundHandle);\n\t\t}\n\t}\n\n\t/**\n\t * Updates the used routes of the channel and its child contexts. The channel must be loaded before calling this.\n\t * It is called in these two scenarios:\n\t * 1. When the used routes of the data store is updated and the data store is loaded.\n\t * 2. When the data store is realized. This updates the channel's used routes as per last GC run.\n\t */\n\tprivate updateChannelUsedRoutes() {\n\t\tassert(this.loaded, 0x144 /* \"Channel should be loaded when updating used routes\" */);\n\t\tassert(\n\t\t\tthis.channel !== undefined,\n\t\t\t0x145 /* \"Channel should be present when data store is loaded\" */,\n\t\t);\n\n\t\t// If there is no lastUsedRoutes, GC has not run up until this point.\n\t\tif (this.lastUsedRoutes === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the route to this data store, if it exists.\n\t\tconst usedChannelRoutes = this.lastUsedRoutes.filter((id: string) => {\n\t\t\treturn id !== \"/\" && id !== \"\";\n\t\t});\n\t\tthis.channel.updateUsedRoutes(usedChannelRoutes);\n\t}\n\n\t/**\n\t * @deprecated 0.18.Should call request on the runtime directly\n\t */\n\tpublic async request(request: IRequest): Promise<IResponse> {\n\t\tconst runtime = await this.realize();\n\t\treturn runtime.request(request);\n\t}\n\n\tpublic submitMessage(type: string, content: any, localOpMetadata: unknown): void {\n\t\tthis.verifyNotClosed(\"submitMessage\");\n\t\tassert(!!this.channel, 0x146 /* \"Channel must exist when submitting message\" */);\n\t\tconst fluidDataStoreContent: FluidDataStoreMessage = {\n\t\t\tcontent,\n\t\t\ttype,\n\t\t};\n\n\t\t// Summarizer clients should not submit messages.\n\t\tthis.identifyLocalChangeInSummarizer(\"DataStoreMessageSubmittedInSummarizer\", type);\n\n\t\tthis._containerRuntime.submitDataStoreOp(this.id, fluidDataStoreContent, localOpMetadata);\n\t}\n\n\t/**\n\t * This is called from a SharedSummaryBlock that does not generate ops but only wants to be part of the summary.\n\t * It indicates that there is data in the object that needs to be summarized.\n\t * We will update the latestSequenceNumber of the summary tracker of this\n\t * store and of the object's channel.\n\t *\n\t * @param address - The address of the channel that is dirty.\n\t *\n\t */\n\tpublic setChannelDirty(address: string): void {\n\t\tthis.verifyNotClosed(\"setChannelDirty\");\n\n\t\t// Get the latest sequence number.\n\t\tconst latestSequenceNumber = this.deltaManager.lastSequenceNumber;\n\n\t\tthis.summarizerNode.invalidate(latestSequenceNumber);\n\n\t\tconst channelSummarizerNode = this.summarizerNode.getChild(address);\n\n\t\tif (channelSummarizerNode) {\n\t\t\tchannelSummarizerNode.invalidate(latestSequenceNumber); // TODO: lazy load problem?\n\t\t}\n\t}\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tpublic submitSignal(type: string, content: any, targetClientId?: string) {\n\t\tthis.verifyNotClosed(\"submitSignal\");\n\n\t\tassert(!!this.channel, 0x147 /* \"Channel must exist on submitting signal\" */);\n\t\treturn this._containerRuntime.submitDataStoreSignal(this.id, type, content, targetClientId);\n\t}\n\n\t/**\n\t * This is called by the data store channel when it becomes locally visible indicating that it is ready to become\n\t * globally visible now.\n\t */\n\tpublic makeLocallyVisible() {\n\t\tassert(this.channel !== undefined, 0x2cf /* \"undefined channel on datastore context\" */);\n\t\tassert(\n\t\t\tthis.channel.visibilityState === VisibilityState.LocallyVisible,\n\t\t\t0x590 /* Channel must be locally visible */,\n\t\t);\n\t\tthis.makeLocallyVisibleFn();\n\t}\n\n\tprotected bindRuntime(channel: IFluidDataStoreChannel) {\n\t\tif (this.channel) {\n\t\t\tthrow new Error(\"Runtime already bound\");\n\t\t}\n\n\t\ttry {\n\t\t\tassert(\n\t\t\t\t!this.detachedRuntimeCreation,\n\t\t\t\t0x148 /* \"Detached runtime creation on runtime bind\" */,\n\t\t\t);\n\t\t\tassert(this.channelDeferred !== undefined, 0x149 /* \"Undefined channel deferral\" */);\n\t\t\tassert(this.pkg !== undefined, 0x14a /* \"Undefined package path\" */);\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst pending = this.pending!;\n\n\t\t\t// Apply all pending ops\n\t\t\tfor (const op of pending) {\n\t\t\t\tchannel.process(op, false, undefined /* localOpMetadata */);\n\t\t\t}\n\n\t\t\tthis.thresholdOpsCounter.send(\"ProcessPendingOps\", pending.length);\n\t\t\tthis.pending = undefined;\n\n\t\t\t// And now mark the runtime active\n\t\t\tthis.loaded = true;\n\t\t\tthis.channel = channel;\n\n\t\t\t// Freeze the package path to ensure that someone doesn't modify it when it is\n\t\t\t// returned in packagePath().\n\t\t\tObject.freeze(this.pkg);\n\n\t\t\t/**\n\t\t\t * Update the used routes of the channel. If GC has run before this data store was realized, we will have\n\t\t\t * the used routes saved. So, this will ensure that all the child contexts have up-to-date used routes as\n\t\t\t * per the last time GC was run.\n\t\t\t * Also, this data store may have been realized during summarize. In that case, the child contexts need to\n\t\t\t * have their used routes updated to determine if its needs to summarize again and to add it to the summary.\n\t\t\t */\n\t\t\tthis.updateChannelUsedRoutes();\n\n\t\t\t// And notify the pending promise it is now available\n\t\t\tthis.channelDeferred.resolve(this.channel);\n\t\t} catch (error) {\n\t\t\tthis.channelDeferred?.reject(error);\n\t\t\tthis.mc.logger.sendErrorEvent(\n\t\t\t\t{\n\t\t\t\t\teventName: \"BindRuntimeError\",\n\t\t\t\t},\n\t\t\t\terror,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic async getAbsoluteUrl(relativeUrl: string): Promise<string | undefined> {\n\t\tif (this.attachState !== AttachState.Attached) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this._containerRuntime.getAbsoluteUrl(relativeUrl);\n\t}\n\n\tpublic abstract generateAttachMessage(): IAttachMessage;\n\n\tpublic abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;\n\n\t/**\n\t * @deprecated Sets the datastore as root, for aliasing purposes: #7948\n\t * This method should not be used outside of the aliasing context.\n\t * It will be removed, as the source of truth for this flag will be the aliasing blob.\n\t */\n\tpublic setInMemoryRoot(): void {\n\t\tthis._isInMemoryRoot = true;\n\t}\n\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tpublic async getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase> {\n\t\treturn {};\n\t}\n\n\tpublic reSubmit(contents: any, localOpMetadata: unknown) {\n\t\tassert(!!this.channel, 0x14b /* \"Channel must exist when resubmitting ops\" */);\n\t\tconst innerContents = contents as FluidDataStoreMessage;\n\t\tthis.channel.reSubmit(innerContents.type, innerContents.content, localOpMetadata);\n\t}\n\n\tpublic rollback(contents: any, localOpMetadata: unknown) {\n\t\tif (!this.channel) {\n\t\t\tthrow new Error(\"Channel must exist when rolling back ops\");\n\t\t}\n\t\tif (!this.channel.rollback) {\n\t\t\tthrow new Error(\"Channel doesn't support rollback\");\n\t\t}\n\t\tconst innerContents = contents as FluidDataStoreMessage;\n\t\tthis.channel.rollback(innerContents.type, innerContents.content, localOpMetadata);\n\t}\n\n\tpublic async applyStashedOp(contents: any): Promise<unknown> {\n\t\tif (!this.channel) {\n\t\t\tawait this.realize();\n\t\t}\n\t\tassert(!!this.channel, 0x14c /* \"Channel must exist when rebasing ops\" */);\n\t\treturn this.channel.applyStashedOp(contents);\n\t}\n\n\tprivate verifyNotClosed(\n\t\tcallSite: string,\n\t\tcheckTombstone = true,\n\t\tsafeTelemetryProps: ITelemetryProperties = {},\n\t) {\n\t\tif (this.deleted) {\n\t\t\tconst messageString = `Context is deleted! Call site [${callSite}]`;\n\t\t\tconst error = new DataCorruptionError(messageString, safeTelemetryProps);\n\t\t\tthis.mc.logger.sendErrorEvent(\n\t\t\t\t{\n\t\t\t\t\teventName: \"GC_Deleted_DataStore_Changed\",\n\t\t\t\t\tcallSite,\n\t\t\t\t},\n\t\t\t\terror,\n\t\t\t);\n\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (this._disposed) {\n\t\t\tthrow new Error(`Context is closed! Call site [${callSite}]`);\n\t\t}\n\n\t\tif (checkTombstone && this.tombstoned) {\n\t\t\tconst messageString = `Context is tombstoned! Call site [${callSite}]`;\n\t\t\tconst error = new DataCorruptionError(messageString, safeTelemetryProps);\n\n\t\t\tsendGCUnexpectedUsageEvent(\n\t\t\t\tthis.mc,\n\t\t\t\t{\n\t\t\t\t\teventName: \"GC_Tombstone_DataStore_Changed\",\n\t\t\t\t\tcategory: this.throwOnTombstoneUsage ? \"error\" : \"generic\",\n\t\t\t\t\tgcTombstoneEnforcementAllowed:\n\t\t\t\t\t\tthis._containerRuntime.gcTombstoneEnforcementAllowed,\n\t\t\t\t\tcallSite,\n\t\t\t\t},\n\t\t\t\tthis.pkg,\n\t\t\t\terror,\n\t\t\t);\n\t\t\tif (this.throwOnTombstoneUsage) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Summarizer client should not have local changes. These changes can become part of the summary and can break\n\t * eventual consistency. For example, the next summary (say at ref seq# 100) may contain these changes whereas\n\t * other clients that are up-to-date till seq# 100 may not have them yet.\n\t */\n\tprotected identifyLocalChangeInSummarizer(eventName: string, type?: string) {\n\t\tif (\n\t\t\tthis.clientDetails.type !== summarizerClientType ||\n\t\t\tthis.localChangesTelemetryCount <= 0\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Log a telemetry if there are local changes in the summarizer. This will give us data on how often\n\t\t// this is happening and which data stores do this. The eventual goal is to disallow local changes\n\t\t// in the summarizer and the data will help us plan this.\n\t\tthis.mc.logger.sendTelemetryEvent({\n\t\t\teventName,\n\t\t\ttype,\n\t\t\tisSummaryInProgress: this.summarizerNode.isSummaryInProgress?.(),\n\t\t\tstack: generateStack(),\n\t\t});\n\t\tthis.localChangesTelemetryCount--;\n\t}\n\n\tpublic getCreateChildSummarizerNodeFn(id: string, createParam: CreateChildSummarizerNodeParam) {\n\t\treturn (\n\t\t\tsummarizeInternal: SummarizeInternalFn,\n\t\t\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t) =>\n\t\t\tthis.summarizerNode.createChild(\n\t\t\t\tsummarizeInternal,\n\t\t\t\tid,\n\t\t\t\tcreateParam,\n\t\t\t\t// DDS will not create failure summaries\n\t\t\t\t{ throwOnFailure: true },\n\t\t\t\tgetGCDataFn,\n\t\t\t);\n\t}\n\n\tpublic async uploadBlob(\n\t\tblob: ArrayBufferLike,\n\t\tsignal?: AbortSignal,\n\t): Promise<IFluidHandle<ArrayBufferLike>> {\n\t\treturn this.containerRuntime.uploadBlob(blob, signal);\n\t}\n}\n\nexport class RemoteFluidDataStoreContext extends FluidDataStoreContext {\n\tprivate readonly initSnapshotValue: ISnapshotTree | undefined;\n\n\tconstructor(props: IRemoteFluidDataStoreContextProps) {\n\t\tsuper(props, true /* existing */, false /* isLocalDataStore */, () => {\n\t\t\tthrow new Error(\"Already attached\");\n\t\t});\n\n\t\tthis.initSnapshotValue = props.snapshotTree;\n\n\t\tif (props.snapshotTree !== undefined) {\n\t\t\tthis.summarizerNode.updateBaseSummaryState(props.snapshotTree);\n\t\t}\n\t}\n\n\tprivate readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {\n\t\tlet tree = this.initSnapshotValue;\n\t\tlet isRootDataStore = true;\n\n\t\tif (!!tree && tree.blobs[dataStoreAttributesBlobName] !== undefined) {\n\t\t\t// Need to get through snapshot and use that to populate extraBlobs\n\t\t\tconst attributes = await readAndParse<ReadFluidDataStoreAttributes>(\n\t\t\t\tthis.storage,\n\t\t\t\ttree.blobs[dataStoreAttributesBlobName],\n\t\t\t);\n\n\t\t\tlet pkgFromSnapshot: string[];\n\t\t\t// Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.\n\t\t\t// For snapshotFormatVersion = \"0.1\" (1) or above, pkg is jsonified, otherwise it is just a string.\n\t\t\tconst formatVersion = getAttributesFormatVersion(attributes);\n\t\t\tif (formatVersion < 1) {\n\t\t\t\tpkgFromSnapshot =\n\t\t\t\t\tattributes.pkg.startsWith('[\"') && attributes.pkg.endsWith('\"]')\n\t\t\t\t\t\t? (JSON.parse(attributes.pkg) as string[])\n\t\t\t\t\t\t: [attributes.pkg];\n\t\t\t} else {\n\t\t\t\tpkgFromSnapshot = JSON.parse(attributes.pkg) as string[];\n\t\t\t}\n\t\t\tthis.pkg = pkgFromSnapshot;\n\n\t\t\t/**\n\t\t\t * If there is no isRootDataStore in the attributes blob, set it to true. This will ensure that\n\t\t\t * data stores in older documents are not garbage collected incorrectly. This may lead to additional\n\t\t\t * roots in the document but they won't break.\n\t\t\t */\n\t\t\tisRootDataStore = attributes.isRootDataStore ?? true;\n\n\t\t\tif (hasIsolatedChannels(attributes)) {\n\t\t\t\ttree = tree.trees[channelsTreeName];\n\t\t\t\tassert(\n\t\t\t\t\ttree !== undefined,\n\t\t\t\t\t0x1fe /* \"isolated channels subtree should exist in remote datastore snapshot\" */,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tpkg: this.pkg!,\n\t\t\tisRootDataStore,\n\t\t\tsnapshot: tree,\n\t\t};\n\t});\n\n\tpublic async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n\t\treturn this.initialSnapshotDetailsP;\n\t}\n\n\tpublic generateAttachMessage(): IAttachMessage {\n\t\tthrow new Error(\"Cannot attach remote store\");\n\t}\n}\n\n/**\n * Base class for detached & attached context classes\n */\nexport class LocalFluidDataStoreContextBase extends FluidDataStoreContext {\n\tprivate readonly snapshotTree: ISnapshotTree | undefined;\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\tpublic readonly createProps?: any;\n\n\tconstructor(props: ILocalFluidDataStoreContextProps) {\n\t\tsuper(\n\t\t\tprops,\n\t\t\tprops.snapshotTree !== undefined ? true : false /* existing */,\n\t\t\ttrue /* isLocalDataStore */,\n\t\t\tprops.makeLocallyVisibleFn,\n\t\t);\n\n\t\t// Summarizer client should not create local data stores.\n\t\tthis.identifyLocalChangeInSummarizer(\"DataStoreCreatedInSummarizer\");\n\n\t\tthis.snapshotTree = props.snapshotTree;\n\t\tif (props.isRootDataStore === true) {\n\t\t\tthis.setInMemoryRoot();\n\t\t}\n\t\tthis.createProps = props.createProps;\n\t\tthis.attachListeners();\n\t}\n\n\tprivate attachListeners(): void {\n\t\tthis.once(\"attaching\", () => {\n\t\t\tassert(\n\t\t\t\tthis.attachState === AttachState.Detached,\n\t\t\t\t0x14d /* \"Should move from detached to attaching\" */,\n\t\t\t);\n\t\t\tthis._attachState = AttachState.Attaching;\n\t\t});\n\t\tthis.once(\"attached\", () => {\n\t\t\tassert(\n\t\t\t\tthis.attachState === AttachState.Attaching,\n\t\t\t\t0x14e /* \"Should move from attaching to attached\" */,\n\t\t\t);\n\t\t\tthis._attachState = AttachState.Attached;\n\t\t});\n\t}\n\n\tpublic generateAttachMessage(): IAttachMessage {\n\t\tassert(\n\t\t\tthis.channel !== undefined,\n\t\t\t0x14f /* \"There should be a channel when generating attach message\" */,\n\t\t);\n\t\tassert(\n\t\t\tthis.pkg !== undefined,\n\t\t\t0x150 /* \"pkg should be available in local data store context\" */,\n\t\t);\n\n\t\tconst summarizeResult = this.channel.getAttachSummary();\n\n\t\t// Wrap dds summaries in .channels subtree.\n\t\twrapSummaryInChannelsTree(summarizeResult);\n\n\t\t// Add data store's attributes to the summary.\n\t\tconst attributes = createAttributes(this.pkg, this.isInMemoryRoot());\n\t\taddBlobToSummary(summarizeResult, dataStoreAttributesBlobName, JSON.stringify(attributes));\n\n\t\t// Attach message needs the summary in ITree format. Convert the ISummaryTree into an ITree.\n\t\tconst snapshot = convertSummaryTreeToITree(summarizeResult.summary);\n\n\t\tconst message: IAttachMessage = {\n\t\t\tid: this.id,\n\t\t\tsnapshot,\n\t\t\ttype: this.pkg[this.pkg.length - 1],\n\t\t};\n\n\t\treturn message;\n\t}\n\n\tprivate readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {\n\t\tlet snapshot = this.snapshotTree;\n\t\tlet attributes: ReadFluidDataStoreAttributes;\n\t\tlet isRootDataStore = false;\n\t\tif (snapshot !== undefined) {\n\t\t\t// Get the dataStore attributes.\n\t\t\t// Note: storage can be undefined in special case while detached.\n\t\t\tattributes = await getFluidDataStoreAttributes(this.storage, snapshot);\n\t\t\tif (hasIsolatedChannels(attributes)) {\n\t\t\t\tsnapshot = snapshot.trees[channelsTreeName];\n\t\t\t\tassert(\n\t\t\t\t\tsnapshot !== undefined,\n\t\t\t\t\t0x1ff /* \"isolated channels subtree should exist in local datastore snapshot\" */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (this.pkg === undefined) {\n\t\t\t\tthis.pkg = JSON.parse(attributes.pkg) as string[];\n\t\t\t\t// If there is no isRootDataStore in the attributes blob, set it to true. This ensures that data\n\t\t\t\t// stores in older documents are not garbage collected incorrectly. This may lead to additional\n\t\t\t\t// roots in the document but they won't break.\n\t\t\t\tif (attributes.isRootDataStore ?? true) {\n\t\t\t\t\tisRootDataStore = true;\n\t\t\t\t\tthis.setInMemoryRoot();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tassert(this.pkg !== undefined, 0x152 /* \"pkg should be available in local data store\" */);\n\n\t\treturn {\n\t\t\tpkg: this.pkg,\n\t\t\tisRootDataStore,\n\t\t\tsnapshot,\n\t\t};\n\t});\n\n\tpublic async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n\t\treturn this.initialSnapshotDetailsP;\n\t}\n\n\t/**\n\t * A context should only be marked as deleted when its a remote context.\n\t * Session Expiry at the runtime level should have closed the container creating the local data store context\n\t * before delete is even possible. Session Expiry is at 30 days, and sweep is done 36+ days later from the time\n\t * it was unreferenced. Thus the sweeping container should have loaded from a snapshot and thus creating a remote\n\t * context.\n\t */\n\tpublic delete() {\n\t\t// TODO: GC:Validation - potentially prevent this from happening or asserting. Maybe throw here.\n\t\tsendGCUnexpectedUsageEvent(\n\t\t\tthis.mc,\n\t\t\t{\n\t\t\t\teventName: \"GC_Deleted_DataStore_Unexpected_Delete\",\n\t\t\t\tmessage: \"Unexpected deletion of a local data store context\",\n\t\t\t\tcategory: \"error\",\n\t\t\t\tgcTombstoneEnforcementAllowed: undefined,\n\t\t\t},\n\t\t\tthis.pkg,\n\t\t);\n\t\tsuper.delete();\n\t}\n}\n\n/**\n * context implementation for \"attached\" data store runtime.\n * Various workflows (snapshot creation, requests) result in .realize() being called\n * on context, resulting in instantiation and attachment of runtime.\n * Runtime is created using data store factory that is associated with this context.\n */\nexport class LocalFluidDataStoreContext extends LocalFluidDataStoreContextBase {\n\tconstructor(props: ILocalFluidDataStoreContextProps) {\n\t\tsuper(props);\n\t}\n}\n\n/**\n * Detached context. Data Store runtime will be attached to it by attachRuntime() call\n * Before attachment happens, this context is not associated with particular type of runtime\n * or factory, i.e. it's package path is undefined.\n * Attachment process provides all missing parts - package path, data store runtime, and data store factory\n */\nexport class LocalDetachedFluidDataStoreContext\n\textends LocalFluidDataStoreContextBase\n\timplements IFluidDataStoreContextDetached\n{\n\tconstructor(props: ILocalFluidDataStoreContextProps) {\n\t\tsuper(props);\n\t\tthis.detachedRuntimeCreation = true;\n\t}\n\n\tpublic async attachRuntime(\n\t\tregistry: IProvideFluidDataStoreFactory,\n\t\tdataStoreChannel: IFluidDataStoreChannel,\n\t) {\n\t\tassert(this.detachedRuntimeCreation, 0x154 /* \"runtime creation is already attached\" */);\n\t\tthis.detachedRuntimeCreation = false;\n\n\t\tassert(this.channelDeferred === undefined, 0x155 /* \"channel deferral is already set\" */);\n\t\tthis.channelDeferred = new Deferred<IFluidDataStoreChannel>();\n\n\t\tconst factory = registry.IFluidDataStoreFactory;\n\n\t\tconst entry = await this.factoryFromPackagePath(this.pkg);\n\t\tassert(entry.factory === factory, 0x156 /* \"Unexpected factory for package path\" */);\n\n\t\tassert(this.registry === undefined, 0x157 /* \"datastore registry already attached\" */);\n\t\tthis.registry = entry.registry;\n\n\t\tsuper.bindRuntime(dataStoreChannel);\n\n\t\t// Load the handle to the data store's entryPoint to make sure that for a detached data store, the entryPoint\n\t\t// initialization function is called before the data store gets attached and potentially connected to the\n\t\t// delta stream, so it gets a chance to do things while the data store is still \"purely local\".\n\t\t// This preserves the behavior from before we introduced entryPoints, where the instantiateDataStore method\n\t\t// of data store factories tends to construct the data object (at least kick off an async method that returns\n\t\t// it); that code moved to the entryPoint initialization function, so we want to ensure it still executes\n\t\t// before the data store is attached.\n\t\tawait dataStoreChannel.entryPoint.get();\n\n\t\tif (await this.isRoot()) {\n\t\t\tdataStoreChannel.makeVisibleAndAttachGraph();\n\t\t}\n\t}\n\n\tpublic async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n\t\tif (this.detachedRuntimeCreation) {\n\t\t\tthrow new Error(\n\t\t\t\t\"Detached Fluid Data Store context can't be realized! Please attach runtime first!\",\n\t\t\t);\n\t\t}\n\t\treturn super.getInitialSnapshotDetails();\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContexts.d.mts","sourceRoot":"","sources":["../src/dataStoreContexts.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,iCAAiC;OAE5E,EAAE,qBAAqB,EAAE,0BAA0B,EAAE;AAE5D,qBAAa,iBAAkB,YAAW,QAAQ,CAAC,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,EAAE,WAAW;IAC/F,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IAEtD,0CAA0C;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA4C;IAEtE;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAsD;IAEvF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAiBzB;IAEH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;gBAElC,UAAU,EAAE,oBAAoB;IAI5C,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAI9D,IAAW,IAAI,IAAI,MAAM,CAExB;IAED,IAAW,QAAQ,YAElB;I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AAO,CAAC,CAAC;QAEhC,qEAAqE;QACrE,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, Deferred, Lazy } from \"@fluidframework/core-utils\";\nimport { IDisposable, ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport { createChildLogger, ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport { FluidDataStoreContext, LocalFluidDataStoreContext } from \"./dataStoreContext\";\n\nexport class DataStoreContexts implements Iterable<[string, FluidDataStoreContext]>, IDisposable {\n\tprivate readonly notBoundContexts = new Set<string>();\n\n\t/** Attached and loaded context proxies */\n\tprivate readonly _contexts = new Map<string, FluidDataStoreContext>();\n\n\t/**\n\t * List of pending context waiting either to be bound or to arrive from another client.\n\t * This covers the case where a local context has been created but not yet bound,\n\t * or the case where a client knows a store will exist and is waiting on its creation,\n\t * so that a caller may await the deferred's promise until such a time as the context is fully ready.\n\t * This is a superset of _contexts, since contexts remain here once the Deferred resolves.\n\t */\n\tprivate readonly deferredContexts = new Map<string, Deferred<FluidDataStoreContext>>();\n\n\tprivate readonly disposeOnce = new Lazy<void>(() => {\n\t\t// close/stop all store contexts\n\t\tfor (const [fluidDataStoreId, contextD] of this.deferredContexts) {\n\t\t\tcontextD.promise\n\t\t\t\t.then((context) => {\n\t\t\t\t\tcontext.dispose();\n\t\t\t\t})\n\t\t\t\t.catch((contextError) => {\n\t\t\t\t\tthis._logger.sendErrorEvent(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\teventName: \"FluidDataStoreContextDisposeError\",\n\t\t\t\t\t\t\tfluidDataStoreId,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcontextError,\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t}\n\t});\n\n\tprivate readonly _logger: ITelemetryLoggerExt;\n\n\tconstructor(baseLogger: ITelemetryBaseLogger) {\n\t\tthis._logger = createChildLogger({ logger: baseLogger });\n\t}\n\n\t[Symbol.iterator](): Iterator<[string, FluidDataStoreContext]> {\n\t\treturn this._contexts.entries();\n\t}\n\n\tpublic get size(): number {\n\t\treturn this._contexts.size;\n\t}\n\n\tpublic get disposed() {\n\t\treturn this.disposeOnce.evaluated;\n\t}\n\tpublic readonly dispose = () => this.disposeOnce.value;\n\n\tpublic notBoundLength() {\n\t\treturn this.notBoundContexts.size;\n\t}\n\n\tpublic isNotBound(id: string) {\n\t\treturn this.notBoundContexts.has(id);\n\t}\n\n\tpublic has(id: string) {\n\t\treturn this._contexts.has(id);\n\t}\n\n\tpublic get(id: string): FluidDataStoreContext | undefined {\n\t\treturn this._contexts.get(id);\n\t}\n\n\tpublic delete(id: string): boolean {\n\t\tthis.deferredContexts.delete(id);\n\t\tthis.notBoundContexts.delete(id);\n\t\treturn this._contexts.delete(id);\n\t}\n\n\t/**\n\t * Return the unbound local context with the given id,\n\t * or undefined if it's not found or not unbound.\n\t */\n\tpublic getUnbound(id: string): LocalFluidDataStoreContext | undefined {\n\t\tconst context = this._contexts.get(id);\n\t\tif (context === undefined || !this.notBoundContexts.has(id)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn context as LocalFluidDataStoreContext;\n\t}\n\n\t/**\n\t * Add the given context, marking it as to-be-bound\n\t */\n\tpublic addUnbound(context: LocalFluidDataStoreContext) {\n\t\tconst id = context.id;\n\t\tassert(!this._contexts.has(id), 0x158 /* \"Creating store with existing ID\" */);\n\n\t\tthis._contexts.set(id, context);\n\n\t\tthis.notBoundContexts.add(id);\n\t\tthis.ensureDeferred(id);\n\t}\n\n\t/**\n\t * Get the context with the given id, once it exists locally and is attached.\n\t * e.g. If created locally, it must be bound, or if created remotely then it's fine as soon as it's sync'd in.\n\t * @param id - The id of the context to get\n\t * @param wait - If false, return undefined if the context isn't present and ready now. Otherwise, wait for it.\n\t */\n\tpublic async getBoundOrRemoted(\n\t\tid: string,\n\t\twait: boolean,\n\t): Promise<FluidDataStoreContext | undefined> {\n\t\tconst deferredContext = this.ensureDeferred(id);\n\n\t\tif (!wait && !deferredContext.isCompleted) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn deferredContext.promise;\n\t}\n\n\tprivate ensureDeferred(id: string): Deferred<FluidDataStoreContext> {\n\t\tconst deferred = this.deferredContexts.get(id);\n\t\tif (deferred) {\n\t\t\treturn deferred;\n\t\t}\n\n\t\tconst newDeferred = new Deferred<FluidDataStoreContext>();\n\t\tthis.deferredContexts.set(id, newDeferred);\n\t\treturn newDeferred;\n\t}\n\n\t/**\n\t * Update this context as bound\n\t */\n\tpublic bind(id: string) {\n\t\tconst removed: boolean = this.notBoundContexts.delete(id);\n\t\tassert(removed, 0x159 /* \"The given id was not found in notBoundContexts to delete\" */);\n\n\t\tthis.resolveDeferred(id);\n\t}\n\n\t/**\n\t * Triggers the deferred to resolve, indicating the context is not local-only\n\t * @param id - The id of the context to resolve to\n\t */\n\tprivate resolveDeferred(id: string) {\n\t\tconst context = this._contexts.get(id);\n\t\tassert(!!context, 0x15a /* \"Cannot find context to resolve to\" */);\n\t\tassert(\n\t\t\t!this.notBoundContexts.has(id),\n\t\t\t0x15b /* \"Expected this id to already be removed from notBoundContexts\" */,\n\t\t);\n\n\t\tconst deferred = this.deferredContexts.get(id);\n\t\tassert(!!deferred, 0x15c /* \"Cannot find deferred to resolve\" */);\n\t\tdeferred.resolve(context);\n\t}\n\n\t/**\n\t * Add the given context, marking it as not local-only.\n\t * This could be because it's a local context that's been bound, or because it's a remote context.\n\t * @param context - The context to add\n\t */\n\tpublic addBoundOrRemoted(context: FluidDataStoreContext) {\n\t\tconst id = context.id;\n\t\tassert(!this._contexts.has(id), 0x15d /* \"Creating store with existing ID\" */);\n\n\t\tthis._contexts.set(id, context);\n\n\t\t// Resolve the deferred immediately since this context is not unbound\n\t\tthis.ensureDeferred(id);\n\t\tthis.resolveDeferred(id);\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRegistry.d.mts","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"OAKO,EACN,2BAA2B,EAC3B,uBAAuB,EACvB,kCAAkC,EAClC,MAAM,qCAAqC;AAE5C;;GAEG;AACH,qBAAa,sBAAuB,YAAW,uBAAuB;IACrE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAGlB;IAEF,IAAW,uBAAuB,SAEjC;gBAEW,YAAY,EAAE,kCAAkC;IAU/C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC;CAOhF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRegistry.mjs","sourceRoot":"","sources":["../src/dataStoreRegistry.ts"],"names":[],"mappings":"OAIO,EAAE,UAAU,EAAE,MAAM,iCAAiC;AAO5D;;GAEG;AACH,MAAM,OAAO,sBAAsB;IAMlC,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YAAY,YAAgD;QAC3D,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;QACrB,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE;YACjC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;gBAC3B,MAAM,IAAI,UAAU,CAAC,6BAA6B,CAAC,CAAC;aACpD;YACD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACjC;IACF,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,IAAY;QAC5B,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC1B;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { UsageError } from \"@fluidframework/telemetry-utils\";\nimport {\n\tFluidDataStoreRegistryEntry,\n\tIFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\n\n/**\n * @internal\n */\nexport class FluidDataStoreRegistry implements IFluidDataStoreRegistry {\n\tprivate readonly map: Map<\n\t\tstring,\n\t\tFluidDataStoreRegistryEntry | Promise<FluidDataStoreRegistryEntry>\n\t>;\n\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this;\n\t}\n\n\tconstructor(namedEntries: NamedFluidDataStoreRegistryEntries) {\n\t\tthis.map = new Map();\n\t\tfor (const entry of namedEntries) {\n\t\t\tif (this.map.has(entry[0])) {\n\t\t\t\tthrow new UsageError(\"Duplicate entry names exist\");\n\t\t\t}\n\t\t\tthis.map.set(entry[0], entry[1]);\n\t\t}\n\t}\n\n\tpublic async get(name: string): Promise<FluidDataStoreRegistryEntry | undefined> {\n\t\tif (this.map.has(name)) {\n\t\t\treturn this.map.get(name);\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n"]}
|
package/lib/dataStores.d.mts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { ITelemetryBaseLogger, IDisposable } from "@fluidframework/core-interfaces";
|
|
6
|
-
import { ISequencedDocumentMessage, ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
7
|
-
import { AliasResult, CreateChildSummarizerNodeFn, CreateChildSummarizerNodeParam, IAttachMessage, IEnvelope, IFluidDataStoreContextDetached, IGarbageCollectionData, IInboundSignalMessage, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
8
|
-
import { AttachState } from "@fluidframework/container-definitions";
|
|
9
|
-
import { DataStoreContexts } from "./dataStoreContexts.mjs";
|
|
10
|
-
import { ContainerRuntime, RuntimeHeaderData } from "./containerRuntime.mjs";
|
|
11
|
-
import { FluidDataStoreContext, LocalFluidDataStoreContext } from "./dataStoreContext.mjs";
|
|
12
|
-
import { GCNodeType } from "./gc/index.mjs";
|
|
13
|
-
import { IDataStoreAliasMessage } from "./dataStore.mjs";
|
|
14
|
-
import { IContainerRuntimeMetadata } from "./summary/index.mjs";
|
|
15
|
-
/**
|
|
16
|
-
* This class encapsulates data store handling. Currently it is only used by the container runtime,
|
|
17
|
-
* but eventually could be hosted on any channel once we formalize the channel api boundary.
|
|
18
|
-
*/
|
|
19
|
-
export declare class DataStores implements IDisposable {
|
|
20
|
-
private readonly baseSnapshot;
|
|
21
|
-
private readonly runtime;
|
|
22
|
-
private readonly submitAttachFn;
|
|
23
|
-
private readonly getCreateChildSummarizerNodeFn;
|
|
24
|
-
private readonly deleteChildSummarizerNodeFn;
|
|
25
|
-
private readonly gcNodeUpdated;
|
|
26
|
-
private readonly isDataStoreDeleted;
|
|
27
|
-
private readonly aliasMap;
|
|
28
|
-
private readonly contexts;
|
|
29
|
-
private readonly pendingAttach;
|
|
30
|
-
readonly attachOpFiredForDataStore: Set<string>;
|
|
31
|
-
private readonly mc;
|
|
32
|
-
private readonly disposeOnce;
|
|
33
|
-
readonly containerLoadStats: {
|
|
34
|
-
readonly containerLoadDataStoreCount: number;
|
|
35
|
-
readonly referencedDataStoreCount: number;
|
|
36
|
-
};
|
|
37
|
-
private dataStoresSinceLastGC;
|
|
38
|
-
private readonly containerRuntimeHandle;
|
|
39
|
-
private readonly pendingAliasMap;
|
|
40
|
-
constructor(baseSnapshot: ISnapshotTree | undefined, runtime: ContainerRuntime, submitAttachFn: (attachContent: IAttachMessage) => void, getCreateChildSummarizerNodeFn: (id: string, createParam: CreateChildSummarizerNodeParam) => CreateChildSummarizerNodeFn, deleteChildSummarizerNodeFn: (id: string) => void, baseLogger: ITelemetryBaseLogger, gcNodeUpdated: (nodePath: string, timestampMs: number, packagePath?: readonly string[]) => void, isDataStoreDeleted: (nodePath: string) => boolean, aliasMap: Map<string, string>, contexts?: DataStoreContexts);
|
|
41
|
-
get aliases(): ReadonlyMap<string, string>;
|
|
42
|
-
get pendingAliases(): Map<string, Promise<AliasResult>>;
|
|
43
|
-
waitIfPendingAlias(maybeAlias: string): Promise<AliasResult>;
|
|
44
|
-
processAttachMessage(message: ISequencedDocumentMessage, local: boolean): void;
|
|
45
|
-
processAliasMessage(message: ISequencedDocumentMessage, localOpMetadata: unknown, local: boolean): void;
|
|
46
|
-
processAliasMessageCore(aliasMessage: IDataStoreAliasMessage): boolean;
|
|
47
|
-
private alreadyProcessed;
|
|
48
|
-
/**
|
|
49
|
-
* Make the data stores locally visible in the container graph by moving the data store context from unbound to
|
|
50
|
-
* bound list. This data store can now be reached from the root.
|
|
51
|
-
* @param id - The id of the data store context to make visible.
|
|
52
|
-
*/
|
|
53
|
-
private makeDataStoreLocallyVisible;
|
|
54
|
-
createDetachedDataStoreCore(pkg: Readonly<string[]>, isRoot: boolean, id?: string): IFluidDataStoreContextDetached;
|
|
55
|
-
_createFluidDataStoreContext(pkg: string[], id: string, props?: any): LocalFluidDataStoreContext;
|
|
56
|
-
get disposed(): boolean;
|
|
57
|
-
readonly dispose: () => void;
|
|
58
|
-
resubmitDataStoreOp(envelope: IEnvelope, localOpMetadata: unknown): void;
|
|
59
|
-
rollbackDataStoreOp(envelope: IEnvelope, localOpMetadata: unknown): void;
|
|
60
|
-
applyStashedOp(envelope: IEnvelope): Promise<unknown>;
|
|
61
|
-
applyStashedAttachOp(message: IAttachMessage): Promise<void>;
|
|
62
|
-
processFluidDataStoreOp(message: ISequencedDocumentMessage, local: boolean, localMessageMetadata: unknown, addedOutboundReference: (fromNodePath: string, toNodePath: string) => void): void;
|
|
63
|
-
getDataStore(id: string, requestHeaderData: RuntimeHeaderData): Promise<FluidDataStoreContext>;
|
|
64
|
-
/**
|
|
65
|
-
* Returns the data store requested with the given id if available. Otherwise, returns undefined.
|
|
66
|
-
*/
|
|
67
|
-
getDataStoreIfAvailable(id: string, requestHeaderData: RuntimeHeaderData): Promise<FluidDataStoreContext | undefined>;
|
|
68
|
-
/**
|
|
69
|
-
* Checks if the data store has been deleted by GC. If so, log an error.
|
|
70
|
-
* @param id - The data store's id.
|
|
71
|
-
* @param context - The data store context.
|
|
72
|
-
* @param callSite - The function name this is called from.
|
|
73
|
-
* @param requestHeaderData - The request header information to log if the data store is deleted.
|
|
74
|
-
* @returns true if the data store is deleted. Otherwise, returns false.
|
|
75
|
-
*/
|
|
76
|
-
private checkAndLogIfDeleted;
|
|
77
|
-
processSignal(fluidDataStoreId: string, message: IInboundSignalMessage, local: boolean): void;
|
|
78
|
-
setConnectionState(connected: boolean, clientId?: string): void;
|
|
79
|
-
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
|
|
80
|
-
get size(): number;
|
|
81
|
-
summarize(fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
|
|
82
|
-
createSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
83
|
-
/**
|
|
84
|
-
* Before GC runs, called by the garbage collector to update any pending GC state.
|
|
85
|
-
* The garbage collector needs to know all outbound references that are added. Since root data stores are not
|
|
86
|
-
* explicitly marked as referenced, notify GC of new root data stores that were added since the last GC run.
|
|
87
|
-
*/
|
|
88
|
-
updateStateBeforeGC(): Promise<void>;
|
|
89
|
-
/**
|
|
90
|
-
* Generates data used for garbage collection. It does the following:
|
|
91
|
-
*
|
|
92
|
-
* 1. Calls into each child data store context to get its GC data.
|
|
93
|
-
*
|
|
94
|
-
* 2. Prefixes the child context's id to the GC nodes in the child's GC data. This makes sure that the node can be
|
|
95
|
-
* identified as belonging to the child.
|
|
96
|
-
*
|
|
97
|
-
* 3. Adds a GC node for this channel to the nodes received from the children. All these nodes together represent
|
|
98
|
-
* the GC data of this channel.
|
|
99
|
-
*
|
|
100
|
-
* @param fullGC - true to bypass optimizations and force full generation of GC data.
|
|
101
|
-
*/
|
|
102
|
-
getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
|
|
103
|
-
/**
|
|
104
|
-
* After GC has run, called to notify this Container's data stores of routes that are used in it.
|
|
105
|
-
* @param usedRoutes - The routes that are used in all data stores in this Container.
|
|
106
|
-
*/
|
|
107
|
-
updateUsedRoutes(usedRoutes: readonly string[]): void;
|
|
108
|
-
/**
|
|
109
|
-
* This is called to update objects whose routes are unused. The unused objects are deleted.
|
|
110
|
-
* @param unusedRoutes - The routes that are unused in all data stores in this Container.
|
|
111
|
-
*/
|
|
112
|
-
updateUnusedRoutes(unusedRoutes: readonly string[]): void;
|
|
113
|
-
/**
|
|
114
|
-
* Delete data stores and its objects that are sweep ready.
|
|
115
|
-
* @param sweepReadyDataStoreRoutes - The routes of data stores and its objects that are sweep ready and should
|
|
116
|
-
* be deleted.
|
|
117
|
-
* @returns The routes of data stores and its objects that were deleted.
|
|
118
|
-
*/
|
|
119
|
-
deleteSweepReadyNodes(sweepReadyDataStoreRoutes: readonly string[]): readonly string[];
|
|
120
|
-
/**
|
|
121
|
-
* This is called to update objects whose routes are tombstones.
|
|
122
|
-
*
|
|
123
|
-
* A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.
|
|
124
|
-
* Tombstoned objects are eventually deleted by GC.
|
|
125
|
-
*
|
|
126
|
-
* @param tombstonedRoutes - The routes that are tombstones in all data stores in this Container.
|
|
127
|
-
*/
|
|
128
|
-
updateTombstonedRoutes(tombstonedRoutes: readonly string[]): void;
|
|
129
|
-
/**
|
|
130
|
-
* Returns the outbound routes of this channel. Only root data stores are considered referenced and their paths are
|
|
131
|
-
* part of outbound routes.
|
|
132
|
-
*/
|
|
133
|
-
private getOutboundRoutes;
|
|
134
|
-
/**
|
|
135
|
-
* Called by GC to retrieve the package path of a data store node with the given path.
|
|
136
|
-
*/
|
|
137
|
-
getDataStorePackagePath(nodePath: string): Promise<readonly string[] | undefined>;
|
|
138
|
-
/**
|
|
139
|
-
* Called by GC to determine if a node is for a data store or for an object within a data store (for e.g. DDS).
|
|
140
|
-
* @returns the GC node type if the node belongs to a data store or object within data store, undefined otherwise.
|
|
141
|
-
*/
|
|
142
|
-
getGCNodeType(nodePath: string): GCNodeType | undefined;
|
|
143
|
-
}
|
|
144
|
-
export declare function getSummaryForDatastores(snapshot: ISnapshotTree | undefined, metadata?: IContainerRuntimeMetadata): ISnapshotTree | undefined;
|
|
145
|
-
/**
|
|
146
|
-
* Traverse this op's contents and detect any outbound routes that were added by this op.
|
|
147
|
-
*/
|
|
148
|
-
export declare function detectOutboundReferences(envelope: IEnvelope, addedOutboundReference: (fromNodePath: string, toNodePath: string) => void): void;
|
|
149
|
-
//# sourceMappingURL=dataStores.d.mts.map
|
package/lib/dataStores.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataStores.d.mts","sourceRoot":"","sources":["../src/dataStores.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,oBAAoB,EACpB,WAAW,EAGX,MAAM,iCAAiC;OAEjC,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,sCAAsC;OACxF,EACN,WAAW,EAEX,2BAA2B,EAC3B,8BAA8B,EAE9B,cAAc,EACd,SAAS,EACT,8BAA8B,EAC9B,sBAAsB,EACtB,qBAAqB,EAGrB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,qCAAqC;OAqBrC,EAAE,WAAW,EAAE,MAAM,uCAAuC;OAI5D,EAAE,iBAAiB,EAAE;OACrB,EAAE,gBAAgB,EAA4B,iBAAiB,EAAE;OACjE,EACN,qBAAqB,EAErB,0BAA0B,EAG1B;OAEM,EAAE,UAAU,EAAiC;OAC7C,EAAE,sBAAsB,EAA2B;OACnD,EAAE,yBAAyB,EAA8C;A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,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE;YAC5C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC/C,+EAA+E;gBAC/E,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE;oBAC9B,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBAC9B;gBAED,2FAA2F;gBAC3F,uFAAuF;gBACvF,yGAAyG;gBACzG,IAAI,GAAG,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS,EAAE;oBAClD,UAAU,GAAG,KAAK,CAAC;iBACnB;gBAED,sBAAsB,CAAC,KAAK,CAAC,CAAC;aAC9B;SACD;IACF,CAAC;IAED,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE1C,6DAA6D;IAC7D,4CAA4C;IAC5C,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9D,aAAa,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tITelemetryBaseLogger,\n\tIDisposable,\n\tIFluidHandle,\n\tIRequest,\n} from \"@fluidframework/core-interfaces\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore\";\nimport { ISequencedDocumentMessage, ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tAliasResult,\n\tchannelsTreeName,\n\tCreateChildSummarizerNodeFn,\n\tCreateChildSummarizerNodeParam,\n\tCreateSummarizerNodeSource,\n\tIAttachMessage,\n\tIEnvelope,\n\tIFluidDataStoreContextDetached,\n\tIGarbageCollectionData,\n\tIInboundSignalMessage,\n\tInboundAttachMessage,\n\tISummarizeResult,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tconvertSnapshotTreeToSummaryTree,\n\tconvertToSummaryTree,\n\tcreate404Response,\n\tcreateResponseError,\n\tGCDataBuilder,\n\tisSerializedHandle,\n\tresponseToException,\n\tSummaryTreeBuilder,\n\tunpackChildNodesUsedRoutes,\n} from \"@fluidframework/runtime-utils\";\nimport {\n\tcreateChildMonitoringContext,\n\tDataCorruptionError,\n\tDataProcessingError,\n\textractSafePropertiesFromMessage,\n\tLoggingError,\n\tMonitoringContext,\n\ttagCodeArtifacts,\n} from \"@fluidframework/telemetry-utils\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport { assert, Lazy } from \"@fluidframework/core-utils\";\nimport { v4 as uuid } from \"uuid\";\nimport { DataStoreContexts } from \"./dataStoreContexts\";\nimport { ContainerRuntime, defaultRuntimeHeaderData, RuntimeHeaderData } from \"./containerRuntime\";\nimport {\n\tFluidDataStoreContext,\n\tRemoteFluidDataStoreContext,\n\tLocalFluidDataStoreContext,\n\tcreateAttributesBlob,\n\tLocalDetachedFluidDataStoreContext,\n} from \"./dataStoreContext\";\nimport { StorageServiceWithAttachBlobs } from \"./storageServiceWithAttachBlobs\";\nimport { GCNodeType, detectOutboundRoutesViaDDSKey } from \"./gc\";\nimport { IDataStoreAliasMessage, isDataStoreAliasMessage } from \"./dataStore\";\nimport { IContainerRuntimeMetadata, nonDataStorePaths, rootHasIsolatedChannels } from \"./summary\";\n\ntype PendingAliasResolve = (success: boolean) => void;\n\n/**\n * This class encapsulates data store handling. Currently it is only used by the container runtime,\n * but eventually could be hosted on any channel once we formalize the channel api boundary.\n */\nexport class DataStores implements IDisposable {\n\t// Stores tracked by the Domain\n\tprivate readonly pendingAttach = new Map<string, IAttachMessage>();\n\t// 0.24 back-compat attachingBeforeSummary\n\tpublic readonly attachOpFiredForDataStore = new Set<string>();\n\n\tprivate readonly mc: MonitoringContext;\n\n\tprivate readonly disposeOnce = new Lazy<void>(() => this.contexts.dispose());\n\n\tpublic readonly containerLoadStats: {\n\t\t// number of dataStores during loadContainer\n\t\treadonly containerLoadDataStoreCount: number;\n\t\t// number of unreferenced dataStores during loadContainer\n\t\treadonly referencedDataStoreCount: number;\n\t};\n\n\t// Stores the ids of new data stores between two GC runs. This is used to notify the garbage collector of new\n\t// root data stores that are added.\n\tprivate dataStoresSinceLastGC: string[] = [];\n\t// The handle to the container runtime. This is used mainly for GC purposes to represent outbound reference from\n\t// the container runtime to other nodes.\n\tprivate readonly containerRuntimeHandle: IFluidHandle;\n\tprivate readonly pendingAliasMap: Map<string, Promise<AliasResult>> = new Map<\n\t\tstring,\n\t\tPromise<AliasResult>\n\t>();\n\n\tconstructor(\n\t\tprivate readonly baseSnapshot: ISnapshotTree | undefined,\n\t\tprivate readonly runtime: ContainerRuntime,\n\t\tprivate readonly submitAttachFn: (attachContent: IAttachMessage) => void,\n\t\tprivate readonly getCreateChildSummarizerNodeFn: (\n\t\t\tid: string,\n\t\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t) => CreateChildSummarizerNodeFn,\n\t\tprivate readonly deleteChildSummarizerNodeFn: (id: string) => void,\n\t\tbaseLogger: ITelemetryBaseLogger,\n\t\tprivate readonly gcNodeUpdated: (\n\t\t\tnodePath: string,\n\t\t\ttimestampMs: number,\n\t\t\tpackagePath?: readonly string[],\n\t\t) => void,\n\t\tprivate readonly isDataStoreDeleted: (nodePath: string) => boolean,\n\t\tprivate readonly aliasMap: Map<string, string>,\n\t\tprivate readonly contexts: DataStoreContexts = new DataStoreContexts(baseLogger),\n\t) {\n\t\tthis.mc = createChildMonitoringContext({ logger: baseLogger });\n\t\tthis.containerRuntimeHandle = new FluidObjectHandle(\n\t\t\tthis.runtime,\n\t\t\t\"/\",\n\t\t\tthis.runtime.IFluidHandleContext,\n\t\t);\n\n\t\t// Extract stores stored inside the snapshot\n\t\tconst fluidDataStores = new Map<string, ISnapshotTree>();\n\t\tif (baseSnapshot) {\n\t\t\tfor (const [key, value] of Object.entries(baseSnapshot.trees)) {\n\t\t\t\tfluidDataStores.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\tlet unreferencedDataStoreCount = 0;\n\t\t// Create a context for each of them\n\t\tfor (const [key, value] of fluidDataStores) {\n\t\t\tlet dataStoreContext: FluidDataStoreContext;\n\n\t\t\t// counting number of unreferenced data stores\n\t\t\tif (value.unreferenced) {\n\t\t\t\tunreferencedDataStoreCount++;\n\t\t\t}\n\t\t\t// If we have a detached container, then create local data store contexts.\n\t\t\tif (this.runtime.attachState !== AttachState.Detached) {\n\t\t\t\tdataStoreContext = new RemoteFluidDataStoreContext({\n\t\t\t\t\tid: key,\n\t\t\t\t\tsnapshotTree: value,\n\t\t\t\t\truntime: this.runtime,\n\t\t\t\t\tstorage: this.runtime.storage,\n\t\t\t\t\tscope: this.runtime.scope,\n\t\t\t\t\tcreateSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(key, {\n\t\t\t\t\t\ttype: CreateSummarizerNodeSource.FromSummary,\n\t\t\t\t\t}),\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (typeof value !== \"object\") {\n\t\t\t\t\tthrow new LoggingError(\"Snapshot should be there to load from!!\");\n\t\t\t\t}\n\t\t\t\tconst snapshotTree = value;\n\t\t\t\tdataStoreContext = new LocalFluidDataStoreContext({\n\t\t\t\t\tid: key,\n\t\t\t\t\tpkg: undefined,\n\t\t\t\t\truntime: this.runtime,\n\t\t\t\t\tstorage: this.runtime.storage,\n\t\t\t\t\tscope: this.runtime.scope,\n\t\t\t\t\tcreateSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(key, {\n\t\t\t\t\t\ttype: CreateSummarizerNodeSource.FromSummary,\n\t\t\t\t\t}),\n\t\t\t\t\tmakeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(key),\n\t\t\t\t\tsnapshotTree,\n\t\t\t\t\tisRootDataStore: undefined,\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.contexts.addBoundOrRemoted(dataStoreContext);\n\t\t}\n\t\tthis.containerLoadStats = {\n\t\t\tcontainerLoadDataStoreCount: fluidDataStores.size,\n\t\t\treferencedDataStoreCount: fluidDataStores.size - unreferencedDataStoreCount,\n\t\t};\n\t}\n\n\tpublic get aliases(): ReadonlyMap<string, string> {\n\t\treturn this.aliasMap;\n\t}\n\n\tpublic get pendingAliases(): Map<string, Promise<AliasResult>> {\n\t\treturn this.pendingAliasMap;\n\t}\n\n\tpublic async waitIfPendingAlias(maybeAlias: string): Promise<AliasResult> {\n\t\tconst pendingAliasPromise = this.pendingAliases.get(maybeAlias);\n\t\treturn pendingAliasPromise ?? \"Success\";\n\t}\n\n\tpublic processAttachMessage(message: ISequencedDocumentMessage, local: boolean) {\n\t\tconst attachMessage = message.contents as InboundAttachMessage;\n\n\t\tthis.dataStoresSinceLastGC.push(attachMessage.id);\n\n\t\t// The local object has already been attached\n\t\tif (local) {\n\t\t\tassert(\n\t\t\t\tthis.pendingAttach.has(attachMessage.id),\n\t\t\t\t0x15e /* \"Local object does not have matching attach message id\" */,\n\t\t\t);\n\t\t\tthis.contexts.get(attachMessage.id)?.emit(\"attached\");\n\t\t\tthis.pendingAttach.delete(attachMessage.id);\n\t\t\treturn;\n\t\t}\n\n\t\t// If a non-local operation then go and create the object, otherwise mark it as officially attached.\n\t\tif (this.alreadyProcessed(attachMessage.id)) {\n\t\t\t// TODO: dataStoreId may require a different tag from PackageData #7488\n\t\t\tconst error = new DataCorruptionError(\n\t\t\t\t// pre-0.58 error message: duplicateDataStoreCreatedWithExistingId\n\t\t\t\t\"Duplicate DataStore created with existing id\",\n\t\t\t\t{\n\t\t\t\t\t...extractSafePropertiesFromMessage(message),\n\t\t\t\t\t...tagCodeArtifacts({ dataStoreId: attachMessage.id }),\n\t\t\t\t},\n\t\t\t);\n\t\t\tthrow error;\n\t\t}\n\n\t\tconst flatAttachBlobs = new Map<string, ArrayBufferLike>();\n\t\tlet snapshotTree: ISnapshotTree | undefined;\n\t\tif (attachMessage.snapshot) {\n\t\t\tsnapshotTree = buildSnapshotTree(attachMessage.snapshot.entries, flatAttachBlobs);\n\t\t}\n\n\t\t// Include the type of attach message which is the pkg of the store to be\n\t\t// used by RemoteFluidDataStoreContext in case it is not in the snapshot.\n\t\tconst pkg = [attachMessage.type];\n\t\tconst remoteFluidDataStoreContext = new RemoteFluidDataStoreContext({\n\t\t\tid: attachMessage.id,\n\t\t\tsnapshotTree,\n\t\t\truntime: this.runtime,\n\t\t\tstorage: new StorageServiceWithAttachBlobs(this.runtime.storage, flatAttachBlobs),\n\t\t\tscope: this.runtime.scope,\n\t\t\tcreateSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(attachMessage.id, {\n\t\t\t\ttype: CreateSummarizerNodeSource.FromAttach,\n\t\t\t\tsequenceNumber: message.sequenceNumber,\n\t\t\t\tsnapshot: attachMessage.snapshot ?? {\n\t\t\t\t\tentries: [createAttributesBlob(pkg, true /* isRootDataStore */)],\n\t\t\t\t},\n\t\t\t}),\n\t\t\tpkg,\n\t\t});\n\n\t\tthis.contexts.addBoundOrRemoted(remoteFluidDataStoreContext);\n\t}\n\n\tpublic processAliasMessage(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocalOpMetadata: unknown,\n\t\tlocal: boolean,\n\t): void {\n\t\tconst aliasMessage = message.contents as IDataStoreAliasMessage;\n\t\tif (!isDataStoreAliasMessage(aliasMessage)) {\n\t\t\tthrow new DataCorruptionError(\"malformedDataStoreAliasMessage\", {\n\t\t\t\t...extractSafePropertiesFromMessage(message),\n\t\t\t});\n\t\t}\n\n\t\tconst resolve = localOpMetadata as PendingAliasResolve;\n\t\tconst aliasResult = this.processAliasMessageCore(aliasMessage);\n\t\tif (local) {\n\t\t\tresolve(aliasResult);\n\t\t}\n\t}\n\n\tpublic processAliasMessageCore(aliasMessage: IDataStoreAliasMessage): boolean {\n\t\tif (this.alreadyProcessed(aliasMessage.alias)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst context = this.contexts.get(aliasMessage.internalId);\n\t\t// If the data store has been deleted, log an error and ignore this message. This helps prevent document\n\t\t// corruption in case a deleted data store accidentally submitted a signal.\n\t\tif (\n\t\t\tthis.checkAndLogIfDeleted(\n\t\t\t\taliasMessage.internalId,\n\t\t\t\tcontext,\n\t\t\t\t\"Changed\",\n\t\t\t\t\"processAliasMessageCore\",\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (context === undefined) {\n\t\t\tthis.mc.logger.sendErrorEvent({\n\t\t\t\teventName: \"AliasFluidDataStoreNotFound\",\n\t\t\t\tfluidDataStoreId: aliasMessage.internalId,\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\n\t\tconst handle = new FluidObjectHandle(\n\t\t\tcontext,\n\t\t\taliasMessage.internalId,\n\t\t\tthis.runtime.IFluidHandleContext,\n\t\t);\n\t\tthis.runtime.addedGCOutboundReference(this.containerRuntimeHandle, handle);\n\n\t\tthis.aliasMap.set(aliasMessage.alias, context.id);\n\t\tcontext.setInMemoryRoot();\n\t\treturn true;\n\t}\n\n\tprivate alreadyProcessed(id: string): boolean {\n\t\treturn this.aliasMap.get(id) !== undefined || this.contexts.get(id) !== undefined;\n\t}\n\n\t/**\n\t * Make the data stores locally visible in the container graph by moving the data store context from unbound to\n\t * bound list. This data store can now be reached from the root.\n\t * @param id - The id of the data store context to make visible.\n\t */\n\tprivate makeDataStoreLocallyVisible(id: string): void {\n\t\tconst localContext = this.contexts.getUnbound(id);\n\t\tassert(!!localContext, 0x15f /* \"Could not find unbound context to bind\" */);\n\n\t\t/**\n\t\t * If the container is not detached, it is globally visible to all clients. This data store should also be\n\t\t * globally visible. Move it to attaching state and send an \"attach\" op for it.\n\t\t * If the container is detached, this data store will be part of the summary that makes the container attached.\n\t\t */\n\t\tif (this.runtime.attachState !== AttachState.Detached) {\n\t\t\tlocalContext.emit(\"attaching\");\n\t\t\tconst message = localContext.generateAttachMessage();\n\n\t\t\tthis.pendingAttach.set(id, message);\n\t\t\tthis.submitAttachFn(message);\n\t\t\tthis.attachOpFiredForDataStore.add(id);\n\t\t}\n\n\t\tthis.contexts.bind(id);\n\t}\n\n\tpublic createDetachedDataStoreCore(\n\t\tpkg: Readonly<string[]>,\n\t\tisRoot: boolean,\n\t\tid = uuid(),\n\t): IFluidDataStoreContextDetached {\n\t\tassert(!id.includes(\"/\"), 0x30c /* Id cannot contain slashes */);\n\n\t\tconst context = new LocalDetachedFluidDataStoreContext({\n\t\t\tid,\n\t\t\tpkg,\n\t\t\truntime: this.runtime,\n\t\t\tstorage: this.runtime.storage,\n\t\t\tscope: this.runtime.scope,\n\t\t\tcreateSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(id, {\n\t\t\t\ttype: CreateSummarizerNodeSource.Local,\n\t\t\t}),\n\t\t\tmakeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),\n\t\t\tsnapshotTree: undefined,\n\t\t\tisRootDataStore: isRoot,\n\t\t});\n\t\tthis.contexts.addUnbound(context);\n\t\treturn context;\n\t}\n\n\tpublic _createFluidDataStoreContext(pkg: string[], id: string, props?: any) {\n\t\tassert(!id.includes(\"/\"), 0x30d /* Id cannot contain slashes */);\n\t\tconst context = new LocalFluidDataStoreContext({\n\t\t\tid,\n\t\t\tpkg,\n\t\t\truntime: this.runtime,\n\t\t\tstorage: this.runtime.storage,\n\t\t\tscope: this.runtime.scope,\n\t\t\tcreateSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(id, {\n\t\t\t\ttype: CreateSummarizerNodeSource.Local,\n\t\t\t}),\n\t\t\tmakeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),\n\t\t\tsnapshotTree: undefined,\n\t\t\tisRootDataStore: false,\n\t\t\tcreateProps: props,\n\t\t});\n\t\tthis.contexts.addUnbound(context);\n\t\treturn context;\n\t}\n\n\tpublic get disposed() {\n\t\treturn this.disposeOnce.evaluated;\n\t}\n\tpublic readonly dispose = () => this.disposeOnce.value;\n\n\tpublic resubmitDataStoreOp(envelope: IEnvelope, localOpMetadata: unknown) {\n\t\tconst context = this.contexts.get(envelope.address);\n\t\t// If the data store has been deleted, log an error and throw an error. If there are local changes for a\n\t\t// deleted data store, it can otherwise lead to inconsistent state when compared to other clients.\n\t\tif (\n\t\t\tthis.checkAndLogIfDeleted(envelope.address, context, \"Changed\", \"resubmitDataStoreOp\")\n\t\t) {\n\t\t\tthrow new DataCorruptionError(\"Context is deleted!\", {\n\t\t\t\tcallSite: \"resubmitDataStoreOp\",\n\t\t\t\t...tagCodeArtifacts({ id: envelope.address }),\n\t\t\t});\n\t\t}\n\t\tassert(!!context, 0x160 /* \"There should be a store context for the op\" */);\n\t\tcontext.reSubmit(envelope.contents, localOpMetadata);\n\t}\n\n\tpublic rollbackDataStoreOp(envelope: IEnvelope, localOpMetadata: unknown) {\n\t\tconst context = this.contexts.get(envelope.address);\n\t\t// If the data store has been deleted, log an error and throw an error. If there are local changes for a\n\t\t// deleted data store, it can otherwise lead to inconsistent state when compared to other clients.\n\t\tif (\n\t\t\tthis.checkAndLogIfDeleted(envelope.address, context, \"Changed\", \"rollbackDataStoreOp\")\n\t\t) {\n\t\t\tthrow new DataCorruptionError(\"Context is deleted!\", {\n\t\t\t\tcallSite: \"rollbackDataStoreOp\",\n\t\t\t\t...tagCodeArtifacts({ id: envelope.address }),\n\t\t\t});\n\t\t}\n\t\tassert(!!context, 0x2e8 /* \"There should be a store context for the op\" */);\n\t\tcontext.rollback(envelope.contents, localOpMetadata);\n\t}\n\n\tpublic async applyStashedOp(envelope: IEnvelope): Promise<unknown> {\n\t\tconst context = this.contexts.get(envelope.address);\n\t\t// If the data store has been deleted, log an error and ignore this message. This helps prevent document\n\t\t// corruption in case the data store that stashed the op is deleted.\n\t\tif (this.checkAndLogIfDeleted(envelope.address, context, \"Changed\", \"applyStashedOp\")) {\n\t\t\treturn undefined;\n\t\t}\n\t\tassert(!!context, 0x161 /* \"There should be a store context for the op\" */);\n\t\treturn context.applyStashedOp(envelope.contents);\n\t}\n\n\tpublic async applyStashedAttachOp(message: IAttachMessage) {\n\t\tthis.pendingAttach.set(message.id, message);\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\tthis.processAttachMessage({ contents: message } as ISequencedDocumentMessage, false);\n\t}\n\n\tpublic processFluidDataStoreOp(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalMessageMetadata: unknown,\n\t\taddedOutboundReference: (fromNodePath: string, toNodePath: string) => void,\n\t) {\n\t\tconst envelope = message.contents as IEnvelope;\n\t\tconst transformed = { ...message, contents: envelope.contents };\n\t\tconst context = this.contexts.get(envelope.address);\n\n\t\t// If the data store has been deleted, log an error and ignore this message. This helps prevent document\n\t\t// corruption in case a deleted data store accidentally submitted an op.\n\t\tif (\n\t\t\tthis.checkAndLogIfDeleted(\n\t\t\t\tenvelope.address,\n\t\t\t\tcontext,\n\t\t\t\t\"Changed\",\n\t\t\t\t\"processFluidDataStoreOp\",\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (context === undefined) {\n\t\t\t// Former assert 0x162\n\t\t\tthrow DataProcessingError.create(\n\t\t\t\t\"No context for op\",\n\t\t\t\t\"processFluidDataStoreOp\",\n\t\t\t\tmessage,\n\t\t\t\t{\n\t\t\t\t\tlocal,\n\t\t\t\t\tmessageDetails: JSON.stringify({\n\t\t\t\t\t\ttype: message.type,\n\t\t\t\t\t\tcontentType: typeof message.contents,\n\t\t\t\t\t}),\n\t\t\t\t\t...tagCodeArtifacts({ address: envelope.address }),\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\tcontext.process(transformed, local, localMessageMetadata);\n\n\t\t// By default, we use the new behavior of detecting outbound routes here.\n\t\t// If this setting is true, then DataStoreContext would be notifying GC instead.\n\t\tif (this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) !== true) {\n\t\t\t// Notify GC of any outbound references that were added by this op.\n\t\t\tdetectOutboundReferences(envelope, addedOutboundReference);\n\t\t}\n\n\t\t// Notify that a GC node for the data store changed. This is used to detect if a deleted data store is\n\t\t// being used.\n\t\tthis.gcNodeUpdated(\n\t\t\t`/${envelope.address}`,\n\t\t\tmessage.timestamp,\n\t\t\tcontext.isLoaded ? context.packagePath : undefined,\n\t\t);\n\t}\n\n\tpublic async getDataStore(\n\t\tid: string,\n\t\trequestHeaderData: RuntimeHeaderData,\n\t): Promise<FluidDataStoreContext> {\n\t\tconst headerData = { ...defaultRuntimeHeaderData, ...requestHeaderData };\n\t\tif (\n\t\t\tthis.checkAndLogIfDeleted(\n\t\t\t\tid,\n\t\t\t\tthis.contexts.get(id),\n\t\t\t\t\"Requested\",\n\t\t\t\t\"getDataStore\",\n\t\t\t\trequestHeaderData,\n\t\t\t)\n\t\t) {\n\t\t\t// The requested data store has been deleted by gc. Create a 404 response exception.\n\t\t\tconst request: IRequest = { url: id };\n\t\t\tthrow responseToException(\n\t\t\t\tcreateResponseError(404, \"DataStore was deleted\", request),\n\t\t\t\trequest,\n\t\t\t);\n\t\t}\n\n\t\tconst context = await this.contexts.getBoundOrRemoted(id, headerData.wait);\n\t\tif (context === undefined) {\n\t\t\t// The requested data store does not exits. Throw a 404 response exception.\n\t\t\tconst request: IRequest = { url: id };\n\t\t\tthrow responseToException(create404Response(request), request);\n\t\t}\n\t\treturn context;\n\t}\n\n\t/**\n\t * Returns the data store requested with the given id if available. Otherwise, returns undefined.\n\t */\n\tpublic async getDataStoreIfAvailable(\n\t\tid: string,\n\t\trequestHeaderData: RuntimeHeaderData,\n\t): Promise<FluidDataStoreContext | undefined> {\n\t\t// If the data store has been deleted, log an error and return undefined.\n\t\tif (\n\t\t\tthis.checkAndLogIfDeleted(\n\t\t\t\tid,\n\t\t\t\tthis.contexts.get(id),\n\t\t\t\t\"Requested\",\n\t\t\t\t\"getDataStoreIfAvailable\",\n\t\t\t\trequestHeaderData,\n\t\t\t)\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst headerData = { ...defaultRuntimeHeaderData, ...requestHeaderData };\n\t\tconst context = await this.contexts.getBoundOrRemoted(id, headerData.wait);\n\t\tif (context === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn context;\n\t}\n\n\t/**\n\t * Checks if the data store has been deleted by GC. If so, log an error.\n\t * @param id - The data store's id.\n\t * @param context - The data store context.\n\t * @param callSite - The function name this is called from.\n\t * @param requestHeaderData - The request header information to log if the data store is deleted.\n\t * @returns true if the data store is deleted. Otherwise, returns false.\n\t */\n\tprivate checkAndLogIfDeleted(\n\t\tid: string,\n\t\tcontext: FluidDataStoreContext | undefined,\n\t\tdeletedLogSuffix: string,\n\t\tcallSite: string,\n\t\trequestHeaderData?: RuntimeHeaderData,\n\t) {\n\t\tconst dataStoreNodePath = `/${id}`;\n\t\tif (!this.isDataStoreDeleted(dataStoreNodePath)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.mc.logger.sendErrorEvent({\n\t\t\teventName: `GC_Deleted_DataStore_${deletedLogSuffix}`,\n\t\t\t...tagCodeArtifacts({ id }),\n\t\t\tcallSite,\n\t\t\theaders: JSON.stringify(requestHeaderData),\n\t\t\texists: context !== undefined,\n\t\t});\n\t\treturn true;\n\t}\n\n\tpublic processSignal(fluidDataStoreId: string, message: IInboundSignalMessage, local: boolean) {\n\t\tconst context = this.contexts.get(fluidDataStoreId);\n\t\t// If the data store has been deleted, log an error and ignore this message. This helps prevent document\n\t\t// corruption in case a deleted data store accidentally submitted a signal.\n\t\tif (this.checkAndLogIfDeleted(fluidDataStoreId, context, \"Changed\", \"processSignal\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!context) {\n\t\t\t// Attach message may not have been processed yet\n\t\t\tassert(!local, 0x163 /* \"Missing datastore for local signal\" */);\n\t\t\tthis.mc.logger.sendTelemetryEvent({\n\t\t\t\teventName: \"SignalFluidDataStoreNotFound\",\n\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\tfluidDataStoreId,\n\t\t\t\t}),\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tcontext.processSignal(message, local);\n\t}\n\n\tpublic setConnectionState(connected: boolean, clientId?: string) {\n\t\tfor (const [fluidDataStoreId, context] of this.contexts) {\n\t\t\ttry {\n\t\t\t\tcontext.setConnectionState(connected, clientId);\n\t\t\t} catch (error) {\n\t\t\t\tthis.mc.logger.sendErrorEvent(\n\t\t\t\t\t{\n\t\t\t\t\t\teventName: \"SetConnectionStateError\",\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\t\t\tfluidDataStoreId,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tdetails: JSON.stringify({\n\t\t\t\t\t\t\truntimeConnected: this.runtime.connected,\n\t\t\t\t\t\t\tconnected,\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t\terror,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {\n\t\tconst eventName = attachState === AttachState.Attaching ? \"attaching\" : \"attached\";\n\t\tfor (const [, context] of this.contexts) {\n\t\t\t// Fire only for bounded stores.\n\t\t\tif (!this.contexts.isNotBound(context.id)) {\n\t\t\t\tcontext.emit(eventName);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic get size(): number {\n\t\treturn this.contexts.size;\n\t}\n\n\tpublic async summarize(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummaryTreeWithStats> {\n\t\tconst summaryBuilder = new SummaryTreeBuilder();\n\n\t\t// Iterate over each store and ask it to snapshot\n\t\tawait Promise.all(\n\t\t\tArray.from(this.contexts)\n\t\t\t\t.filter(([_, context]) => {\n\t\t\t\t\t// Summarizer works only with clients with no local changes. A data store in attaching\n\t\t\t\t\t// state indicates an op was sent to attach a local data store, and the the attach op\n\t\t\t\t\t// had not yet round tripped back to the client.\n\t\t\t\t\tif (context.attachState === AttachState.Attaching) {\n\t\t\t\t\t\t// Formerly assert 0x588\n\t\t\t\t\t\tconst error = DataProcessingError.create(\n\t\t\t\t\t\t\t\"Local data store detected in attaching state during summarize\",\n\t\t\t\t\t\t\t\"summarize\",\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t\treturn context.attachState === AttachState.Attached;\n\t\t\t\t})\n\t\t\t\t.map(async ([contextId, context]) => {\n\t\t\t\t\tconst contextSummary = await context.summarize(\n\t\t\t\t\t\tfullTree,\n\t\t\t\t\t\ttrackState,\n\t\t\t\t\t\ttelemetryContext,\n\t\t\t\t\t);\n\t\t\t\t\tsummaryBuilder.addWithStats(contextId, contextSummary);\n\t\t\t\t}),\n\t\t);\n\n\t\treturn summaryBuilder.getSummaryTree();\n\t}\n\n\tpublic createSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {\n\t\tconst builder = new SummaryTreeBuilder();\n\t\t// Attaching graph of some stores can cause other stores to get bound too.\n\t\t// So keep taking summary until no new stores get bound.\n\t\tlet notBoundContextsLength: number;\n\t\tdo {\n\t\t\tconst builderTree = builder.summary.tree;\n\t\t\tnotBoundContextsLength = this.contexts.notBoundLength();\n\t\t\t// Iterate over each data store and ask it to snapshot\n\t\t\tArray.from(this.contexts)\n\t\t\t\t.filter(\n\t\t\t\t\t([key, _]) =>\n\t\t\t\t\t\t// Take summary of bounded data stores only, make sure we haven't summarized them already\n\t\t\t\t\t\t// and no attach op has been fired for that data store because for loader versions <= 0.24\n\t\t\t\t\t\t// we set attach state as \"attaching\" before taking createNew summary.\n\t\t\t\t\t\t!(\n\t\t\t\t\t\t\tthis.contexts.isNotBound(key) ||\n\t\t\t\t\t\t\tbuilderTree[key] ||\n\t\t\t\t\t\t\tthis.attachOpFiredForDataStore.has(key)\n\t\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\t.map(([key, value]) => {\n\t\t\t\t\tlet dataStoreSummary: ISummarizeResult;\n\t\t\t\t\tif (value.isLoaded) {\n\t\t\t\t\t\tconst snapshot = value.generateAttachMessage().snapshot;\n\t\t\t\t\t\tdataStoreSummary = convertToSummaryTree(snapshot, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If this data store is not yet loaded, then there should be no changes in the snapshot from\n\t\t\t\t\t\t// which it was created as it is detached container. So just use the previous snapshot.\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\t!!this.baseSnapshot,\n\t\t\t\t\t\t\t0x166 /* \"BaseSnapshot should be there as detached container loaded from snapshot\" */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdataStoreSummary = convertSnapshotTreeToSummaryTree(\n\t\t\t\t\t\t\tthis.baseSnapshot.trees[key],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbuilder.addWithStats(key, dataStoreSummary);\n\t\t\t\t});\n\t\t} while (notBoundContextsLength !== this.contexts.notBoundLength());\n\n\t\treturn builder.getSummaryTree();\n\t}\n\n\t/**\n\t * Before GC runs, called by the garbage collector to update any pending GC state.\n\t * The garbage collector needs to know all outbound references that are added. Since root data stores are not\n\t * explicitly marked as referenced, notify GC of new root data stores that were added since the last GC run.\n\t */\n\tpublic async updateStateBeforeGC(): Promise<void> {\n\t\tfor (const id of this.dataStoresSinceLastGC) {\n\t\t\tconst context = this.contexts.get(id);\n\t\t\tassert(context !== undefined, 0x2b6 /* Missing data store context */);\n\t\t\tif (await context.isRoot()) {\n\t\t\t\t// A root data store is basically a reference from the container runtime to the data store.\n\t\t\t\tconst handle = new FluidObjectHandle(context, id, this.runtime.IFluidHandleContext);\n\t\t\t\tthis.runtime.addedGCOutboundReference(this.containerRuntimeHandle, handle);\n\t\t\t}\n\t\t}\n\t\tthis.dataStoresSinceLastGC = [];\n\t}\n\n\t/**\n\t * Generates data used for garbage collection. It does the following:\n\t *\n\t * 1. Calls into each child data store context to get its GC data.\n\t *\n\t * 2. Prefixes the child context's id to the GC nodes in the child's GC data. This makes sure that the node can be\n\t * identified as belonging to the child.\n\t *\n\t * 3. Adds a GC node for this channel to the nodes received from the children. All these nodes together represent\n\t * the GC data of this channel.\n\t *\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tpublic async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\tconst builder = new GCDataBuilder();\n\t\t// Iterate over each store and get their GC data.\n\t\tawait Promise.all(\n\t\t\tArray.from(this.contexts)\n\t\t\t\t.filter(([_, context]) => {\n\t\t\t\t\t// Summarizer client and hence GC works only with clients with no local changes. A data store in\n\t\t\t\t\t// attaching state indicates an op was sent to attach a local data store, and the the attach op\n\t\t\t\t\t// had not yet round tripped back to the client.\n\t\t\t\t\t// Formerly assert 0x589\n\t\t\t\t\tif (context.attachState === AttachState.Attaching) {\n\t\t\t\t\t\tconst error = DataProcessingError.create(\n\t\t\t\t\t\t\t\"Local data store detected in attaching state while running GC\",\n\t\t\t\t\t\t\t\"getGCData\",\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn context.attachState === AttachState.Attached;\n\t\t\t\t})\n\t\t\t\t.map(async ([contextId, context]) => {\n\t\t\t\t\tconst contextGCData = await context.getGCData(fullGC);\n\t\t\t\t\t// Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.\n\t\t\t\t\t// This also gradually builds the id of each node to be a path from the root.\n\t\t\t\t\tbuilder.prefixAndAddNodes(contextId, contextGCData.gcNodes);\n\t\t\t\t}),\n\t\t);\n\n\t\t// Get the outbound routes and add a GC node for this channel.\n\t\tbuilder.addNode(\"/\", await this.getOutboundRoutes());\n\t\treturn builder.getGCData();\n\t}\n\n\t/**\n\t * After GC has run, called to notify this Container's data stores of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in all data stores in this Container.\n\t */\n\tpublic updateUsedRoutes(usedRoutes: readonly string[]) {\n\t\t// Get a map of data store ids to routes used in it.\n\t\tconst usedDataStoreRoutes = unpackChildNodesUsedRoutes(usedRoutes);\n\n\t\t// Verify that the used routes are correct.\n\t\tfor (const [id] of usedDataStoreRoutes) {\n\t\t\tassert(\n\t\t\t\tthis.contexts.has(id),\n\t\t\t\t0x167 /* \"Used route does not belong to any known data store\" */,\n\t\t\t);\n\t\t}\n\n\t\t// Update the used routes in each data store. Used routes is empty for unused data stores.\n\t\tfor (const [contextId, context] of this.contexts) {\n\t\t\tcontext.updateUsedRoutes(usedDataStoreRoutes.get(contextId) ?? []);\n\t\t}\n\t}\n\n\t/**\n\t * This is called to update objects whose routes are unused. The unused objects are deleted.\n\t * @param unusedRoutes - The routes that are unused in all data stores in this Container.\n\t */\n\tpublic updateUnusedRoutes(unusedRoutes: readonly string[]) {\n\t\tfor (const route of unusedRoutes) {\n\t\t\tconst pathParts = route.split(\"/\");\n\t\t\t// Delete data store only if its route (/datastoreId) is in unusedRoutes. We don't want to delete a data\n\t\t\t// store based on its DDS being unused.\n\t\t\tif (pathParts.length > 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst dataStoreId = pathParts[1];\n\t\t\tassert(this.contexts.has(dataStoreId), 0x2d7 /* No data store with specified id */);\n\t\t\t// Delete the contexts of unused data stores.\n\t\t\tthis.contexts.delete(dataStoreId);\n\t\t\t// Delete the summarizer node of the unused data stores.\n\t\t\tthis.deleteChildSummarizerNodeFn(dataStoreId);\n\t\t}\n\t}\n\n\t/**\n\t * Delete data stores and its objects that are sweep ready.\n\t * @param sweepReadyDataStoreRoutes - The routes of data stores and its objects that are sweep ready and should\n\t * be deleted.\n\t * @returns The routes of data stores and its objects that were deleted.\n\t */\n\tpublic deleteSweepReadyNodes(sweepReadyDataStoreRoutes: readonly string[]): readonly string[] {\n\t\tfor (const route of sweepReadyDataStoreRoutes) {\n\t\t\tconst pathParts = route.split(\"/\");\n\t\t\tconst dataStoreId = pathParts[1];\n\n\t\t\t// Ignore sub-data store routes because a data store and its sub-routes are deleted together, so, we only\n\t\t\t// need to delete the data store.\n\t\t\t// These routes will still be returned below as among the deleted routes\n\t\t\tif (pathParts.length > 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst dataStoreContext = this.contexts.get(dataStoreId);\n\t\t\tif (dataStoreContext === undefined) {\n\t\t\t\t// If the data store hasn't already been deleted, log an error because this should never happen.\n\t\t\t\t// If the data store has already been deleted, log a telemetry event. This can happen because multiple GC\n\t\t\t\t// sweep ops can contain the same data store. It would be interesting to track how often this happens.\n\t\t\t\tconst alreadyDeleted = this.isDataStoreDeleted(`/${dataStoreId}`);\n\t\t\t\tthis.mc.logger.sendTelemetryEvent({\n\t\t\t\t\teventName: \"DeletedDataStoreNotFound\",\n\t\t\t\t\tcategory: alreadyDeleted ? \"generic\" : \"error\",\n\t\t\t\t\t...tagCodeArtifacts({ id: dataStoreId }),\n\t\t\t\t\tdetails: { alreadyDeleted },\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdataStoreContext.delete();\n\n\t\t\t// Delete the contexts of sweep ready data stores.\n\t\t\tthis.contexts.delete(dataStoreId);\n\t\t\t// Delete the summarizer node of the sweep ready data stores.\n\t\t\tthis.deleteChildSummarizerNodeFn(dataStoreId);\n\t\t}\n\t\treturn Array.from(sweepReadyDataStoreRoutes);\n\t}\n\n\t/**\n\t * This is called to update objects whose routes are tombstones.\n\t *\n\t * A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.\n\t * Tombstoned objects are eventually deleted by GC.\n\t *\n\t * @param tombstonedRoutes - The routes that are tombstones in all data stores in this Container.\n\t */\n\tpublic updateTombstonedRoutes(tombstonedRoutes: readonly string[]) {\n\t\tconst tombstonedDataStoresSet: Set<string> = new Set();\n\t\tfor (const route of tombstonedRoutes) {\n\t\t\tconst pathParts = route.split(\"/\");\n\t\t\t// Tombstone data store only if its route (/datastoreId) is directly in tombstoneRoutes.\n\t\t\tif (pathParts.length > 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst dataStoreId = pathParts[1];\n\t\t\tassert(this.contexts.has(dataStoreId), 0x510 /* No data store with specified id */);\n\t\t\ttombstonedDataStoresSet.add(dataStoreId);\n\t\t}\n\n\t\t// Update the used routes in each data store. Used routes is empty for unused data stores.\n\t\tfor (const [contextId, context] of this.contexts) {\n\t\t\tcontext.setTombstone(tombstonedDataStoresSet.has(contextId));\n\t\t}\n\t}\n\n\t/**\n\t * Returns the outbound routes of this channel. Only root data stores are considered referenced and their paths are\n\t * part of outbound routes.\n\t */\n\tprivate async getOutboundRoutes(): Promise<string[]> {\n\t\tconst outboundRoutes: string[] = [];\n\t\tfor (const [contextId, context] of this.contexts) {\n\t\t\tconst isRootDataStore = await context.isRoot();\n\t\t\tif (isRootDataStore) {\n\t\t\t\toutboundRoutes.push(`/${contextId}`);\n\t\t\t}\n\t\t}\n\t\treturn outboundRoutes;\n\t}\n\n\t/**\n\t * Called by GC to retrieve the package path of a data store node with the given path.\n\t */\n\tpublic async getDataStorePackagePath(nodePath: string): Promise<readonly string[] | undefined> {\n\t\t// If the node belongs to a data store, return its package path. For DDSes, we return the package path of the\n\t\t// data store that contains it.\n\t\tconst context = this.contexts.get(nodePath.split(\"/\")[1]);\n\t\treturn (await context?.getInitialSnapshotDetails())?.pkg;\n\t}\n\n\t/**\n\t * Called by GC to determine if a node is for a data store or for an object within a data store (for e.g. DDS).\n\t * @returns the GC node type if the node belongs to a data store or object within data store, undefined otherwise.\n\t */\n\tpublic getGCNodeType(nodePath: string): GCNodeType | undefined {\n\t\tconst pathParts = nodePath.split(\"/\");\n\t\tif (!this.contexts.has(pathParts[1])) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Data stores paths are of the format \"/dataStoreId\".\n\t\t// Sub data store paths are of the format \"/dataStoreId/subPath/...\".\n\t\tif (pathParts.length === 2) {\n\t\t\treturn GCNodeType.DataStore;\n\t\t}\n\t\treturn GCNodeType.SubDataStore;\n\t}\n}\n\nexport function getSummaryForDatastores(\n\tsnapshot: ISnapshotTree | undefined,\n\tmetadata?: IContainerRuntimeMetadata,\n): ISnapshotTree | undefined {\n\tif (!snapshot) {\n\t\treturn undefined;\n\t}\n\n\tif (rootHasIsolatedChannels(metadata)) {\n\t\tconst datastoresSnapshot = snapshot.trees[channelsTreeName];\n\t\tassert(!!datastoresSnapshot, 0x168 /* Expected tree in snapshot not found */);\n\t\treturn datastoresSnapshot;\n\t} else {\n\t\t// back-compat: strip out all non-datastore paths before giving to DataStores object.\n\t\tconst datastoresTrees: ISnapshotTree[\"trees\"] = {};\n\t\tfor (const [key, value] of Object.entries(snapshot.trees)) {\n\t\t\tif (!nonDataStorePaths.includes(key)) {\n\t\t\t\tdatastoresTrees[key] = value;\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t...snapshot,\n\t\t\ttrees: datastoresTrees,\n\t\t};\n\t}\n}\n\n/**\n * Traverse this op's contents and detect any outbound routes that were added by this op.\n */\nexport function detectOutboundReferences(\n\tenvelope: IEnvelope,\n\taddedOutboundReference: (fromNodePath: string, toNodePath: string) => void,\n): void {\n\t// These will be built up as we traverse the envelope contents\n\tconst outboundPaths: string[] = [];\n\tlet ddsAddress: string | undefined;\n\n\tfunction recursivelyFindHandles(obj: unknown) {\n\t\tif (typeof obj === \"object\" && obj !== null) {\n\t\t\tfor (const [key, value] of Object.entries(obj)) {\n\t\t\t\t// If 'value' is a serialized IFluidHandle, it represents a new outbound route.\n\t\t\t\tif (isSerializedHandle(value)) {\n\t\t\t\t\toutboundPaths.push(value.url);\n\t\t\t\t}\n\n\t\t\t\t// NOTE: This is taking a hard dependency on the fact that in our DataStore implementation,\n\t\t\t\t// the address of the DDS is stored in a property called \"address\". This is not ideal.\n\t\t\t\t// An alternative would be for the op envelope to include the absolute path (built up as it is submitted)\n\t\t\t\tif (key === \"address\" && ddsAddress === undefined) {\n\t\t\t\t\tddsAddress = value;\n\t\t\t\t}\n\n\t\t\t\trecursivelyFindHandles(value);\n\t\t\t}\n\t\t}\n\t}\n\n\trecursivelyFindHandles(envelope.contents);\n\n\t// GC node paths are all absolute paths, hence the \"\" prefix.\n\t// e.g. this will yield \"/dataStoreId/ddsId\"\n\tconst fromPath = [\"\", envelope.address, ddsAddress].join(\"/\");\n\toutboundPaths.forEach((toPath) => addedOutboundReference(fromPath, toPath));\n}\n"]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { EventForwarder } from "@fluid-internal/client-utils";
|
|
6
|
-
import { IDeltaManager, IDeltaManagerEvents, IDeltaQueue, IDeltaSender, ReadOnlyInfo } from "@fluidframework/container-definitions";
|
|
7
|
-
import { IClientConfiguration, IClientDetails, IDocumentMessage, ISequencedDocumentMessage, ISignalMessage } from "@fluidframework/protocol-definitions";
|
|
8
|
-
/**
|
|
9
|
-
* Base class for creating proxy to the real delta manager. It implements all required methods on IDeltaManager and
|
|
10
|
-
* proxy implementations can override specific methods.
|
|
11
|
-
*/
|
|
12
|
-
export declare class DeltaManagerProxyBase extends EventForwarder<IDeltaManagerEvents> implements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {
|
|
13
|
-
protected readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
14
|
-
get IDeltaSender(): IDeltaSender;
|
|
15
|
-
get inbound(): IDeltaQueue<ISequencedDocumentMessage>;
|
|
16
|
-
get outbound(): IDeltaQueue<IDocumentMessage[]>;
|
|
17
|
-
get inboundSignal(): IDeltaQueue<ISignalMessage>;
|
|
18
|
-
get minimumSequenceNumber(): number;
|
|
19
|
-
get lastSequenceNumber(): number;
|
|
20
|
-
get lastMessage(): ISequencedDocumentMessage | undefined;
|
|
21
|
-
get lastKnownSeqNumber(): number;
|
|
22
|
-
get initialSequenceNumber(): number;
|
|
23
|
-
get hasCheckpointSequenceNumber(): boolean;
|
|
24
|
-
get clientDetails(): IClientDetails;
|
|
25
|
-
get version(): string;
|
|
26
|
-
get maxMessageSize(): number;
|
|
27
|
-
get serviceConfiguration(): IClientConfiguration | undefined;
|
|
28
|
-
get active(): boolean;
|
|
29
|
-
get readOnlyInfo(): ReadOnlyInfo;
|
|
30
|
-
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>);
|
|
31
|
-
dispose(): void;
|
|
32
|
-
submitSignal(content: any, targetClientId?: string): void;
|
|
33
|
-
flush(): void;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=deltaManagerProxyBase.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deltaManagerProxyBase.d.mts","sourceRoot":"","sources":["../src/deltaManagerProxyBase.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,cAAc,EAAE,MAAM,8BAA8B;OACtD,EACN,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,MAAM,uCAAuC;OACvC,EACN,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,EACd,MAAM,sCAAsC;AAE7C;;;GAGG;AACH,qBAAa,qBACZ,SAAQ,cAAc,CAAC,mBAAmB,CAC1C,YAAW,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;IAmEpE,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC;IAjE5F,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED,IAAW,OAAO,IAAI,WAAW,CAAC,yBAAyB,CAAC,CAE3D;IAED,IAAW,QAAQ,IAAI,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAErD;IAED,IAAW,aAAa,IAAI,WAAW,CAAC,cAAc,CAAC,CAEtD;IAED,IAAW,qBAAqB,IAAI,MAAM,CAEzC;IAED,IAAW,kBAAkB,IAAI,MAA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