@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
package/src/dataStoreContext.ts
CHANGED
|
@@ -9,18 +9,14 @@ import {
|
|
|
9
9
|
IRequest,
|
|
10
10
|
IResponse,
|
|
11
11
|
IFluidHandle,
|
|
12
|
-
|
|
12
|
+
ITelemetryBaseProperties,
|
|
13
13
|
} from "@fluidframework/core-interfaces";
|
|
14
|
-
import {
|
|
15
|
-
IAudience,
|
|
16
|
-
IDeltaManager,
|
|
17
|
-
AttachState,
|
|
18
|
-
ILoaderOptions,
|
|
19
|
-
} from "@fluidframework/container-definitions";
|
|
14
|
+
import { IAudience, IDeltaManager, AttachState } from "@fluidframework/container-definitions";
|
|
20
15
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
21
|
-
import { assert,
|
|
16
|
+
import { assert, LazyPromise } from "@fluidframework/core-utils";
|
|
22
17
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
23
18
|
import { BlobTreeEntry, readAndParse } from "@fluidframework/driver-utils";
|
|
19
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
24
20
|
import {
|
|
25
21
|
IClientDetails,
|
|
26
22
|
IDocumentMessage,
|
|
@@ -29,15 +25,15 @@ import {
|
|
|
29
25
|
ISnapshotTree,
|
|
30
26
|
ITreeEntry,
|
|
31
27
|
} from "@fluidframework/protocol-definitions";
|
|
32
|
-
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
33
28
|
import {
|
|
34
29
|
channelsTreeName,
|
|
35
30
|
CreateChildSummarizerNodeFn,
|
|
36
31
|
CreateChildSummarizerNodeParam,
|
|
37
32
|
FluidDataStoreRegistryEntry,
|
|
38
|
-
IAttachMessage,
|
|
39
33
|
IFluidDataStoreChannel,
|
|
40
34
|
IFluidDataStoreContext,
|
|
35
|
+
IFluidParentContext,
|
|
36
|
+
IContainerRuntimeBase,
|
|
41
37
|
IFluidDataStoreContextDetached,
|
|
42
38
|
IFluidDataStoreContextEvents,
|
|
43
39
|
IFluidDataStoreRegistry,
|
|
@@ -50,18 +46,17 @@ import {
|
|
|
50
46
|
ISummarizerNodeWithGC,
|
|
51
47
|
SummarizeInternalFn,
|
|
52
48
|
ITelemetryContext,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
ISummaryTreeWithStats,
|
|
50
|
+
IDataStore,
|
|
51
|
+
gcDataBlobKey,
|
|
56
52
|
} from "@fluidframework/runtime-definitions";
|
|
57
|
-
import { addBlobToSummary
|
|
53
|
+
import { addBlobToSummary } from "@fluidframework/runtime-utils";
|
|
58
54
|
import {
|
|
59
55
|
createChildMonitoringContext,
|
|
60
56
|
DataCorruptionError,
|
|
61
57
|
DataProcessingError,
|
|
62
58
|
extractSafePropertiesFromMessage,
|
|
63
59
|
generateStack,
|
|
64
|
-
ITelemetryLoggerExt,
|
|
65
60
|
LoggingError,
|
|
66
61
|
MonitoringContext,
|
|
67
62
|
tagCodeArtifacts,
|
|
@@ -76,9 +71,8 @@ import {
|
|
|
76
71
|
getAttributesFormatVersion,
|
|
77
72
|
getFluidDataStoreAttributes,
|
|
78
73
|
summarizerClientType,
|
|
79
|
-
} from "./summary";
|
|
80
|
-
import {
|
|
81
|
-
import { detectOutboundRoutesViaDDSKey, sendGCUnexpectedUsageEvent } from "./gc";
|
|
74
|
+
} from "./summary/index.js";
|
|
75
|
+
import { detectOutboundRoutesViaDDSKey, sendGCUnexpectedUsageEvent } from "./gc/index.js";
|
|
82
76
|
|
|
83
77
|
function createAttributes(
|
|
84
78
|
pkg: readonly string[],
|
|
@@ -100,21 +94,18 @@ interface ISnapshotDetails {
|
|
|
100
94
|
pkg: readonly string[];
|
|
101
95
|
isRootDataStore: boolean;
|
|
102
96
|
snapshot?: ISnapshotTree;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
interface FluidDataStoreMessage {
|
|
106
|
-
content: any;
|
|
107
|
-
type: string;
|
|
97
|
+
sequenceNumber?: number;
|
|
108
98
|
}
|
|
109
99
|
|
|
110
100
|
/** Properties necessary for creating a FluidDataStoreContext */
|
|
111
101
|
export interface IFluidDataStoreContextProps {
|
|
112
102
|
readonly id: string;
|
|
113
|
-
readonly
|
|
103
|
+
readonly parentContext: IFluidParentContext;
|
|
114
104
|
readonly storage: IDocumentStorageService;
|
|
115
105
|
readonly scope: FluidObject;
|
|
116
106
|
readonly createSummarizerNodeFn: CreateChildSummarizerNodeFn;
|
|
117
107
|
readonly pkg?: Readonly<string[]>;
|
|
108
|
+
readonly loadingGroupId?: string;
|
|
118
109
|
}
|
|
119
110
|
|
|
120
111
|
/** Properties necessary for creating a local FluidDataStoreContext */
|
|
@@ -129,6 +120,11 @@ export interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContext
|
|
|
129
120
|
readonly createProps?: any;
|
|
130
121
|
}
|
|
131
122
|
|
|
123
|
+
/** Properties necessary for creating a local FluidDataStoreContext */
|
|
124
|
+
export interface ILocalDetachedFluidDataStoreContextProps extends ILocalFluidDataStoreContextProps {
|
|
125
|
+
readonly channelToDataStoreFn: (channel: IFluidDataStoreChannel) => IDataStore;
|
|
126
|
+
}
|
|
127
|
+
|
|
132
128
|
/** Properties necessary for creating a remote FluidDataStoreContext */
|
|
133
129
|
export interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContextProps {
|
|
134
130
|
readonly snapshotTree: ISnapshotTree | undefined;
|
|
@@ -139,47 +135,47 @@ export interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContex
|
|
|
139
135
|
*/
|
|
140
136
|
export abstract class FluidDataStoreContext
|
|
141
137
|
extends TypedEventEmitter<IFluidDataStoreContextEvents>
|
|
142
|
-
implements IFluidDataStoreContext, IDisposable
|
|
138
|
+
implements IFluidDataStoreContext, IFluidParentContext, IDisposable
|
|
143
139
|
{
|
|
144
140
|
public get packagePath(): readonly string[] {
|
|
145
141
|
assert(this.pkg !== undefined, 0x139 /* "Undefined package path" */);
|
|
146
142
|
return this.pkg;
|
|
147
143
|
}
|
|
148
144
|
|
|
149
|
-
public get options():
|
|
150
|
-
return this.
|
|
145
|
+
public get options(): Record<string | number, any> {
|
|
146
|
+
return this.parentContext.options;
|
|
151
147
|
}
|
|
152
148
|
|
|
153
149
|
public get clientId(): string | undefined {
|
|
154
|
-
return this.
|
|
150
|
+
return this.parentContext.clientId;
|
|
155
151
|
}
|
|
156
152
|
|
|
157
153
|
public get clientDetails(): IClientDetails {
|
|
158
|
-
return this.
|
|
154
|
+
return this.parentContext.clientDetails;
|
|
159
155
|
}
|
|
160
156
|
|
|
161
|
-
public get logger()
|
|
162
|
-
return this.
|
|
157
|
+
public get logger() {
|
|
158
|
+
return this.parentContext.logger;
|
|
163
159
|
}
|
|
164
160
|
|
|
165
161
|
public get deltaManager(): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {
|
|
166
|
-
return this.
|
|
162
|
+
return this.parentContext.deltaManager;
|
|
167
163
|
}
|
|
168
164
|
|
|
169
165
|
public get connected(): boolean {
|
|
170
|
-
return this.
|
|
166
|
+
return this.parentContext.connected;
|
|
171
167
|
}
|
|
172
168
|
|
|
173
169
|
public get IFluidHandleContext() {
|
|
174
|
-
return this.
|
|
170
|
+
return this.parentContext.IFluidHandleContext;
|
|
175
171
|
}
|
|
176
172
|
|
|
177
|
-
public get containerRuntime():
|
|
173
|
+
public get containerRuntime(): IContainerRuntimeBase {
|
|
178
174
|
return this._containerRuntime;
|
|
179
175
|
}
|
|
180
176
|
|
|
181
177
|
public ensureNoDataModelChanges<T>(callback: () => T): T {
|
|
182
|
-
return this.
|
|
178
|
+
return this.parentContext.ensureNoDataModelChanges(callback);
|
|
183
179
|
}
|
|
184
180
|
|
|
185
181
|
public get isLoaded(): boolean {
|
|
@@ -190,8 +186,8 @@ export abstract class FluidDataStoreContext
|
|
|
190
186
|
return this._baseSnapshot;
|
|
191
187
|
}
|
|
192
188
|
|
|
193
|
-
public get idCompressor():
|
|
194
|
-
return this.
|
|
189
|
+
public get idCompressor(): IIdCompressor | undefined {
|
|
190
|
+
return this.parentContext.idCompressor;
|
|
195
191
|
}
|
|
196
192
|
|
|
197
193
|
private _disposed = false;
|
|
@@ -208,7 +204,8 @@ export abstract class FluidDataStoreContext
|
|
|
208
204
|
return this._tombstoned;
|
|
209
205
|
}
|
|
210
206
|
/** If true, throw an error when a tombstone data store is used. */
|
|
211
|
-
|
|
207
|
+
public readonly gcThrowOnTombstoneUsage: boolean;
|
|
208
|
+
public readonly gcTombstoneEnforcementAllowed: boolean;
|
|
212
209
|
|
|
213
210
|
/** If true, this means that this data store context and its children have been removed from the runtime */
|
|
214
211
|
private deleted: boolean = false;
|
|
@@ -218,9 +215,15 @@ export abstract class FluidDataStoreContext
|
|
|
218
215
|
}
|
|
219
216
|
|
|
220
217
|
public get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined {
|
|
218
|
+
assert(
|
|
219
|
+
this.channel !== undefined,
|
|
220
|
+
0x8f3 /* This should be called after the channel is created, when the registry is populated */,
|
|
221
|
+
);
|
|
221
222
|
return this.registry;
|
|
222
223
|
}
|
|
223
224
|
|
|
225
|
+
private baseSnapshotSequenceNumber: number | undefined;
|
|
226
|
+
|
|
224
227
|
/**
|
|
225
228
|
* A datastore is considered as root if it
|
|
226
229
|
* 1. is root in memory - see isInMemoryRoot
|
|
@@ -248,8 +251,8 @@ export abstract class FluidDataStoreContext
|
|
|
248
251
|
protected channel: IFluidDataStoreChannel | undefined;
|
|
249
252
|
private loaded = false;
|
|
250
253
|
protected pending: ISequencedDocumentMessage[] | undefined = [];
|
|
251
|
-
protected
|
|
252
|
-
|
|
254
|
+
protected channelP: Promise<IFluidDataStoreChannel> | undefined;
|
|
255
|
+
protected _baseSnapshot: ISnapshotTree | undefined;
|
|
253
256
|
protected _attachState: AttachState;
|
|
254
257
|
private _isInMemoryRoot: boolean = false;
|
|
255
258
|
protected readonly summarizerNode: ISummarizerNodeWithGC;
|
|
@@ -269,9 +272,12 @@ export abstract class FluidDataStoreContext
|
|
|
269
272
|
private lastUsedRoutes: string[] | undefined;
|
|
270
273
|
|
|
271
274
|
public readonly id: string;
|
|
272
|
-
private readonly _containerRuntime:
|
|
275
|
+
private readonly _containerRuntime: IContainerRuntimeBase;
|
|
276
|
+
private readonly parentContext: IFluidParentContext;
|
|
273
277
|
public readonly storage: IDocumentStorageService;
|
|
274
278
|
public readonly scope: FluidObject;
|
|
279
|
+
// Represents the group to which the data store belongs too.
|
|
280
|
+
public readonly loadingGroupId: string | undefined;
|
|
275
281
|
protected pkg?: readonly string[];
|
|
276
282
|
|
|
277
283
|
constructor(
|
|
@@ -282,19 +288,21 @@ export abstract class FluidDataStoreContext
|
|
|
282
288
|
) {
|
|
283
289
|
super();
|
|
284
290
|
|
|
285
|
-
this._containerRuntime = props.
|
|
291
|
+
this._containerRuntime = props.parentContext.containerRuntime;
|
|
292
|
+
this.parentContext = props.parentContext;
|
|
286
293
|
this.id = props.id;
|
|
287
294
|
this.storage = props.storage;
|
|
288
295
|
this.scope = props.scope;
|
|
289
296
|
this.pkg = props.pkg;
|
|
297
|
+
this.loadingGroupId = props.loadingGroupId;
|
|
290
298
|
|
|
291
299
|
// URIs use slashes as delimiters. Handles use URIs.
|
|
292
300
|
// Thus having slashes in types almost guarantees trouble down the road!
|
|
293
301
|
assert(!this.id.includes("/"), 0x13a /* Data store ID contains slash */);
|
|
294
302
|
|
|
295
303
|
this._attachState =
|
|
296
|
-
this.
|
|
297
|
-
? this.
|
|
304
|
+
this.parentContext.attachState !== AttachState.Detached && this.existing
|
|
305
|
+
? this.parentContext.attachState
|
|
298
306
|
: AttachState.Detached;
|
|
299
307
|
|
|
300
308
|
const thisSummarizeInternal = async (
|
|
@@ -325,7 +333,8 @@ export abstract class FluidDataStoreContext
|
|
|
325
333
|
this.mc.logger,
|
|
326
334
|
);
|
|
327
335
|
|
|
328
|
-
this.
|
|
336
|
+
this.gcThrowOnTombstoneUsage = this.parentContext.gcThrowOnTombstoneUsage;
|
|
337
|
+
this.gcTombstoneEnforcementAllowed = this.parentContext.gcTombstoneEnforcementAllowed;
|
|
329
338
|
|
|
330
339
|
// By default, a data store can log maximum 10 local changes telemetry in summarizer.
|
|
331
340
|
this.localChangesTelemetryCount =
|
|
@@ -339,9 +348,9 @@ export abstract class FluidDataStoreContext
|
|
|
339
348
|
this._disposed = true;
|
|
340
349
|
|
|
341
350
|
// Dispose any pending runtime after it gets fulfilled
|
|
342
|
-
// Errors are logged where this.
|
|
343
|
-
if (this.
|
|
344
|
-
this.
|
|
351
|
+
// Errors are logged where this.channelP is consumed/generated (realizeCore(), bindRuntime())
|
|
352
|
+
if (this.channelP) {
|
|
353
|
+
this.channelP
|
|
345
354
|
.then((runtime) => {
|
|
346
355
|
runtime.dispose();
|
|
347
356
|
})
|
|
@@ -382,9 +391,8 @@ export abstract class FluidDataStoreContext
|
|
|
382
391
|
|
|
383
392
|
public async realize(): Promise<IFluidDataStoreChannel> {
|
|
384
393
|
assert(!this.detachedRuntimeCreation, 0x13d /* "Detached runtime creation on realize()" */);
|
|
385
|
-
if (!this.
|
|
386
|
-
this.
|
|
387
|
-
this.realizeCore(this.existing).catch((error) => {
|
|
394
|
+
if (!this.channelP) {
|
|
395
|
+
this.channelP = this.realizeCore(this.existing).catch((error) => {
|
|
388
396
|
const errorWrapped = DataProcessingError.wrapIfUnrecognized(
|
|
389
397
|
error,
|
|
390
398
|
"realizeFluidDataStoreContext",
|
|
@@ -395,22 +403,22 @@ export abstract class FluidDataStoreContext
|
|
|
395
403
|
fluidDataStoreId: this.id,
|
|
396
404
|
}),
|
|
397
405
|
);
|
|
398
|
-
this.channelDeferred?.reject(errorWrapped);
|
|
399
406
|
this.mc.logger.sendErrorEvent({ eventName: "RealizeError" }, errorWrapped);
|
|
407
|
+
throw errorWrapped;
|
|
400
408
|
});
|
|
401
409
|
}
|
|
402
|
-
return this.
|
|
410
|
+
return this.channelP;
|
|
403
411
|
}
|
|
404
412
|
|
|
405
|
-
protected async factoryFromPackagePath(
|
|
406
|
-
|
|
413
|
+
protected async factoryFromPackagePath() {
|
|
414
|
+
const packages = this.pkg;
|
|
407
415
|
if (packages === undefined) {
|
|
408
416
|
this.rejectDeferredRealize("packages is undefined");
|
|
409
417
|
}
|
|
410
418
|
|
|
411
419
|
let entry: FluidDataStoreRegistryEntry | undefined;
|
|
412
420
|
let registry: IFluidDataStoreRegistry | undefined =
|
|
413
|
-
this.
|
|
421
|
+
this.parentContext.IFluidDataStoreRegistry;
|
|
414
422
|
let lastPkg: string | undefined;
|
|
415
423
|
for (const pkg of packages) {
|
|
416
424
|
if (!registry) {
|
|
@@ -432,33 +440,33 @@ export abstract class FluidDataStoreContext
|
|
|
432
440
|
this.rejectDeferredRealize("Can't find factory for package", lastPkg, packages);
|
|
433
441
|
}
|
|
434
442
|
|
|
435
|
-
|
|
443
|
+
assert(this.registry === undefined, 0x157 /* "datastore registry already attached" */);
|
|
444
|
+
this.registry = registry;
|
|
445
|
+
|
|
446
|
+
return factory;
|
|
436
447
|
}
|
|
437
448
|
|
|
438
|
-
private async realizeCore(existing: boolean)
|
|
449
|
+
private async realizeCore(existing: boolean) {
|
|
439
450
|
const details = await this.getInitialSnapshotDetails();
|
|
440
451
|
// Base snapshot is the baseline where pending ops are applied to.
|
|
441
452
|
// It is important that this be in sync with the pending ops, and also
|
|
442
453
|
// that it is set here, before bindRuntime is called.
|
|
443
454
|
this._baseSnapshot = details.snapshot;
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
const { factory, registry } = await this.factoryFromPackagePath(packages);
|
|
455
|
+
this.baseSnapshotSequenceNumber = details.sequenceNumber;
|
|
456
|
+
assert(this.pkg === details.pkg, 0x13e /* "Unexpected package path" */);
|
|
447
457
|
|
|
448
|
-
|
|
449
|
-
this.registry === undefined,
|
|
450
|
-
0x13f /* "datastore context registry is already set" */,
|
|
451
|
-
);
|
|
452
|
-
this.registry = registry;
|
|
458
|
+
const factory = await this.factoryFromPackagePath();
|
|
453
459
|
|
|
454
460
|
const channel = await factory.instantiateDataStore(this, existing);
|
|
455
461
|
assert(channel !== undefined, 0x140 /* "undefined channel on datastore context" */);
|
|
456
|
-
this.bindRuntime(channel);
|
|
462
|
+
await this.bindRuntime(channel, existing);
|
|
457
463
|
// This data store may have been disposed before the channel is created during realization. If so,
|
|
458
464
|
// dispose the channel now.
|
|
459
465
|
if (this.disposed) {
|
|
460
466
|
channel.dispose();
|
|
461
467
|
}
|
|
468
|
+
|
|
469
|
+
return channel;
|
|
462
470
|
}
|
|
463
471
|
|
|
464
472
|
/**
|
|
@@ -483,28 +491,21 @@ export abstract class FluidDataStoreContext
|
|
|
483
491
|
}
|
|
484
492
|
|
|
485
493
|
public process(
|
|
486
|
-
|
|
494
|
+
message: ISequencedDocumentMessage,
|
|
487
495
|
local: boolean,
|
|
488
496
|
localOpMetadata: unknown,
|
|
489
497
|
): void {
|
|
490
|
-
const safeTelemetryProps = extractSafePropertiesFromMessage(
|
|
498
|
+
const safeTelemetryProps = extractSafePropertiesFromMessage(message);
|
|
491
499
|
// On op process, tombstone error is logged in garbage collector. So, set "checkTombstone" to false when calling
|
|
492
500
|
// "verifyNotClosed" which logs tombstone errors. Throw error if tombstoned and throwing on load is configured.
|
|
493
501
|
this.verifyNotClosed("process", false /* checkTombstone */, safeTelemetryProps);
|
|
494
|
-
if (this.tombstoned && this.
|
|
502
|
+
if (this.tombstoned && this.gcThrowOnTombstoneUsage) {
|
|
495
503
|
throw new DataCorruptionError(
|
|
496
504
|
"Context is tombstoned! Call site [process]",
|
|
497
505
|
safeTelemetryProps,
|
|
498
506
|
);
|
|
499
507
|
}
|
|
500
508
|
|
|
501
|
-
const innerContents = messageArg.contents as FluidDataStoreMessage;
|
|
502
|
-
const message = {
|
|
503
|
-
...messageArg,
|
|
504
|
-
type: innerContents.type,
|
|
505
|
-
contents: innerContents.content,
|
|
506
|
-
};
|
|
507
|
-
|
|
508
509
|
this.summarizerNode.recordChange(message);
|
|
509
510
|
|
|
510
511
|
if (this.loaded) {
|
|
@@ -529,11 +530,11 @@ export abstract class FluidDataStoreContext
|
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
public getQuorum(): IQuorumClients {
|
|
532
|
-
return this.
|
|
533
|
+
return this.parentContext.getQuorum();
|
|
533
534
|
}
|
|
534
535
|
|
|
535
536
|
public getAudience(): IAudience {
|
|
536
|
-
return this.
|
|
537
|
+
return this.parentContext.getAudience();
|
|
537
538
|
}
|
|
538
539
|
|
|
539
540
|
/**
|
|
@@ -581,6 +582,11 @@ export abstract class FluidDataStoreContext
|
|
|
581
582
|
summarizeResult.stats.unreferencedBlobSize = summarizeResult.stats.totalBlobSize;
|
|
582
583
|
}
|
|
583
584
|
|
|
585
|
+
// Add loadingGroupId to the summary
|
|
586
|
+
if (this.loadingGroupId !== undefined) {
|
|
587
|
+
summarizeResult.summary.groupId = this.loadingGroupId;
|
|
588
|
+
}
|
|
589
|
+
|
|
584
590
|
return {
|
|
585
591
|
...summarizeResult,
|
|
586
592
|
id: this.id,
|
|
@@ -650,9 +656,11 @@ export abstract class FluidDataStoreContext
|
|
|
650
656
|
}
|
|
651
657
|
|
|
652
658
|
/**
|
|
653
|
-
* @deprecated There is no replacement for this, its functionality is no longer needed.
|
|
659
|
+
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
654
660
|
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
655
661
|
*
|
|
662
|
+
* Similar capability is exposed with from/to string paths instead of handles via @see addedGCOutboundRoute
|
|
663
|
+
*
|
|
656
664
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
657
665
|
* all references added in the system.
|
|
658
666
|
* @param srcHandle - The handle of the node that added the reference.
|
|
@@ -662,10 +670,26 @@ export abstract class FluidDataStoreContext
|
|
|
662
670
|
// By default, skip this call since the ContainerRuntime will detect the outbound route directly.
|
|
663
671
|
if (this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) === true) {
|
|
664
672
|
// Note: The ContainerRuntime code will check this same setting to avoid double counting.
|
|
665
|
-
this.
|
|
673
|
+
this.parentContext.addedGCOutboundReference?.(srcHandle, outboundHandle);
|
|
666
674
|
}
|
|
667
675
|
}
|
|
668
676
|
|
|
677
|
+
/**
|
|
678
|
+
* (Same as @see addedGCOutboundReference, but with string paths instead of handles)
|
|
679
|
+
*
|
|
680
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
681
|
+
* all references added in the system.
|
|
682
|
+
*
|
|
683
|
+
* @param fromPath - The absolute path of the node that added the reference.
|
|
684
|
+
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
685
|
+
*/
|
|
686
|
+
public addedGCOutboundRoute(fromPath: string, toPath: string) {
|
|
687
|
+
this.parentContext.addedGCOutboundReference?.(
|
|
688
|
+
{ absolutePath: fromPath },
|
|
689
|
+
{ absolutePath: toPath },
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
669
693
|
/**
|
|
670
694
|
* Updates the used routes of the channel and its child contexts. The channel must be loaded before calling this.
|
|
671
695
|
* It is called in these two scenarios:
|
|
@@ -702,15 +726,10 @@ export abstract class FluidDataStoreContext
|
|
|
702
726
|
public submitMessage(type: string, content: any, localOpMetadata: unknown): void {
|
|
703
727
|
this.verifyNotClosed("submitMessage");
|
|
704
728
|
assert(!!this.channel, 0x146 /* "Channel must exist when submitting message" */);
|
|
705
|
-
const fluidDataStoreContent: FluidDataStoreMessage = {
|
|
706
|
-
content,
|
|
707
|
-
type,
|
|
708
|
-
};
|
|
709
|
-
|
|
710
729
|
// Summarizer clients should not submit messages.
|
|
711
730
|
this.identifyLocalChangeInSummarizer("DataStoreMessageSubmittedInSummarizer", type);
|
|
712
731
|
|
|
713
|
-
this.
|
|
732
|
+
this.parentContext.submitMessage(type, content, localOpMetadata);
|
|
714
733
|
}
|
|
715
734
|
|
|
716
735
|
/**
|
|
@@ -747,7 +766,7 @@ export abstract class FluidDataStoreContext
|
|
|
747
766
|
this.verifyNotClosed("submitSignal");
|
|
748
767
|
|
|
749
768
|
assert(!!this.channel, 0x147 /* "Channel must exist on submitting signal" */);
|
|
750
|
-
return this.
|
|
769
|
+
return this.parentContext.submitSignal(type, content, targetClientId);
|
|
751
770
|
}
|
|
752
771
|
|
|
753
772
|
/**
|
|
@@ -756,75 +775,86 @@ export abstract class FluidDataStoreContext
|
|
|
756
775
|
*/
|
|
757
776
|
public makeLocallyVisible() {
|
|
758
777
|
assert(this.channel !== undefined, 0x2cf /* "undefined channel on datastore context" */);
|
|
759
|
-
assert(
|
|
760
|
-
this.channel.visibilityState === VisibilityState.LocallyVisible,
|
|
761
|
-
0x590 /* Channel must be locally visible */,
|
|
762
|
-
);
|
|
763
778
|
this.makeLocallyVisibleFn();
|
|
764
779
|
}
|
|
765
780
|
|
|
766
|
-
protected bindRuntime(channel: IFluidDataStoreChannel) {
|
|
781
|
+
protected async bindRuntime(channel: IFluidDataStoreChannel, existing: boolean) {
|
|
767
782
|
if (this.channel) {
|
|
768
783
|
throw new Error("Runtime already bound");
|
|
769
784
|
}
|
|
770
785
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
assert(this.channelDeferred !== undefined, 0x149 /* "Undefined channel deferral" */);
|
|
777
|
-
assert(this.pkg !== undefined, 0x14a /* "Undefined package path" */);
|
|
786
|
+
assert(
|
|
787
|
+
!this.detachedRuntimeCreation,
|
|
788
|
+
0x148 /* "Detached runtime creation on runtime bind" */,
|
|
789
|
+
);
|
|
790
|
+
assert(this.pkg !== undefined, 0x14a /* "Undefined package path" */);
|
|
778
791
|
|
|
792
|
+
if (existing) {
|
|
779
793
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
780
794
|
const pending = this.pending!;
|
|
781
795
|
|
|
782
796
|
// Apply all pending ops
|
|
783
797
|
for (const op of pending) {
|
|
784
|
-
|
|
798
|
+
// Only process ops whose seq number is greater than snapshot sequence number from which it loaded.
|
|
799
|
+
const seqNumber = this.baseSnapshotSequenceNumber ?? -1;
|
|
800
|
+
if (op.sequenceNumber > seqNumber) {
|
|
801
|
+
channel.process(op, false, undefined /* localOpMetadata */);
|
|
802
|
+
}
|
|
785
803
|
}
|
|
786
804
|
|
|
787
805
|
this.thresholdOpsCounter.send("ProcessPendingOps", pending.length);
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
806
|
+
} else {
|
|
807
|
+
assert(this.pending?.length === 0, 0x8f4 /* no pending ops */);
|
|
808
|
+
|
|
809
|
+
// Execute data store's entry point to make sure that for a local (aka detached from container) data store, the
|
|
810
|
+
// entryPoint initialization function is called before the data store gets attached and potentially connected to
|
|
811
|
+
// the delta stream, so it gets a chance to do things while the data store is still "purely local".
|
|
812
|
+
// This preserves the behavior from before we introduced entryPoints, where the instantiateDataStore method
|
|
813
|
+
// of data store factories tends to construct the data object (at least kick off an async method that returns
|
|
814
|
+
// it); that code moved to the entryPoint initialization function, so we want to ensure it still executes
|
|
815
|
+
// before the data store is attached.
|
|
816
|
+
await channel.entryPoint.get();
|
|
817
|
+
}
|
|
818
|
+
this.pending = undefined;
|
|
793
819
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
820
|
+
// And now mark the runtime active
|
|
821
|
+
this.loaded = true;
|
|
822
|
+
this.channel = channel;
|
|
797
823
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
* per the last time GC was run.
|
|
802
|
-
* Also, this data store may have been realized during summarize. In that case, the child contexts need to
|
|
803
|
-
* have their used routes updated to determine if its needs to summarize again and to add it to the summary.
|
|
804
|
-
*/
|
|
805
|
-
this.updateChannelUsedRoutes();
|
|
824
|
+
// Freeze the package path to ensure that someone doesn't modify it when it is
|
|
825
|
+
// returned in packagePath().
|
|
826
|
+
Object.freeze(this.pkg);
|
|
806
827
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
error,
|
|
816
|
-
);
|
|
817
|
-
}
|
|
828
|
+
/**
|
|
829
|
+
* Update the used routes of the channel. If GC has run before this data store was realized, we will have
|
|
830
|
+
* the used routes saved. So, this will ensure that all the child contexts have up-to-date used routes as
|
|
831
|
+
* per the last time GC was run.
|
|
832
|
+
* Also, this data store may have been realized during summarize. In that case, the child contexts need to
|
|
833
|
+
* have their used routes updated to determine if its needs to summarize again and to add it to the summary.
|
|
834
|
+
*/
|
|
835
|
+
this.updateChannelUsedRoutes();
|
|
818
836
|
}
|
|
819
837
|
|
|
820
838
|
public async getAbsoluteUrl(relativeUrl: string): Promise<string | undefined> {
|
|
821
839
|
if (this.attachState !== AttachState.Attached) {
|
|
822
840
|
return undefined;
|
|
823
841
|
}
|
|
824
|
-
return this.
|
|
842
|
+
return this.parentContext.getAbsoluteUrl(relativeUrl);
|
|
825
843
|
}
|
|
826
844
|
|
|
827
|
-
|
|
845
|
+
/**
|
|
846
|
+
* Get the data required when attaching this context's DataStore.
|
|
847
|
+
* Used for both Container Attach and DataStore Attach.
|
|
848
|
+
*
|
|
849
|
+
* @returns the summary, type, and GC Data for this context's DataStore.
|
|
850
|
+
*/
|
|
851
|
+
public abstract getAttachData(
|
|
852
|
+
includeGCData: boolean,
|
|
853
|
+
telemetryContext?: ITelemetryContext,
|
|
854
|
+
): {
|
|
855
|
+
attachSummary: ISummaryTreeWithStats;
|
|
856
|
+
type: string;
|
|
857
|
+
};
|
|
828
858
|
|
|
829
859
|
public abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;
|
|
830
860
|
|
|
@@ -844,21 +874,19 @@ export abstract class FluidDataStoreContext
|
|
|
844
874
|
return {};
|
|
845
875
|
}
|
|
846
876
|
|
|
847
|
-
public reSubmit(contents: any, localOpMetadata: unknown) {
|
|
877
|
+
public reSubmit(type: string, contents: any, localOpMetadata: unknown) {
|
|
848
878
|
assert(!!this.channel, 0x14b /* "Channel must exist when resubmitting ops" */);
|
|
849
|
-
|
|
850
|
-
this.channel.reSubmit(innerContents.type, innerContents.content, localOpMetadata);
|
|
879
|
+
this.channel.reSubmit(type, contents, localOpMetadata);
|
|
851
880
|
}
|
|
852
881
|
|
|
853
|
-
public rollback(contents: any, localOpMetadata: unknown) {
|
|
882
|
+
public rollback(type: string, contents: any, localOpMetadata: unknown) {
|
|
854
883
|
if (!this.channel) {
|
|
855
884
|
throw new Error("Channel must exist when rolling back ops");
|
|
856
885
|
}
|
|
857
886
|
if (!this.channel.rollback) {
|
|
858
887
|
throw new Error("Channel doesn't support rollback");
|
|
859
888
|
}
|
|
860
|
-
|
|
861
|
-
this.channel.rollback(innerContents.type, innerContents.content, localOpMetadata);
|
|
889
|
+
this.channel.rollback(type, contents, localOpMetadata);
|
|
862
890
|
}
|
|
863
891
|
|
|
864
892
|
public async applyStashedOp(contents: any): Promise<unknown> {
|
|
@@ -872,7 +900,7 @@ export abstract class FluidDataStoreContext
|
|
|
872
900
|
private verifyNotClosed(
|
|
873
901
|
callSite: string,
|
|
874
902
|
checkTombstone = true,
|
|
875
|
-
safeTelemetryProps:
|
|
903
|
+
safeTelemetryProps: ITelemetryBaseProperties = {},
|
|
876
904
|
) {
|
|
877
905
|
if (this.deleted) {
|
|
878
906
|
const messageString = `Context is deleted! Call site [${callSite}]`;
|
|
@@ -900,15 +928,14 @@ export abstract class FluidDataStoreContext
|
|
|
900
928
|
this.mc,
|
|
901
929
|
{
|
|
902
930
|
eventName: "GC_Tombstone_DataStore_Changed",
|
|
903
|
-
category: this.
|
|
904
|
-
gcTombstoneEnforcementAllowed:
|
|
905
|
-
this._containerRuntime.gcTombstoneEnforcementAllowed,
|
|
931
|
+
category: this.gcThrowOnTombstoneUsage ? "error" : "generic",
|
|
932
|
+
gcTombstoneEnforcementAllowed: this.gcTombstoneEnforcementAllowed,
|
|
906
933
|
callSite,
|
|
907
934
|
},
|
|
908
935
|
this.pkg,
|
|
909
936
|
error,
|
|
910
937
|
);
|
|
911
|
-
if (this.
|
|
938
|
+
if (this.gcThrowOnTombstoneUsage) {
|
|
912
939
|
throw error;
|
|
913
940
|
}
|
|
914
941
|
}
|
|
@@ -948,37 +975,58 @@ export abstract class FluidDataStoreContext
|
|
|
948
975
|
summarizeInternal,
|
|
949
976
|
id,
|
|
950
977
|
createParam,
|
|
951
|
-
|
|
952
|
-
{ throwOnFailure: true },
|
|
978
|
+
undefined /* config */,
|
|
953
979
|
getGCDataFn,
|
|
954
980
|
);
|
|
955
981
|
}
|
|
956
982
|
|
|
983
|
+
public deleteChildSummarizerNode(id: string) {
|
|
984
|
+
this.summarizerNode.deleteChild(id);
|
|
985
|
+
}
|
|
986
|
+
|
|
957
987
|
public async uploadBlob(
|
|
958
988
|
blob: ArrayBufferLike,
|
|
959
989
|
signal?: AbortSignal,
|
|
960
990
|
): Promise<IFluidHandle<ArrayBufferLike>> {
|
|
961
|
-
return this.
|
|
991
|
+
return this.parentContext.uploadBlob(blob, signal);
|
|
962
992
|
}
|
|
963
993
|
}
|
|
964
994
|
|
|
965
995
|
export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
966
|
-
|
|
996
|
+
// Tells whether we need to fetch the snapshot before use. This is to support Data Virtualization.
|
|
997
|
+
private snapshotFetchRequired: boolean;
|
|
998
|
+
private readonly runtime: IContainerRuntimeBase;
|
|
967
999
|
|
|
968
1000
|
constructor(props: IRemoteFluidDataStoreContextProps) {
|
|
969
1001
|
super(props, true /* existing */, false /* isLocalDataStore */, () => {
|
|
970
1002
|
throw new Error("Already attached");
|
|
971
1003
|
});
|
|
972
1004
|
|
|
973
|
-
this.
|
|
974
|
-
|
|
1005
|
+
this._baseSnapshot = props.snapshotTree;
|
|
1006
|
+
this.snapshotFetchRequired = !!props.snapshotTree?.omitted;
|
|
1007
|
+
this.runtime = props.parentContext.containerRuntime;
|
|
975
1008
|
if (props.snapshotTree !== undefined) {
|
|
976
1009
|
this.summarizerNode.updateBaseSummaryState(props.snapshotTree);
|
|
977
1010
|
}
|
|
978
1011
|
}
|
|
979
1012
|
|
|
980
1013
|
private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {
|
|
981
|
-
|
|
1014
|
+
// Sequence number of the snapshot.
|
|
1015
|
+
let sequenceNumber: number | undefined;
|
|
1016
|
+
if (this.snapshotFetchRequired) {
|
|
1017
|
+
assert(
|
|
1018
|
+
this.loadingGroupId !== undefined,
|
|
1019
|
+
0x8f5 /* groupId should be present to fetch snapshot */,
|
|
1020
|
+
);
|
|
1021
|
+
const snapshot = await this.runtime.getSnapshotForLoadingGroupId(
|
|
1022
|
+
[this.loadingGroupId],
|
|
1023
|
+
[this.id],
|
|
1024
|
+
);
|
|
1025
|
+
this._baseSnapshot = snapshot.snapshotTree;
|
|
1026
|
+
sequenceNumber = snapshot.sequenceNumber;
|
|
1027
|
+
this.snapshotFetchRequired = false;
|
|
1028
|
+
}
|
|
1029
|
+
let tree = this.baseSnapshot;
|
|
982
1030
|
let isRootDataStore = true;
|
|
983
1031
|
|
|
984
1032
|
if (!!tree && tree.blobs[dataStoreAttributesBlobName] !== undefined) {
|
|
@@ -1018,11 +1066,12 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
1018
1066
|
}
|
|
1019
1067
|
}
|
|
1020
1068
|
|
|
1069
|
+
assert(this.pkg !== undefined, 0x8f6 /* The datastore context package should be defined */);
|
|
1021
1070
|
return {
|
|
1022
|
-
|
|
1023
|
-
pkg: this.pkg!,
|
|
1071
|
+
pkg: this.pkg,
|
|
1024
1072
|
isRootDataStore,
|
|
1025
1073
|
snapshot: tree,
|
|
1074
|
+
sequenceNumber,
|
|
1026
1075
|
};
|
|
1027
1076
|
});
|
|
1028
1077
|
|
|
@@ -1030,7 +1079,13 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
1030
1079
|
return this.initialSnapshotDetailsP;
|
|
1031
1080
|
}
|
|
1032
1081
|
|
|
1033
|
-
|
|
1082
|
+
/**
|
|
1083
|
+
* @see FluidDataStoreContext.getAttachData
|
|
1084
|
+
*/
|
|
1085
|
+
public getAttachData(includeGCData: boolean): {
|
|
1086
|
+
attachSummary: ISummaryTreeWithStats;
|
|
1087
|
+
type: string;
|
|
1088
|
+
} {
|
|
1034
1089
|
throw new Error("Cannot attach remote store");
|
|
1035
1090
|
}
|
|
1036
1091
|
}
|
|
@@ -1081,7 +1136,16 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1081
1136
|
});
|
|
1082
1137
|
}
|
|
1083
1138
|
|
|
1084
|
-
|
|
1139
|
+
/**
|
|
1140
|
+
* @see FluidDataStoreContext.getAttachData
|
|
1141
|
+
*/
|
|
1142
|
+
public getAttachData(
|
|
1143
|
+
includeGCData: boolean,
|
|
1144
|
+
telemetryContext?: ITelemetryContext,
|
|
1145
|
+
): {
|
|
1146
|
+
attachSummary: ISummaryTreeWithStats;
|
|
1147
|
+
type: string;
|
|
1148
|
+
} {
|
|
1085
1149
|
assert(
|
|
1086
1150
|
this.channel !== undefined,
|
|
1087
1151
|
0x14f /* "There should be a channel when generating attach message" */,
|
|
@@ -1091,25 +1155,30 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1091
1155
|
0x150 /* "pkg should be available in local data store context" */,
|
|
1092
1156
|
);
|
|
1093
1157
|
|
|
1094
|
-
const
|
|
1158
|
+
const attachSummary = this.channel.getAttachSummary(telemetryContext);
|
|
1095
1159
|
|
|
1096
1160
|
// Wrap dds summaries in .channels subtree.
|
|
1097
|
-
wrapSummaryInChannelsTree(
|
|
1161
|
+
wrapSummaryInChannelsTree(attachSummary);
|
|
1098
1162
|
|
|
1099
1163
|
// Add data store's attributes to the summary.
|
|
1100
1164
|
const attributes = createAttributes(this.pkg, this.isInMemoryRoot());
|
|
1101
|
-
addBlobToSummary(
|
|
1165
|
+
addBlobToSummary(attachSummary, dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
1166
|
+
if (includeGCData) {
|
|
1167
|
+
const gcData = this.channel.getAttachGCData?.(telemetryContext);
|
|
1168
|
+
if (gcData !== undefined) {
|
|
1169
|
+
addBlobToSummary(attachSummary, gcDataBlobKey, JSON.stringify(gcData));
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1102
1172
|
|
|
1103
|
-
//
|
|
1104
|
-
|
|
1173
|
+
// Add loadingGroupId to the summary
|
|
1174
|
+
if (this.loadingGroupId !== undefined) {
|
|
1175
|
+
attachSummary.summary.groupId = this.loadingGroupId;
|
|
1176
|
+
}
|
|
1105
1177
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
snapshot,
|
|
1178
|
+
return {
|
|
1179
|
+
attachSummary,
|
|
1109
1180
|
type: this.pkg[this.pkg.length - 1],
|
|
1110
1181
|
};
|
|
1111
|
-
|
|
1112
|
-
return message;
|
|
1113
1182
|
}
|
|
1114
1183
|
|
|
1115
1184
|
private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {
|
|
@@ -1196,43 +1265,47 @@ export class LocalDetachedFluidDataStoreContext
|
|
|
1196
1265
|
extends LocalFluidDataStoreContextBase
|
|
1197
1266
|
implements IFluidDataStoreContextDetached
|
|
1198
1267
|
{
|
|
1199
|
-
constructor(props:
|
|
1268
|
+
constructor(props: ILocalDetachedFluidDataStoreContextProps) {
|
|
1200
1269
|
super(props);
|
|
1201
1270
|
this.detachedRuntimeCreation = true;
|
|
1271
|
+
this.channelToDataStoreFn = props.channelToDataStoreFn;
|
|
1202
1272
|
}
|
|
1273
|
+
private readonly channelToDataStoreFn: (channel: IFluidDataStoreChannel) => IDataStore;
|
|
1203
1274
|
|
|
1204
1275
|
public async attachRuntime(
|
|
1205
1276
|
registry: IProvideFluidDataStoreFactory,
|
|
1206
1277
|
dataStoreChannel: IFluidDataStoreChannel,
|
|
1207
|
-
) {
|
|
1278
|
+
): Promise<IDataStore> {
|
|
1208
1279
|
assert(this.detachedRuntimeCreation, 0x154 /* "runtime creation is already attached" */);
|
|
1209
1280
|
this.detachedRuntimeCreation = false;
|
|
1210
1281
|
|
|
1211
|
-
assert(this.
|
|
1212
|
-
this.channelDeferred = new Deferred<IFluidDataStoreChannel>();
|
|
1282
|
+
assert(this.channelP === undefined, 0x155 /* "channel deferral is already set" */);
|
|
1213
1283
|
|
|
1214
|
-
|
|
1284
|
+
this.channelP = Promise.resolve()
|
|
1285
|
+
.then(async () => {
|
|
1286
|
+
const factory = registry.IFluidDataStoreFactory;
|
|
1215
1287
|
|
|
1216
|
-
|
|
1217
|
-
|
|
1288
|
+
const factory2 = await this.factoryFromPackagePath();
|
|
1289
|
+
assert(factory2 === factory, 0x156 /* "Unexpected factory for package path" */);
|
|
1218
1290
|
|
|
1219
|
-
|
|
1220
|
-
this.registry = entry.registry;
|
|
1291
|
+
await super.bindRuntime(dataStoreChannel, false /* existing */);
|
|
1221
1292
|
|
|
1222
|
-
|
|
1293
|
+
assert(
|
|
1294
|
+
!(await this.isRoot()),
|
|
1295
|
+
0x8f7 /* there are no more createRootDataStore() kind of APIs! */,
|
|
1296
|
+
);
|
|
1223
1297
|
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1298
|
+
return dataStoreChannel;
|
|
1299
|
+
})
|
|
1300
|
+
.catch((error) => {
|
|
1301
|
+
this.mc.logger.sendErrorEvent({ eventName: "AttachRuntimeError" }, error);
|
|
1302
|
+
// The following two lines result in same exception thrown.
|
|
1303
|
+
// But we need to ensure that this.channelDeferred.promise is "observed", as otherwise
|
|
1304
|
+
// out UT reports unhandled exception
|
|
1305
|
+
throw error;
|
|
1306
|
+
});
|
|
1232
1307
|
|
|
1233
|
-
|
|
1234
|
-
dataStoreChannel.makeVisibleAndAttachGraph();
|
|
1235
|
-
}
|
|
1308
|
+
return this.channelToDataStoreFn(await this.channelP);
|
|
1236
1309
|
}
|
|
1237
1310
|
|
|
1238
1311
|
public async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {
|