@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/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
|
@@ -3,15 +3,22 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
IDisposable,
|
|
8
|
+
FluidObject,
|
|
9
|
+
IRequest,
|
|
10
|
+
IResponse,
|
|
11
|
+
IFluidHandle,
|
|
12
|
+
ITelemetryProperties,
|
|
13
|
+
} from "@fluidframework/core-interfaces";
|
|
8
14
|
import {
|
|
9
15
|
IAudience,
|
|
10
16
|
IDeltaManager,
|
|
11
17
|
AttachState,
|
|
12
18
|
ILoaderOptions,
|
|
13
19
|
} from "@fluidframework/container-definitions";
|
|
14
|
-
import {
|
|
20
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
21
|
+
import { assert, Deferred, LazyPromise } from "@fluidframework/core-utils";
|
|
15
22
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
16
23
|
import { BlobTreeEntry, readAndParse } from "@fluidframework/driver-utils";
|
|
17
24
|
import {
|
|
@@ -47,27 +54,19 @@ import {
|
|
|
47
54
|
IIdCompressorCore,
|
|
48
55
|
VisibilityState,
|
|
49
56
|
} from "@fluidframework/runtime-definitions";
|
|
57
|
+
import { addBlobToSummary, convertSummaryTreeToITree } from "@fluidframework/runtime-utils";
|
|
50
58
|
import {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
import {
|
|
56
|
-
ChildLogger,
|
|
59
|
+
createChildMonitoringContext,
|
|
60
|
+
DataCorruptionError,
|
|
61
|
+
DataProcessingError,
|
|
62
|
+
extractSafePropertiesFromMessage,
|
|
57
63
|
generateStack,
|
|
58
64
|
ITelemetryLoggerExt,
|
|
59
|
-
loggerToMonitoringContext,
|
|
60
65
|
LoggingError,
|
|
61
66
|
MonitoringContext,
|
|
62
|
-
|
|
67
|
+
tagCodeArtifacts,
|
|
63
68
|
ThresholdCounter,
|
|
64
69
|
} from "@fluidframework/telemetry-utils";
|
|
65
|
-
import {
|
|
66
|
-
DataCorruptionError,
|
|
67
|
-
DataProcessingError,
|
|
68
|
-
extractSafePropertiesFromMessage,
|
|
69
|
-
} from "@fluidframework/container-utils";
|
|
70
|
-
|
|
71
70
|
import {
|
|
72
71
|
dataStoreAttributesBlobName,
|
|
73
72
|
hasIsolatedChannels,
|
|
@@ -309,9 +308,18 @@ export abstract class FluidDataStoreContext
|
|
|
309
308
|
async (fullGC?: boolean) => this.getGCDataInternal(fullGC),
|
|
310
309
|
);
|
|
311
310
|
|
|
312
|
-
this.mc =
|
|
313
|
-
|
|
314
|
-
|
|
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
|
+
});
|
|
315
323
|
this.thresholdOpsCounter = new ThresholdCounter(
|
|
316
324
|
FluidDataStoreContext.pendingOpsCountThreshold,
|
|
317
325
|
this.mc.logger,
|
|
@@ -367,10 +375,13 @@ export abstract class FluidDataStoreContext
|
|
|
367
375
|
failedPkgPath?: string,
|
|
368
376
|
fullPackageName?: readonly string[],
|
|
369
377
|
): never {
|
|
370
|
-
throw new LoggingError(
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
378
|
+
throw new LoggingError(
|
|
379
|
+
reason,
|
|
380
|
+
tagCodeArtifacts({
|
|
381
|
+
failedPkgPath,
|
|
382
|
+
packagePath: fullPackageName?.join("/"),
|
|
383
|
+
}),
|
|
384
|
+
);
|
|
374
385
|
}
|
|
375
386
|
|
|
376
387
|
public async realize(): Promise<IFluidDataStoreChannel> {
|
|
@@ -382,15 +393,14 @@ export abstract class FluidDataStoreContext
|
|
|
382
393
|
error,
|
|
383
394
|
"realizeFluidDataStoreContext",
|
|
384
395
|
);
|
|
385
|
-
errorWrapped.addTelemetryProperties(
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
});
|
|
396
|
+
errorWrapped.addTelemetryProperties(
|
|
397
|
+
tagCodeArtifacts({
|
|
398
|
+
fullPackageName: this.pkg?.join("/"),
|
|
399
|
+
fluidDataStoreId: this.id,
|
|
400
|
+
}),
|
|
401
|
+
);
|
|
392
402
|
this.channelDeferred?.reject(errorWrapped);
|
|
393
|
-
this.logger.sendErrorEvent({ eventName: "RealizeError" }, errorWrapped);
|
|
403
|
+
this.mc.logger.sendErrorEvent({ eventName: "RealizeError" }, errorWrapped);
|
|
394
404
|
});
|
|
395
405
|
}
|
|
396
406
|
return this.channelDeferred.promise;
|
|
@@ -780,13 +790,9 @@ export abstract class FluidDataStoreContext
|
|
|
780
790
|
this.channelDeferred.resolve(this.channel);
|
|
781
791
|
} catch (error) {
|
|
782
792
|
this.channelDeferred?.reject(error);
|
|
783
|
-
this.logger.sendErrorEvent(
|
|
793
|
+
this.mc.logger.sendErrorEvent(
|
|
784
794
|
{
|
|
785
795
|
eventName: "BindRuntimeError",
|
|
786
|
-
fluidDataStoreId: {
|
|
787
|
-
value: this.id,
|
|
788
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
789
|
-
},
|
|
790
796
|
},
|
|
791
797
|
error,
|
|
792
798
|
);
|
|
@@ -842,8 +848,7 @@ export abstract class FluidDataStoreContext
|
|
|
842
848
|
await this.realize();
|
|
843
849
|
}
|
|
844
850
|
assert(!!this.channel, 0x14c /* "Channel must exist when rebasing ops" */);
|
|
845
|
-
|
|
846
|
-
return this.channel.applyStashedOp(innerContents.content);
|
|
851
|
+
return this.channel.applyStashedOp(contents);
|
|
847
852
|
}
|
|
848
853
|
|
|
849
854
|
private verifyNotClosed(
|
|
@@ -910,11 +915,6 @@ export abstract class FluidDataStoreContext
|
|
|
910
915
|
this.mc.logger.sendTelemetryEvent({
|
|
911
916
|
eventName,
|
|
912
917
|
type,
|
|
913
|
-
fluidDataStoreId: {
|
|
914
|
-
value: this.id,
|
|
915
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
916
|
-
},
|
|
917
|
-
packageName: packagePathToTelemetryProperty(this.pkg),
|
|
918
918
|
isSummaryInProgress: this.summarizerNode.isSummaryInProgress?.(),
|
|
919
919
|
stack: generateStack(),
|
|
920
920
|
});
|
|
@@ -936,8 +936,11 @@ export abstract class FluidDataStoreContext
|
|
|
936
936
|
);
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
-
public async uploadBlob(
|
|
940
|
-
|
|
939
|
+
public async uploadBlob(
|
|
940
|
+
blob: ArrayBufferLike,
|
|
941
|
+
signal?: AbortSignal,
|
|
942
|
+
): Promise<IFluidHandle<ArrayBufferLike>> {
|
|
943
|
+
return this.containerRuntime.uploadBlob(blob, signal);
|
|
941
944
|
}
|
|
942
945
|
}
|
|
943
946
|
|
package/src/dataStoreContexts.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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";
|
|
9
9
|
import { FluidDataStoreContext, LocalFluidDataStoreContext } from "./dataStoreContext";
|
|
10
10
|
|
|
11
11
|
export class DataStoreContexts implements Iterable<[string, FluidDataStoreContext]>, IDisposable {
|
|
@@ -45,7 +45,7 @@ export class DataStoreContexts implements Iterable<[string, FluidDataStoreContex
|
|
|
45
45
|
private readonly _logger: ITelemetryLoggerExt;
|
|
46
46
|
|
|
47
47
|
constructor(baseLogger: ITelemetryBaseLogger) {
|
|
48
|
-
this._logger =
|
|
48
|
+
this._logger = createChildLogger({ logger: baseLogger });
|
|
49
49
|
}
|
|
50
50
|
|
|
51
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,12 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryBaseLogger, IDisposable } from "@fluidframework/common-definitions";
|
|
7
6
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
ITelemetryBaseLogger,
|
|
8
|
+
IDisposable,
|
|
9
|
+
IFluidHandle,
|
|
10
|
+
IRequest,
|
|
11
|
+
} from "@fluidframework/core-interfaces";
|
|
12
12
|
import { FluidObjectHandle } from "@fluidframework/datastore";
|
|
13
13
|
import { ISequencedDocumentMessage, ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
14
14
|
import {
|
|
@@ -38,15 +38,16 @@ import {
|
|
|
38
38
|
unpackChildNodesUsedRoutes,
|
|
39
39
|
} from "@fluidframework/runtime-utils";
|
|
40
40
|
import {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
createChildMonitoringContext,
|
|
42
|
+
DataCorruptionError,
|
|
43
|
+
extractSafePropertiesFromMessage,
|
|
43
44
|
LoggingError,
|
|
44
45
|
MonitoringContext,
|
|
45
|
-
|
|
46
|
+
tagCodeArtifacts,
|
|
46
47
|
} from "@fluidframework/telemetry-utils";
|
|
47
48
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
48
49
|
import { buildSnapshotTree } from "@fluidframework/driver-utils";
|
|
49
|
-
import { assert, Lazy } from "@fluidframework/
|
|
50
|
+
import { assert, Lazy } from "@fluidframework/core-utils";
|
|
50
51
|
import { v4 as uuid } from "uuid";
|
|
51
52
|
import { DataStoreContexts } from "./dataStoreContexts";
|
|
52
53
|
import {
|
|
@@ -66,7 +67,7 @@ import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs";
|
|
|
66
67
|
import { IDataStoreAliasMessage, isDataStoreAliasMessage } from "./dataStore";
|
|
67
68
|
import {
|
|
68
69
|
GCNodeType,
|
|
69
|
-
|
|
70
|
+
disableDatastoreSweepKey,
|
|
70
71
|
throwOnTombstoneLoadKey,
|
|
71
72
|
sendGCUnexpectedUsageEvent,
|
|
72
73
|
} from "./gc";
|
|
@@ -132,7 +133,7 @@ export class DataStores implements IDisposable {
|
|
|
132
133
|
private readonly aliasMap: Map<string, string>,
|
|
133
134
|
private readonly contexts: DataStoreContexts = new DataStoreContexts(baseLogger),
|
|
134
135
|
) {
|
|
135
|
-
this.mc =
|
|
136
|
+
this.mc = createChildMonitoringContext({ logger: baseLogger });
|
|
136
137
|
this.containerRuntimeHandle = new FluidObjectHandle(
|
|
137
138
|
this.runtime,
|
|
138
139
|
"/",
|
|
@@ -238,10 +239,7 @@ export class DataStores implements IDisposable {
|
|
|
238
239
|
"Duplicate DataStore created with existing id",
|
|
239
240
|
{
|
|
240
241
|
...extractSafePropertiesFromMessage(message),
|
|
241
|
-
dataStoreId:
|
|
242
|
-
value: attachMessage.id,
|
|
243
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
244
|
-
},
|
|
242
|
+
...tagCodeArtifacts({ dataStoreId: attachMessage.id }),
|
|
245
243
|
},
|
|
246
244
|
);
|
|
247
245
|
throw error;
|
|
@@ -430,8 +428,7 @@ export class DataStores implements IDisposable {
|
|
|
430
428
|
) {
|
|
431
429
|
const envelope = message.contents as IEnvelope;
|
|
432
430
|
const transformed = { ...message, contents: envelope.contents };
|
|
433
|
-
|
|
434
|
-
this.validateNotDeleted(envelope.address, request);
|
|
431
|
+
this.validateNotDeleted(envelope.address);
|
|
435
432
|
const context = this.contexts.get(envelope.address);
|
|
436
433
|
assert(!!context, 0x162 /* "There should be a store context for the op" */);
|
|
437
434
|
context.process(transformed, local, localMessageMetadata);
|
|
@@ -450,114 +447,154 @@ export class DataStores implements IDisposable {
|
|
|
450
447
|
requestHeaderData: RuntimeHeaderData,
|
|
451
448
|
): Promise<FluidDataStoreContext> {
|
|
452
449
|
const headerData = { ...defaultRuntimeHeaderData, ...requestHeaderData };
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
this.validateNotDeleted(id, request, headerData);
|
|
450
|
+
this.validateNotDeleted(id, headerData);
|
|
456
451
|
|
|
457
452
|
const context = await this.contexts.getBoundOrRemoted(id, headerData.wait);
|
|
458
453
|
if (context === undefined) {
|
|
459
454
|
// The requested data store does not exits. Throw a 404 response exception.
|
|
455
|
+
const request: IRequest = { url: id };
|
|
460
456
|
throw responseToException(create404Response(request), request);
|
|
461
457
|
}
|
|
462
458
|
|
|
463
|
-
this.validateNotTombstoned(context,
|
|
459
|
+
this.validateNotTombstoned(context, requestHeaderData);
|
|
464
460
|
|
|
465
461
|
return context;
|
|
466
462
|
}
|
|
467
463
|
|
|
468
464
|
/**
|
|
469
|
-
*
|
|
470
|
-
|
|
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.
|
|
471
487
|
* @param id - data store id
|
|
472
488
|
* @param request - the request information to log if the validation detects the data store has been deleted
|
|
473
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.
|
|
474
491
|
*/
|
|
475
|
-
private
|
|
476
|
-
id: string,
|
|
477
|
-
request: IRequest,
|
|
478
|
-
requestHeaderData?: RuntimeHeaderData,
|
|
479
|
-
) {
|
|
492
|
+
private checkIfDeleted(id: string, requestHeaderData?: RuntimeHeaderData) {
|
|
480
493
|
const dataStoreNodePath = `/${id}`;
|
|
481
|
-
if (this.isDataStoreDeleted(dataStoreNodePath)) {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
)
|
|
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)) {
|
|
486
523
|
// The requested data store is removed by gc. Create a 404 gc response exception.
|
|
487
|
-
const
|
|
524
|
+
const request: IRequest = { url: id };
|
|
525
|
+
throw responseToException(
|
|
488
526
|
createResponseError(404, "DataStore was deleted", request),
|
|
489
527
|
request,
|
|
490
528
|
);
|
|
491
|
-
sendGCUnexpectedUsageEvent(
|
|
492
|
-
this.mc,
|
|
493
|
-
{
|
|
494
|
-
eventName: "GC_Deleted_DataStore_Requested",
|
|
495
|
-
category: "error",
|
|
496
|
-
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
497
|
-
headers: JSON.stringify(requestHeaderData),
|
|
498
|
-
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
499
|
-
},
|
|
500
|
-
undefined /** packagePath */,
|
|
501
|
-
error,
|
|
502
|
-
);
|
|
503
|
-
throw error;
|
|
504
529
|
}
|
|
505
530
|
}
|
|
506
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
|
+
|
|
507
561
|
/**
|
|
508
562
|
* Validates that the data store context requested has not been marked as tombstone by GC.
|
|
509
|
-
*
|
|
510
563
|
* @param context - the data store context in question
|
|
511
564
|
* @param request - the request information to log if the validation detects the data store has been tombstoned
|
|
512
|
-
* @param
|
|
565
|
+
* @param requestHeaderData - the request header information to log if the validation detects the data store has been tombstoned
|
|
513
566
|
*/
|
|
514
567
|
private validateNotTombstoned(
|
|
515
568
|
context: FluidDataStoreContext,
|
|
516
|
-
|
|
517
|
-
headerData: RuntimeHeaderData,
|
|
569
|
+
requestHeaderData: RuntimeHeaderData,
|
|
518
570
|
) {
|
|
519
|
-
if (context
|
|
520
|
-
const shouldFail = this.throwOnTombstoneLoad && !headerData.allowTombstone;
|
|
521
|
-
|
|
571
|
+
if (this.checkIfTombstoned(context, requestHeaderData)) {
|
|
522
572
|
// The requested data store is removed by gc. Create a 404 gc response exception.
|
|
573
|
+
const request: IRequest = { url: context.id };
|
|
523
574
|
const error = responseToException(
|
|
524
575
|
createResponseError(404, "DataStore was deleted", request, {
|
|
525
576
|
[TombstoneResponseHeaderKey]: true,
|
|
526
577
|
}),
|
|
527
578
|
request,
|
|
528
579
|
);
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
{
|
|
532
|
-
eventName: "GC_Tombstone_DataStore_Requested",
|
|
533
|
-
category: shouldFail ? "error" : "generic",
|
|
534
|
-
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
535
|
-
headers: JSON.stringify(headerData),
|
|
536
|
-
gcTombstoneEnforcementAllowed: this.runtime.gcTombstoneEnforcementAllowed,
|
|
537
|
-
},
|
|
538
|
-
context.isLoaded ? context.packagePath : undefined,
|
|
539
|
-
error,
|
|
540
|
-
);
|
|
541
|
-
|
|
542
|
-
if (shouldFail) {
|
|
580
|
+
// Throw an error if configured via options and via request headers.
|
|
581
|
+
if (this.throwOnTombstoneLoad && !requestHeaderData.allowTombstone) {
|
|
543
582
|
throw error;
|
|
544
583
|
}
|
|
545
584
|
}
|
|
546
585
|
}
|
|
547
586
|
|
|
548
|
-
public processSignal(
|
|
549
|
-
|
|
550
|
-
this.
|
|
551
|
-
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);
|
|
552
590
|
if (!context) {
|
|
553
591
|
// Attach message may not have been processed yet
|
|
554
592
|
assert(!local, 0x163 /* "Missing datastore for local signal" */);
|
|
555
593
|
this.mc.logger.sendTelemetryEvent({
|
|
556
594
|
eventName: "SignalFluidDataStoreNotFound",
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
},
|
|
595
|
+
...tagCodeArtifacts({
|
|
596
|
+
fluidDataStoreId,
|
|
597
|
+
}),
|
|
561
598
|
});
|
|
562
599
|
return;
|
|
563
600
|
}
|
|
@@ -566,7 +603,7 @@ export class DataStores implements IDisposable {
|
|
|
566
603
|
}
|
|
567
604
|
|
|
568
605
|
public setConnectionState(connected: boolean, clientId?: string) {
|
|
569
|
-
for (const [
|
|
606
|
+
for (const [fluidDataStoreId, context] of this.contexts) {
|
|
570
607
|
try {
|
|
571
608
|
context.setConnectionState(connected, clientId);
|
|
572
609
|
} catch (error) {
|
|
@@ -574,7 +611,9 @@ export class DataStores implements IDisposable {
|
|
|
574
611
|
{
|
|
575
612
|
eventName: "SetConnectionStateError",
|
|
576
613
|
clientId,
|
|
577
|
-
|
|
614
|
+
...tagCodeArtifacts({
|
|
615
|
+
fluidDataStoreId,
|
|
616
|
+
}),
|
|
578
617
|
details: JSON.stringify({
|
|
579
618
|
runtimeConnected: this.runtime.connected,
|
|
580
619
|
connected,
|
|
@@ -781,11 +820,11 @@ export class DataStores implements IDisposable {
|
|
|
781
820
|
* Delete data stores and its objects that are sweep ready.
|
|
782
821
|
* @param sweepReadyDataStoreRoutes - The routes of data stores and its objects that are sweep ready and should
|
|
783
822
|
* be deleted.
|
|
784
|
-
* @returns
|
|
823
|
+
* @returns The routes of data stores and its objects that were deleted.
|
|
785
824
|
*/
|
|
786
825
|
public deleteSweepReadyNodes(sweepReadyDataStoreRoutes: string[]): string[] {
|
|
787
826
|
// If sweep for data stores is not enabled, return empty list indicating nothing is deleted.
|
|
788
|
-
if (this.mc.config.getBoolean(
|
|
827
|
+
if (this.mc.config.getBoolean(disableDatastoreSweepKey) === true) {
|
|
789
828
|
return [];
|
|
790
829
|
}
|
|
791
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
|
+
}
|