@fluidframework/container-runtime 2.0.0-rc.2.0.1 → 2.0.0-rc.3.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/CHANGELOG.md +23 -0
- package/api-report/container-runtime.api.md +471 -52
- package/dist/batchTracker.d.ts +1 -1
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +4 -4
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +33 -30
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +82 -107
- package/dist/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +27 -22
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +189 -165
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +3 -3
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +17 -17
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js +2 -2
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +42 -39
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +425 -292
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +8 -8
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +58 -19
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +171 -114
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +1 -0
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +12 -11
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +5 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js +4 -4
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/dist/deltaManagerSummarizerProxy.js.map +1 -1
- package/dist/deltaScheduler.d.ts +1 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +6 -6
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +4 -4
- package/dist/error.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +3 -2
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +23 -23
- 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 +4 -5
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +4 -5
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +5 -1
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +21 -12
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +2 -2
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +11 -11
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +2 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +11 -9
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +6 -6
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +1 -1
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +2 -1
- package/dist/gc/index.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +91 -0
- package/dist/messageTypes.d.ts +11 -5
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js +4 -0
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +2 -20
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +3 -3
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +3 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +5 -6
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +15 -4
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +62 -63
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +2 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +14 -16
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +12 -4
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +63 -53
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +2 -1
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +30 -29
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +8 -0
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +36 -32
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +1 -1
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +18 -18
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/public.d.ts +12 -0
- package/dist/scheduleManager.d.ts +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +28 -24
- package/dist/scheduleManager.js.map +1 -1
- package/dist/storageServiceWithAttachBlobs.d.ts +2 -2
- package/dist/storageServiceWithAttachBlobs.d.ts.map +1 -1
- package/dist/storageServiceWithAttachBlobs.js +2 -2
- package/dist/storageServiceWithAttachBlobs.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +209 -0
- package/dist/summary/documentSchema.d.ts.map +1 -0
- package/dist/summary/documentSchema.js +390 -0
- package/dist/summary/documentSchema.js.map +1 -0
- package/dist/summary/index.d.ts +2 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +4 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +2 -2
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +12 -7
- 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 +3 -3
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +3 -3
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +16 -16
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +3 -2
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +13 -13
- 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 +1 -1
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js +2 -2
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +3 -2
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +28 -28
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -3
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +14 -14
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +5 -3
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -2
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +7 -7
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +6 -17
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +8 -8
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +4 -3
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +17 -17
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +1 -1
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +15 -14
- package/dist/summary/summaryManager.js.map +1 -1
- package/internal.d.ts +11 -0
- package/legacy.d.ts +11 -0
- package/lib/batchTracker.d.ts +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +2 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +33 -30
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +48 -73
- package/lib/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +27 -22
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +132 -108
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +3 -3
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +3 -3
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +42 -39
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +276 -141
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +3 -3
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +58 -19
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +110 -53
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +1 -0
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +3 -2
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +5 -1
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerSummarizerProxy.d.ts +1 -1
- package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/lib/deltaManagerSummarizerProxy.js.map +1 -1
- package/lib/deltaScheduler.d.ts +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +1 -1
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/error.d.ts +1 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +2 -2
- package/lib/error.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +3 -2
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +8 -8
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +2 -2
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +4 -5
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +4 -5
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +5 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +10 -2
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +2 -2
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +2 -2
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +2 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +4 -2
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +2 -2
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +1 -1
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -1
- package/lib/gc/index.js.map +1 -1
- package/lib/index.d.ts +5 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -2
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +91 -0
- package/lib/messageTypes.d.ts +11 -5
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js +4 -0
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +2 -20
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +3 -3
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js +2 -2
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +2 -3
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +15 -4
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +61 -62
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +2 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +9 -12
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +12 -4
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +47 -38
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +2 -1
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +19 -18
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +8 -0
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +36 -32
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +1 -1
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +2 -2
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/public.d.ts +12 -0
- package/lib/scheduleManager.d.ts +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +7 -3
- package/lib/scheduleManager.js.map +1 -1
- package/lib/storageServiceWithAttachBlobs.d.ts +2 -2
- package/lib/storageServiceWithAttachBlobs.d.ts.map +1 -1
- package/lib/storageServiceWithAttachBlobs.js +1 -1
- package/lib/storageServiceWithAttachBlobs.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +209 -0
- package/lib/summary/documentSchema.d.ts.map +1 -0
- package/lib/summary/documentSchema.js +386 -0
- package/lib/summary/documentSchema.js.map +1 -0
- package/lib/summary/index.d.ts +2 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -0
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +2 -2
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +7 -2
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +3 -3
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +3 -3
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +3 -2
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +3 -3
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +2 -2
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +1 -1
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js +1 -1
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +3 -2
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +5 -5
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +3 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +5 -3
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -2
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -1
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +6 -17
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +3 -3
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +4 -3
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +4 -4
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +1 -1
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +9 -8
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +57 -65
- package/src/batchTracker.ts +4 -3
- package/src/blobManager.ts +100 -77
- package/src/channelCollection.ts +223 -167
- package/src/connectionTelemetry.ts +12 -12
- package/src/containerHandleContext.ts +3 -2
- package/src/containerRuntime.ts +481 -277
- package/src/dataStore.ts +9 -4
- package/src/dataStoreContext.ts +201 -97
- package/src/dataStoreContexts.ts +5 -2
- package/src/dataStoreRegistry.ts +3 -2
- package/src/deltaManagerSummarizerProxy.ts +1 -1
- package/src/deltaScheduler.ts +2 -1
- package/src/error.ts +2 -2
- package/src/gc/garbageCollection.ts +21 -20
- package/src/gc/gcConfigs.ts +15 -18
- package/src/gc/gcDefinitions.ts +6 -8
- package/src/gc/gcHelpers.ts +22 -5
- package/src/gc/gcSummaryStateTracker.ts +7 -5
- package/src/gc/gcTelemetry.ts +13 -7
- package/src/gc/gcUnreferencedStateTracker.ts +3 -2
- package/src/gc/index.ts +1 -0
- package/src/index.ts +22 -1
- package/src/messageTypes.ts +20 -6
- package/src/opLifecycle/README.md +89 -0
- package/src/opLifecycle/batchManager.ts +1 -0
- package/src/opLifecycle/definitions.ts +3 -21
- package/src/opLifecycle/index.ts +3 -9
- package/src/opLifecycle/opCompressor.ts +6 -5
- package/src/opLifecycle/opDecompressor.ts +90 -100
- package/src/opLifecycle/opGroupingManager.ts +12 -14
- package/src/opLifecycle/opSplitter.ts +76 -48
- package/src/opLifecycle/outbox.ts +30 -38
- package/src/opLifecycle/remoteMessageProcessor.ts +43 -55
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +6 -6
- package/src/scheduleManager.ts +10 -8
- package/src/storageServiceWithAttachBlobs.ts +2 -2
- package/src/summary/documentSchema.ts +631 -0
- package/src/summary/index.ts +10 -1
- package/src/summary/orderedClientElection.ts +7 -7
- package/src/summary/runWhileConnectedCoordinator.ts +3 -2
- package/src/summary/runningSummarizer.ts +22 -20
- package/src/summary/summarizer.ts +17 -15
- package/src/summary/summarizerClientElection.ts +3 -2
- package/src/summary/summarizerHeuristics.ts +4 -2
- package/src/summary/summarizerNode/summarizerNode.ts +20 -18
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +3 -2
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +16 -8
- package/src/summary/summarizerTypes.ts +7 -3
- package/src/summary/summaryCollection.ts +3 -3
- package/src/summary/summaryFormat.ts +14 -26
- package/src/summary/summaryGenerator.ts +12 -15
- package/src/summary/summaryManager.ts +16 -13
- package/api-extractor-cjs.json +0 -8
- package/dist/container-runtime-alpha.d.ts +0 -1753
- package/dist/container-runtime-beta.d.ts +0 -268
- package/dist/container-runtime-public.d.ts +0 -268
- package/dist/container-runtime-untrimmed.d.ts +0 -1893
- package/lib/container-runtime-alpha.d.ts +0 -1753
- package/lib/container-runtime-beta.d.ts +0 -268
- package/lib/container-runtime-public.d.ts +0 -268
- package/lib/container-runtime-untrimmed.d.ts +0 -1893
- package/lib/test/batchTracker.spec.js +0 -88
- package/lib/test/batchTracker.spec.js.map +0 -1
- package/lib/test/blobManager.spec.js +0 -835
- package/lib/test/blobManager.spec.js.map +0 -1
- package/lib/test/channelCollection.spec.js +0 -141
- package/lib/test/channelCollection.spec.js.map +0 -1
- package/lib/test/containerRuntime.spec.js +0 -1748
- package/lib/test/containerRuntime.spec.js.map +0 -1
- package/lib/test/dataStoreContext.spec.js +0 -801
- package/lib/test/dataStoreContext.spec.js.map +0 -1
- package/lib/test/dataStoreCreation.spec.js +0 -312
- package/lib/test/dataStoreCreation.spec.js.map +0 -1
- package/lib/test/dataStoreRegistry.spec.js +0 -26
- package/lib/test/dataStoreRegistry.spec.js.map +0 -1
- package/lib/test/fuzz/fuzzUtils.js +0 -66
- package/lib/test/fuzz/fuzzUtils.js.map +0 -1
- package/lib/test/fuzz/summarizer.fuzz.spec.js +0 -31
- package/lib/test/fuzz/summarizer.fuzz.spec.js.map +0 -1
- package/lib/test/fuzz/summarizerFuzzMocks.js +0 -162
- package/lib/test/fuzz/summarizerFuzzMocks.js.map +0 -1
- package/lib/test/fuzz/summarizerFuzzSuite.js +0 -106
- package/lib/test/fuzz/summarizerFuzzSuite.js.map +0 -1
- package/lib/test/gc/garbageCollection.spec.js +0 -1465
- package/lib/test/gc/garbageCollection.spec.js.map +0 -1
- package/lib/test/gc/gcConfigs.spec.js +0 -690
- package/lib/test/gc/gcConfigs.spec.js.map +0 -1
- package/lib/test/gc/gcHelpers.spec.js +0 -110
- package/lib/test/gc/gcHelpers.spec.js.map +0 -1
- package/lib/test/gc/gcReferenceGraphAlgorithm.spec.js +0 -68
- package/lib/test/gc/gcReferenceGraphAlgorithm.spec.js.map +0 -1
- package/lib/test/gc/gcStats.spec.js +0 -391
- package/lib/test/gc/gcStats.spec.js.map +0 -1
- package/lib/test/gc/gcSummaryStateTracker.spec.js +0 -228
- package/lib/test/gc/gcSummaryStateTracker.spec.js.map +0 -1
- package/lib/test/gc/gcTelemetry.spec.js +0 -530
- package/lib/test/gc/gcTelemetry.spec.js.map +0 -1
- package/lib/test/gc/gcUnitTestHelpers.js +0 -29
- package/lib/test/gc/gcUnitTestHelpers.js.map +0 -1
- package/lib/test/gc/gcUnreferencedStateTracker.spec.js +0 -192
- package/lib/test/gc/gcUnreferencedStateTracker.spec.js.map +0 -1
- package/lib/test/getPendingBlobs.spec.js +0 -193
- package/lib/test/getPendingBlobs.spec.js.map +0 -1
- package/lib/test/hardwareStats.spec.js +0 -93
- package/lib/test/hardwareStats.spec.js.map +0 -1
- package/lib/test/index.js +0 -6
- package/lib/test/index.js.map +0 -1
- package/lib/test/opLifecycle/OpGroupingManager.spec.js +0 -225
- package/lib/test/opLifecycle/OpGroupingManager.spec.js.map +0 -1
- package/lib/test/opLifecycle/batchManager.spec.js +0 -189
- package/lib/test/opLifecycle/batchManager.spec.js.map +0 -1
- package/lib/test/opLifecycle/opCompressor.spec.js +0 -74
- package/lib/test/opLifecycle/opCompressor.spec.js.map +0 -1
- package/lib/test/opLifecycle/opDecompressor.spec.js +0 -218
- package/lib/test/opLifecycle/opDecompressor.spec.js.map +0 -1
- package/lib/test/opLifecycle/opSplitter.spec.js +0 -272
- package/lib/test/opLifecycle/opSplitter.spec.js.map +0 -1
- package/lib/test/opLifecycle/outbox.spec.js +0 -675
- package/lib/test/opLifecycle/outbox.spec.js.map +0 -1
- package/lib/test/opLifecycle/remoteMessageProcessor.spec.js +0 -196
- package/lib/test/opLifecycle/remoteMessageProcessor.spec.js.map +0 -1
- package/lib/test/pendingStateManager.spec.js +0 -329
- package/lib/test/pendingStateManager.spec.js.map +0 -1
- package/lib/test/scheduleManager.spec.js +0 -270
- package/lib/test/scheduleManager.spec.js.map +0 -1
- package/lib/test/summarizerNode.spec.js +0 -326
- package/lib/test/summarizerNode.spec.js.map +0 -1
- package/lib/test/summarizerNodeWithGc.spec.js +0 -318
- package/lib/test/summarizerNodeWithGc.spec.js.map +0 -1
- package/lib/test/summary/orderedClientElection.spec.js +0 -535
- package/lib/test/summary/orderedClientElection.spec.js.map +0 -1
- package/lib/test/summary/runningSummarizer.spec.js +0 -1349
- package/lib/test/summary/runningSummarizer.spec.js.map +0 -1
- package/lib/test/summary/summarizer.spec.js +0 -29
- package/lib/test/summary/summarizer.spec.js.map +0 -1
- package/lib/test/summary/summarizerClientElection.spec.js +0 -436
- package/lib/test/summary/summarizerClientElection.spec.js.map +0 -1
- package/lib/test/summary/summarizerHeuristics.spec.js +0 -289
- package/lib/test/summary/summarizerHeuristics.spec.js.map +0 -1
- package/lib/test/summary/summaryCollection.spec.js +0 -200
- package/lib/test/summary/summaryCollection.spec.js.map +0 -1
- package/lib/test/summary/summaryManager.spec.js +0 -430
- package/lib/test/summary/summaryManager.spec.js.map +0 -1
- package/lib/test/summary/testQuorumClients.js +0 -34
- package/lib/test/summary/testQuorumClients.js.map +0 -1
- package/lib/test/throttler.spec.js +0 -175
- package/lib/test/throttler.spec.js.map +0 -1
- package/lib/test/types/validateContainerRuntimePrevious.generated.js +0 -180
- package/lib/test/types/validateContainerRuntimePrevious.generated.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/src/channelCollection.ts
CHANGED
|
@@ -3,90 +3,95 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { AttachState } from "@fluidframework/container-definitions";
|
|
6
7
|
import {
|
|
7
|
-
|
|
8
|
+
FluidObject,
|
|
8
9
|
IDisposable,
|
|
9
10
|
IFluidHandle,
|
|
10
11
|
IRequest,
|
|
11
|
-
FluidObject,
|
|
12
12
|
IResponse,
|
|
13
|
+
ITelemetryBaseLogger,
|
|
13
14
|
} from "@fluidframework/core-interfaces";
|
|
14
|
-
import {
|
|
15
|
+
import { assert, Lazy, LazyPromise } from "@fluidframework/core-utils/internal";
|
|
16
|
+
import { FluidObjectHandle } from "@fluidframework/datastore/internal";
|
|
17
|
+
import { buildSnapshotTree } from "@fluidframework/driver-utils/internal";
|
|
15
18
|
import { ISequencedDocumentMessage, ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
19
|
+
import {
|
|
20
|
+
IGarbageCollectionData,
|
|
21
|
+
IInboundSignalMessage,
|
|
22
|
+
ISummaryTreeWithStats,
|
|
23
|
+
ITelemetryContext,
|
|
24
|
+
} from "@fluidframework/runtime-definitions";
|
|
16
25
|
import {
|
|
17
26
|
AliasResult,
|
|
18
|
-
channelsTreeName,
|
|
19
27
|
CreateSummarizerNodeSource,
|
|
20
28
|
IAttachMessage,
|
|
21
29
|
IEnvelope,
|
|
22
30
|
IFluidDataStoreChannel,
|
|
31
|
+
IFluidDataStoreContext,
|
|
23
32
|
IFluidDataStoreContextDetached,
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
IFluidDataStoreFactory,
|
|
34
|
+
IFluidDataStoreRegistry,
|
|
26
35
|
IFluidParentContext,
|
|
27
|
-
InboundAttachMessage,
|
|
28
36
|
ISummarizeResult,
|
|
29
|
-
|
|
30
|
-
ITelemetryContext,
|
|
31
|
-
IFluidDataStoreFactory,
|
|
32
|
-
IFluidDataStoreContext,
|
|
37
|
+
InboundAttachMessage,
|
|
33
38
|
NamedFluidDataStoreRegistryEntries,
|
|
34
|
-
|
|
35
|
-
} from "@fluidframework/runtime-definitions";
|
|
39
|
+
channelsTreeName,
|
|
40
|
+
} from "@fluidframework/runtime-definitions/internal";
|
|
36
41
|
import {
|
|
42
|
+
GCDataBuilder,
|
|
43
|
+
RequestParser,
|
|
44
|
+
SummaryTreeBuilder,
|
|
37
45
|
convertSnapshotTreeToSummaryTree,
|
|
38
46
|
convertSummaryTreeToITree,
|
|
39
47
|
create404Response,
|
|
40
48
|
createResponseError,
|
|
41
|
-
|
|
49
|
+
encodeCompactIdToString,
|
|
42
50
|
isSerializedHandle,
|
|
43
51
|
processAttachMessageGCData,
|
|
44
52
|
responseToException,
|
|
45
|
-
SummaryTreeBuilder,
|
|
46
53
|
unpackChildNodesUsedRoutes,
|
|
47
|
-
|
|
48
|
-
encodeCompactIdToString,
|
|
49
|
-
} from "@fluidframework/runtime-utils";
|
|
54
|
+
} from "@fluidframework/runtime-utils/internal";
|
|
50
55
|
import {
|
|
51
|
-
createChildMonitoringContext,
|
|
52
56
|
DataCorruptionError,
|
|
53
57
|
DataProcessingError,
|
|
54
|
-
extractSafePropertiesFromMessage,
|
|
55
58
|
LoggingError,
|
|
56
59
|
MonitoringContext,
|
|
57
|
-
tagCodeArtifacts,
|
|
58
60
|
createChildLogger,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
FluidDataStoreContext,
|
|
67
|
-
RemoteFluidDataStoreContext,
|
|
68
|
-
LocalFluidDataStoreContext,
|
|
69
|
-
createAttributesBlob,
|
|
70
|
-
LocalDetachedFluidDataStoreContext,
|
|
71
|
-
} from "./dataStoreContext.js";
|
|
72
|
-
import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs.js";
|
|
61
|
+
createChildMonitoringContext,
|
|
62
|
+
extractSafePropertiesFromMessage,
|
|
63
|
+
tagCodeArtifacts,
|
|
64
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
65
|
+
|
|
66
|
+
import { RuntimeHeaderData, defaultRuntimeHeaderData } from "./containerRuntime.js";
|
|
73
67
|
import {
|
|
74
68
|
IDataStoreAliasMessage,
|
|
75
69
|
channelToDataStore,
|
|
76
70
|
isDataStoreAliasMessage,
|
|
77
71
|
} from "./dataStore.js";
|
|
72
|
+
import {
|
|
73
|
+
FluidDataStoreContext,
|
|
74
|
+
IFluidDataStoreContextInternal,
|
|
75
|
+
ILocalDetachedFluidDataStoreContextProps,
|
|
76
|
+
LocalDetachedFluidDataStoreContext,
|
|
77
|
+
LocalFluidDataStoreContext,
|
|
78
|
+
RemoteFluidDataStoreContext,
|
|
79
|
+
createAttributesBlob,
|
|
80
|
+
} from "./dataStoreContext.js";
|
|
81
|
+
import { DataStoreContexts } from "./dataStoreContexts.js";
|
|
82
|
+
import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
78
83
|
import {
|
|
79
84
|
GCNodeType,
|
|
80
85
|
detectOutboundRoutesViaDDSKey,
|
|
81
86
|
trimLeadingAndTrailingSlashes,
|
|
82
87
|
} from "./gc/index.js";
|
|
88
|
+
import { ContainerMessageType, LocalContainerRuntimeMessage } from "./messageTypes.js";
|
|
89
|
+
import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs.js";
|
|
83
90
|
import {
|
|
84
91
|
IContainerRuntimeMetadata,
|
|
85
92
|
nonDataStorePaths,
|
|
86
93
|
rootHasIsolatedChannels,
|
|
87
94
|
} from "./summary/index.js";
|
|
88
|
-
import { ContainerMessageType, LocalContainerRuntimeMessage } from "./messageTypes.js";
|
|
89
|
-
import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
90
95
|
|
|
91
96
|
/**
|
|
92
97
|
* Accepted header keys for requests coming to the runtime.
|
|
@@ -180,7 +185,10 @@ export function wrapContext(context: IFluidParentContext): IFluidParentContext {
|
|
|
180
185
|
return context.getCreateChildSummarizerNodeFn?.(...args);
|
|
181
186
|
},
|
|
182
187
|
deleteChildSummarizerNode: (...args) => {
|
|
183
|
-
return context.deleteChildSummarizerNode
|
|
188
|
+
return context.deleteChildSummarizerNode(...args);
|
|
189
|
+
},
|
|
190
|
+
setChannelDirty: (address: string) => {
|
|
191
|
+
return context.setChannelDirty(address);
|
|
184
192
|
},
|
|
185
193
|
};
|
|
186
194
|
}
|
|
@@ -215,7 +223,7 @@ export function wrapContextForInnerChannel(
|
|
|
215
223
|
);
|
|
216
224
|
};
|
|
217
225
|
|
|
218
|
-
context.submitSignal = (type: string, contents:
|
|
226
|
+
context.submitSignal = (type: string, contents: unknown, targetClientId?: string) => {
|
|
219
227
|
const envelope: IEnvelope = {
|
|
220
228
|
address: id,
|
|
221
229
|
contents,
|
|
@@ -237,7 +245,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
237
245
|
// 0.24 back-compat attachingBeforeSummary
|
|
238
246
|
public readonly attachOpFiredForDataStore = new Set<string>();
|
|
239
247
|
|
|
240
|
-
|
|
248
|
+
protected readonly mc: MonitoringContext;
|
|
241
249
|
|
|
242
250
|
private readonly disposeOnce = new Lazy<void>(() => this.contexts.dispose());
|
|
243
251
|
|
|
@@ -261,10 +269,11 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
261
269
|
Promise<AliasResult>
|
|
262
270
|
>();
|
|
263
271
|
|
|
264
|
-
|
|
272
|
+
protected readonly contexts: DataStoreContexts;
|
|
273
|
+
private readonly aliasedDataStores: Set<string>;
|
|
265
274
|
|
|
266
275
|
constructor(
|
|
267
|
-
|
|
276
|
+
protected readonly baseSnapshot: ISnapshotTree | undefined,
|
|
268
277
|
public readonly parentContext: IFluidParentContext,
|
|
269
278
|
baseLogger: ITelemetryBaseLogger,
|
|
270
279
|
private readonly gcNodeUpdated: (
|
|
@@ -291,6 +300,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
291
300
|
"",
|
|
292
301
|
this.parentContext.IFluidHandleContext,
|
|
293
302
|
);
|
|
303
|
+
this.aliasedDataStores = new Set(aliasMap.values());
|
|
294
304
|
|
|
295
305
|
// Extract stores stored inside the snapshot
|
|
296
306
|
const fluidDataStores = new Map<string, ISnapshotTree>();
|
|
@@ -338,7 +348,6 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
338
348
|
}),
|
|
339
349
|
makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(key),
|
|
340
350
|
snapshotTree,
|
|
341
|
-
isRootDataStore: undefined,
|
|
342
351
|
});
|
|
343
352
|
}
|
|
344
353
|
this.contexts.addBoundOrRemoted(dataStoreContext);
|
|
@@ -365,7 +374,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
365
374
|
/** For sampling. Only log once per container */
|
|
366
375
|
private shouldSendAttachLog = true;
|
|
367
376
|
|
|
368
|
-
|
|
377
|
+
protected wrapContextForInnerChannel(id: string): IFluidParentContext {
|
|
369
378
|
return wrapContextForInnerChannel(id, this.parentContext);
|
|
370
379
|
}
|
|
371
380
|
|
|
@@ -415,7 +424,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
415
424
|
this.pendingAttach.has(attachMessage.id),
|
|
416
425
|
0x15e /* "Local object does not have matching attach message id" */,
|
|
417
426
|
);
|
|
418
|
-
this.contexts.get(attachMessage.id)?.
|
|
427
|
+
this.contexts.get(attachMessage.id)?.setAttachState(AttachState.Attached);
|
|
419
428
|
this.pendingAttach.delete(attachMessage.id);
|
|
420
429
|
return;
|
|
421
430
|
}
|
|
@@ -479,47 +488,44 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
479
488
|
}
|
|
480
489
|
|
|
481
490
|
const resolve = localOpMetadata as PendingAliasResolve;
|
|
482
|
-
const aliasResult = this.processAliasMessageCore(
|
|
491
|
+
const aliasResult = this.processAliasMessageCore(
|
|
492
|
+
aliasMessage.internalId,
|
|
493
|
+
aliasMessage.alias,
|
|
494
|
+
);
|
|
483
495
|
if (local) {
|
|
484
496
|
resolve(aliasResult);
|
|
485
497
|
}
|
|
486
498
|
}
|
|
487
499
|
|
|
488
|
-
public processAliasMessageCore(
|
|
489
|
-
if (this.alreadyProcessed(
|
|
500
|
+
public processAliasMessageCore(internalId: string, alias: string): boolean {
|
|
501
|
+
if (this.alreadyProcessed(alias)) {
|
|
490
502
|
return false;
|
|
491
503
|
}
|
|
492
504
|
|
|
493
|
-
const context = this.contexts.get(
|
|
505
|
+
const context = this.contexts.get(internalId);
|
|
494
506
|
// If the data store has been deleted, log an error and ignore this message. This helps prevent document
|
|
495
507
|
// corruption in case a deleted data store accidentally submitted a signal.
|
|
496
|
-
if (
|
|
497
|
-
this.checkAndLogIfDeleted(
|
|
498
|
-
aliasMessage.internalId,
|
|
499
|
-
context,
|
|
500
|
-
"Changed",
|
|
501
|
-
"processAliasMessageCore",
|
|
502
|
-
)
|
|
503
|
-
) {
|
|
508
|
+
if (this.checkAndLogIfDeleted(internalId, context, "Changed", "processAliasMessageCore")) {
|
|
504
509
|
return false;
|
|
505
510
|
}
|
|
506
511
|
|
|
507
512
|
if (context === undefined) {
|
|
508
513
|
this.mc.logger.sendErrorEvent({
|
|
509
514
|
eventName: "AliasFluidDataStoreNotFound",
|
|
510
|
-
fluidDataStoreId:
|
|
515
|
+
fluidDataStoreId: internalId,
|
|
511
516
|
});
|
|
512
517
|
return false;
|
|
513
518
|
}
|
|
514
519
|
|
|
515
520
|
const handle = new FluidObjectHandle(
|
|
516
521
|
context,
|
|
517
|
-
|
|
522
|
+
internalId,
|
|
518
523
|
this.parentContext.IFluidHandleContext,
|
|
519
524
|
);
|
|
520
525
|
this.parentContext.addedGCOutboundReference?.(this.containerRuntimeHandle, handle);
|
|
521
526
|
|
|
522
|
-
this.aliasMap.set(
|
|
527
|
+
this.aliasMap.set(alias, context.id);
|
|
528
|
+
this.aliasedDataStores.add(context.id);
|
|
523
529
|
context.setInMemoryRoot();
|
|
524
530
|
return true;
|
|
525
531
|
}
|
|
@@ -529,7 +535,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
529
535
|
}
|
|
530
536
|
|
|
531
537
|
/** Package up the context's attach summary etc into an IAttachMessage */
|
|
532
|
-
private generateAttachMessage(localContext:
|
|
538
|
+
private generateAttachMessage(localContext: IFluidDataStoreContextInternal): IAttachMessage {
|
|
533
539
|
const { attachSummary } = localContext.getAttachData(/* includeGCData: */ true);
|
|
534
540
|
const type = localContext.packagePath[localContext.packagePath.length - 1];
|
|
535
541
|
|
|
@@ -558,17 +564,20 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
558
564
|
* If the container is detached, this data store will be part of the summary that makes the container attached.
|
|
559
565
|
*/
|
|
560
566
|
if (this.parentContext.attachState !== AttachState.Detached) {
|
|
561
|
-
localContext.
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
this.pendingAttach.set(id, message);
|
|
565
|
-
this.parentContext.submitMessage(ContainerMessageType.Attach, message, undefined);
|
|
566
|
-
this.attachOpFiredForDataStore.add(id);
|
|
567
|
+
localContext.setAttachState(AttachState.Attaching);
|
|
568
|
+
this.submitAttachChannelOp(localContext);
|
|
567
569
|
}
|
|
568
570
|
|
|
569
571
|
this.contexts.bind(id);
|
|
570
572
|
}
|
|
571
573
|
|
|
574
|
+
protected submitAttachChannelOp(localContext: LocalFluidDataStoreContext) {
|
|
575
|
+
const message = this.generateAttachMessage(localContext);
|
|
576
|
+
this.pendingAttach.set(localContext.id, message);
|
|
577
|
+
this.parentContext.submitMessage(ContainerMessageType.Attach, message, undefined);
|
|
578
|
+
this.attachOpFiredForDataStore.add(localContext.id);
|
|
579
|
+
}
|
|
580
|
+
|
|
572
581
|
/**
|
|
573
582
|
* Generate compact internal DataStore ID.
|
|
574
583
|
*
|
|
@@ -602,13 +611,41 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
602
611
|
return id;
|
|
603
612
|
}
|
|
604
613
|
|
|
605
|
-
public
|
|
614
|
+
public createDetachedDataStore(
|
|
606
615
|
pkg: Readonly<string[]>,
|
|
607
616
|
loadingGroupId?: string,
|
|
608
617
|
): IFluidDataStoreContextDetached {
|
|
609
|
-
|
|
618
|
+
return this.createContext(
|
|
619
|
+
this.createDataStoreId(),
|
|
620
|
+
pkg,
|
|
621
|
+
LocalDetachedFluidDataStoreContext,
|
|
622
|
+
undefined, // props
|
|
623
|
+
loadingGroupId,
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
public createDataStoreContext(
|
|
628
|
+
pkg: Readonly<string[]>,
|
|
629
|
+
props?: any,
|
|
630
|
+
loadingGroupId?: string,
|
|
631
|
+
): IFluidDataStoreContextInternal {
|
|
632
|
+
return this.createContext(
|
|
633
|
+
this.createDataStoreId(),
|
|
634
|
+
pkg,
|
|
635
|
+
LocalFluidDataStoreContext,
|
|
636
|
+
props,
|
|
637
|
+
loadingGroupId,
|
|
638
|
+
);
|
|
639
|
+
}
|
|
610
640
|
|
|
611
|
-
|
|
641
|
+
protected createContext<T extends LocalFluidDataStoreContext>(
|
|
642
|
+
id: string,
|
|
643
|
+
pkg: Readonly<string[]>,
|
|
644
|
+
contextCtor: new (props: ILocalDetachedFluidDataStoreContextProps) => T,
|
|
645
|
+
createProps?: any,
|
|
646
|
+
loadingGroupId?: string,
|
|
647
|
+
) {
|
|
648
|
+
const context = new contextCtor({
|
|
612
649
|
id,
|
|
613
650
|
pkg,
|
|
614
651
|
parentContext: this.wrapContextForInnerChannel(id),
|
|
@@ -619,7 +656,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
619
656
|
}),
|
|
620
657
|
makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),
|
|
621
658
|
snapshotTree: undefined,
|
|
622
|
-
|
|
659
|
+
createProps,
|
|
623
660
|
loadingGroupId,
|
|
624
661
|
channelToDataStoreFn: (channel: IFluidDataStoreChannel) =>
|
|
625
662
|
channelToDataStore(
|
|
@@ -629,31 +666,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
629
666
|
createChildLogger({ logger: this.parentContext.logger }),
|
|
630
667
|
),
|
|
631
668
|
});
|
|
632
|
-
this.contexts.addUnbound(context);
|
|
633
|
-
return context;
|
|
634
|
-
}
|
|
635
669
|
|
|
636
|
-
public _createFluidDataStoreContext(
|
|
637
|
-
pkg: Readonly<string[]>,
|
|
638
|
-
props?: any,
|
|
639
|
-
loadingGroupId?: string,
|
|
640
|
-
) {
|
|
641
|
-
const id = this.createDataStoreId();
|
|
642
|
-
const context = new LocalFluidDataStoreContext({
|
|
643
|
-
id,
|
|
644
|
-
pkg,
|
|
645
|
-
parentContext: this.wrapContextForInnerChannel(id),
|
|
646
|
-
storage: this.parentContext.storage,
|
|
647
|
-
scope: this.parentContext.scope,
|
|
648
|
-
createSummarizerNodeFn: this.parentContext.getCreateChildSummarizerNodeFn(id, {
|
|
649
|
-
type: CreateSummarizerNodeSource.Local,
|
|
650
|
-
}),
|
|
651
|
-
makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),
|
|
652
|
-
snapshotTree: undefined,
|
|
653
|
-
isRootDataStore: false,
|
|
654
|
-
createProps: props,
|
|
655
|
-
loadingGroupId,
|
|
656
|
-
});
|
|
657
670
|
this.contexts.addUnbound(context);
|
|
658
671
|
return context;
|
|
659
672
|
}
|
|
@@ -669,10 +682,14 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
669
682
|
case ContainerMessageType.Alias:
|
|
670
683
|
this.parentContext.submitMessage(type, content, localOpMetadata);
|
|
671
684
|
return;
|
|
685
|
+
case ContainerMessageType.FluidDataStoreOp:
|
|
686
|
+
return this.reSubmitChannelOp(type, content, localOpMetadata);
|
|
672
687
|
default:
|
|
688
|
+
assert(false, 0x907 /* unknown op type */);
|
|
673
689
|
}
|
|
690
|
+
}
|
|
674
691
|
|
|
675
|
-
|
|
692
|
+
protected reSubmitChannelOp(type: string, content: any, localOpMetadata: unknown) {
|
|
676
693
|
const envelope = content as IEnvelope;
|
|
677
694
|
const context = this.contexts.get(envelope.address);
|
|
678
695
|
// If the data store has been deleted, log an error and throw an error. If there are local changes for a
|
|
@@ -716,10 +733,14 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
716
733
|
return this.applyStashedAttachOp(opContents.contents);
|
|
717
734
|
case ContainerMessageType.Alias:
|
|
718
735
|
return;
|
|
736
|
+
case ContainerMessageType.FluidDataStoreOp:
|
|
737
|
+
return this.applyStashedChannelChannelOp(opContents.contents);
|
|
719
738
|
default:
|
|
739
|
+
assert(false, 0x908 /* unknon type of op */);
|
|
720
740
|
}
|
|
741
|
+
}
|
|
721
742
|
|
|
722
|
-
|
|
743
|
+
protected async applyStashedChannelChannelOp(envelope: IEnvelope) {
|
|
723
744
|
const context = this.contexts.get(envelope.address);
|
|
724
745
|
// If the data store has been deleted, log an error and ignore this message. This helps prevent document
|
|
725
746
|
// corruption in case the data store that stashed the op is deleted.
|
|
@@ -731,9 +752,49 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
731
752
|
}
|
|
732
753
|
|
|
733
754
|
private async applyStashedAttachOp(message: IAttachMessage) {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
755
|
+
const { id, snapshot } = message;
|
|
756
|
+
|
|
757
|
+
// build the snapshot from the summary in the attach message
|
|
758
|
+
const flatAttachBlobs = new Map<string, ArrayBufferLike>();
|
|
759
|
+
const snapshotTree = buildSnapshotTree(snapshot.entries, flatAttachBlobs);
|
|
760
|
+
const storage = new StorageServiceWithAttachBlobs(
|
|
761
|
+
this.parentContext.storage,
|
|
762
|
+
flatAttachBlobs,
|
|
763
|
+
);
|
|
764
|
+
|
|
765
|
+
// create a local datastore context for the data store context,
|
|
766
|
+
// which this message represents. All newly created data store
|
|
767
|
+
// contexts start as a local context on the client that created
|
|
768
|
+
// them, and for stashed ops, the client that applies it plays
|
|
769
|
+
// the role of creating client.
|
|
770
|
+
const dataStoreContext = new LocalFluidDataStoreContext({
|
|
771
|
+
id,
|
|
772
|
+
pkg: undefined,
|
|
773
|
+
parentContext: this.wrapContextForInnerChannel(id),
|
|
774
|
+
storage,
|
|
775
|
+
scope: this.parentContext.scope,
|
|
776
|
+
createSummarizerNodeFn: this.parentContext.getCreateChildSummarizerNodeFn(id, {
|
|
777
|
+
type: CreateSummarizerNodeSource.FromSummary,
|
|
778
|
+
}),
|
|
779
|
+
makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),
|
|
780
|
+
snapshotTree,
|
|
781
|
+
});
|
|
782
|
+
|
|
783
|
+
// realize the local context, as local contexts shouldn't be delay
|
|
784
|
+
// loaded, as this client is playing the role of creating client,
|
|
785
|
+
// and creating clients always create realized data store contexts.
|
|
786
|
+
const channel = await dataStoreContext.realize();
|
|
787
|
+
await channel.entryPoint.get();
|
|
788
|
+
|
|
789
|
+
// add to the list of bound or remoted, as this context must be bound
|
|
790
|
+
// to had an attach message sent, and is the non-detached case is remoted.
|
|
791
|
+
this.contexts.addBoundOrRemoted(dataStoreContext);
|
|
792
|
+
if (this.parentContext.attachState !== AttachState.Detached) {
|
|
793
|
+
// if the client is not detached put in the pending attach list
|
|
794
|
+
// so that on ack of the stashed op, the context is found.
|
|
795
|
+
// detached client don't send ops, so should not expect and ack.
|
|
796
|
+
this.pendingAttach.set(message.id, message);
|
|
797
|
+
}
|
|
737
798
|
}
|
|
738
799
|
|
|
739
800
|
public process(
|
|
@@ -749,32 +810,48 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
749
810
|
case ContainerMessageType.Alias:
|
|
750
811
|
this.processAliasMessage(message, localMessageMetadata, local);
|
|
751
812
|
return;
|
|
752
|
-
case ContainerMessageType.FluidDataStoreOp:
|
|
813
|
+
case ContainerMessageType.FluidDataStoreOp: {
|
|
814
|
+
const envelope = message.contents as IEnvelope;
|
|
815
|
+
const innerContents = envelope.contents as FluidDataStoreMessage;
|
|
816
|
+
const transformed = {
|
|
817
|
+
...message,
|
|
818
|
+
type: innerContents.type,
|
|
819
|
+
contents: innerContents.content,
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
this.processChannelOp(envelope.address, transformed, local, localMessageMetadata);
|
|
823
|
+
|
|
824
|
+
// By default, we use the new behavior of detecting outbound routes here.
|
|
825
|
+
// If this setting is true, then DataStoreContext would be notifying GC instead.
|
|
826
|
+
if (
|
|
827
|
+
this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) !== true &&
|
|
828
|
+
addedOutboundReference !== undefined
|
|
829
|
+
) {
|
|
830
|
+
// Notify GC of any outbound references that were added by this op.
|
|
831
|
+
detectOutboundReferences(
|
|
832
|
+
envelope.address,
|
|
833
|
+
transformed.contents,
|
|
834
|
+
addedOutboundReference,
|
|
835
|
+
);
|
|
836
|
+
}
|
|
753
837
|
break;
|
|
838
|
+
}
|
|
754
839
|
default:
|
|
755
840
|
assert(false, 0x8e9 /* unreached */);
|
|
756
841
|
}
|
|
842
|
+
}
|
|
757
843
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
const context = this.contexts.get(envelope.address);
|
|
844
|
+
protected processChannelOp(
|
|
845
|
+
address: string,
|
|
846
|
+
message: ISequencedDocumentMessage,
|
|
847
|
+
local: boolean,
|
|
848
|
+
localMessageMetadata: unknown,
|
|
849
|
+
) {
|
|
850
|
+
const context = this.contexts.get(address);
|
|
767
851
|
|
|
768
852
|
// If the data store has been deleted, log an error and ignore this message. This helps prevent document
|
|
769
853
|
// corruption in case a deleted data store accidentally submitted an op.
|
|
770
|
-
if (
|
|
771
|
-
this.checkAndLogIfDeleted(
|
|
772
|
-
envelope.address,
|
|
773
|
-
context,
|
|
774
|
-
"Changed",
|
|
775
|
-
"processFluidDataStoreOp",
|
|
776
|
-
)
|
|
777
|
-
) {
|
|
854
|
+
if (this.checkAndLogIfDeleted(address, context, "Changed", "processFluidDataStoreOp")) {
|
|
778
855
|
return;
|
|
779
856
|
}
|
|
780
857
|
|
|
@@ -790,27 +867,17 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
790
867
|
type: message.type,
|
|
791
868
|
contentType: typeof message.contents,
|
|
792
869
|
}),
|
|
793
|
-
...tagCodeArtifacts({ address
|
|
870
|
+
...tagCodeArtifacts({ address }),
|
|
794
871
|
},
|
|
795
872
|
);
|
|
796
873
|
}
|
|
797
874
|
|
|
798
|
-
context.process(
|
|
799
|
-
|
|
800
|
-
// By default, we use the new behavior of detecting outbound routes here.
|
|
801
|
-
// If this setting is true, then DataStoreContext would be notifying GC instead.
|
|
802
|
-
if (
|
|
803
|
-
this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) !== true &&
|
|
804
|
-
addedOutboundReference !== undefined
|
|
805
|
-
) {
|
|
806
|
-
// Notify GC of any outbound references that were added by this op.
|
|
807
|
-
detectOutboundReferences(envelope, addedOutboundReference);
|
|
808
|
-
}
|
|
875
|
+
context.process(message, local, localMessageMetadata);
|
|
809
876
|
|
|
810
877
|
// Notify that a GC node for the data store changed. This is used to detect if a deleted data store is
|
|
811
878
|
// being used.
|
|
812
879
|
this.gcNodeUpdated(
|
|
813
|
-
`/${
|
|
880
|
+
`/${address}`,
|
|
814
881
|
"Changed",
|
|
815
882
|
message.timestamp,
|
|
816
883
|
context.isLoaded ? context.packagePath : undefined,
|
|
@@ -820,7 +887,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
820
887
|
public async getDataStore(
|
|
821
888
|
id: string,
|
|
822
889
|
requestHeaderData: RuntimeHeaderData,
|
|
823
|
-
): Promise<
|
|
890
|
+
): Promise<IFluidDataStoreContextInternal> {
|
|
824
891
|
const headerData = { ...defaultRuntimeHeaderData, ...requestHeaderData };
|
|
825
892
|
if (
|
|
826
893
|
this.checkAndLogIfDeleted(
|
|
@@ -854,7 +921,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
854
921
|
public async getDataStoreIfAvailable(
|
|
855
922
|
id: string,
|
|
856
923
|
requestHeaderData: RuntimeHeaderData,
|
|
857
|
-
): Promise<
|
|
924
|
+
): Promise<IFluidDataStoreContextInternal | undefined> {
|
|
858
925
|
// If the data store has been deleted, log an error and return undefined.
|
|
859
926
|
if (
|
|
860
927
|
this.checkAndLogIfDeleted(
|
|
@@ -885,7 +952,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
885
952
|
*/
|
|
886
953
|
private checkAndLogIfDeleted(
|
|
887
954
|
id: string,
|
|
888
|
-
context:
|
|
955
|
+
context: IFluidDataStoreContext | undefined,
|
|
889
956
|
deletedLogSuffix: string,
|
|
890
957
|
callSite: string,
|
|
891
958
|
requestHeaderData?: RuntimeHeaderData,
|
|
@@ -955,11 +1022,10 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
955
1022
|
}
|
|
956
1023
|
|
|
957
1024
|
public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {
|
|
958
|
-
const eventName = attachState === AttachState.Attaching ? "attaching" : "attached";
|
|
959
1025
|
for (const [, context] of this.contexts) {
|
|
960
1026
|
// Fire only for bounded stores.
|
|
961
1027
|
if (!this.contexts.isNotBound(context.id)) {
|
|
962
|
-
context.
|
|
1028
|
+
context.setAttachState(attachState);
|
|
963
1029
|
}
|
|
964
1030
|
}
|
|
965
1031
|
}
|
|
@@ -1144,25 +1210,15 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1144
1210
|
}
|
|
1145
1211
|
}
|
|
1146
1212
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
if (pathParts.length > 2) {
|
|
1157
|
-
continue;
|
|
1158
|
-
}
|
|
1159
|
-
const dataStoreId = pathParts[1];
|
|
1160
|
-
assert(this.contexts.has(dataStoreId), 0x2d7 /* No data store with specified id */);
|
|
1161
|
-
// Delete the contexts of unused data stores.
|
|
1162
|
-
this.contexts.delete(dataStoreId);
|
|
1163
|
-
// Delete the summarizer node of the unused data stores.
|
|
1164
|
-
this.parentContext.deleteChildSummarizerNode?.(dataStoreId);
|
|
1165
|
-
}
|
|
1213
|
+
public deleteChild(dataStoreId: string) {
|
|
1214
|
+
const dataStoreContext = this.contexts.get(dataStoreId);
|
|
1215
|
+
assert(dataStoreContext !== undefined, 0x2d7 /* No data store with specified id */);
|
|
1216
|
+
|
|
1217
|
+
dataStoreContext.delete();
|
|
1218
|
+
// Delete the contexts of unused data stores.
|
|
1219
|
+
this.contexts.delete(dataStoreId);
|
|
1220
|
+
// Delete the summarizer node of the unused data stores.
|
|
1221
|
+
this.parentContext.deleteChildSummarizerNode(dataStoreId);
|
|
1166
1222
|
}
|
|
1167
1223
|
|
|
1168
1224
|
/**
|
|
@@ -1198,12 +1254,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1198
1254
|
continue;
|
|
1199
1255
|
}
|
|
1200
1256
|
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
// Delete the contexts of sweep ready data stores.
|
|
1204
|
-
this.contexts.delete(dataStoreId);
|
|
1205
|
-
// Delete the summarizer node of the sweep ready data stores.
|
|
1206
|
-
this.parentContext.deleteChildSummarizerNode?.(dataStoreId);
|
|
1257
|
+
this.deleteChild(dataStoreId);
|
|
1207
1258
|
}
|
|
1208
1259
|
return Array.from(sweepReadyDataStoreRoutes);
|
|
1209
1260
|
}
|
|
@@ -1241,8 +1292,9 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1241
1292
|
*/
|
|
1242
1293
|
private async getOutboundRoutes(): Promise<string[]> {
|
|
1243
1294
|
const outboundRoutes: string[] = [];
|
|
1295
|
+
// Getting this information is a performance optimization that reduces network calls for virtualized datastores
|
|
1244
1296
|
for (const [contextId, context] of this.contexts) {
|
|
1245
|
-
const isRootDataStore = await context.isRoot();
|
|
1297
|
+
const isRootDataStore = await context.isRoot(this.aliasedDataStores);
|
|
1246
1298
|
if (isRootDataStore) {
|
|
1247
1299
|
outboundRoutes.push(`/${contextId}`);
|
|
1248
1300
|
}
|
|
@@ -1375,7 +1427,8 @@ export function getSummaryForDatastores(
|
|
|
1375
1427
|
* @internal
|
|
1376
1428
|
*/
|
|
1377
1429
|
export function detectOutboundReferences(
|
|
1378
|
-
|
|
1430
|
+
address: string,
|
|
1431
|
+
contents: unknown,
|
|
1379
1432
|
addedOutboundReference: (fromNodePath: string, toNodePath: string) => void,
|
|
1380
1433
|
): void {
|
|
1381
1434
|
// These will be built up as we traverse the envelope contents
|
|
@@ -1402,16 +1455,18 @@ export function detectOutboundReferences(
|
|
|
1402
1455
|
}
|
|
1403
1456
|
}
|
|
1404
1457
|
|
|
1405
|
-
recursivelyFindHandles(
|
|
1458
|
+
recursivelyFindHandles(contents);
|
|
1406
1459
|
|
|
1407
1460
|
// GC node paths are all absolute paths, hence the "" prefix.
|
|
1408
1461
|
// e.g. this will yield "/dataStoreId/ddsId"
|
|
1409
|
-
const fromPath = ["",
|
|
1462
|
+
const fromPath = ["", address, ddsAddress].join("/");
|
|
1410
1463
|
outboundPaths.forEach((toPath) => addedOutboundReference(fromPath, toPath));
|
|
1411
1464
|
}
|
|
1412
1465
|
|
|
1413
1466
|
/** @internal */
|
|
1414
|
-
export class ChannelCollectionFactory
|
|
1467
|
+
export class ChannelCollectionFactory<T extends ChannelCollection = ChannelCollection>
|
|
1468
|
+
implements IFluidDataStoreFactory
|
|
1469
|
+
{
|
|
1415
1470
|
public readonly type = "ChannelCollectionChannel";
|
|
1416
1471
|
|
|
1417
1472
|
public IFluidDataStoreRegistry: IFluidDataStoreRegistry;
|
|
@@ -1422,6 +1477,7 @@ export class ChannelCollectionFactory implements IFluidDataStoreFactory {
|
|
|
1422
1477
|
private readonly provideEntryPoint: (
|
|
1423
1478
|
runtime: IFluidDataStoreChannel,
|
|
1424
1479
|
) => Promise<FluidObject>,
|
|
1480
|
+
private readonly ctor: (...args: ConstructorParameters<typeof ChannelCollection>) => T,
|
|
1425
1481
|
) {
|
|
1426
1482
|
this.IFluidDataStoreRegistry = new FluidDataStoreRegistry(registryEntries);
|
|
1427
1483
|
}
|
|
@@ -1434,7 +1490,7 @@ export class ChannelCollectionFactory implements IFluidDataStoreFactory {
|
|
|
1434
1490
|
context: IFluidDataStoreContext,
|
|
1435
1491
|
_existing: boolean,
|
|
1436
1492
|
): Promise<IFluidDataStoreChannel> {
|
|
1437
|
-
const runtime =
|
|
1493
|
+
const runtime = this.ctor(
|
|
1438
1494
|
context.baseSnapshot,
|
|
1439
1495
|
context, // parentContext
|
|
1440
1496
|
context.logger,
|