@fluidframework/container-runtime 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +123 -0
- package/README.md +4 -3
- package/dist/batchTracker.d.ts +3 -2
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +6 -5
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +10 -16
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +184 -172
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +25 -16
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +161 -35
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +697 -449
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +15 -7
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +3 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +83 -87
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +1 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +8 -9
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.js +2 -2
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/dataStores.d.ts +22 -6
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +123 -81
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerProxyBase.d.ts +35 -0
- package/dist/deltaManagerProxyBase.d.ts.map +1 -0
- package/dist/deltaManagerProxyBase.js +77 -0
- package/dist/deltaManagerProxyBase.js.map +1 -0
- package/dist/deltaManagerSummarizerProxy.d.ts +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/dist/deltaManagerSummarizerProxy.js +4 -2
- package/dist/deltaManagerSummarizerProxy.js.map +1 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +10 -10
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/error.d.ts +14 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +21 -0
- package/dist/error.js.map +1 -0
- package/dist/gc/garbageCollection.d.ts +10 -9
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +61 -53
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +18 -14
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +17 -4
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +14 -15
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +0 -8
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +11 -24
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +4 -7
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +19 -58
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +45 -35
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +4 -4
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +2 -2
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +3 -5
- package/dist/gc/index.js.map +1 -1
- package/dist/id-compressor/appendOnlySortedMap.d.ts +8 -30
- package/dist/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/appendOnlySortedMap.js +26 -68
- package/dist/id-compressor/appendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/finalSpace.d.ts +29 -0
- package/dist/id-compressor/finalSpace.d.ts.map +1 -0
- package/dist/id-compressor/finalSpace.js +62 -0
- package/dist/id-compressor/finalSpace.js.map +1 -0
- package/dist/id-compressor/idCompressor.d.ts +25 -250
- package/dist/id-compressor/idCompressor.d.ts.map +1 -1
- package/dist/id-compressor/idCompressor.js +390 -1153
- package/dist/id-compressor/idCompressor.js.map +1 -1
- package/dist/id-compressor/identifiers.d.ts +32 -0
- package/dist/id-compressor/identifiers.d.ts.map +1 -0
- package/dist/id-compressor/identifiers.js +15 -0
- package/dist/id-compressor/identifiers.js.map +1 -0
- package/dist/id-compressor/index.d.ts +5 -6
- package/dist/id-compressor/index.d.ts.map +1 -1
- package/dist/id-compressor/index.js +20 -26
- package/dist/id-compressor/index.js.map +1 -1
- package/dist/id-compressor/persistanceUtilities.d.ts +22 -0
- package/dist/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/dist/id-compressor/persistanceUtilities.js +43 -0
- package/dist/id-compressor/persistanceUtilities.js.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/dist/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js +80 -0
- package/dist/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/dist/id-compressor/sessions.d.ts +115 -0
- package/dist/id-compressor/sessions.d.ts.map +1 -0
- package/dist/id-compressor/sessions.js +305 -0
- package/dist/id-compressor/sessions.js.map +1 -0
- package/dist/id-compressor/utilities.d.ts +49 -0
- package/dist/id-compressor/utilities.d.ts.map +1 -0
- package/dist/id-compressor/utilities.js +166 -0
- package/dist/id-compressor/utilities.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/batchManager.js +10 -6
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +2 -2
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +12 -7
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +2 -2
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +23 -20
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +19 -9
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +2 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +22 -19
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +7 -5
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +22 -31
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +19 -7
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.js +1 -2
- package/dist/opProperties.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +18 -8
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +73 -51
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +36 -32
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/index.d.ts +3 -3
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +2 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +3 -3
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +26 -27
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +3 -3
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +31 -10
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +271 -139
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +8 -7
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +79 -78
- 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 +7 -11
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.js +10 -14
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/index.d.ts +1 -1
- package/dist/summary/summarizerNode/index.d.ts.map +1 -1
- package/dist/summary/summarizerNode/index.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +10 -19
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +57 -130
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +2 -4
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -14
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +15 -101
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +38 -25
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -3
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +12 -13
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +3 -0
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +6 -4
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +10 -4
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +106 -57
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +8 -8
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +38 -28
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts +3 -2
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +5 -4
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +10 -16
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +159 -147
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +15 -6
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +161 -35
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +651 -402
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +13 -5
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +3 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +47 -51
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +1 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +3 -4
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.js +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/dataStores.d.ts +22 -6
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +107 -65
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerProxyBase.d.ts +35 -0
- package/lib/deltaManagerProxyBase.d.ts.map +1 -0
- package/lib/deltaManagerProxyBase.js +73 -0
- package/lib/deltaManagerProxyBase.js.map +1 -0
- package/lib/deltaManagerSummarizerProxy.d.ts +1 -1
- package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/lib/deltaManagerSummarizerProxy.js +3 -1
- package/lib/deltaManagerSummarizerProxy.js.map +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +7 -7
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/error.d.ts +14 -0
- package/lib/error.d.ts.map +1 -0
- package/lib/error.js +17 -0
- package/lib/error.js.map +1 -0
- package/lib/gc/garbageCollection.d.ts +10 -9
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +61 -53
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +16 -12
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +17 -4
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +13 -14
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +0 -8
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +5 -17
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +4 -7
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +20 -59
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +46 -36
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +2 -2
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +2 -2
- package/lib/gc/index.js.map +1 -1
- package/lib/id-compressor/appendOnlySortedMap.d.ts +8 -30
- package/lib/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/appendOnlySortedMap.js +25 -66
- package/lib/id-compressor/appendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/finalSpace.d.ts +29 -0
- package/lib/id-compressor/finalSpace.d.ts.map +1 -0
- package/lib/id-compressor/finalSpace.js +58 -0
- package/lib/id-compressor/finalSpace.js.map +1 -0
- package/lib/id-compressor/idCompressor.d.ts +25 -250
- package/lib/id-compressor/idCompressor.d.ts.map +1 -1
- package/lib/id-compressor/idCompressor.js +385 -1142
- package/lib/id-compressor/idCompressor.js.map +1 -1
- package/lib/id-compressor/identifiers.d.ts +32 -0
- package/lib/id-compressor/identifiers.d.ts.map +1 -0
- package/lib/id-compressor/identifiers.js +11 -0
- package/lib/id-compressor/identifiers.js.map +1 -0
- package/lib/id-compressor/index.d.ts +5 -6
- package/lib/id-compressor/index.d.ts.map +1 -1
- package/lib/id-compressor/index.js +5 -6
- package/lib/id-compressor/index.js.map +1 -1
- package/lib/id-compressor/persistanceUtilities.d.ts +22 -0
- package/lib/id-compressor/persistanceUtilities.d.ts.map +1 -0
- package/lib/id-compressor/persistanceUtilities.js +34 -0
- package/lib/id-compressor/persistanceUtilities.js.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
- package/lib/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js +76 -0
- package/lib/id-compressor/sessionSpaceNormalizer.js.map +1 -0
- package/lib/id-compressor/sessions.d.ts +115 -0
- package/lib/id-compressor/sessions.d.ts.map +1 -0
- package/lib/id-compressor/sessions.js +290 -0
- package/lib/id-compressor/sessions.js.map +1 -0
- package/lib/id-compressor/utilities.d.ts +49 -0
- package/lib/id-compressor/utilities.d.ts.map +1 -0
- package/lib/id-compressor/utilities.js +148 -0
- package/lib/id-compressor/utilities.js.map +1 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/batchManager.js +10 -6
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +2 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +10 -5
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +2 -2
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +15 -12
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +17 -7
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +2 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +13 -10
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +7 -5
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +13 -22
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +20 -8
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.js +1 -2
- package/lib/opProperties.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 +18 -8
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +62 -40
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +18 -14
- package/lib/scheduleManager.js.map +1 -1
- package/lib/summary/index.d.ts +3 -3
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +3 -3
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +21 -22
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +31 -10
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +265 -133
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +8 -7
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +75 -74
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +2 -2
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +6 -10
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.js +9 -13
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/index.d.ts +1 -1
- package/lib/summary/summarizerNode/index.d.ts.map +1 -1
- package/lib/summary/summarizerNode/index.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +10 -19
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +42 -115
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +2 -4
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -14
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +14 -100
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +38 -25
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -3
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +5 -6
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +3 -0
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +5 -3
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +10 -4
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +100 -51
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +8 -8
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +35 -25
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +28 -31
- package/src/batchTracker.ts +7 -5
- package/src/blobManager.ts +188 -166
- package/src/connectionTelemetry.ts +9 -4
- package/src/containerRuntime.ts +806 -441
- package/src/dataStore.ts +12 -4
- package/src/dataStoreContext.ts +39 -43
- package/src/dataStoreContexts.ts +4 -6
- package/src/dataStoreRegistry.ts +1 -1
- package/src/dataStores.ts +114 -80
- package/src/deltaManagerProxyBase.ts +111 -0
- package/src/deltaManagerSummarizerProxy.ts +4 -1
- package/src/deltaScheduler.ts +7 -11
- package/src/error.ts +18 -0
- package/src/gc/garbageCollection.md +53 -5
- package/src/gc/garbageCollection.ts +58 -52
- package/src/gc/gcConfigs.ts +4 -2
- package/src/gc/gcDefinitions.ts +17 -20
- package/src/gc/gcEarlyAdoption.md +145 -0
- package/src/gc/gcHelpers.ts +1 -12
- package/src/gc/gcSummaryStateTracker.ts +19 -65
- package/src/gc/gcTelemetry.ts +14 -12
- package/src/gc/gcUnreferencedStateTracker.ts +1 -1
- package/src/gc/index.ts +2 -4
- package/src/id-compressor/appendOnlySortedMap.ts +26 -87
- package/src/id-compressor/finalSpace.ts +67 -0
- package/src/id-compressor/idCompressor.ts +458 -1682
- package/src/id-compressor/identifiers.ts +42 -0
- package/src/id-compressor/index.ts +11 -20
- package/src/id-compressor/persistanceUtilities.ts +58 -0
- package/src/id-compressor/sessionSpaceNormalizer.ts +83 -0
- package/src/id-compressor/sessions.ts +405 -0
- package/src/id-compressor/utilities.ts +187 -0
- package/src/index.ts +7 -2
- package/src/opLifecycle/opCompressor.ts +6 -5
- package/src/opLifecycle/opDecompressor.ts +6 -4
- package/src/opLifecycle/opGroupingManager.ts +9 -6
- package/src/opLifecycle/opSplitter.ts +7 -6
- package/src/opLifecycle/outbox.ts +23 -32
- package/src/opLifecycle/remoteMessageProcessor.ts +27 -8
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +72 -42
- package/src/scheduleManager.ts +7 -5
- package/src/summary/index.ts +4 -3
- package/src/summary/orderedClientElection.ts +10 -6
- package/src/summary/runWhileConnectedCoordinator.ts +1 -1
- package/src/summary/runningSummarizer.ts +291 -163
- package/src/summary/summarizer.ts +27 -16
- package/src/summary/summarizerClientElection.ts +2 -2
- package/src/summary/summarizerHeuristics.ts +1 -1
- package/src/summary/summarizerNode/index.ts +1 -2
- package/src/summary/summarizerNode/summarizerNode.ts +36 -160
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +7 -38
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +11 -130
- package/src/summary/summarizerTypes.ts +40 -25
- package/src/summary/summaryCollection.ts +3 -3
- package/src/summary/summaryFormat.ts +4 -1
- package/src/summary/summaryGenerator.ts +52 -52
- package/src/summary/summaryManager.ts +44 -17
- package/dist/id-compressor/idRange.d.ts +0 -11
- package/dist/id-compressor/idRange.d.ts.map +0 -1
- package/dist/id-compressor/idRange.js +0 -29
- package/dist/id-compressor/idRange.js.map +0 -1
- package/dist/id-compressor/numericUuid.d.ts +0 -59
- package/dist/id-compressor/numericUuid.d.ts.map +0 -1
- package/dist/id-compressor/numericUuid.js +0 -325
- package/dist/id-compressor/numericUuid.js.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/dist/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/dist/id-compressor/sessionIdNormalizer.js +0 -488
- package/dist/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/dist/id-compressor/utils.d.ts +0 -57
- package/dist/id-compressor/utils.d.ts.map +0 -1
- package/dist/id-compressor/utils.js +0 -90
- package/dist/id-compressor/utils.js.map +0 -1
- package/dist/id-compressor/uuidUtilities.d.ts +0 -28
- package/dist/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/dist/id-compressor/uuidUtilities.js +0 -104
- package/dist/id-compressor/uuidUtilities.js.map +0 -1
- package/lib/id-compressor/idRange.d.ts +0 -11
- package/lib/id-compressor/idRange.d.ts.map +0 -1
- package/lib/id-compressor/idRange.js +0 -25
- package/lib/id-compressor/idRange.js.map +0 -1
- package/lib/id-compressor/numericUuid.d.ts +0 -59
- package/lib/id-compressor/numericUuid.d.ts.map +0 -1
- package/lib/id-compressor/numericUuid.js +0 -315
- package/lib/id-compressor/numericUuid.js.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.d.ts +0 -138
- package/lib/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
- package/lib/id-compressor/sessionIdNormalizer.js +0 -484
- package/lib/id-compressor/sessionIdNormalizer.js.map +0 -1
- package/lib/id-compressor/utils.d.ts +0 -57
- package/lib/id-compressor/utils.d.ts.map +0 -1
- package/lib/id-compressor/utils.js +0 -79
- package/lib/id-compressor/utils.js.map +0 -1
- package/lib/id-compressor/uuidUtilities.d.ts +0 -28
- package/lib/id-compressor/uuidUtilities.d.ts.map +0 -1
- package/lib/id-compressor/uuidUtilities.js +0 -96
- package/lib/id-compressor/uuidUtilities.js.map +0 -1
- package/src/id-compressor/idRange.ts +0 -35
- package/src/id-compressor/numericUuid.ts +0 -383
- package/src/id-compressor/sessionIdNormalizer.ts +0 -609
- package/src/id-compressor/utils.ts +0 -114
- package/src/id-compressor/uuidUtilities.ts +0 -120
package/dist/dataStores.js
CHANGED
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.getSummaryForDatastores = exports.DataStores = void 0;
|
|
8
|
-
const container_utils_1 = require("@fluidframework/container-utils");
|
|
9
8
|
const datastore_1 = require("@fluidframework/datastore");
|
|
10
9
|
const runtime_definitions_1 = require("@fluidframework/runtime-definitions");
|
|
11
10
|
const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
12
11
|
const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
|
|
13
12
|
const container_definitions_1 = require("@fluidframework/container-definitions");
|
|
14
13
|
const driver_utils_1 = require("@fluidframework/driver-utils");
|
|
15
|
-
const common_utils_1 = require("@fluidframework/common-utils");
|
|
16
14
|
const core_utils_1 = require("@fluidframework/core-utils");
|
|
17
15
|
const uuid_1 = require("uuid");
|
|
18
16
|
const dataStoreContexts_1 = require("./dataStoreContexts");
|
|
@@ -47,7 +45,7 @@ class DataStores {
|
|
|
47
45
|
this.dataStoresSinceLastGC = [];
|
|
48
46
|
this.pendingAliasMap = new Map();
|
|
49
47
|
this.dispose = () => this.disposeOnce.value;
|
|
50
|
-
this.mc = (0, telemetry_utils_1.
|
|
48
|
+
this.mc = (0, telemetry_utils_1.createChildMonitoringContext)({ logger: baseLogger });
|
|
51
49
|
this.containerRuntimeHandle = new datastore_1.FluidObjectHandle(this.runtime, "/", this.runtime.IFluidHandleContext);
|
|
52
50
|
// Tombstone should only throw when the feature flag is enabled and the client isn't a summarizer
|
|
53
51
|
this.throwOnTombstoneLoad =
|
|
@@ -119,25 +117,24 @@ class DataStores {
|
|
|
119
117
|
return pendingAliasPromise === undefined ? "Success" : pendingAliasPromise;
|
|
120
118
|
}
|
|
121
119
|
processAttachMessage(message, local) {
|
|
122
|
-
var _a, _b;
|
|
123
120
|
const attachMessage = message.contents;
|
|
124
121
|
this.dataStoresSinceLastGC.push(attachMessage.id);
|
|
125
122
|
// The local object has already been attached
|
|
126
123
|
if (local) {
|
|
127
|
-
(0,
|
|
128
|
-
|
|
124
|
+
(0, core_utils_1.assert)(this.pendingAttach.has(attachMessage.id), 0x15e /* "Local object does not have matching attach message id" */);
|
|
125
|
+
this.contexts.get(attachMessage.id)?.emit("attached");
|
|
129
126
|
this.pendingAttach.delete(attachMessage.id);
|
|
130
127
|
return;
|
|
131
128
|
}
|
|
132
129
|
// If a non-local operation then go and create the object, otherwise mark it as officially attached.
|
|
133
130
|
if (this.alreadyProcessed(attachMessage.id)) {
|
|
134
131
|
// TODO: dataStoreId may require a different tag from PackageData #7488
|
|
135
|
-
const error = new
|
|
132
|
+
const error = new telemetry_utils_1.DataCorruptionError(
|
|
136
133
|
// pre-0.58 error message: duplicateDataStoreCreatedWithExistingId
|
|
137
|
-
"Duplicate DataStore created with existing id",
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
"Duplicate DataStore created with existing id", {
|
|
135
|
+
...(0, telemetry_utils_1.extractSafePropertiesFromMessage)(message),
|
|
136
|
+
...(0, telemetry_utils_1.tagCodeArtifacts)({ dataStoreId: attachMessage.id }),
|
|
137
|
+
});
|
|
141
138
|
throw error;
|
|
142
139
|
}
|
|
143
140
|
const flatAttachBlobs = new Map();
|
|
@@ -157,7 +154,7 @@ class DataStores {
|
|
|
157
154
|
createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(attachMessage.id, {
|
|
158
155
|
type: runtime_definitions_1.CreateSummarizerNodeSource.FromAttach,
|
|
159
156
|
sequenceNumber: message.sequenceNumber,
|
|
160
|
-
snapshot:
|
|
157
|
+
snapshot: attachMessage.snapshot ?? {
|
|
161
158
|
entries: [(0, dataStoreContext_1.createAttributesBlob)(pkg, true /* isRootDataStore */)],
|
|
162
159
|
},
|
|
163
160
|
}),
|
|
@@ -168,7 +165,9 @@ class DataStores {
|
|
|
168
165
|
processAliasMessage(message, localOpMetadata, local) {
|
|
169
166
|
const aliasMessage = message.contents;
|
|
170
167
|
if (!(0, dataStore_1.isDataStoreAliasMessage)(aliasMessage)) {
|
|
171
|
-
throw new
|
|
168
|
+
throw new telemetry_utils_1.DataCorruptionError("malformedDataStoreAliasMessage", {
|
|
169
|
+
...(0, telemetry_utils_1.extractSafePropertiesFromMessage)(message),
|
|
170
|
+
});
|
|
172
171
|
}
|
|
173
172
|
const resolve = localOpMetadata;
|
|
174
173
|
const aliasResult = this.processAliasMessageCore(aliasMessage);
|
|
@@ -204,7 +203,7 @@ class DataStores {
|
|
|
204
203
|
*/
|
|
205
204
|
makeDataStoreLocallyVisible(id) {
|
|
206
205
|
const localContext = this.contexts.getUnbound(id);
|
|
207
|
-
(0,
|
|
206
|
+
(0, core_utils_1.assert)(!!localContext, 0x15f /* "Could not find unbound context to bind" */);
|
|
208
207
|
/**
|
|
209
208
|
* If the container is not detached, it is globally visible to all clients. This data store should also be
|
|
210
209
|
* globally visible. Move it to attaching state and send an "attach" op for it.
|
|
@@ -220,7 +219,7 @@ class DataStores {
|
|
|
220
219
|
this.contexts.bind(id);
|
|
221
220
|
}
|
|
222
221
|
createDetachedDataStoreCore(pkg, isRoot, id = (0, uuid_1.v4)()) {
|
|
223
|
-
(0,
|
|
222
|
+
(0, core_utils_1.assert)(!id.includes("/"), 0x30c /* Id cannot contain slashes */);
|
|
224
223
|
const context = new dataStoreContext_1.LocalDetachedFluidDataStoreContext({
|
|
225
224
|
id,
|
|
226
225
|
pkg,
|
|
@@ -238,7 +237,7 @@ class DataStores {
|
|
|
238
237
|
return context;
|
|
239
238
|
}
|
|
240
239
|
_createFluidDataStoreContext(pkg, id, props) {
|
|
241
|
-
(0,
|
|
240
|
+
(0, core_utils_1.assert)(!id.includes("/"), 0x30d /* Id cannot contain slashes */);
|
|
242
241
|
const context = new dataStoreContext_1.LocalFluidDataStoreContext({
|
|
243
242
|
id,
|
|
244
243
|
pkg,
|
|
@@ -261,17 +260,17 @@ class DataStores {
|
|
|
261
260
|
}
|
|
262
261
|
resubmitDataStoreOp(envelope, localOpMetadata) {
|
|
263
262
|
const context = this.contexts.get(envelope.address);
|
|
264
|
-
(0,
|
|
263
|
+
(0, core_utils_1.assert)(!!context, 0x160 /* "There should be a store context for the op" */);
|
|
265
264
|
context.reSubmit(envelope.contents, localOpMetadata);
|
|
266
265
|
}
|
|
267
266
|
rollbackDataStoreOp(envelope, localOpMetadata) {
|
|
268
267
|
const context = this.contexts.get(envelope.address);
|
|
269
|
-
(0,
|
|
268
|
+
(0, core_utils_1.assert)(!!context, 0x2e8 /* "There should be a store context for the op" */);
|
|
270
269
|
context.rollback(envelope.contents, localOpMetadata);
|
|
271
270
|
}
|
|
272
271
|
async applyStashedOp(envelope) {
|
|
273
272
|
const context = this.contexts.get(envelope.address);
|
|
274
|
-
(0,
|
|
273
|
+
(0, core_utils_1.assert)(!!context, 0x161 /* "There should be a store context for the op" */);
|
|
275
274
|
return context.applyStashedOp(envelope.contents);
|
|
276
275
|
}
|
|
277
276
|
async applyStashedAttachOp(message) {
|
|
@@ -281,97 +280,137 @@ class DataStores {
|
|
|
281
280
|
}
|
|
282
281
|
processFluidDataStoreOp(message, local, localMessageMetadata) {
|
|
283
282
|
const envelope = message.contents;
|
|
284
|
-
const transformed =
|
|
285
|
-
|
|
286
|
-
this.validateNotDeleted(envelope.address, request);
|
|
283
|
+
const transformed = { ...message, contents: envelope.contents };
|
|
284
|
+
this.validateNotDeleted(envelope.address);
|
|
287
285
|
const context = this.contexts.get(envelope.address);
|
|
288
|
-
(0,
|
|
286
|
+
(0, core_utils_1.assert)(!!context, 0x162 /* "There should be a store context for the op" */);
|
|
289
287
|
context.process(transformed, local, localMessageMetadata);
|
|
290
288
|
// Notify that a GC node for the data store changed. This is used to detect if a deleted data store is
|
|
291
289
|
// being used.
|
|
292
290
|
this.gcNodeUpdated(`/${envelope.address}`, message.timestamp, context.isLoaded ? context.packagePath : undefined);
|
|
293
291
|
}
|
|
294
292
|
async getDataStore(id, requestHeaderData) {
|
|
295
|
-
const headerData =
|
|
296
|
-
|
|
297
|
-
this.validateNotDeleted(id, request, headerData);
|
|
293
|
+
const headerData = { ...containerRuntime_1.defaultRuntimeHeaderData, ...requestHeaderData };
|
|
294
|
+
this.validateNotDeleted(id, headerData);
|
|
298
295
|
const context = await this.contexts.getBoundOrRemoted(id, headerData.wait);
|
|
299
296
|
if (context === undefined) {
|
|
300
297
|
// The requested data store does not exits. Throw a 404 response exception.
|
|
298
|
+
const request = { url: id };
|
|
301
299
|
throw (0, runtime_utils_1.responseToException)((0, runtime_utils_1.create404Response)(request), request);
|
|
302
300
|
}
|
|
303
|
-
this.validateNotTombstoned(context,
|
|
301
|
+
this.validateNotTombstoned(context, requestHeaderData);
|
|
304
302
|
return context;
|
|
305
303
|
}
|
|
306
304
|
/**
|
|
307
|
-
*
|
|
308
|
-
|
|
305
|
+
* Returns the data store requested with the given id if available. Otherwise, returns undefined.
|
|
306
|
+
*/
|
|
307
|
+
async getDataStoreIfAvailable(id, requestHeaderData) {
|
|
308
|
+
// If the data store has been deleted, return undefined.
|
|
309
|
+
if (this.checkIfDeleted(id, requestHeaderData)) {
|
|
310
|
+
return undefined;
|
|
311
|
+
}
|
|
312
|
+
const headerData = { ...containerRuntime_1.defaultRuntimeHeaderData, ...requestHeaderData };
|
|
313
|
+
const context = await this.contexts.getBoundOrRemoted(id, headerData.wait);
|
|
314
|
+
if (context === undefined) {
|
|
315
|
+
return undefined;
|
|
316
|
+
}
|
|
317
|
+
// Check if the data store is tombstoned. If so, we want to log a telemetry event.
|
|
318
|
+
this.checkIfTombstoned(context, requestHeaderData);
|
|
319
|
+
return context;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Checks if the data store has been deleted by GC.
|
|
309
323
|
* @param id - data store id
|
|
310
324
|
* @param request - the request information to log if the validation detects the data store has been deleted
|
|
311
325
|
* @param requestHeaderData - the request header information to log if the validation detects the data store has been deleted
|
|
326
|
+
* @returns true if the data store is deleted. Otherwise, returns false.
|
|
312
327
|
*/
|
|
313
|
-
|
|
328
|
+
checkIfDeleted(id, requestHeaderData) {
|
|
314
329
|
const dataStoreNodePath = `/${id}`;
|
|
315
|
-
if (this.isDataStoreDeleted(dataStoreNodePath)) {
|
|
316
|
-
|
|
330
|
+
if (!this.isDataStoreDeleted(dataStoreNodePath)) {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
(0, core_utils_1.assert)(!this.contexts.has(id), 0x570 /* Inconsistent state! GC says the data store is deleted, but the data store is not deleted from the runtime. */);
|
|
334
|
+
(0, gc_1.sendGCUnexpectedUsageEvent)(this.mc, {
|
|
335
|
+
eventName: "GC_Deleted_DataStore_Requested",
|
|
336
|
+
category: "error",
|
|
337
|
+
isSummarizerClient: this.runtime.clientDetails.type === summary_1.summarizerClientType,
|
|
338
|
+
id,
|
|
339
|
+
headers: JSON.stringify(requestHeaderData),
|
|
340
|
+
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
341
|
+
}, undefined /* packagePath */);
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Validate that the data store had not been deleted by GC.
|
|
346
|
+
* @param id - data store id
|
|
347
|
+
* @param requestHeaderData - the request header information to log if the validation detects the data store has been deleted
|
|
348
|
+
*/
|
|
349
|
+
validateNotDeleted(id, requestHeaderData) {
|
|
350
|
+
if (this.checkIfDeleted(id, requestHeaderData)) {
|
|
317
351
|
// The requested data store is removed by gc. Create a 404 gc response exception.
|
|
318
|
-
const
|
|
319
|
-
(0,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
352
|
+
const request = { url: id };
|
|
353
|
+
throw (0, runtime_utils_1.responseToException)((0, runtime_utils_1.createResponseError)(404, "DataStore was deleted", request), request);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Checks if the data store has not been marked as tombstone by GC or not.
|
|
358
|
+
* @param context - the data store context in question
|
|
359
|
+
* @param requestHeaderData - the request header information to log if the validation detects the data store has been tombstoned
|
|
360
|
+
* @returns true if the data store is tombstoned. Otherwise, returns false.
|
|
361
|
+
*/
|
|
362
|
+
checkIfTombstoned(context, requestHeaderData) {
|
|
363
|
+
if (!context.tombstoned) {
|
|
364
|
+
return false;
|
|
327
365
|
}
|
|
366
|
+
const logErrorEvent = this.throwOnTombstoneLoad && !requestHeaderData.allowTombstone;
|
|
367
|
+
(0, gc_1.sendGCUnexpectedUsageEvent)(this.mc, {
|
|
368
|
+
eventName: "GC_Tombstone_DataStore_Requested",
|
|
369
|
+
category: logErrorEvent ? "error" : "generic",
|
|
370
|
+
isSummarizerClient: this.runtime.clientDetails.type === summary_1.summarizerClientType,
|
|
371
|
+
id: context.id,
|
|
372
|
+
headers: JSON.stringify(requestHeaderData),
|
|
373
|
+
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
374
|
+
}, context.isLoaded ? context.packagePath : undefined);
|
|
375
|
+
return true;
|
|
328
376
|
}
|
|
329
377
|
/**
|
|
330
378
|
* Validates that the data store context requested has not been marked as tombstone by GC.
|
|
331
|
-
*
|
|
332
379
|
* @param context - the data store context in question
|
|
333
380
|
* @param request - the request information to log if the validation detects the data store has been tombstoned
|
|
334
|
-
* @param
|
|
381
|
+
* @param requestHeaderData - the request header information to log if the validation detects the data store has been tombstoned
|
|
335
382
|
*/
|
|
336
|
-
validateNotTombstoned(context,
|
|
337
|
-
if (context
|
|
338
|
-
const shouldFail = this.throwOnTombstoneLoad && !headerData.allowTombstone;
|
|
383
|
+
validateNotTombstoned(context, requestHeaderData) {
|
|
384
|
+
if (this.checkIfTombstoned(context, requestHeaderData)) {
|
|
339
385
|
// The requested data store is removed by gc. Create a 404 gc response exception.
|
|
386
|
+
const request = { url: context.id };
|
|
340
387
|
const error = (0, runtime_utils_1.responseToException)((0, runtime_utils_1.createResponseError)(404, "DataStore was deleted", request, {
|
|
341
388
|
[containerRuntime_1.TombstoneResponseHeaderKey]: true,
|
|
342
389
|
}), request);
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
category: shouldFail ? "error" : "generic",
|
|
346
|
-
isSummarizerClient: this.runtime.clientDetails.type === summary_1.summarizerClientType,
|
|
347
|
-
headers: JSON.stringify(headerData),
|
|
348
|
-
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
349
|
-
}, context.isLoaded ? context.packagePath : undefined, error);
|
|
350
|
-
if (shouldFail) {
|
|
390
|
+
// Throw an error if configured via options and via request headers.
|
|
391
|
+
if (this.throwOnTombstoneLoad && !requestHeaderData.allowTombstone) {
|
|
351
392
|
throw error;
|
|
352
393
|
}
|
|
353
394
|
}
|
|
354
395
|
}
|
|
355
|
-
processSignal(
|
|
356
|
-
|
|
357
|
-
this.
|
|
358
|
-
const context = this.contexts.get(address);
|
|
396
|
+
processSignal(fluidDataStoreId, message, local) {
|
|
397
|
+
this.validateNotDeleted(fluidDataStoreId);
|
|
398
|
+
const context = this.contexts.get(fluidDataStoreId);
|
|
359
399
|
if (!context) {
|
|
360
400
|
// Attach message may not have been processed yet
|
|
361
|
-
(0,
|
|
401
|
+
(0, core_utils_1.assert)(!local, 0x163 /* "Missing datastore for local signal" */);
|
|
362
402
|
this.mc.logger.sendTelemetryEvent({
|
|
363
403
|
eventName: "SignalFluidDataStoreNotFound",
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
},
|
|
404
|
+
...(0, telemetry_utils_1.tagCodeArtifacts)({
|
|
405
|
+
fluidDataStoreId,
|
|
406
|
+
}),
|
|
368
407
|
});
|
|
369
408
|
return;
|
|
370
409
|
}
|
|
371
410
|
context.processSignal(message, local);
|
|
372
411
|
}
|
|
373
412
|
setConnectionState(connected, clientId) {
|
|
374
|
-
for (const [
|
|
413
|
+
for (const [fluidDataStoreId, context] of this.contexts) {
|
|
375
414
|
try {
|
|
376
415
|
context.setConnectionState(connected, clientId);
|
|
377
416
|
}
|
|
@@ -379,7 +418,9 @@ class DataStores {
|
|
|
379
418
|
this.mc.logger.sendErrorEvent({
|
|
380
419
|
eventName: "SetConnectionStateError",
|
|
381
420
|
clientId,
|
|
382
|
-
|
|
421
|
+
...(0, telemetry_utils_1.tagCodeArtifacts)({
|
|
422
|
+
fluidDataStoreId,
|
|
423
|
+
}),
|
|
383
424
|
details: JSON.stringify({
|
|
384
425
|
runtimeConnected: this.runtime.connected,
|
|
385
426
|
connected,
|
|
@@ -407,7 +448,7 @@ class DataStores {
|
|
|
407
448
|
.filter(([_, context]) => {
|
|
408
449
|
// Summarizer works only with clients with no local changes. A data store in attaching
|
|
409
450
|
// state indicates an op was sent to attach a local data store.
|
|
410
|
-
(0,
|
|
451
|
+
(0, core_utils_1.assert)(context.attachState !== container_definitions_1.AttachState.Attaching, 0x588 /* Local data store detected in attaching state during summarize */);
|
|
411
452
|
return context.attachState === container_definitions_1.AttachState.Attached;
|
|
412
453
|
})
|
|
413
454
|
.map(async ([contextId, context]) => {
|
|
@@ -442,7 +483,7 @@ class DataStores {
|
|
|
442
483
|
else {
|
|
443
484
|
// If this data store is not yet loaded, then there should be no changes in the snapshot from
|
|
444
485
|
// which it was created as it is detached container. So just use the previous snapshot.
|
|
445
|
-
(0,
|
|
486
|
+
(0, core_utils_1.assert)(!!this.baseSnapshot, 0x166 /* "BaseSnapshot should be there as detached container loaded from snapshot" */);
|
|
446
487
|
dataStoreSummary = (0, runtime_utils_1.convertSnapshotTreeToSummaryTree)(this.baseSnapshot.trees[key]);
|
|
447
488
|
}
|
|
448
489
|
builder.addWithStats(key, dataStoreSummary);
|
|
@@ -458,7 +499,7 @@ class DataStores {
|
|
|
458
499
|
async updateStateBeforeGC() {
|
|
459
500
|
for (const id of this.dataStoresSinceLastGC) {
|
|
460
501
|
const context = this.contexts.get(id);
|
|
461
|
-
(0,
|
|
502
|
+
(0, core_utils_1.assert)(context !== undefined, 0x2b6 /* Missing data store context */);
|
|
462
503
|
if (await context.isRoot()) {
|
|
463
504
|
// A root data store is basically a reference from the container runtime to the data store.
|
|
464
505
|
const handle = new datastore_1.FluidObjectHandle(context, id, this.runtime.IFluidHandleContext);
|
|
@@ -487,7 +528,7 @@ class DataStores {
|
|
|
487
528
|
.filter(([_, context]) => {
|
|
488
529
|
// Summarizer client and hence GC works only with clients with no local changes. A data store in
|
|
489
530
|
// attaching state indicates an op was sent to attach a local data store.
|
|
490
|
-
(0,
|
|
531
|
+
(0, core_utils_1.assert)(context.attachState !== container_definitions_1.AttachState.Attaching, 0x589 /* Local data store detected in attaching state while running GC */);
|
|
491
532
|
return context.attachState === container_definitions_1.AttachState.Attached;
|
|
492
533
|
})
|
|
493
534
|
.map(async ([contextId, context]) => {
|
|
@@ -505,16 +546,15 @@ class DataStores {
|
|
|
505
546
|
* @param usedRoutes - The routes that are used in all data stores in this Container.
|
|
506
547
|
*/
|
|
507
548
|
updateUsedRoutes(usedRoutes) {
|
|
508
|
-
var _a;
|
|
509
549
|
// Get a map of data store ids to routes used in it.
|
|
510
550
|
const usedDataStoreRoutes = (0, runtime_utils_1.unpackChildNodesUsedRoutes)(usedRoutes);
|
|
511
551
|
// Verify that the used routes are correct.
|
|
512
552
|
for (const [id] of usedDataStoreRoutes) {
|
|
513
|
-
(0,
|
|
553
|
+
(0, core_utils_1.assert)(this.contexts.has(id), 0x167 /* "Used route does not belong to any known data store" */);
|
|
514
554
|
}
|
|
515
555
|
// Update the used routes in each data store. Used routes is empty for unused data stores.
|
|
516
556
|
for (const [contextId, context] of this.contexts) {
|
|
517
|
-
context.updateUsedRoutes(
|
|
557
|
+
context.updateUsedRoutes(usedDataStoreRoutes.get(contextId) ?? []);
|
|
518
558
|
}
|
|
519
559
|
}
|
|
520
560
|
/**
|
|
@@ -530,7 +570,7 @@ class DataStores {
|
|
|
530
570
|
continue;
|
|
531
571
|
}
|
|
532
572
|
const dataStoreId = pathParts[1];
|
|
533
|
-
(0,
|
|
573
|
+
(0, core_utils_1.assert)(this.contexts.has(dataStoreId), 0x2d7 /* No data store with specified id */);
|
|
534
574
|
// Delete the contexts of unused data stores.
|
|
535
575
|
this.contexts.delete(dataStoreId);
|
|
536
576
|
// Delete the summarizer node of the unused data stores.
|
|
@@ -541,11 +581,11 @@ class DataStores {
|
|
|
541
581
|
* Delete data stores and its objects that are sweep ready.
|
|
542
582
|
* @param sweepReadyDataStoreRoutes - The routes of data stores and its objects that are sweep ready and should
|
|
543
583
|
* be deleted.
|
|
544
|
-
* @returns
|
|
584
|
+
* @returns The routes of data stores and its objects that were deleted.
|
|
545
585
|
*/
|
|
546
586
|
deleteSweepReadyNodes(sweepReadyDataStoreRoutes) {
|
|
547
587
|
// If sweep for data stores is not enabled, return empty list indicating nothing is deleted.
|
|
548
|
-
if (this.mc.config.getBoolean(gc_1.
|
|
588
|
+
if (this.mc.config.getBoolean(gc_1.disableDatastoreSweepKey) === true) {
|
|
549
589
|
return [];
|
|
550
590
|
}
|
|
551
591
|
for (const route of sweepReadyDataStoreRoutes) {
|
|
@@ -564,7 +604,7 @@ class DataStores {
|
|
|
564
604
|
});
|
|
565
605
|
}
|
|
566
606
|
const dataStore = this.contexts.get(dataStoreId);
|
|
567
|
-
(0,
|
|
607
|
+
(0, core_utils_1.assert)(dataStore !== undefined, 0x571 /* Attempting to delete unknown dataStore */);
|
|
568
608
|
dataStore.delete();
|
|
569
609
|
// Delete the contexts of sweep ready data stores.
|
|
570
610
|
this.contexts.delete(dataStoreId);
|
|
@@ -587,7 +627,7 @@ class DataStores {
|
|
|
587
627
|
continue;
|
|
588
628
|
}
|
|
589
629
|
const dataStoreId = pathParts[1];
|
|
590
|
-
(0,
|
|
630
|
+
(0, core_utils_1.assert)(this.contexts.has(dataStoreId), 0x510 /* No data store with specified id */);
|
|
591
631
|
tombstonedDataStoresSet.add(dataStoreId);
|
|
592
632
|
}
|
|
593
633
|
// Update the used routes in each data store. Used routes is empty for unused data stores.
|
|
@@ -613,11 +653,10 @@ class DataStores {
|
|
|
613
653
|
* Called by GC to retrieve the package path of a data store node with the given path.
|
|
614
654
|
*/
|
|
615
655
|
async getDataStorePackagePath(nodePath) {
|
|
616
|
-
var _a;
|
|
617
656
|
// If the node belongs to a data store, return its package path. For DDSes, we return the package path of the
|
|
618
657
|
// data store that contains it.
|
|
619
658
|
const context = this.contexts.get(nodePath.split("/")[1]);
|
|
620
|
-
return (
|
|
659
|
+
return (await context?.getInitialSnapshotDetails())?.pkg;
|
|
621
660
|
}
|
|
622
661
|
/**
|
|
623
662
|
* Called by GC to determine if a node is for a data store or for an object within a data store (for e.g. DDS).
|
|
@@ -643,7 +682,7 @@ function getSummaryForDatastores(snapshot, metadata) {
|
|
|
643
682
|
}
|
|
644
683
|
if ((0, summary_1.rootHasIsolatedChannels)(metadata)) {
|
|
645
684
|
const datastoresSnapshot = snapshot.trees[runtime_definitions_1.channelsTreeName];
|
|
646
|
-
(0,
|
|
685
|
+
(0, core_utils_1.assert)(!!datastoresSnapshot, 0x168 /* Expected tree in snapshot not found */);
|
|
647
686
|
return datastoresSnapshot;
|
|
648
687
|
}
|
|
649
688
|
else {
|
|
@@ -654,7 +693,10 @@ function getSummaryForDatastores(snapshot, metadata) {
|
|
|
654
693
|
datastoresTrees[key] = value;
|
|
655
694
|
}
|
|
656
695
|
}
|
|
657
|
-
return
|
|
696
|
+
return {
|
|
697
|
+
...snapshot,
|
|
698
|
+
trees: datastoresTrees,
|
|
699
|
+
};
|
|
658
700
|
}
|
|
659
701
|
}
|
|
660
702
|
exports.getSummaryForDatastores = getSummaryForDatastores;
|