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