@fluidframework/container-runtime 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191258
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/src/dataStore.ts
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryLoggerExt, TelemetryDataTag } from "@fluidframework/telemetry-utils";
|
|
7
|
-
import { assert, unreachableCase } from "@fluidframework/
|
|
6
|
+
import { ITelemetryLoggerExt, TelemetryDataTag, UsageError } from "@fluidframework/telemetry-utils";
|
|
7
|
+
import { assert, unreachableCase } from "@fluidframework/core-utils";
|
|
8
8
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
9
|
-
import { UsageError } from "@fluidframework/container-utils";
|
|
10
9
|
import { FluidObject, IFluidHandle, IRequest, IResponse } from "@fluidframework/core-interfaces";
|
|
11
10
|
import {
|
|
12
11
|
AliasResult,
|
|
@@ -62,6 +61,9 @@ class DataStore implements IDataStore {
|
|
|
62
61
|
private readonly pendingAliases: Map<string, Promise<AliasResult>>;
|
|
63
62
|
private aliasResult: Promise<AliasResult> | undefined;
|
|
64
63
|
|
|
64
|
+
/**
|
|
65
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IDataStore.trySetAlias}
|
|
66
|
+
*/
|
|
65
67
|
async trySetAlias(alias: string): Promise<AliasResult> {
|
|
66
68
|
if (alias.includes("/")) {
|
|
67
69
|
throw new UsageError(`The alias cannot contain slashes: '${alias}'`);
|
|
@@ -158,7 +160,10 @@ class DataStore implements IDataStore {
|
|
|
158
160
|
return "Success";
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
165
|
+
*/
|
|
166
|
+
public async request(request: IRequest): Promise<IResponse> {
|
|
162
167
|
return this.fluidDataStoreChannel.request(request);
|
|
163
168
|
}
|
|
164
169
|
|
|
@@ -179,6 +184,9 @@ class DataStore implements IDataStore {
|
|
|
179
184
|
this.pendingAliases = datastores.pendingAliases;
|
|
180
185
|
}
|
|
181
186
|
|
|
187
|
+
/**
|
|
188
|
+
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
189
|
+
*/
|
|
182
190
|
public get IFluidRouter() {
|
|
183
191
|
return this.fluidDataStoreChannel;
|
|
184
192
|
}
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
AttachState,
|
|
18
18
|
ILoaderOptions,
|
|
19
19
|
} from "@fluidframework/container-definitions";
|
|
20
|
-
import {
|
|
21
|
-
import { LazyPromise } from "@fluidframework/core-utils";
|
|
20
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
21
|
+
import { assert, Deferred, LazyPromise } from "@fluidframework/core-utils";
|
|
22
22
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
23
23
|
import { BlobTreeEntry, readAndParse } from "@fluidframework/driver-utils";
|
|
24
24
|
import {
|
|
@@ -54,27 +54,19 @@ import {
|
|
|
54
54
|
IIdCompressorCore,
|
|
55
55
|
VisibilityState,
|
|
56
56
|
} from "@fluidframework/runtime-definitions";
|
|
57
|
+
import { addBlobToSummary, convertSummaryTreeToITree } from "@fluidframework/runtime-utils";
|
|
57
58
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
import {
|
|
63
|
-
ChildLogger,
|
|
59
|
+
createChildMonitoringContext,
|
|
60
|
+
DataCorruptionError,
|
|
61
|
+
DataProcessingError,
|
|
62
|
+
extractSafePropertiesFromMessage,
|
|
64
63
|
generateStack,
|
|
65
64
|
ITelemetryLoggerExt,
|
|
66
|
-
loggerToMonitoringContext,
|
|
67
65
|
LoggingError,
|
|
68
66
|
MonitoringContext,
|
|
69
|
-
|
|
67
|
+
tagCodeArtifacts,
|
|
70
68
|
ThresholdCounter,
|
|
71
69
|
} from "@fluidframework/telemetry-utils";
|
|
72
|
-
import {
|
|
73
|
-
DataCorruptionError,
|
|
74
|
-
DataProcessingError,
|
|
75
|
-
extractSafePropertiesFromMessage,
|
|
76
|
-
} from "@fluidframework/container-utils";
|
|
77
|
-
|
|
78
70
|
import {
|
|
79
71
|
dataStoreAttributesBlobName,
|
|
80
72
|
hasIsolatedChannels,
|
|
@@ -316,9 +308,18 @@ export abstract class FluidDataStoreContext
|
|
|
316
308
|
async (fullGC?: boolean) => this.getGCDataInternal(fullGC),
|
|
317
309
|
);
|
|
318
310
|
|
|
319
|
-
this.mc =
|
|
320
|
-
|
|
321
|
-
|
|
311
|
+
this.mc = createChildMonitoringContext({
|
|
312
|
+
logger: this.logger,
|
|
313
|
+
namespace: "FluidDataStoreContext",
|
|
314
|
+
properties: {
|
|
315
|
+
all: tagCodeArtifacts({
|
|
316
|
+
fluidDataStoreId: this.id,
|
|
317
|
+
// The package name is a getter because `this.pkg` may not be initialized during construction.
|
|
318
|
+
// For data stores loaded from summary, it is initialized during data store realization.
|
|
319
|
+
fullPackageName: () => this.pkg?.join("/"),
|
|
320
|
+
}),
|
|
321
|
+
},
|
|
322
|
+
});
|
|
322
323
|
this.thresholdOpsCounter = new ThresholdCounter(
|
|
323
324
|
FluidDataStoreContext.pendingOpsCountThreshold,
|
|
324
325
|
this.mc.logger,
|
|
@@ -374,10 +375,13 @@ export abstract class FluidDataStoreContext
|
|
|
374
375
|
failedPkgPath?: string,
|
|
375
376
|
fullPackageName?: readonly string[],
|
|
376
377
|
): never {
|
|
377
|
-
throw new LoggingError(
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
378
|
+
throw new LoggingError(
|
|
379
|
+
reason,
|
|
380
|
+
tagCodeArtifacts({
|
|
381
|
+
failedPkgPath,
|
|
382
|
+
packagePath: fullPackageName?.join("/"),
|
|
383
|
+
}),
|
|
384
|
+
);
|
|
381
385
|
}
|
|
382
386
|
|
|
383
387
|
public async realize(): Promise<IFluidDataStoreChannel> {
|
|
@@ -389,13 +393,12 @@ export abstract class FluidDataStoreContext
|
|
|
389
393
|
error,
|
|
390
394
|
"realizeFluidDataStoreContext",
|
|
391
395
|
);
|
|
392
|
-
errorWrapped.addTelemetryProperties(
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
},
|
|
397
|
-
|
|
398
|
-
});
|
|
396
|
+
errorWrapped.addTelemetryProperties(
|
|
397
|
+
tagCodeArtifacts({
|
|
398
|
+
fullPackageName: this.pkg?.join("/"),
|
|
399
|
+
fluidDataStoreId: this.id,
|
|
400
|
+
}),
|
|
401
|
+
);
|
|
399
402
|
this.channelDeferred?.reject(errorWrapped);
|
|
400
403
|
this.mc.logger.sendErrorEvent({ eventName: "RealizeError" }, errorWrapped);
|
|
401
404
|
});
|
|
@@ -790,10 +793,6 @@ export abstract class FluidDataStoreContext
|
|
|
790
793
|
this.mc.logger.sendErrorEvent(
|
|
791
794
|
{
|
|
792
795
|
eventName: "BindRuntimeError",
|
|
793
|
-
fluidDataStoreId: {
|
|
794
|
-
value: this.id,
|
|
795
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
796
|
-
},
|
|
797
796
|
},
|
|
798
797
|
error,
|
|
799
798
|
);
|
|
@@ -849,8 +848,7 @@ export abstract class FluidDataStoreContext
|
|
|
849
848
|
await this.realize();
|
|
850
849
|
}
|
|
851
850
|
assert(!!this.channel, 0x14c /* "Channel must exist when rebasing ops" */);
|
|
852
|
-
|
|
853
|
-
return this.channel.applyStashedOp(innerContents.content);
|
|
851
|
+
return this.channel.applyStashedOp(contents);
|
|
854
852
|
}
|
|
855
853
|
|
|
856
854
|
private verifyNotClosed(
|
|
@@ -917,11 +915,6 @@ export abstract class FluidDataStoreContext
|
|
|
917
915
|
this.mc.logger.sendTelemetryEvent({
|
|
918
916
|
eventName,
|
|
919
917
|
type,
|
|
920
|
-
fluidDataStoreId: {
|
|
921
|
-
value: this.id,
|
|
922
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
923
|
-
},
|
|
924
|
-
packageName: packagePathToTelemetryProperty(this.pkg),
|
|
925
918
|
isSummaryInProgress: this.summarizerNode.isSummaryInProgress?.(),
|
|
926
919
|
stack: generateStack(),
|
|
927
920
|
});
|
|
@@ -943,8 +936,11 @@ export abstract class FluidDataStoreContext
|
|
|
943
936
|
);
|
|
944
937
|
}
|
|
945
938
|
|
|
946
|
-
public async uploadBlob(
|
|
947
|
-
|
|
939
|
+
public async uploadBlob(
|
|
940
|
+
blob: ArrayBufferLike,
|
|
941
|
+
signal?: AbortSignal,
|
|
942
|
+
): Promise<IFluidHandle<ArrayBufferLike>> {
|
|
943
|
+
return this.containerRuntime.uploadBlob(blob, signal);
|
|
948
944
|
}
|
|
949
945
|
}
|
|
950
946
|
|
package/src/dataStoreContexts.ts
CHANGED
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
10
|
-
import { ChildLogger, ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
6
|
+
import { assert, Deferred, Lazy } from "@fluidframework/core-utils";
|
|
7
|
+
import { IDisposable, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
8
|
+
import { createChildLogger, ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
11
9
|
import { FluidDataStoreContext, LocalFluidDataStoreContext } from "./dataStoreContext";
|
|
12
10
|
|
|
13
11
|
export class DataStoreContexts implements Iterable<[string, FluidDataStoreContext]>, IDisposable {
|
|
@@ -47,7 +45,7 @@ export class DataStoreContexts implements Iterable<[string, FluidDataStoreContex
|
|
|
47
45
|
private readonly _logger: ITelemetryLoggerExt;
|
|
48
46
|
|
|
49
47
|
constructor(baseLogger: ITelemetryBaseLogger) {
|
|
50
|
-
this._logger =
|
|
48
|
+
this._logger = createChildLogger({ logger: baseLogger });
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
[Symbol.iterator](): Iterator<[string, FluidDataStoreContext]> {
|
package/src/dataStoreRegistry.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { UsageError } from "@fluidframework/
|
|
5
|
+
import { UsageError } from "@fluidframework/telemetry-utils";
|
|
6
6
|
import {
|
|
7
7
|
FluidDataStoreRegistryEntry,
|
|
8
8
|
IFluidDataStoreRegistry,
|
package/src/dataStores.ts
CHANGED
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
DataCorruptionError,
|
|
8
|
-
extractSafePropertiesFromMessage,
|
|
9
|
-
} from "@fluidframework/container-utils";
|
|
10
6
|
import {
|
|
11
7
|
ITelemetryBaseLogger,
|
|
12
8
|
IDisposable,
|
|
@@ -42,16 +38,16 @@ import {
|
|
|
42
38
|
unpackChildNodesUsedRoutes,
|
|
43
39
|
} from "@fluidframework/runtime-utils";
|
|
44
40
|
import {
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
createChildMonitoringContext,
|
|
42
|
+
DataCorruptionError,
|
|
43
|
+
extractSafePropertiesFromMessage,
|
|
47
44
|
LoggingError,
|
|
48
45
|
MonitoringContext,
|
|
49
|
-
|
|
46
|
+
tagCodeArtifacts,
|
|
50
47
|
} from "@fluidframework/telemetry-utils";
|
|
51
48
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
52
49
|
import { buildSnapshotTree } from "@fluidframework/driver-utils";
|
|
53
|
-
import { assert } from "@fluidframework/
|
|
54
|
-
import { Lazy } from "@fluidframework/core-utils";
|
|
50
|
+
import { assert, Lazy } from "@fluidframework/core-utils";
|
|
55
51
|
import { v4 as uuid } from "uuid";
|
|
56
52
|
import { DataStoreContexts } from "./dataStoreContexts";
|
|
57
53
|
import {
|
|
@@ -71,7 +67,7 @@ import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs";
|
|
|
71
67
|
import { IDataStoreAliasMessage, isDataStoreAliasMessage } from "./dataStore";
|
|
72
68
|
import {
|
|
73
69
|
GCNodeType,
|
|
74
|
-
|
|
70
|
+
disableDatastoreSweepKey,
|
|
75
71
|
throwOnTombstoneLoadKey,
|
|
76
72
|
sendGCUnexpectedUsageEvent,
|
|
77
73
|
} from "./gc";
|
|
@@ -137,7 +133,7 @@ export class DataStores implements IDisposable {
|
|
|
137
133
|
private readonly aliasMap: Map<string, string>,
|
|
138
134
|
private readonly contexts: DataStoreContexts = new DataStoreContexts(baseLogger),
|
|
139
135
|
) {
|
|
140
|
-
this.mc =
|
|
136
|
+
this.mc = createChildMonitoringContext({ logger: baseLogger });
|
|
141
137
|
this.containerRuntimeHandle = new FluidObjectHandle(
|
|
142
138
|
this.runtime,
|
|
143
139
|
"/",
|
|
@@ -243,10 +239,7 @@ export class DataStores implements IDisposable {
|
|
|
243
239
|
"Duplicate DataStore created with existing id",
|
|
244
240
|
{
|
|
245
241
|
...extractSafePropertiesFromMessage(message),
|
|
246
|
-
dataStoreId:
|
|
247
|
-
value: attachMessage.id,
|
|
248
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
249
|
-
},
|
|
242
|
+
...tagCodeArtifacts({ dataStoreId: attachMessage.id }),
|
|
250
243
|
},
|
|
251
244
|
);
|
|
252
245
|
throw error;
|
|
@@ -435,8 +428,7 @@ export class DataStores implements IDisposable {
|
|
|
435
428
|
) {
|
|
436
429
|
const envelope = message.contents as IEnvelope;
|
|
437
430
|
const transformed = { ...message, contents: envelope.contents };
|
|
438
|
-
|
|
439
|
-
this.validateNotDeleted(envelope.address, request);
|
|
431
|
+
this.validateNotDeleted(envelope.address);
|
|
440
432
|
const context = this.contexts.get(envelope.address);
|
|
441
433
|
assert(!!context, 0x162 /* "There should be a store context for the op" */);
|
|
442
434
|
context.process(transformed, local, localMessageMetadata);
|
|
@@ -455,114 +447,154 @@ export class DataStores implements IDisposable {
|
|
|
455
447
|
requestHeaderData: RuntimeHeaderData,
|
|
456
448
|
): Promise<FluidDataStoreContext> {
|
|
457
449
|
const headerData = { ...defaultRuntimeHeaderData, ...requestHeaderData };
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
this.validateNotDeleted(id, request, headerData);
|
|
450
|
+
this.validateNotDeleted(id, headerData);
|
|
461
451
|
|
|
462
452
|
const context = await this.contexts.getBoundOrRemoted(id, headerData.wait);
|
|
463
453
|
if (context === undefined) {
|
|
464
454
|
// The requested data store does not exits. Throw a 404 response exception.
|
|
455
|
+
const request: IRequest = { url: id };
|
|
465
456
|
throw responseToException(create404Response(request), request);
|
|
466
457
|
}
|
|
467
458
|
|
|
468
|
-
this.validateNotTombstoned(context,
|
|
459
|
+
this.validateNotTombstoned(context, requestHeaderData);
|
|
469
460
|
|
|
470
461
|
return context;
|
|
471
462
|
}
|
|
472
463
|
|
|
473
464
|
/**
|
|
474
|
-
*
|
|
475
|
-
|
|
465
|
+
* Returns the data store requested with the given id if available. Otherwise, returns undefined.
|
|
466
|
+
*/
|
|
467
|
+
public async getDataStoreIfAvailable(
|
|
468
|
+
id: string,
|
|
469
|
+
requestHeaderData: RuntimeHeaderData,
|
|
470
|
+
): Promise<FluidDataStoreContext | undefined> {
|
|
471
|
+
// If the data store has been deleted, return undefined.
|
|
472
|
+
if (this.checkIfDeleted(id, requestHeaderData)) {
|
|
473
|
+
return undefined;
|
|
474
|
+
}
|
|
475
|
+
const headerData = { ...defaultRuntimeHeaderData, ...requestHeaderData };
|
|
476
|
+
const context = await this.contexts.getBoundOrRemoted(id, headerData.wait);
|
|
477
|
+
if (context === undefined) {
|
|
478
|
+
return undefined;
|
|
479
|
+
}
|
|
480
|
+
// Check if the data store is tombstoned. If so, we want to log a telemetry event.
|
|
481
|
+
this.checkIfTombstoned(context, requestHeaderData);
|
|
482
|
+
return context;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Checks if the data store has been deleted by GC.
|
|
476
487
|
* @param id - data store id
|
|
477
488
|
* @param request - the request information to log if the validation detects the data store has been deleted
|
|
478
489
|
* @param requestHeaderData - the request header information to log if the validation detects the data store has been deleted
|
|
490
|
+
* @returns true if the data store is deleted. Otherwise, returns false.
|
|
479
491
|
*/
|
|
480
|
-
private
|
|
481
|
-
id: string,
|
|
482
|
-
request: IRequest,
|
|
483
|
-
requestHeaderData?: RuntimeHeaderData,
|
|
484
|
-
) {
|
|
492
|
+
private checkIfDeleted(id: string, requestHeaderData?: RuntimeHeaderData) {
|
|
485
493
|
const dataStoreNodePath = `/${id}`;
|
|
486
|
-
if (this.isDataStoreDeleted(dataStoreNodePath)) {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
)
|
|
494
|
+
if (!this.isDataStoreDeleted(dataStoreNodePath)) {
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
assert(
|
|
498
|
+
!this.contexts.has(id),
|
|
499
|
+
0x570 /* Inconsistent state! GC says the data store is deleted, but the data store is not deleted from the runtime. */,
|
|
500
|
+
);
|
|
501
|
+
sendGCUnexpectedUsageEvent(
|
|
502
|
+
this.mc,
|
|
503
|
+
{
|
|
504
|
+
eventName: "GC_Deleted_DataStore_Requested",
|
|
505
|
+
category: "error",
|
|
506
|
+
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
507
|
+
id,
|
|
508
|
+
headers: JSON.stringify(requestHeaderData),
|
|
509
|
+
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
510
|
+
},
|
|
511
|
+
undefined /* packagePath */,
|
|
512
|
+
);
|
|
513
|
+
return true;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Validate that the data store had not been deleted by GC.
|
|
518
|
+
* @param id - data store id
|
|
519
|
+
* @param requestHeaderData - the request header information to log if the validation detects the data store has been deleted
|
|
520
|
+
*/
|
|
521
|
+
private validateNotDeleted(id: string, requestHeaderData?: RuntimeHeaderData) {
|
|
522
|
+
if (this.checkIfDeleted(id, requestHeaderData)) {
|
|
491
523
|
// The requested data store is removed by gc. Create a 404 gc response exception.
|
|
492
|
-
const
|
|
524
|
+
const request: IRequest = { url: id };
|
|
525
|
+
throw responseToException(
|
|
493
526
|
createResponseError(404, "DataStore was deleted", request),
|
|
494
527
|
request,
|
|
495
528
|
);
|
|
496
|
-
sendGCUnexpectedUsageEvent(
|
|
497
|
-
this.mc,
|
|
498
|
-
{
|
|
499
|
-
eventName: "GC_Deleted_DataStore_Requested",
|
|
500
|
-
category: "error",
|
|
501
|
-
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
502
|
-
headers: JSON.stringify(requestHeaderData),
|
|
503
|
-
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
504
|
-
},
|
|
505
|
-
undefined /** packagePath */,
|
|
506
|
-
error,
|
|
507
|
-
);
|
|
508
|
-
throw error;
|
|
509
529
|
}
|
|
510
530
|
}
|
|
511
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Checks if the data store has not been marked as tombstone by GC or not.
|
|
534
|
+
* @param context - the data store context in question
|
|
535
|
+
* @param requestHeaderData - the request header information to log if the validation detects the data store has been tombstoned
|
|
536
|
+
* @returns true if the data store is tombstoned. Otherwise, returns false.
|
|
537
|
+
*/
|
|
538
|
+
private checkIfTombstoned(
|
|
539
|
+
context: FluidDataStoreContext,
|
|
540
|
+
requestHeaderData: RuntimeHeaderData,
|
|
541
|
+
) {
|
|
542
|
+
if (!context.tombstoned) {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
const logErrorEvent = this.throwOnTombstoneLoad && !requestHeaderData.allowTombstone;
|
|
546
|
+
sendGCUnexpectedUsageEvent(
|
|
547
|
+
this.mc,
|
|
548
|
+
{
|
|
549
|
+
eventName: "GC_Tombstone_DataStore_Requested",
|
|
550
|
+
category: logErrorEvent ? "error" : "generic",
|
|
551
|
+
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
552
|
+
id: context.id,
|
|
553
|
+
headers: JSON.stringify(requestHeaderData),
|
|
554
|
+
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
555
|
+
},
|
|
556
|
+
context.isLoaded ? context.packagePath : undefined,
|
|
557
|
+
);
|
|
558
|
+
return true;
|
|
559
|
+
}
|
|
560
|
+
|
|
512
561
|
/**
|
|
513
562
|
* Validates that the data store context requested has not been marked as tombstone by GC.
|
|
514
|
-
*
|
|
515
563
|
* @param context - the data store context in question
|
|
516
564
|
* @param request - the request information to log if the validation detects the data store has been tombstoned
|
|
517
|
-
* @param
|
|
565
|
+
* @param requestHeaderData - the request header information to log if the validation detects the data store has been tombstoned
|
|
518
566
|
*/
|
|
519
567
|
private validateNotTombstoned(
|
|
520
568
|
context: FluidDataStoreContext,
|
|
521
|
-
|
|
522
|
-
headerData: RuntimeHeaderData,
|
|
569
|
+
requestHeaderData: RuntimeHeaderData,
|
|
523
570
|
) {
|
|
524
|
-
if (context
|
|
525
|
-
const shouldFail = this.throwOnTombstoneLoad && !headerData.allowTombstone;
|
|
526
|
-
|
|
571
|
+
if (this.checkIfTombstoned(context, requestHeaderData)) {
|
|
527
572
|
// The requested data store is removed by gc. Create a 404 gc response exception.
|
|
573
|
+
const request: IRequest = { url: context.id };
|
|
528
574
|
const error = responseToException(
|
|
529
575
|
createResponseError(404, "DataStore was deleted", request, {
|
|
530
576
|
[TombstoneResponseHeaderKey]: true,
|
|
531
577
|
}),
|
|
532
578
|
request,
|
|
533
579
|
);
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
{
|
|
537
|
-
eventName: "GC_Tombstone_DataStore_Requested",
|
|
538
|
-
category: shouldFail ? "error" : "generic",
|
|
539
|
-
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
540
|
-
headers: JSON.stringify(headerData),
|
|
541
|
-
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
542
|
-
},
|
|
543
|
-
context.isLoaded ? context.packagePath : undefined,
|
|
544
|
-
error,
|
|
545
|
-
);
|
|
546
|
-
|
|
547
|
-
if (shouldFail) {
|
|
580
|
+
// Throw an error if configured via options and via request headers.
|
|
581
|
+
if (this.throwOnTombstoneLoad && !requestHeaderData.allowTombstone) {
|
|
548
582
|
throw error;
|
|
549
583
|
}
|
|
550
584
|
}
|
|
551
585
|
}
|
|
552
586
|
|
|
553
|
-
public processSignal(
|
|
554
|
-
|
|
555
|
-
this.
|
|
556
|
-
const context = this.contexts.get(address);
|
|
587
|
+
public processSignal(fluidDataStoreId: string, message: IInboundSignalMessage, local: boolean) {
|
|
588
|
+
this.validateNotDeleted(fluidDataStoreId);
|
|
589
|
+
const context = this.contexts.get(fluidDataStoreId);
|
|
557
590
|
if (!context) {
|
|
558
591
|
// Attach message may not have been processed yet
|
|
559
592
|
assert(!local, 0x163 /* "Missing datastore for local signal" */);
|
|
560
593
|
this.mc.logger.sendTelemetryEvent({
|
|
561
594
|
eventName: "SignalFluidDataStoreNotFound",
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
},
|
|
595
|
+
...tagCodeArtifacts({
|
|
596
|
+
fluidDataStoreId,
|
|
597
|
+
}),
|
|
566
598
|
});
|
|
567
599
|
return;
|
|
568
600
|
}
|
|
@@ -571,7 +603,7 @@ export class DataStores implements IDisposable {
|
|
|
571
603
|
}
|
|
572
604
|
|
|
573
605
|
public setConnectionState(connected: boolean, clientId?: string) {
|
|
574
|
-
for (const [
|
|
606
|
+
for (const [fluidDataStoreId, context] of this.contexts) {
|
|
575
607
|
try {
|
|
576
608
|
context.setConnectionState(connected, clientId);
|
|
577
609
|
} catch (error) {
|
|
@@ -579,7 +611,9 @@ export class DataStores implements IDisposable {
|
|
|
579
611
|
{
|
|
580
612
|
eventName: "SetConnectionStateError",
|
|
581
613
|
clientId,
|
|
582
|
-
|
|
614
|
+
...tagCodeArtifacts({
|
|
615
|
+
fluidDataStoreId,
|
|
616
|
+
}),
|
|
583
617
|
details: JSON.stringify({
|
|
584
618
|
runtimeConnected: this.runtime.connected,
|
|
585
619
|
connected,
|
|
@@ -786,11 +820,11 @@ export class DataStores implements IDisposable {
|
|
|
786
820
|
* Delete data stores and its objects that are sweep ready.
|
|
787
821
|
* @param sweepReadyDataStoreRoutes - The routes of data stores and its objects that are sweep ready and should
|
|
788
822
|
* be deleted.
|
|
789
|
-
* @returns
|
|
823
|
+
* @returns The routes of data stores and its objects that were deleted.
|
|
790
824
|
*/
|
|
791
825
|
public deleteSweepReadyNodes(sweepReadyDataStoreRoutes: string[]): string[] {
|
|
792
826
|
// If sweep for data stores is not enabled, return empty list indicating nothing is deleted.
|
|
793
|
-
if (this.mc.config.getBoolean(
|
|
827
|
+
if (this.mc.config.getBoolean(disableDatastoreSweepKey) === true) {
|
|
794
828
|
return [];
|
|
795
829
|
}
|
|
796
830
|
for (const route of sweepReadyDataStoreRoutes) {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { EventForwarder } from "@fluid-internal/client-utils";
|
|
7
|
+
import {
|
|
8
|
+
IDeltaManager,
|
|
9
|
+
IDeltaManagerEvents,
|
|
10
|
+
IDeltaQueue,
|
|
11
|
+
IDeltaSender,
|
|
12
|
+
ReadOnlyInfo,
|
|
13
|
+
} from "@fluidframework/container-definitions";
|
|
14
|
+
import {
|
|
15
|
+
IClientConfiguration,
|
|
16
|
+
IClientDetails,
|
|
17
|
+
IDocumentMessage,
|
|
18
|
+
ISequencedDocumentMessage,
|
|
19
|
+
ISignalMessage,
|
|
20
|
+
} from "@fluidframework/protocol-definitions";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Base class for creating proxy to the real delta manager. It implements all required methods on IDeltaManager and
|
|
24
|
+
* proxy implementations can override specific methods.
|
|
25
|
+
*/
|
|
26
|
+
export class DeltaManagerProxyBase
|
|
27
|
+
extends EventForwarder<IDeltaManagerEvents>
|
|
28
|
+
implements IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>
|
|
29
|
+
{
|
|
30
|
+
public get IDeltaSender(): IDeltaSender {
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public get inbound(): IDeltaQueue<ISequencedDocumentMessage> {
|
|
35
|
+
return this.deltaManager.inbound;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public get outbound(): IDeltaQueue<IDocumentMessage[]> {
|
|
39
|
+
return this.deltaManager.outbound;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public get inboundSignal(): IDeltaQueue<ISignalMessage> {
|
|
43
|
+
return this.deltaManager.inboundSignal;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public get minimumSequenceNumber(): number {
|
|
47
|
+
return this.deltaManager.minimumSequenceNumber;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public get lastSequenceNumber(): number {
|
|
51
|
+
return this.deltaManager.lastSequenceNumber;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public get lastMessage() {
|
|
55
|
+
return this.deltaManager.lastMessage;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public get lastKnownSeqNumber() {
|
|
59
|
+
return this.deltaManager.lastKnownSeqNumber;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public get initialSequenceNumber(): number {
|
|
63
|
+
return this.deltaManager.initialSequenceNumber;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public get hasCheckpointSequenceNumber() {
|
|
67
|
+
return this.deltaManager.hasCheckpointSequenceNumber;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public get clientDetails(): IClientDetails {
|
|
71
|
+
return this.deltaManager.clientDetails;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public get version(): string {
|
|
75
|
+
return this.deltaManager.version;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public get maxMessageSize(): number {
|
|
79
|
+
return this.deltaManager.maxMessageSize;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public get serviceConfiguration(): IClientConfiguration | undefined {
|
|
83
|
+
return this.deltaManager.serviceConfiguration;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public get active(): boolean {
|
|
87
|
+
return this.deltaManager.active;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public get readOnlyInfo(): ReadOnlyInfo {
|
|
91
|
+
return this.deltaManager.readOnlyInfo;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
constructor(
|
|
95
|
+
protected readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,
|
|
96
|
+
) {
|
|
97
|
+
super(deltaManager);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public dispose(): void {
|
|
101
|
+
super.dispose();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public submitSignal(content: any): void {
|
|
105
|
+
return this.deltaManager.submitSignal(content);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public flush(): void {
|
|
109
|
+
return this.deltaManager.flush();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { IDeltaManager, ReadOnlyInfo } from "@fluidframework/container-definitions";
|
|
7
|
-
import { DeltaManagerProxyBase } from "@fluidframework/container-utils";
|
|
8
7
|
import { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
|
+
|
|
9
|
+
import { DeltaManagerProxyBase } from "./deltaManagerProxyBase";
|
|
9
10
|
import { summarizerClientType } from "./summary";
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -41,6 +42,8 @@ export class DeltaManagerSummarizerProxy
|
|
|
41
42
|
|
|
42
43
|
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>) {
|
|
43
44
|
super(deltaManager);
|
|
45
|
+
// We are expecting this class to have many listeners, so we suppress noisy "MaxListenersExceededWarning" logging.
|
|
46
|
+
super.setMaxListeners(0);
|
|
44
47
|
this.isSummarizerClient = this.deltaManager.clientDetails.type === summarizerClientType;
|
|
45
48
|
}
|
|
46
49
|
}
|