@fluidframework/container-runtime 2.13.0 → 2.20.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.cjs +36 -0
- package/CHANGELOG.md +46 -0
- package/api-report/container-runtime.legacy.alpha.api.md +9 -203
- package/container-runtime.test-files.tar +0 -0
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager/blobManager.d.ts +5 -1
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +16 -2
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
- package/dist/channelCollection.d.ts +23 -12
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +22 -12
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +6 -2
- package/dist/connectionTelemetry.js.map +1 -1
- 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 +74 -65
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +53 -37
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +7 -3
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +2 -1
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +41 -25
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +31 -18
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +6 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +6 -2
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +1 -17
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +9 -6
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +95 -89
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +21 -7
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +12 -5
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +11 -0
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +3 -2
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +210 -70
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +39 -13
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +6 -2
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +6 -2
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +18 -6
- package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +33 -11
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +6 -2
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.d.ts +42 -13
- package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +27 -9
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +1 -0
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +3 -1
- package/dist/gc/index.js.map +1 -1
- package/dist/inboundBatchAggregator.d.ts +34 -0
- package/dist/inboundBatchAggregator.d.ts.map +1 -0
- package/dist/inboundBatchAggregator.js +185 -0
- package/dist/inboundBatchAggregator.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -4
- package/dist/messageTypes.d.ts +14 -5
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/metadata.d.ts +12 -4
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +6 -2
- package/dist/metadata.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +9 -3
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +3 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.d.ts +9 -3
- package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.js +9 -3
- package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +3 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +12 -7
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +0 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +5 -4
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +2 -0
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +1 -1
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +6 -1
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +9 -3
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/package.json +2 -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 +19 -7
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +13 -5
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +2 -0
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +1 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +93 -31
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +15 -5
- package/dist/summary/orderedClientElection.js.map +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 +17 -6
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +12 -4
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +9 -5
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +9 -3
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +6 -2
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js +12 -4
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +24 -8
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +15 -5
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +12 -4
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +12 -4
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +246 -135
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +1 -2
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +24 -8
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +9 -3
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +3 -1
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +8 -4
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +12 -4
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/throttler.d.ts +26 -10
- package/dist/throttler.d.ts.map +1 -1
- package/dist/throttler.js +12 -4
- package/dist/throttler.js.map +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts +5 -1
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +16 -2
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
- package/lib/channelCollection.d.ts +23 -12
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +22 -12
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +6 -2
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts +1 -1
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +74 -65
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +53 -37
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +7 -3
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +2 -1
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +41 -25
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +31 -18
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +6 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +6 -2
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +1 -1
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +1 -17
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +9 -6
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +95 -89
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +21 -7
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +12 -5
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +11 -0
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +2 -2
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +210 -70
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +39 -13
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +6 -2
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +6 -2
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +18 -6
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +33 -11
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +6 -2
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.d.ts +42 -13
- package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +27 -9
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +1 -0
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -0
- package/lib/gc/index.js.map +1 -1
- package/lib/inboundBatchAggregator.d.ts +34 -0
- package/lib/inboundBatchAggregator.d.ts.map +1 -0
- package/lib/inboundBatchAggregator.js +181 -0
- package/lib/inboundBatchAggregator.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +0 -4
- package/lib/messageTypes.d.ts +14 -5
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/metadata.d.ts +12 -4
- package/lib/metadata.d.ts.map +1 -1
- package/lib/metadata.js +6 -2
- package/lib/metadata.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +9 -3
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +3 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.d.ts +9 -3
- package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.js +9 -3
- package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +1 -1
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +3 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +13 -8
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +0 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +6 -5
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +2 -0
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +1 -1
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +6 -1
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +9 -3
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- 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 +19 -7
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +13 -5
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +2 -0
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +1 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +93 -31
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +15 -5
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +17 -6
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +12 -4
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +9 -5
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +9 -3
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +6 -2
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js +12 -4
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +24 -8
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +15 -5
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +3 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +12 -4
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +12 -4
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +246 -135
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -2
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +24 -8
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +9 -3
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +3 -1
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +8 -4
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +12 -4
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/throttler.d.ts +26 -10
- package/lib/throttler.d.ts.map +1 -1
- package/lib/throttler.js +12 -4
- package/lib/throttler.js.map +1 -1
- package/package.json +43 -30
- package/src/batchTracker.ts +31 -33
- package/src/blobManager/blobManager.ts +38 -19
- package/src/blobManager/blobManagerSnapSum.ts +2 -2
- package/src/channelCollection.ts +45 -38
- package/src/connectionTelemetry.ts +31 -13
- package/src/containerHandleContext.ts +2 -2
- package/src/containerRuntime.ts +199 -142
- package/src/dataStore.ts +11 -6
- package/src/dataStoreContext.ts +80 -59
- package/src/dataStoreContexts.ts +16 -12
- package/src/dataStoreRegistry.ts +1 -1
- package/src/deltaManagerProxies.ts +5 -5
- package/src/deltaScheduler.ts +19 -13
- package/src/gc/garbageCollection.ts +42 -20
- package/src/gc/gcConfigs.ts +4 -4
- package/src/gc/gcDefinitions.ts +212 -70
- package/src/gc/gcHelpers.ts +13 -7
- package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
- package/src/gc/gcSummaryDefinitions.ts +18 -6
- package/src/gc/gcSummaryStateTracker.ts +4 -2
- package/src/gc/gcTelemetry.ts +47 -19
- package/src/gc/gcUnreferencedStateTracker.ts +40 -16
- package/src/gc/index.ts +1 -0
- package/src/{scheduleManager.ts → inboundBatchAggregator.ts} +53 -120
- package/src/index.ts +0 -3
- package/src/messageTypes.ts +14 -5
- package/src/metadata.ts +12 -4
- package/src/opLifecycle/batchManager.ts +12 -6
- package/src/opLifecycle/duplicateBatchDetector.ts +10 -4
- package/src/opLifecycle/opCompressor.ts +8 -4
- package/src/opLifecycle/opDecompressor.ts +19 -10
- package/src/opLifecycle/opGroupingManager.ts +12 -8
- package/src/opLifecycle/opSplitter.ts +10 -7
- package/src/opLifecycle/outbox.ts +22 -13
- package/src/opLifecycle/remoteMessageProcessor.ts +10 -4
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +34 -16
- package/src/summary/documentSchema.ts +30 -18
- package/src/summary/index.ts +0 -3
- package/src/summary/orderedClientElection.ts +100 -38
- package/src/summary/runWhileConnectedCoordinator.ts +6 -3
- package/src/summary/runningSummarizer.ts +38 -19
- package/src/summary/summarizer.ts +29 -16
- package/src/summary/summarizerClientElection.ts +2 -2
- package/src/summary/summarizerHeuristics.ts +22 -11
- package/src/summary/summarizerNode/summarizerNode.ts +22 -12
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +48 -16
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +21 -11
- package/src/summary/summarizerTypes.ts +246 -139
- package/src/summary/summaryCollection.ts +22 -23
- package/src/summary/summaryFormat.ts +24 -8
- package/src/summary/summaryGenerator.ts +14 -8
- package/src/summary/summaryManager.ts +28 -18
- package/src/throttler.ts +23 -11
- package/dist/scheduleManager.d.ts +0 -28
- package/dist/scheduleManager.d.ts.map +0 -1
- package/dist/scheduleManager.js +0 -233
- package/dist/scheduleManager.js.map +0 -1
- package/lib/scheduleManager.d.ts +0 -28
- package/lib/scheduleManager.d.ts.map +0 -1
- package/lib/scheduleManager.js +0 -229
- package/lib/scheduleManager.js.map +0 -1
package/src/dataStore.ts
CHANGED
|
@@ -26,9 +26,13 @@ import { ContainerMessageType } from "./messageTypes.js";
|
|
|
26
26
|
* alias to a datastore
|
|
27
27
|
*/
|
|
28
28
|
export interface IDataStoreAliasMessage {
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The internal id of the datastore
|
|
31
|
+
*/
|
|
30
32
|
readonly internalId: string;
|
|
31
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* The alias name to be assigned to the datastore
|
|
35
|
+
*/
|
|
32
36
|
readonly alias: string;
|
|
33
37
|
}
|
|
34
38
|
|
|
@@ -39,11 +43,12 @@ export interface IDataStoreAliasMessage {
|
|
|
39
43
|
* @returns True if the {@link IDataStoreAliasMessage} is fully implemented, false otherwise
|
|
40
44
|
*/
|
|
41
45
|
export const isDataStoreAliasMessage = (
|
|
42
|
-
maybeDataStoreAliasMessage:
|
|
46
|
+
maybeDataStoreAliasMessage: unknown,
|
|
43
47
|
): maybeDataStoreAliasMessage is IDataStoreAliasMessage => {
|
|
44
48
|
return (
|
|
45
|
-
typeof maybeDataStoreAliasMessage?.internalId ===
|
|
46
|
-
|
|
49
|
+
typeof (maybeDataStoreAliasMessage as Partial<IDataStoreAliasMessage>)?.internalId ===
|
|
50
|
+
"string" &&
|
|
51
|
+
typeof (maybeDataStoreAliasMessage as Partial<IDataStoreAliasMessage>)?.alias === "string"
|
|
47
52
|
);
|
|
48
53
|
};
|
|
49
54
|
|
|
@@ -187,7 +192,7 @@ class DataStore implements IDataStore {
|
|
|
187
192
|
private async ackBasedPromise<T>(
|
|
188
193
|
executor: (
|
|
189
194
|
resolve: (value: T | PromiseLike<T>) => void,
|
|
190
|
-
reject: (reason?:
|
|
195
|
+
reject: (reason?: unknown) => void,
|
|
191
196
|
) => void,
|
|
192
197
|
): Promise<T> {
|
|
193
198
|
let rejectBecauseDispose: () => void;
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -14,7 +14,11 @@ import {
|
|
|
14
14
|
ITelemetryBaseProperties,
|
|
15
15
|
type IEvent,
|
|
16
16
|
} from "@fluidframework/core-interfaces";
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
type IFluidHandleContext,
|
|
19
|
+
type IFluidHandleInternal,
|
|
20
|
+
type ITelemetryBaseLogger,
|
|
21
|
+
} from "@fluidframework/core-interfaces/internal";
|
|
18
22
|
import { assert, LazyPromise, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
19
23
|
import { IClientDetails, IQuorumClients } from "@fluidframework/driver-definitions";
|
|
20
24
|
import {
|
|
@@ -104,7 +108,9 @@ export function createAttributesBlob(
|
|
|
104
108
|
return new BlobTreeEntry(dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
108
114
|
export interface ISnapshotDetails {
|
|
109
115
|
pkg: readonly string[];
|
|
110
116
|
isRootDataStore: boolean;
|
|
@@ -152,10 +158,6 @@ export interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContext
|
|
|
152
158
|
readonly pkg: Readonly<string[]> | undefined;
|
|
153
159
|
readonly snapshotTree: ISnapshotTree | undefined;
|
|
154
160
|
readonly makeLocallyVisibleFn: () => void;
|
|
155
|
-
/**
|
|
156
|
-
* @deprecated 0.16 Issue #1635, #3631
|
|
157
|
-
*/
|
|
158
|
-
readonly createProps?: any;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
/**
|
|
@@ -177,7 +179,9 @@ export interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContex
|
|
|
177
179
|
|
|
178
180
|
// back-compat: To be removed in the future.
|
|
179
181
|
// Added in "2.0.0-rc.2.0.0" timeframe (to support older builds).
|
|
180
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* @internal
|
|
184
|
+
*/
|
|
181
185
|
export interface IFluidDataStoreContextEvents extends IEvent {
|
|
182
186
|
(event: "attaching" | "attached", listener: () => void);
|
|
183
187
|
}
|
|
@@ -195,7 +199,7 @@ export abstract class FluidDataStoreContext
|
|
|
195
199
|
return this.pkg;
|
|
196
200
|
}
|
|
197
201
|
|
|
198
|
-
public get options(): Record<string | number,
|
|
202
|
+
public get options(): Record<string | number, unknown> {
|
|
199
203
|
return this.parentContext.options;
|
|
200
204
|
}
|
|
201
205
|
|
|
@@ -207,7 +211,7 @@ export abstract class FluidDataStoreContext
|
|
|
207
211
|
return this.parentContext.clientDetails;
|
|
208
212
|
}
|
|
209
213
|
|
|
210
|
-
public get baseLogger() {
|
|
214
|
+
public get baseLogger(): ITelemetryBaseLogger {
|
|
211
215
|
return this.parentContext.baseLogger;
|
|
212
216
|
}
|
|
213
217
|
|
|
@@ -219,7 +223,7 @@ export abstract class FluidDataStoreContext
|
|
|
219
223
|
return this.parentContext.connected;
|
|
220
224
|
}
|
|
221
225
|
|
|
222
|
-
public get IFluidHandleContext() {
|
|
226
|
+
public get IFluidHandleContext(): IFluidHandleContext {
|
|
223
227
|
return this.parentContext.IFluidHandleContext;
|
|
224
228
|
}
|
|
225
229
|
|
|
@@ -239,7 +243,7 @@ export abstract class FluidDataStoreContext
|
|
|
239
243
|
}
|
|
240
244
|
|
|
241
245
|
private _disposed = false;
|
|
242
|
-
public get disposed() {
|
|
246
|
+
public get disposed(): boolean {
|
|
243
247
|
return this._disposed;
|
|
244
248
|
}
|
|
245
249
|
|
|
@@ -248,7 +252,7 @@ export abstract class FluidDataStoreContext
|
|
|
248
252
|
* Tombstoned objects are eventually deleted by GC.
|
|
249
253
|
*/
|
|
250
254
|
private _tombstoned = false;
|
|
251
|
-
public get tombstoned() {
|
|
255
|
+
public get tombstoned(): boolean {
|
|
252
256
|
return this._tombstoned;
|
|
253
257
|
}
|
|
254
258
|
/**
|
|
@@ -261,7 +265,9 @@ export abstract class FluidDataStoreContext
|
|
|
261
265
|
*/
|
|
262
266
|
public readonly gcTombstoneEnforcementAllowed: boolean = false;
|
|
263
267
|
|
|
264
|
-
/**
|
|
268
|
+
/**
|
|
269
|
+
* If true, this means that this data store context and its children have been removed from the runtime
|
|
270
|
+
*/
|
|
265
271
|
protected deleted: boolean = false;
|
|
266
272
|
|
|
267
273
|
public get attachState(): AttachState {
|
|
@@ -289,6 +295,7 @@ export abstract class FluidDataStoreContext
|
|
|
289
295
|
// We know that if the base snapshot is omitted, then the isRootDataStore flag is not set.
|
|
290
296
|
// That means we can skip the expensive call to getInitialSnapshotDetails for virtualized datastores,
|
|
291
297
|
// and get the information from the alias map directly.
|
|
298
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
292
299
|
if (aliasedDataStores !== undefined && (this.baseSnapshot as any)?.omitted === true) {
|
|
293
300
|
return aliasedDataStores.has(this.id);
|
|
294
301
|
}
|
|
@@ -319,7 +326,9 @@ export abstract class FluidDataStoreContext
|
|
|
319
326
|
protected detachedRuntimeCreation = false;
|
|
320
327
|
protected channel: IFluidDataStoreChannel | undefined;
|
|
321
328
|
private loaded = false;
|
|
322
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* Tracks the messages for this data store that are sent while it's not loaded
|
|
331
|
+
*/
|
|
323
332
|
private pendingMessagesState: IPendingMessagesState | undefined = {
|
|
324
333
|
messageCollections: [],
|
|
325
334
|
pendingCount: 0,
|
|
@@ -378,7 +387,8 @@ export abstract class FluidDataStoreContext
|
|
|
378
387
|
fullTree: boolean,
|
|
379
388
|
trackState: boolean,
|
|
380
389
|
telemetryContext?: ITelemetryContext,
|
|
381
|
-
) =>
|
|
390
|
+
): Promise<ISummarizeInternalResult> =>
|
|
391
|
+
this.summarizeInternal(fullTree, trackState, telemetryContext);
|
|
382
392
|
|
|
383
393
|
this.summarizerNode = props.createSummarizerNodeFn(
|
|
384
394
|
thisSummarizeInternal,
|
|
@@ -429,11 +439,11 @@ export abstract class FluidDataStoreContext
|
|
|
429
439
|
* This function is called to prevent ops from being generated from this data store once it has been deleted. Furthermore, this data store
|
|
430
440
|
* should not receive any ops/signals.
|
|
431
441
|
*/
|
|
432
|
-
public delete() {
|
|
442
|
+
public delete(): void {
|
|
433
443
|
this.deleted = true;
|
|
434
444
|
}
|
|
435
445
|
|
|
436
|
-
public setTombstone(tombstone: boolean) {
|
|
446
|
+
public setTombstone(tombstone: boolean): void {
|
|
437
447
|
if (this.tombstoned === tombstone) {
|
|
438
448
|
return;
|
|
439
449
|
}
|
|
@@ -483,7 +493,7 @@ export abstract class FluidDataStoreContext
|
|
|
483
493
|
return this.channelP;
|
|
484
494
|
}
|
|
485
495
|
|
|
486
|
-
protected async factoryFromPackagePath() {
|
|
496
|
+
protected async factoryFromPackagePath(): Promise<IFluidDataStoreFactory> {
|
|
487
497
|
const packages = this.pkg;
|
|
488
498
|
if (packages === undefined) {
|
|
489
499
|
this.rejectDeferredRealize("packages is undefined");
|
|
@@ -555,7 +565,7 @@ export abstract class FluidDataStoreContext
|
|
|
555
565
|
return created;
|
|
556
566
|
}
|
|
557
567
|
|
|
558
|
-
private async realizeCore(existing: boolean) {
|
|
568
|
+
private async realizeCore(existing: boolean): Promise<IFluidDataStoreChannel> {
|
|
559
569
|
const details = await this.getInitialSnapshotDetails();
|
|
560
570
|
// Base snapshot is the baseline where pending ops are applied to.
|
|
561
571
|
// It is important that this be in sync with the pending ops, and also
|
|
@@ -584,7 +594,7 @@ export abstract class FluidDataStoreContext
|
|
|
584
594
|
* @param clientId - ID of the client. Its old ID when in disconnected state and
|
|
585
595
|
* its new client ID when we are connecting or connected.
|
|
586
596
|
*/
|
|
587
|
-
public setConnectionState(connected: boolean, clientId?: string) {
|
|
597
|
+
public setConnectionState(connected: boolean, clientId?: string): void {
|
|
588
598
|
// ConnectionState should not fail in tombstone mode as this is internally run
|
|
589
599
|
this.verifyNotClosed("setConnectionState", false /* checkTombstone */);
|
|
590
600
|
|
|
@@ -608,7 +618,7 @@ export abstract class FluidDataStoreContext
|
|
|
608
618
|
private processMessagesCompat(
|
|
609
619
|
channel: IFluidDataStoreChannel,
|
|
610
620
|
messageCollection: IRuntimeMessageCollection,
|
|
611
|
-
) {
|
|
621
|
+
): void {
|
|
612
622
|
if (channel.processMessages !== undefined) {
|
|
613
623
|
channel.processMessages(messageCollection);
|
|
614
624
|
} else {
|
|
@@ -769,7 +779,7 @@ export abstract class FluidDataStoreContext
|
|
|
769
779
|
*
|
|
770
780
|
* @param usedRoutes - The routes that are used in this data store.
|
|
771
781
|
*/
|
|
772
|
-
public updateUsedRoutes(usedRoutes: string[]) {
|
|
782
|
+
public updateUsedRoutes(usedRoutes: string[]): void {
|
|
773
783
|
// Update the used routes in this data store's summarizer node.
|
|
774
784
|
this.summarizerNode.updateUsedRoutes(usedRoutes);
|
|
775
785
|
|
|
@@ -794,10 +804,15 @@ export abstract class FluidDataStoreContext
|
|
|
794
804
|
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
795
805
|
* @param messageTimestampMs - The timestamp of the message that added the reference.
|
|
796
806
|
*/
|
|
797
|
-
public addedGCOutboundRoute(
|
|
807
|
+
public addedGCOutboundRoute(
|
|
808
|
+
fromPath: string,
|
|
809
|
+
toPath: string,
|
|
810
|
+
messageTimestampMs?: number,
|
|
811
|
+
): void {
|
|
798
812
|
this.parentContext.addedGCOutboundRoute(fromPath, toPath, messageTimestampMs);
|
|
799
813
|
}
|
|
800
814
|
|
|
815
|
+
// eslint-disable-next-line jsdoc/require-description
|
|
801
816
|
/**
|
|
802
817
|
* @deprecated 0.18.Should call request on the runtime directly
|
|
803
818
|
*/
|
|
@@ -806,7 +821,7 @@ export abstract class FluidDataStoreContext
|
|
|
806
821
|
return runtime.request(request);
|
|
807
822
|
}
|
|
808
823
|
|
|
809
|
-
public submitMessage(type: string, content:
|
|
824
|
+
public submitMessage(type: string, content: unknown, localOpMetadata: unknown): void {
|
|
810
825
|
this.verifyNotClosed("submitMessage");
|
|
811
826
|
assert(!!this.channel, 0x146 /* "Channel must exist when submitting message" */);
|
|
812
827
|
// Summarizer clients should not submit messages.
|
|
@@ -845,7 +860,7 @@ export abstract class FluidDataStoreContext
|
|
|
845
860
|
* @param content - Content of the signal. Should be a JSON serializable object or primitive.
|
|
846
861
|
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
847
862
|
*/
|
|
848
|
-
public submitSignal(type: string, content: unknown, targetClientId?: string) {
|
|
863
|
+
public submitSignal(type: string, content: unknown, targetClientId?: string): void {
|
|
849
864
|
this.verifyNotClosed("submitSignal");
|
|
850
865
|
|
|
851
866
|
assert(!!this.channel, 0x147 /* "Channel must exist on submitting signal" */);
|
|
@@ -856,12 +871,12 @@ export abstract class FluidDataStoreContext
|
|
|
856
871
|
* This is called by the data store channel when it becomes locally visible indicating that it is ready to become
|
|
857
872
|
* globally visible now.
|
|
858
873
|
*/
|
|
859
|
-
public makeLocallyVisible() {
|
|
874
|
+
public makeLocallyVisible(): void {
|
|
860
875
|
assert(this.channel !== undefined, 0x2cf /* "undefined channel on datastore context" */);
|
|
861
876
|
this.makeLocallyVisibleFn();
|
|
862
877
|
}
|
|
863
878
|
|
|
864
|
-
protected processPendingOps(channel: IFluidDataStoreChannel) {
|
|
879
|
+
protected processPendingOps(channel: IFluidDataStoreChannel): void {
|
|
865
880
|
const baseSequenceNumber = this.baseSnapshotSequenceNumber ?? -1;
|
|
866
881
|
|
|
867
882
|
assert(
|
|
@@ -879,7 +894,7 @@ export abstract class FluidDataStoreContext
|
|
|
879
894
|
this.pendingMessagesState = undefined;
|
|
880
895
|
}
|
|
881
896
|
|
|
882
|
-
protected completeBindingRuntime(channel: IFluidDataStoreChannel) {
|
|
897
|
+
protected completeBindingRuntime(channel: IFluidDataStoreChannel): void {
|
|
883
898
|
// And now mark the runtime active
|
|
884
899
|
this.loaded = true;
|
|
885
900
|
this.channel = channel;
|
|
@@ -895,7 +910,10 @@ export abstract class FluidDataStoreContext
|
|
|
895
910
|
Object.freeze(this.pkg);
|
|
896
911
|
}
|
|
897
912
|
|
|
898
|
-
protected async bindRuntime(
|
|
913
|
+
protected async bindRuntime(
|
|
914
|
+
channel: IFluidDataStoreChannel,
|
|
915
|
+
existing: boolean,
|
|
916
|
+
): Promise<void> {
|
|
899
917
|
if (this.channel) {
|
|
900
918
|
throw new Error("Runtime already bound");
|
|
901
919
|
}
|
|
@@ -946,6 +964,7 @@ export abstract class FluidDataStoreContext
|
|
|
946
964
|
|
|
947
965
|
public abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;
|
|
948
966
|
|
|
967
|
+
// eslint-disable-next-line jsdoc/require-description
|
|
949
968
|
/**
|
|
950
969
|
* @deprecated Sets the datastore as root, for aliasing purposes: #7948
|
|
951
970
|
* This method should not be used outside of the aliasing context.
|
|
@@ -955,6 +974,7 @@ export abstract class FluidDataStoreContext
|
|
|
955
974
|
this._isInMemoryRoot = true;
|
|
956
975
|
}
|
|
957
976
|
|
|
977
|
+
// eslint-disable-next-line jsdoc/require-description
|
|
958
978
|
/**
|
|
959
979
|
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
960
980
|
*/
|
|
@@ -962,12 +982,12 @@ export abstract class FluidDataStoreContext
|
|
|
962
982
|
return {};
|
|
963
983
|
}
|
|
964
984
|
|
|
965
|
-
public reSubmit(type: string, contents:
|
|
985
|
+
public reSubmit(type: string, contents: unknown, localOpMetadata: unknown): void {
|
|
966
986
|
assert(!!this.channel, 0x14b /* "Channel must exist when resubmitting ops" */);
|
|
967
987
|
this.channel.reSubmit(type, contents, localOpMetadata);
|
|
968
988
|
}
|
|
969
989
|
|
|
970
|
-
public rollback(type: string, contents:
|
|
990
|
+
public rollback(type: string, contents: unknown, localOpMetadata: unknown): void {
|
|
971
991
|
if (!this.channel) {
|
|
972
992
|
throw new Error("Channel must exist when rolling back ops");
|
|
973
993
|
}
|
|
@@ -977,7 +997,7 @@ export abstract class FluidDataStoreContext
|
|
|
977
997
|
this.channel.rollback(type, contents, localOpMetadata);
|
|
978
998
|
}
|
|
979
999
|
|
|
980
|
-
public async applyStashedOp(contents:
|
|
1000
|
+
public async applyStashedOp(contents: unknown): Promise<unknown> {
|
|
981
1001
|
if (!this.channel) {
|
|
982
1002
|
await this.realize();
|
|
983
1003
|
}
|
|
@@ -989,7 +1009,7 @@ export abstract class FluidDataStoreContext
|
|
|
989
1009
|
callSite: string,
|
|
990
1010
|
checkTombstone = true,
|
|
991
1011
|
safeTelemetryProps: ITelemetryBaseProperties = {},
|
|
992
|
-
) {
|
|
1012
|
+
): void {
|
|
993
1013
|
if (this.deleted) {
|
|
994
1014
|
const messageString = `Context is deleted! Call site [${callSite}]`;
|
|
995
1015
|
const error = DataProcessingError.create(
|
|
@@ -1038,7 +1058,7 @@ export abstract class FluidDataStoreContext
|
|
|
1038
1058
|
* eventual consistency. For example, the next summary (say at ref seq# 100) may contain these changes whereas
|
|
1039
1059
|
* other clients that are up-to-date till seq# 100 may not have them yet.
|
|
1040
1060
|
*/
|
|
1041
|
-
protected identifyLocalChangeInSummarizer(eventName: string, type?: string) {
|
|
1061
|
+
protected identifyLocalChangeInSummarizer(eventName: string, type?: string): void {
|
|
1042
1062
|
if (
|
|
1043
1063
|
this.clientDetails.type !== summarizerClientType ||
|
|
1044
1064
|
this.localChangesTelemetryCount <= 0
|
|
@@ -1065,7 +1085,7 @@ export abstract class FluidDataStoreContext
|
|
|
1065
1085
|
return (
|
|
1066
1086
|
summarizeInternal: SummarizeInternalFn,
|
|
1067
1087
|
getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
1068
|
-
) =>
|
|
1088
|
+
): ISummarizerNodeWithGC =>
|
|
1069
1089
|
this.summarizerNode.createChild(
|
|
1070
1090
|
summarizeInternal,
|
|
1071
1091
|
id,
|
|
@@ -1075,7 +1095,7 @@ export abstract class FluidDataStoreContext
|
|
|
1075
1095
|
);
|
|
1076
1096
|
}
|
|
1077
1097
|
|
|
1078
|
-
public deleteChildSummarizerNode(id: string) {
|
|
1098
|
+
public deleteChildSummarizerNode(id: string): void {
|
|
1079
1099
|
this.summarizerNode.deleteChild(id);
|
|
1080
1100
|
}
|
|
1081
1101
|
|
|
@@ -1087,7 +1107,9 @@ export abstract class FluidDataStoreContext
|
|
|
1087
1107
|
}
|
|
1088
1108
|
}
|
|
1089
1109
|
|
|
1090
|
-
/**
|
|
1110
|
+
/**
|
|
1111
|
+
* @internal
|
|
1112
|
+
*/
|
|
1091
1113
|
export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
1092
1114
|
// Tells whether we need to fetch the snapshot before use. This is to support Data Virtualization.
|
|
1093
1115
|
private snapshotFetchRequired: boolean | undefined;
|
|
@@ -1111,17 +1133,21 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
1111
1133
|
}
|
|
1112
1134
|
}
|
|
1113
1135
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1136
|
+
/**
|
|
1137
|
+
* This API should not be called for RemoteFluidDataStoreContext. But here is one scenario where it's not the case:
|
|
1138
|
+
* The scenario (hit by stashedOps.spec.ts, "resends attach op" UT is the following (as far as I understand):
|
|
1139
|
+
*
|
|
1140
|
+
* 1. data store is being attached in attached container
|
|
1141
|
+
*
|
|
1142
|
+
* 2. container state is serialized (stashed ops feature)
|
|
1143
|
+
*
|
|
1144
|
+
* 3. new container instance is rehydrated (from stashed ops) -
|
|
1145
|
+
* As result, we create RemoteFluidDataStoreContext for this data store that is actually in "attaching" state * (as of # 2).
|
|
1146
|
+
* But its state is set to attached when loading container from stashed ops.
|
|
1147
|
+
*
|
|
1148
|
+
* 4. attach op for this data store is processed - setAttachState() is called.
|
|
1149
|
+
*/
|
|
1150
|
+
public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {}
|
|
1125
1151
|
|
|
1126
1152
|
private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {
|
|
1127
1153
|
// Sequence number of the snapshot.
|
|
@@ -1218,14 +1244,14 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
1218
1244
|
}
|
|
1219
1245
|
|
|
1220
1246
|
/**
|
|
1221
|
-
* @
|
|
1247
|
+
* {@inheritDoc FluidDataStoreContext.getAttachSummary}
|
|
1222
1248
|
*/
|
|
1223
1249
|
public getAttachSummary(): ISummaryTreeWithStats {
|
|
1224
1250
|
throw new Error("Cannot attach remote store");
|
|
1225
1251
|
}
|
|
1226
1252
|
|
|
1227
1253
|
/**
|
|
1228
|
-
* @
|
|
1254
|
+
* {@inheritDoc FluidDataStoreContext.getAttachGCData}
|
|
1229
1255
|
*/
|
|
1230
1256
|
public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
|
|
1231
1257
|
throw new Error("Cannot attach remote store");
|
|
@@ -1238,10 +1264,6 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
1238
1264
|
*/
|
|
1239
1265
|
export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
1240
1266
|
private readonly snapshotTree: ISnapshotTree | undefined;
|
|
1241
|
-
/**
|
|
1242
|
-
* @deprecated 0.16 Issue #1635, #3631
|
|
1243
|
-
*/
|
|
1244
|
-
public readonly createProps?: any;
|
|
1245
1267
|
|
|
1246
1268
|
constructor(props: ILocalFluidDataStoreContextProps) {
|
|
1247
1269
|
super(
|
|
@@ -1255,7 +1277,6 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1255
1277
|
this.identifyLocalChangeInSummarizer("DataStoreCreatedInSummarizer");
|
|
1256
1278
|
|
|
1257
1279
|
this.snapshotTree = props.snapshotTree;
|
|
1258
|
-
this.createProps = props.createProps;
|
|
1259
1280
|
}
|
|
1260
1281
|
|
|
1261
1282
|
public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {
|
|
@@ -1303,7 +1324,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1303
1324
|
}
|
|
1304
1325
|
|
|
1305
1326
|
/**
|
|
1306
|
-
* @
|
|
1327
|
+
* {@inheritDoc FluidDataStoreContext.getAttachSummary}
|
|
1307
1328
|
*/
|
|
1308
1329
|
public getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
|
|
1309
1330
|
assert(
|
|
@@ -1333,7 +1354,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1333
1354
|
}
|
|
1334
1355
|
|
|
1335
1356
|
/**
|
|
1336
|
-
* @
|
|
1357
|
+
* {@inheritDoc FluidDataStoreContext.getAttachGCData}
|
|
1337
1358
|
*/
|
|
1338
1359
|
public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
|
|
1339
1360
|
assert(
|
|
@@ -1390,7 +1411,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1390
1411
|
* it was unreferenced. Thus the sweeping container should have loaded from a snapshot and thus creating a remote
|
|
1391
1412
|
* context.
|
|
1392
1413
|
*/
|
|
1393
|
-
public delete() {
|
|
1414
|
+
public delete(): void {
|
|
1394
1415
|
// TODO: GC:Validation - potentially prevent this from happening or asserting. Maybe throw here.
|
|
1395
1416
|
this.mc.logger.sendErrorEvent({
|
|
1396
1417
|
eventName: "GC_Deleted_DataStore_Unexpected_Delete",
|
|
@@ -1477,7 +1498,7 @@ export class LocalDetachedFluidDataStoreContext
|
|
|
1477
1498
|
*
|
|
1478
1499
|
* If used incorrectly, this function can result in permanent data corruption.
|
|
1479
1500
|
*/
|
|
1480
|
-
public unsafe_AttachRuntimeSync(channel: IFluidDataStoreChannel) {
|
|
1501
|
+
public unsafe_AttachRuntimeSync(channel: IFluidDataStoreChannel): IDataStore {
|
|
1481
1502
|
this.channelP = Promise.resolve(channel);
|
|
1482
1503
|
this.processPendingOps(channel);
|
|
1483
1504
|
this.completeBindingRuntime(channel);
|
package/src/dataStoreContexts.ts
CHANGED
|
@@ -12,13 +12,17 @@ import {
|
|
|
12
12
|
|
|
13
13
|
import { FluidDataStoreContext, LocalFluidDataStoreContext } from "./dataStoreContext.js";
|
|
14
14
|
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
16
18
|
export class DataStoreContexts
|
|
17
19
|
implements Iterable<[string, FluidDataStoreContext]>, IDisposable
|
|
18
20
|
{
|
|
19
21
|
private readonly notBoundContexts = new Set<string>();
|
|
20
22
|
|
|
21
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Attached and loaded context proxies
|
|
25
|
+
*/
|
|
22
26
|
private readonly _contexts = new Map<string, FluidDataStoreContext>();
|
|
23
27
|
|
|
24
28
|
/**
|
|
@@ -63,20 +67,20 @@ export class DataStoreContexts
|
|
|
63
67
|
return this._contexts.size;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
public get disposed() {
|
|
70
|
+
public get disposed(): boolean {
|
|
67
71
|
return this.disposeOnce.evaluated;
|
|
68
72
|
}
|
|
69
|
-
public readonly dispose = () => this.disposeOnce.value;
|
|
73
|
+
public readonly dispose = (): void => this.disposeOnce.value;
|
|
70
74
|
|
|
71
|
-
public notBoundLength() {
|
|
75
|
+
public notBoundLength(): number {
|
|
72
76
|
return this.notBoundContexts.size;
|
|
73
77
|
}
|
|
74
78
|
|
|
75
|
-
public isNotBound(id: string) {
|
|
79
|
+
public isNotBound(id: string): boolean {
|
|
76
80
|
return this.notBoundContexts.has(id);
|
|
77
81
|
}
|
|
78
82
|
|
|
79
|
-
public has(id: string) {
|
|
83
|
+
public has(id: string): boolean {
|
|
80
84
|
return this._contexts.has(id);
|
|
81
85
|
}
|
|
82
86
|
|
|
@@ -98,7 +102,7 @@ export class DataStoreContexts
|
|
|
98
102
|
private readonly _recentlyDeletedContexts: Map<string, FluidDataStoreContext | undefined> =
|
|
99
103
|
new Map();
|
|
100
104
|
|
|
101
|
-
public getRecentlyDeletedContext(id: string) {
|
|
105
|
+
public getRecentlyDeletedContext(id: string): FluidDataStoreContext | undefined {
|
|
102
106
|
return this._recentlyDeletedContexts.get(id);
|
|
103
107
|
}
|
|
104
108
|
|
|
@@ -118,7 +122,7 @@ export class DataStoreContexts
|
|
|
118
122
|
/**
|
|
119
123
|
* Add the given context, marking it as to-be-bound
|
|
120
124
|
*/
|
|
121
|
-
public addUnbound(context: LocalFluidDataStoreContext) {
|
|
125
|
+
public addUnbound(context: LocalFluidDataStoreContext): void {
|
|
122
126
|
const id = context.id;
|
|
123
127
|
assert(!this._contexts.has(id), 0x158 /* "Creating store with existing ID" */);
|
|
124
128
|
|
|
@@ -161,7 +165,7 @@ export class DataStoreContexts
|
|
|
161
165
|
/**
|
|
162
166
|
* Update this context as bound
|
|
163
167
|
*/
|
|
164
|
-
public bind(id: string) {
|
|
168
|
+
public bind(id: string): void {
|
|
165
169
|
const removed: boolean = this.notBoundContexts.delete(id);
|
|
166
170
|
assert(removed, 0x159 /* "The given id was not found in notBoundContexts to delete" */);
|
|
167
171
|
|
|
@@ -172,7 +176,7 @@ export class DataStoreContexts
|
|
|
172
176
|
* Triggers the deferred to resolve, indicating the context is not local-only
|
|
173
177
|
* @param id - The id of the context to resolve to
|
|
174
178
|
*/
|
|
175
|
-
private resolveDeferred(id: string) {
|
|
179
|
+
private resolveDeferred(id: string): void {
|
|
176
180
|
const context = this._contexts.get(id);
|
|
177
181
|
assert(!!context, 0x15a /* "Cannot find context to resolve to" */);
|
|
178
182
|
assert(
|
|
@@ -190,7 +194,7 @@ export class DataStoreContexts
|
|
|
190
194
|
* This could be because it's a local context that's been bound, or because it's a remote context.
|
|
191
195
|
* @param context - The context to add
|
|
192
196
|
*/
|
|
193
|
-
public addBoundOrRemoted(context: FluidDataStoreContext) {
|
|
197
|
+
public addBoundOrRemoted(context: FluidDataStoreContext): void {
|
|
194
198
|
const id = context.id;
|
|
195
199
|
assert(!this._contexts.has(id), 0x15d /* "Creating store with existing ID" */);
|
|
196
200
|
|
package/src/dataStoreRegistry.ts
CHANGED
|
@@ -20,7 +20,7 @@ export class FluidDataStoreRegistry implements IFluidDataStoreRegistry {
|
|
|
20
20
|
FluidDataStoreRegistryEntry | Promise<FluidDataStoreRegistryEntry>
|
|
21
21
|
>;
|
|
22
22
|
|
|
23
|
-
public get IFluidDataStoreRegistry() {
|
|
23
|
+
public get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {
|
|
24
24
|
return this;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -59,11 +59,11 @@ export abstract class BaseDeltaManagerProxy
|
|
|
59
59
|
return this.deltaManager.lastSequenceNumber;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
public get lastMessage() {
|
|
62
|
+
public get lastMessage(): ISequencedDocumentMessage | undefined {
|
|
63
63
|
return this.deltaManager.lastMessage;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
public get lastKnownSeqNumber() {
|
|
66
|
+
public get lastKnownSeqNumber(): number {
|
|
67
67
|
return this.deltaManager.lastKnownSeqNumber;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -71,7 +71,7 @@ export abstract class BaseDeltaManagerProxy
|
|
|
71
71
|
return this.deltaManager.initialSequenceNumber;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
public get hasCheckpointSequenceNumber() {
|
|
74
|
+
public get hasCheckpointSequenceNumber(): boolean {
|
|
75
75
|
return this.deltaManager.hasCheckpointSequenceNumber;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -132,7 +132,7 @@ export abstract class BaseDeltaManagerProxy
|
|
|
132
132
|
return this.deltaManager.flush();
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
private readonly onPrepareSend = (messageBuffer:
|
|
135
|
+
private readonly onPrepareSend = (messageBuffer: unknown[]): void => {
|
|
136
136
|
this.emit("prepareSend", messageBuffer);
|
|
137
137
|
};
|
|
138
138
|
private readonly onSubmitOp = (message: IDocumentMessage): void => {
|
|
@@ -218,7 +218,7 @@ export class DeltaManagerPendingOpsProxy extends BaseDeltaManagerProxy {
|
|
|
218
218
|
return this.deltaManager.minimumSequenceNumber;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
public get lastMessage() {
|
|
221
|
+
public get lastMessage(): ISequencedDocumentMessage | undefined {
|
|
222
222
|
if (this.deltaManager.lastMessage === undefined) {
|
|
223
223
|
return this.deltaManager.lastMessage;
|
|
224
224
|
}
|