@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
|
@@ -3,56 +3,48 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
6
|
+
import { ITelemetryLoggerExt, TelemetryDataTag } from "@fluidframework/telemetry-utils";
|
|
7
7
|
import { ISnapshotTree, ISummaryTree, SummaryObject } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { channelsTreeName, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
export interface IRefreshSummaryResult {
|
|
11
|
+
/** Tells whether this summary is tracked by this client. */
|
|
12
|
+
isSummaryTracked: boolean;
|
|
13
|
+
/** Tells whether this summary is newer than the latest one tracked by this client. */
|
|
14
|
+
isSummaryNewer: boolean;
|
|
15
|
+
}
|
|
10
16
|
|
|
11
17
|
/**
|
|
12
|
-
* Return type of
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* 2. The latest summary was updated and the summary corresponding to the params was tracked by this client.
|
|
17
|
-
*
|
|
18
|
-
* 3. The latest summary was updated but the summary corresponding to the params was not tracked. In this case, the
|
|
19
|
-
* latest snapshot is fetched and the latest summary state is updated based on it.
|
|
18
|
+
* Return type of validateSummary function. In case of success, the object returned should have success: true.
|
|
19
|
+
* In case of failure, the object returned should have success: false and additional properties to indicate what
|
|
20
|
+
* the failure was, where it was, can it be retried, etc.
|
|
20
21
|
*/
|
|
21
|
-
export type
|
|
22
|
-
| {
|
|
23
|
-
latestSummaryUpdated: false;
|
|
24
|
-
}
|
|
22
|
+
export type ValidateSummaryResult =
|
|
25
23
|
| {
|
|
26
|
-
|
|
27
|
-
wasSummaryTracked: true;
|
|
28
|
-
summaryRefSeq: number;
|
|
24
|
+
success: true;
|
|
29
25
|
}
|
|
30
26
|
| {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
success: false;
|
|
28
|
+
/** The failure reason */
|
|
29
|
+
reason: string;
|
|
30
|
+
/** id of the node that failed during validation */
|
|
31
|
+
id: {
|
|
32
|
+
tag: TelemetryDataTag.CodeArtifact;
|
|
33
|
+
value: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
/** If the error can be retried, time to wait before retrying */
|
|
36
|
+
retryAfterSeconds?: number;
|
|
35
37
|
};
|
|
36
38
|
|
|
37
|
-
/**
|
|
38
|
-
* Result of snapshot fetch during refreshing latest summary state.
|
|
39
|
-
*/
|
|
40
|
-
export interface IFetchSnapshotResult {
|
|
41
|
-
snapshotTree: ISnapshotTree;
|
|
42
|
-
snapshotRefSeq: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
39
|
export interface ISummarizerNodeRootContract {
|
|
46
40
|
startSummary(referenceSequenceNumber: number, summaryLogger: ITelemetryLoggerExt): void;
|
|
47
|
-
|
|
41
|
+
validateSummary(): ValidateSummaryResult;
|
|
42
|
+
completeSummary(proposalHandle: string, validate: boolean): void;
|
|
48
43
|
clearSummary(): void;
|
|
49
44
|
refreshLatestSummary(
|
|
50
|
-
proposalHandle: string
|
|
45
|
+
proposalHandle: string,
|
|
51
46
|
summaryRefSeq: number,
|
|
52
|
-
|
|
53
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
54
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
55
|
-
): Promise<RefreshSummaryResult>;
|
|
47
|
+
): Promise<IRefreshSummaryResult>;
|
|
56
48
|
}
|
|
57
49
|
|
|
58
50
|
/** Path for nodes in a tree with escaped special characters */
|
|
@@ -7,12 +7,11 @@ import {
|
|
|
7
7
|
ITelemetryLoggerExt,
|
|
8
8
|
LoggingError,
|
|
9
9
|
TelemetryDataTag,
|
|
10
|
+
tagCodeArtifacts,
|
|
10
11
|
} from "@fluidframework/telemetry-utils";
|
|
11
|
-
import { assert, LazyPromise } from "@fluidframework/
|
|
12
|
-
import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
12
|
+
import { assert, LazyPromise } from "@fluidframework/core-utils";
|
|
13
13
|
import {
|
|
14
14
|
CreateChildSummarizerNodeParam,
|
|
15
|
-
gcTreeKey,
|
|
16
15
|
IGarbageCollectionData,
|
|
17
16
|
IGarbageCollectionDetailsBase,
|
|
18
17
|
ISummarizeInternalResult,
|
|
@@ -23,21 +22,17 @@ import {
|
|
|
23
22
|
ITelemetryContext,
|
|
24
23
|
IExperimentalIncrementalSummaryContext,
|
|
25
24
|
} from "@fluidframework/runtime-definitions";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
getGCDataFromSnapshot,
|
|
30
|
-
runGarbageCollection,
|
|
31
|
-
unpackChildNodesGCDetails,
|
|
32
|
-
} from "../../gc";
|
|
25
|
+
import { unpackChildNodesUsedRoutes } from "@fluidframework/runtime-utils";
|
|
26
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
27
|
+
import { cloneGCData, unpackChildNodesGCDetails } from "../../gc";
|
|
33
28
|
import { SummarizerNode } from "./summarizerNode";
|
|
34
29
|
import {
|
|
35
30
|
EscapedPath,
|
|
36
31
|
ICreateChildDetails,
|
|
37
32
|
IInitialSummary,
|
|
38
33
|
ISummarizerNodeRootContract,
|
|
39
|
-
parseSummaryForSubtrees,
|
|
40
34
|
SummaryNode,
|
|
35
|
+
ValidateSummaryResult,
|
|
41
36
|
} from "./summarizerNodeUtils";
|
|
42
37
|
|
|
43
38
|
export interface IRootSummarizerNodeWithGC
|
|
@@ -47,7 +42,7 @@ export interface IRootSummarizerNodeWithGC
|
|
|
47
42
|
// Extend SummaryNode to add used routes tracking to it.
|
|
48
43
|
class SummaryNodeWithGC extends SummaryNode {
|
|
49
44
|
constructor(
|
|
50
|
-
public readonly serializedUsedRoutes: string,
|
|
45
|
+
public readonly serializedUsedRoutes: string | undefined,
|
|
51
46
|
summary: {
|
|
52
47
|
readonly referenceSequenceNumber: number;
|
|
53
48
|
readonly basePath: EscapedPath | undefined;
|
|
@@ -105,7 +100,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
105
100
|
* Use createRootSummarizerNodeWithGC to create root node, or createChild to create child nodes.
|
|
106
101
|
*/
|
|
107
102
|
public constructor(
|
|
108
|
-
logger:
|
|
103
|
+
logger: ITelemetryBaseLogger,
|
|
109
104
|
private readonly summarizeFn: (
|
|
110
105
|
fullTree: boolean,
|
|
111
106
|
trackState: boolean,
|
|
@@ -117,7 +112,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
117
112
|
/** Undefined means created without summary */
|
|
118
113
|
latestSummary?: SummaryNode,
|
|
119
114
|
initialSummary?: IInitialSummary,
|
|
120
|
-
wipSummaryLogger?:
|
|
115
|
+
wipSummaryLogger?: ITelemetryBaseLogger,
|
|
121
116
|
private readonly getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
122
117
|
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,
|
|
123
118
|
/** A unique id of this node to be logged when sending telemetry. */
|
|
@@ -255,45 +250,86 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
255
250
|
super.startSummary(referenceSequenceNumber, summaryLogger);
|
|
256
251
|
}
|
|
257
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Validates that the in-progress summary is correct for all nodes, i.e., GC should have run for non-skipped nodes.
|
|
255
|
+
* @param parentSkipRecursion - true if the parent of this node skipped recursing the child nodes when running GC.
|
|
256
|
+
* In that case, the children will not have work-in-progress state.
|
|
257
|
+
*
|
|
258
|
+
* @returns ValidateSummaryResult which contains a boolean success indicating whether the validation was successful.
|
|
259
|
+
* In case of failure, additional information is returned indicating type of failure and where it was.
|
|
260
|
+
*/
|
|
261
|
+
protected validateSummaryCore(parentSkipRecursion: boolean): ValidateSummaryResult {
|
|
262
|
+
if (this.wasGCMissed()) {
|
|
263
|
+
return {
|
|
264
|
+
success: false,
|
|
265
|
+
reason: "NodeDidNotRunGC",
|
|
266
|
+
id: {
|
|
267
|
+
tag: TelemetryDataTag.CodeArtifact,
|
|
268
|
+
value: this.telemetryNodeId,
|
|
269
|
+
},
|
|
270
|
+
// These errors are usually transient and should go away when summarize / GC is retried.
|
|
271
|
+
retryAfterSeconds: 1,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
return super.validateSummaryCore(parentSkipRecursion);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
private wasGCMissed(): boolean {
|
|
278
|
+
// If GC is disabled, it should not have run so it was not missed.
|
|
279
|
+
// Otherwise, GC should have been called on this node and wipSerializedUsedRoutes must be set.
|
|
280
|
+
if (this.gcDisabled || this.wipSerializedUsedRoutes !== undefined) {
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* The absence of wip used routes indicates that GC was not run on this node. This can happen if:
|
|
285
|
+
* 1. A child node was created after GC was already run on the parent. For example, a data store
|
|
286
|
+
* is realized (loaded) after GC was run on it creating summarizer nodes for its DDSes. In this
|
|
287
|
+
* case, the parent will pass on used routes to the child nodes and it will have wip used routes.
|
|
288
|
+
* 2. A new node was created but GC was never run on it. This can mean that the GC data generated
|
|
289
|
+
* during summarize is incomplete.
|
|
290
|
+
*
|
|
291
|
+
* This happens due to scenarios such as data store created during summarize. Such errors should go away when
|
|
292
|
+
* summarize is attempted again.
|
|
293
|
+
*/
|
|
294
|
+
return true;
|
|
295
|
+
}
|
|
296
|
+
|
|
258
297
|
/**
|
|
259
298
|
* Called after summary has been uploaded to the server. Add the work-in-progress state to the pending
|
|
260
299
|
* summary queue. We track this until we get an ack from the server for this summary.
|
|
300
|
+
* @param proposalHandle - The handle of the summary that was uploaded to the server.
|
|
301
|
+
* @param parentPath - The path of the parent node which is used to build the path of this node.
|
|
302
|
+
* @param parentSkipRecursion - true if the parent of this node skipped recursing the child nodes when summarizing.
|
|
303
|
+
* In that case, the children will not have work-in-progress state.
|
|
304
|
+
* @param validate - true to validate that the in-progress summary is correct for all nodes.
|
|
261
305
|
*/
|
|
262
306
|
protected completeSummaryCore(
|
|
263
307
|
proposalHandle: string,
|
|
264
308
|
parentPath: EscapedPath | undefined,
|
|
265
309
|
parentSkipRecursion: boolean,
|
|
310
|
+
validate: boolean,
|
|
266
311
|
) {
|
|
312
|
+
if (validate && this.wasGCMissed()) {
|
|
313
|
+
this.throwUnexpectedError({
|
|
314
|
+
eventName: "NodeDidNotRunGC",
|
|
315
|
+
proposalHandle,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
267
319
|
let wipSerializedUsedRoutes: string | undefined;
|
|
268
320
|
// If GC is disabled, don't set wip used routes.
|
|
269
321
|
if (!this.gcDisabled) {
|
|
270
322
|
wipSerializedUsedRoutes = this.wipSerializedUsedRoutes;
|
|
271
|
-
/**
|
|
272
|
-
* The absence of wip used routes indicates that GC was not run on this node. This can happen if:
|
|
273
|
-
* 1. A child node was created after GC was already run on the parent. For example, a data store
|
|
274
|
-
* is realized (loaded) after GC was run on it creating summarizer nodes for its DDSes. In this
|
|
275
|
-
* case, the used routes of the parent should be passed on the child nodes and it should be fine.
|
|
276
|
-
* 2. A new node was created but GC was never run on it. This can mean that the GC data generated
|
|
277
|
-
* during summarize is complete . We should not continue, log and throw an error. This will help us
|
|
278
|
-
* identify these cases and take appropriate action.
|
|
279
|
-
*/
|
|
280
|
-
if (wipSerializedUsedRoutes === undefined) {
|
|
281
|
-
this.throwUnexpectedError({
|
|
282
|
-
eventName: "NodeDidNotRunGC",
|
|
283
|
-
proposalHandle,
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
323
|
}
|
|
287
324
|
|
|
288
|
-
super.completeSummaryCore(proposalHandle, parentPath, parentSkipRecursion);
|
|
325
|
+
super.completeSummaryCore(proposalHandle, parentPath, parentSkipRecursion, validate);
|
|
289
326
|
|
|
290
327
|
// If GC is disabled, skip setting pending summary with GC state.
|
|
291
328
|
if (!this.gcDisabled) {
|
|
292
329
|
const summaryNode = this.pendingSummaries.get(proposalHandle);
|
|
293
330
|
if (summaryNode !== undefined) {
|
|
294
331
|
const summaryNodeWithGC = new SummaryNodeWithGC(
|
|
295
|
-
|
|
296
|
-
wipSerializedUsedRoutes!,
|
|
332
|
+
wipSerializedUsedRoutes,
|
|
297
333
|
summaryNode,
|
|
298
334
|
);
|
|
299
335
|
this.pendingSummaries.set(proposalHandle, summaryNodeWithGC);
|
|
@@ -327,10 +363,9 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
327
363
|
const error = new LoggingError("MissingGCStateInPendingSummary", {
|
|
328
364
|
proposalHandle,
|
|
329
365
|
referenceSequenceNumber,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
},
|
|
366
|
+
...tagCodeArtifacts({
|
|
367
|
+
id: this.telemetryNodeId,
|
|
368
|
+
}),
|
|
334
369
|
});
|
|
335
370
|
this.logger.sendErrorEvent(
|
|
336
371
|
{
|
|
@@ -347,117 +382,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
347
382
|
return super.refreshLatestSummaryFromPending(proposalHandle, referenceSequenceNumber);
|
|
348
383
|
}
|
|
349
384
|
|
|
350
|
-
/**
|
|
351
|
-
* Called when we need to upload the reference state from the given summary.
|
|
352
|
-
*/
|
|
353
|
-
protected async refreshLatestSummaryFromSnapshot(
|
|
354
|
-
referenceSequenceNumber: number,
|
|
355
|
-
snapshotTree: ISnapshotTree,
|
|
356
|
-
basePath: EscapedPath | undefined,
|
|
357
|
-
localPath: EscapedPath,
|
|
358
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
359
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
360
|
-
): Promise<void> {
|
|
361
|
-
await this.refreshGCStateFromSnapshot(
|
|
362
|
-
referenceSequenceNumber,
|
|
363
|
-
snapshotTree,
|
|
364
|
-
readAndParseBlob,
|
|
365
|
-
);
|
|
366
|
-
return super.refreshLatestSummaryFromSnapshot(
|
|
367
|
-
referenceSequenceNumber,
|
|
368
|
-
snapshotTree,
|
|
369
|
-
basePath,
|
|
370
|
-
localPath,
|
|
371
|
-
correlatedSummaryLogger,
|
|
372
|
-
readAndParseBlob,
|
|
373
|
-
);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Updates GC state from the given snapshot if GC is enabled and the snapshot is newer than the one this node
|
|
378
|
-
* is tracking.
|
|
379
|
-
*/
|
|
380
|
-
private async refreshGCStateFromSnapshot(
|
|
381
|
-
referenceSequenceNumber: number,
|
|
382
|
-
snapshotTree: ISnapshotTree,
|
|
383
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
384
|
-
): Promise<void> {
|
|
385
|
-
// If GC is disabled or we have seen a newer summary, skip updating GC state.
|
|
386
|
-
if (this.gcDisabled || this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
// Load the base GC details before proceeding because if that happens later it can overwrite the GC details
|
|
391
|
-
// written by the following code.
|
|
392
|
-
await this.loadBaseGCDetails();
|
|
393
|
-
|
|
394
|
-
// Possible re-entrancy. We may already have processed this while loading base GC details.
|
|
395
|
-
if (this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* GC data is written at root of the snapshot tree under "gc" sub-tree. This data needs to be propagated to
|
|
401
|
-
* all the nodes in the container.
|
|
402
|
-
* The root summarizer node reads the GC data from the "gc" sub-tree, runs GC on it to get used routes in
|
|
403
|
-
* the container and updates its GC data and referenced used routes. It then gets the GC data and used
|
|
404
|
-
* routes of all its children and adds it to their snapshot tree.
|
|
405
|
-
* All the other nodes gets the GC data and used routes from their snapshot tree and updates their state.
|
|
406
|
-
* They get the GC data and used routes of their children and add it to their snapshot tree and so on.
|
|
407
|
-
*
|
|
408
|
-
* Note that if the snapshot does not have GC tree, GC data will be set to undefined and used routes will be
|
|
409
|
-
* set to self-route (meaning referenced) for all nodes. This is important because the GC data needs to be
|
|
410
|
-
* regenerated in the next summary.
|
|
411
|
-
*/
|
|
412
|
-
let gcDetails: IGarbageCollectionDetailsBase | undefined;
|
|
413
|
-
const gcSnapshotTree = snapshotTree.trees[gcTreeKey];
|
|
414
|
-
if (gcSnapshotTree !== undefined) {
|
|
415
|
-
// If there is a GC tree in the snapshot, this is the root summarizer node. Read GC data from the tree
|
|
416
|
-
// process it as explained above.
|
|
417
|
-
const gcSnapshotData = await getGCDataFromSnapshot(gcSnapshotTree, readAndParseBlob);
|
|
418
|
-
|
|
419
|
-
if (gcSnapshotData.gcState !== undefined) {
|
|
420
|
-
const gcNodes: { [id: string]: string[] } = {};
|
|
421
|
-
for (const [nodeId, nodeData] of Object.entries(gcSnapshotData.gcState.gcNodes)) {
|
|
422
|
-
gcNodes[nodeId] = Array.from(nodeData.outboundRoutes);
|
|
423
|
-
}
|
|
424
|
-
// Run GC on the nodes in the snapshot to get the used routes for each node in the container.
|
|
425
|
-
const usedRoutes = runGarbageCollection(gcNodes, ["/"]).referencedNodeIds;
|
|
426
|
-
gcDetails = { gcData: { gcNodes }, usedRoutes };
|
|
427
|
-
}
|
|
428
|
-
} else {
|
|
429
|
-
// If there is a GC blob in the snapshot, it's a non-root summarizer nodes - The root summarizer node
|
|
430
|
-
// writes GC blob in the snapshot of child nodes. Get GC data and used routes from the blob.
|
|
431
|
-
const gcDetailsBlob = snapshotTree.blobs[gcTreeKey];
|
|
432
|
-
if (gcDetailsBlob !== undefined) {
|
|
433
|
-
gcDetails = JSON.parse(gcDetailsBlob) as IGarbageCollectionDetailsBase;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
// Update this node to the same GC state it was when the ack corresponding to this summary was processed.
|
|
438
|
-
this.gcData = gcDetails?.gcData !== undefined ? cloneGCData(gcDetails.gcData) : undefined;
|
|
439
|
-
this.referenceUsedRoutes =
|
|
440
|
-
gcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : undefined;
|
|
441
|
-
// If there are no used routes in the GC details, set it to have self route which will make the node
|
|
442
|
-
// referenced. This scenario can only happen if the snapshot is from a client where GC was not run or
|
|
443
|
-
// disabled. In both the cases, the node should be referenced.
|
|
444
|
-
this.usedRoutes =
|
|
445
|
-
gcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : [""];
|
|
446
|
-
|
|
447
|
-
if (gcDetails === undefined) {
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// Generate the GC data and used routes of children GC nodes and add it to their snapshot tree.
|
|
452
|
-
const gcDetailsMap = unpackChildNodesGCDetails(gcDetails);
|
|
453
|
-
const { childrenTree } = parseSummaryForSubtrees(snapshotTree);
|
|
454
|
-
gcDetailsMap.forEach((childGCDetails: IGarbageCollectionDetailsBase, childId: string) => {
|
|
455
|
-
if (childrenTree.trees[childId] !== undefined) {
|
|
456
|
-
childrenTree.trees[childId].blobs[gcTreeKey] = JSON.stringify(childGCDetails);
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
|
|
461
385
|
/**
|
|
462
386
|
* Override the createChild method to return an instance of SummarizerNodeWithGC.
|
|
463
387
|
*/
|
|
@@ -623,7 +547,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
623
547
|
* @param baseGCDetailsP - Function to get the initial GC details of this node
|
|
624
548
|
*/
|
|
625
549
|
export const createRootSummarizerNodeWithGC = (
|
|
626
|
-
logger:
|
|
550
|
+
logger: ITelemetryBaseLogger,
|
|
627
551
|
summarizeInternalFn: SummarizeInternalFn,
|
|
628
552
|
changeSequenceNumber: number,
|
|
629
553
|
referenceSequenceNumber: number | undefined,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IEvent, IEventProvider, ITelemetryProperties } from "@fluidframework/
|
|
6
|
+
import { IEvent, IEventProvider, ITelemetryProperties } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { ITelemetryLoggerExt, ITelemetryLoggerPropertyBag } from "@fluidframework/telemetry-utils";
|
|
8
8
|
import { ContainerWarning, IDeltaManager } from "@fluidframework/container-definitions";
|
|
9
9
|
import {
|
|
@@ -33,6 +33,20 @@ export interface ICancellationToken<T> {
|
|
|
33
33
|
/* Similar to AbortSignal, but using promise instead of events */
|
|
34
34
|
export type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Data required to update internal tracking state after receiving a Summary Ack.
|
|
38
|
+
*/
|
|
39
|
+
export interface IRefreshSummaryAckOptions {
|
|
40
|
+
/** Handle from the ack's summary op. */
|
|
41
|
+
readonly proposalHandle: string | undefined;
|
|
42
|
+
/** Handle from the summary ack just received */
|
|
43
|
+
readonly ackHandle: string;
|
|
44
|
+
/** Reference sequence number from the ack's summary op */
|
|
45
|
+
readonly summaryRefSeq: number;
|
|
46
|
+
/** Telemetry logger to which telemetry events will be forwarded. */
|
|
47
|
+
readonly summaryLogger: ITelemetryLoggerExt;
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
export interface ISummarizerInternalsProvider {
|
|
37
51
|
/** Encapsulates the work to walk the internals of the running container to generate a summary */
|
|
38
52
|
submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
|
|
@@ -87,29 +101,21 @@ export interface ISummarizerRuntime extends IConnectableRuntime {
|
|
|
87
101
|
export interface ISummarizeOptions {
|
|
88
102
|
/** True to generate the full tree with no handle reuse optimizations; defaults to false */
|
|
89
103
|
readonly fullTree?: boolean;
|
|
90
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* True to ask the server what the latest summary is first; defaults to false
|
|
106
|
+
*
|
|
107
|
+
* @deprecated - Summarize will not refresh latest snapshot state anymore.
|
|
108
|
+
*/
|
|
91
109
|
readonly refreshLatestAck?: boolean;
|
|
92
110
|
}
|
|
93
111
|
|
|
94
|
-
/**
|
|
95
|
-
* Data required to update internal tracking state after receiving a Summary Ack.
|
|
96
|
-
*/
|
|
97
|
-
export interface IRefreshSummaryAckOptions {
|
|
98
|
-
/** Handle from the ack's summary op. */
|
|
99
|
-
readonly proposalHandle: string | undefined;
|
|
100
|
-
/** Handle from the summary ack just received */
|
|
101
|
-
readonly ackHandle: string;
|
|
102
|
-
/** Reference sequence number from the ack's summary op */
|
|
103
|
-
readonly summaryRefSeq: number;
|
|
104
|
-
/** Telemetry logger to which telemetry events will be forwarded. */
|
|
105
|
-
readonly summaryLogger: ITelemetryLoggerExt;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
112
|
export interface ISubmitSummaryOptions extends ISummarizeOptions {
|
|
109
113
|
/** Logger to use for correlated summary events */
|
|
110
114
|
readonly summaryLogger: ITelemetryLoggerExt;
|
|
111
115
|
/** Tells when summary process should be cancelled */
|
|
112
116
|
readonly cancellationToken: ISummaryCancellationToken;
|
|
117
|
+
/** Summarization may be attempted multiple times. This tells whether this is the final summarization attempt. */
|
|
118
|
+
readonly finalAttempt?: boolean;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
export interface IOnDemandSummarizeOptions extends ISummarizeOptions {
|
|
@@ -213,6 +219,19 @@ export type SubmitSummaryResult =
|
|
|
213
219
|
| IUploadSummaryResult
|
|
214
220
|
| ISubmitSummaryOpResult;
|
|
215
221
|
|
|
222
|
+
/** The stages of Summarize, used to describe how far progress succeeded in case of a failure at a later stage. */
|
|
223
|
+
export type SummaryStage = SubmitSummaryResult["stage"] | "unknown";
|
|
224
|
+
|
|
225
|
+
/** Type for summarization failures that are retriable. */
|
|
226
|
+
export interface IRetriableFailureResult {
|
|
227
|
+
readonly retryAfterSeconds?: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/** The data in summarizer result when submit summary stage fails. */
|
|
231
|
+
export interface SubmitSummaryFailureData extends IRetriableFailureResult {
|
|
232
|
+
stage: SummaryStage;
|
|
233
|
+
}
|
|
234
|
+
|
|
216
235
|
export interface IBroadcastSummaryResult {
|
|
217
236
|
readonly summarizeOp: ISummaryOpMessage;
|
|
218
237
|
readonly broadcastDuration: number;
|
|
@@ -223,7 +242,7 @@ export interface IAckSummaryResult {
|
|
|
223
242
|
readonly ackNackDuration: number;
|
|
224
243
|
}
|
|
225
244
|
|
|
226
|
-
export interface INackSummaryResult {
|
|
245
|
+
export interface INackSummaryResult extends IRetriableFailureResult {
|
|
227
246
|
readonly summaryNackOp: ISummaryNackMessage;
|
|
228
247
|
readonly ackNackDuration: number;
|
|
229
248
|
}
|
|
@@ -238,12 +257,13 @@ export type SummarizeResultPart<TSuccess, TFailure = undefined> =
|
|
|
238
257
|
data: TFailure | undefined;
|
|
239
258
|
message: string;
|
|
240
259
|
error: any;
|
|
241
|
-
retryAfterSeconds?: number;
|
|
242
260
|
};
|
|
243
261
|
|
|
244
262
|
export interface ISummarizeResults {
|
|
245
263
|
/** Resolves when we generate, upload, and submit the summary. */
|
|
246
|
-
readonly summarySubmitted: Promise<
|
|
264
|
+
readonly summarySubmitted: Promise<
|
|
265
|
+
SummarizeResultPart<SubmitSummaryResult, SubmitSummaryFailureData>
|
|
266
|
+
>;
|
|
247
267
|
/** Resolves when we observe our summarize op broadcast. */
|
|
248
268
|
readonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;
|
|
249
269
|
/** Resolves when we receive a summaryAck or summaryNack. */
|
|
@@ -305,11 +325,14 @@ export type SummarizerStopReason =
|
|
|
305
325
|
*/
|
|
306
326
|
| "latestSummaryStateStale";
|
|
307
327
|
|
|
328
|
+
export interface ISummarizeEventProps {
|
|
329
|
+
result: "success" | "failure" | "canceled";
|
|
330
|
+
currentAttempt: number;
|
|
331
|
+
maxAttempts: number;
|
|
332
|
+
error?: any;
|
|
333
|
+
}
|
|
308
334
|
export interface ISummarizerEvents extends IEvent {
|
|
309
|
-
|
|
310
|
-
* An event indicating that the Summarizer is having problems summarizing
|
|
311
|
-
*/
|
|
312
|
-
(event: "summarizingError", listener: (error: ISummarizingWarning) => void);
|
|
335
|
+
(event: "summarize", listener: (props: ISummarizeEventProps) => void);
|
|
313
336
|
}
|
|
314
337
|
|
|
315
338
|
export interface ISummarizer extends IEventProvider<ISummarizerEvents> {
|
|
@@ -427,7 +450,7 @@ export interface ISummarizeHeuristicRunner {
|
|
|
427
450
|
|
|
428
451
|
type ISummarizeTelemetryRequiredProperties =
|
|
429
452
|
/** Reason code for attempting to summarize */
|
|
430
|
-
"
|
|
453
|
+
"summarizeReason";
|
|
431
454
|
|
|
432
455
|
type ISummarizeTelemetryOptionalProperties =
|
|
433
456
|
/** Number of attempts within the last time window, used for calculating the throttle delay. */
|
|
@@ -436,6 +459,8 @@ type ISummarizeTelemetryOptionalProperties =
|
|
|
436
459
|
| "summaryAttemptsPerPhase"
|
|
437
460
|
/** One-based count of phases we've attempted (used to index into an array of ISummarizeOptions */
|
|
438
461
|
| "summaryAttemptPhase"
|
|
462
|
+
/** Summarization may be attempted multiple times. This tells whether this is the final summarization attempt */
|
|
463
|
+
| "finalAttempt"
|
|
439
464
|
| keyof ISummarizeOptions;
|
|
440
465
|
|
|
441
466
|
export type ISummarizeTelemetryProperties = Pick<
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IDisposable, IEvent } from "@fluidframework/
|
|
6
|
+
import { IDisposable, IEvent } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
8
|
-
import { Deferred, assert
|
|
8
|
+
import { Deferred, assert } from "@fluidframework/core-utils";
|
|
9
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
9
10
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
10
11
|
import {
|
|
11
12
|
IDocumentMessage,
|
|
@@ -71,7 +72,9 @@ class Summary implements ISummary {
|
|
|
71
72
|
return new Summary(clientId, clientSequenceNumber);
|
|
72
73
|
}
|
|
73
74
|
public static createFromOp(op: ISummaryOpMessage) {
|
|
74
|
-
|
|
75
|
+
// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
77
|
+
const summary = new Summary(op.clientId as string, op.clientSequenceNumber);
|
|
75
78
|
summary.broadcast(op);
|
|
76
79
|
return summary;
|
|
77
80
|
}
|
|
@@ -377,7 +380,9 @@ export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEve
|
|
|
377
380
|
let summary: Summary | undefined;
|
|
378
381
|
|
|
379
382
|
// Check if summary already being watched, broadcast if so
|
|
380
|
-
|
|
383
|
+
// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)
|
|
384
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
385
|
+
const watcher = this.summaryWatchers.get(op.clientId as string);
|
|
381
386
|
if (watcher) {
|
|
382
387
|
summary = watcher.tryGetSummary(op.clientSequenceNumber);
|
|
383
388
|
if (summary) {
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/
|
|
6
|
+
import { assert } from "@fluidframework/core-utils";
|
|
7
7
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
readAndParse,
|
|
10
|
+
blobHeadersBlobName as blobNameForBlobHeaders,
|
|
11
|
+
} from "@fluidframework/driver-utils";
|
|
9
12
|
import {
|
|
10
13
|
ISequencedDocumentMessage,
|
|
11
14
|
ISnapshotTree,
|
|
@@ -153,6 +156,7 @@ export const chunksBlobName = ".chunks";
|
|
|
153
156
|
export const electedSummarizerBlobName = ".electedSummarizer";
|
|
154
157
|
export const blobsTreeName = ".blobs";
|
|
155
158
|
export const idCompressorBlobName = ".idCompressor";
|
|
159
|
+
export const blobHeadersBlobName = blobNameForBlobHeaders;
|
|
156
160
|
|
|
157
161
|
export function rootHasIsolatedChannels(metadata?: IContainerRuntimeMetadata): boolean {
|
|
158
162
|
return !!metadata && !metadata.disableIsolatedChannels;
|
|
@@ -183,7 +187,9 @@ export const dataStoreAttributesBlobName = ".component";
|
|
|
183
187
|
* @param summarizeResult - Summary tree and stats to modify
|
|
184
188
|
*
|
|
185
189
|
* @example
|
|
190
|
+
*
|
|
186
191
|
* Converts from:
|
|
192
|
+
*
|
|
187
193
|
* ```typescript
|
|
188
194
|
* {
|
|
189
195
|
* type: SummaryType.Tree,
|
|
@@ -204,6 +210,7 @@ export const dataStoreAttributesBlobName = ".component";
|
|
|
204
210
|
* },
|
|
205
211
|
* }
|
|
206
212
|
* ```
|
|
213
|
+
*
|
|
207
214
|
* And adds +1 to treeNodeCount in stats.
|
|
208
215
|
*/
|
|
209
216
|
export function wrapSummaryInChannelsTree(summarizeResult: ISummaryTreeWithStats): void {
|