@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
|
@@ -2,28 +2,25 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
10
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
11
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12
|
-
t[p[i]] = s[p[i]];
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
};
|
|
16
|
-
import { ChildLogger, isFluidError, loggerToMonitoringContext, } from "@fluidframework/telemetry-utils";
|
|
17
|
-
import { assert, delay, Deferred, PromiseTimer } from "@fluidframework/common-utils";
|
|
18
|
-
import { UsageError } from "@fluidframework/container-utils";
|
|
19
|
-
import { DriverErrorType } from "@fluidframework/driver-definitions";
|
|
20
|
-
import { isRuntimeMessage } from "@fluidframework/driver-utils";
|
|
5
|
+
import { isFluidError, createChildMonitoringContext, createChildLogger, UsageError, } from "@fluidframework/telemetry-utils";
|
|
6
|
+
import { assert, delay, Deferred, PromiseTimer } from "@fluidframework/core-utils";
|
|
7
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
8
|
+
import { DriverErrorTypes } from "@fluidframework/driver-definitions";
|
|
21
9
|
import { MessageType } from "@fluidframework/protocol-definitions";
|
|
22
10
|
import { opSize } from "../opProperties";
|
|
23
11
|
import { SummarizeHeuristicRunner } from "./summarizerHeuristics";
|
|
24
12
|
import { raceTimer, SummarizeResultBuilder, SummaryGenerator, } from "./summaryGenerator";
|
|
25
13
|
const maxSummarizeAckWaitTime = 10 * 60 * 1000; // 10 minutes
|
|
26
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The maximum number of summarization attempts that will be done by default in case of failures
|
|
16
|
+
* that can be retried.
|
|
17
|
+
*/
|
|
18
|
+
export const defaultMaxAttempts = 2;
|
|
19
|
+
/**
|
|
20
|
+
* The default value for maximum number of summarization attempts that will be done for summarization failures where
|
|
21
|
+
* submit fails and the failure can be retried.
|
|
22
|
+
*/
|
|
23
|
+
export const defaultMaxAttemptsForSubmitFailures = 5;
|
|
27
24
|
/**
|
|
28
25
|
* An instance of RunningSummarizer manages the heuristics for summarizing.
|
|
29
26
|
* Until disposed, the instance of RunningSummarizer can assume that it is
|
|
@@ -31,8 +28,9 @@ const defaultNumberSummarizationAttempts = 2; // only up to 2 attempts
|
|
|
31
28
|
* track of summaries that it is generating as they are broadcast and acked/nacked.
|
|
32
29
|
* This object is created and controlled by Summarizer object.
|
|
33
30
|
*/
|
|
34
|
-
export class RunningSummarizer {
|
|
31
|
+
export class RunningSummarizer extends TypedEventEmitter {
|
|
35
32
|
constructor(baseLogger, summaryWatcher, configuration, submitSummaryCallback, refreshLatestSummaryAckCallback, heuristicData, summaryCollection, cancellationToken, stopSummarizerCallback, runtime) {
|
|
33
|
+
super();
|
|
36
34
|
this.summaryWatcher = summaryWatcher;
|
|
37
35
|
this.configuration = configuration;
|
|
38
36
|
this.submitSummaryCallback = submitSummaryCallback;
|
|
@@ -63,9 +61,13 @@ export class RunningSummarizer {
|
|
|
63
61
|
summarizeCount: () => this.summarizeCount,
|
|
64
62
|
summarizerSuccessfulAttempts: () => this.totalSuccessfulAttempts,
|
|
65
63
|
};
|
|
66
|
-
this.mc =
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
this.mc = createChildMonitoringContext({
|
|
65
|
+
logger: baseLogger,
|
|
66
|
+
namespace: "Running",
|
|
67
|
+
properties: {
|
|
68
|
+
all: telemetryProps,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
69
71
|
if (configuration.state !== "disableHeuristics") {
|
|
70
72
|
assert(this.configuration.state === "enabled", 0x2ea /* "Configuration state should be enabled" */);
|
|
71
73
|
this.heuristicRunner = new SummarizeHeuristicRunner(heuristicData, this.configuration, (reason) => this.trySummarize(reason), this.mc.logger);
|
|
@@ -101,26 +103,21 @@ export class RunningSummarizer {
|
|
|
101
103
|
this.generator = new SummaryGenerator(this.pendingAckTimer, this.heuristicData, this.submitSummaryCallback, () => {
|
|
102
104
|
this.totalSuccessfulAttempts++;
|
|
103
105
|
}, this.summaryWatcher, this.mc.logger);
|
|
104
|
-
// Listen to
|
|
105
|
-
this.deltaManagerListener = (op) => {
|
|
106
|
-
if (!isRuntimeMessage(op)) {
|
|
107
|
-
this.handleOp(op, false);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
// Listen to runtime for runtime ops
|
|
106
|
+
// Listen to runtime for ops
|
|
111
107
|
this.runtimeListener = (op, runtimeMessage) => {
|
|
112
|
-
|
|
113
|
-
this.handleOp(op, true);
|
|
114
|
-
}
|
|
108
|
+
this.handleOp(op, runtimeMessage === true);
|
|
115
109
|
};
|
|
116
|
-
// Purpose of listening to deltaManager is for back-compat
|
|
117
|
-
// Can remove and only listen to runtime once loader version is past 2.0.0-internal.1.2.0 (https://github.com/microsoft/FluidFramework/pull/11832)
|
|
118
|
-
// Tracked by AB#3883
|
|
119
|
-
this.runtime.deltaManager.on("op", this.deltaManagerListener);
|
|
120
110
|
this.runtime.on("op", this.runtimeListener);
|
|
111
|
+
// The max attempts for submit failures can be overridden via a feature flag. This allows us to
|
|
112
|
+
// tweak this as per telemetry data until we arrive at a stable number.
|
|
113
|
+
// If its set to a number higher than `defaultMaxAttemptsForSubmitFailures`, it will be ignored.
|
|
114
|
+
const overrideMaxAttempts = this.mc.config.getNumber("Fluid.Summarizer.AttemptsForSubmitFailures");
|
|
115
|
+
this.maxAttemptsForSubmitFailures =
|
|
116
|
+
overrideMaxAttempts && overrideMaxAttempts < defaultMaxAttemptsForSubmitFailures
|
|
117
|
+
? overrideMaxAttempts
|
|
118
|
+
: defaultMaxAttemptsForSubmitFailures;
|
|
121
119
|
}
|
|
122
120
|
static async start(logger, summaryWatcher, configuration, submitSummaryCallback, refreshLatestSummaryAckCallback, heuristicData, summaryCollection, cancellationToken, stopSummarizerCallback, runtime) {
|
|
123
|
-
var _a, _b;
|
|
124
121
|
const summarizer = new RunningSummarizer(logger, summaryWatcher, configuration, submitSummaryCallback, refreshLatestSummaryAckCallback, heuristicData, summaryCollection, cancellationToken, stopSummarizerCallback, runtime);
|
|
125
122
|
// Before doing any heuristics or proceeding with its refreshing, if there is a summary ack received while
|
|
126
123
|
// this summarizer catches up, let's refresh state before proceeding with the summarization.
|
|
@@ -129,7 +126,7 @@ export class RunningSummarizer {
|
|
|
129
126
|
// Handle summary acks asynchronously
|
|
130
127
|
// Note: no exceptions are thrown from processIncomingSummaryAcks handler as it handles all exceptions
|
|
131
128
|
summarizer.processIncomingSummaryAcks(lastAckRefSeq).catch((error) => {
|
|
132
|
-
logger.sendErrorEvent({ eventName: "HandleSummaryAckFatalError" }, error);
|
|
129
|
+
createChildLogger({ logger }).sendErrorEvent({ eventName: "HandleSummaryAckFatalError" }, error);
|
|
133
130
|
});
|
|
134
131
|
// Update heuristic counts
|
|
135
132
|
// By the time we get here, there are potentially ops missing from the heuristic summary counts
|
|
@@ -150,21 +147,20 @@ export class RunningSummarizer {
|
|
|
150
147
|
// Update last seq number (in case the handlers haven't processed anything yet)
|
|
151
148
|
heuristicData.lastOpSequenceNumber = runtime.deltaManager.lastSequenceNumber;
|
|
152
149
|
// Start heuristics
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
summarizer.heuristicRunner?.start();
|
|
151
|
+
summarizer.heuristicRunner?.run();
|
|
155
152
|
return summarizer;
|
|
156
153
|
}
|
|
157
154
|
get disposed() {
|
|
158
155
|
return this._disposed;
|
|
159
156
|
}
|
|
160
157
|
async handleSummaryAck() {
|
|
161
|
-
var _a;
|
|
162
158
|
const lastAck = this.summaryCollection.latestAck;
|
|
163
159
|
let refSequenceNumber = -1;
|
|
164
160
|
// In case we haven't received the lastestAck yet, just return.
|
|
165
161
|
if (lastAck !== undefined) {
|
|
166
162
|
refSequenceNumber = lastAck.summaryOp.referenceSequenceNumber;
|
|
167
|
-
const summaryLogger =
|
|
163
|
+
const summaryLogger = this.tryGetCorrelatedLogger(refSequenceNumber) ?? this.mc.logger;
|
|
168
164
|
const summaryOpHandle = lastAck.summaryOp.contents.handle;
|
|
169
165
|
const summaryAckHandle = lastAck.summaryAck.contents.handle;
|
|
170
166
|
while (this.summarizingLock !== undefined) {
|
|
@@ -192,7 +188,7 @@ export class RunningSummarizer {
|
|
|
192
188
|
// code in `submitSummary` function in container runtime, will refresh the latest state
|
|
193
189
|
// by calling `refreshLatestSummaryAckFromServer` and we will be fine.
|
|
194
190
|
const isIgnoredError = isFluidError(error) &&
|
|
195
|
-
error.errorType ===
|
|
191
|
+
error.errorType === DriverErrorTypes.fileNotFoundOrAccessDeniedError;
|
|
196
192
|
summaryLogger.sendTelemetryEvent({
|
|
197
193
|
eventName: isIgnoredError
|
|
198
194
|
? "HandleSummaryAckErrorIgnored"
|
|
@@ -215,10 +211,9 @@ export class RunningSummarizer {
|
|
|
215
211
|
* and, in case of a positive one, it will wait for a summary ack that is greater than this current reference sequence number.
|
|
216
212
|
*/
|
|
217
213
|
async processIncomingSummaryAcks(lastAckRefSeq) {
|
|
218
|
-
var _a;
|
|
219
214
|
let refSequenceNumber = lastAckRefSeq > 0 ? lastAckRefSeq : this.runtime.deltaManager.initialSequenceNumber;
|
|
220
215
|
while (!this.disposed) {
|
|
221
|
-
const summaryLogger =
|
|
216
|
+
const summaryLogger = this.tryGetCorrelatedLogger(refSequenceNumber) ?? this.mc.logger;
|
|
222
217
|
// Initialize ack with undefined if exception happens inside of waitSummaryAck on second iteration,
|
|
223
218
|
// we record undefined, not previous handles.
|
|
224
219
|
await this.summaryCollection.waitSummaryAck(refSequenceNumber);
|
|
@@ -233,11 +228,9 @@ export class RunningSummarizer {
|
|
|
233
228
|
}
|
|
234
229
|
}
|
|
235
230
|
dispose() {
|
|
236
|
-
var _a;
|
|
237
|
-
this.runtime.deltaManager.off("op", this.deltaManagerListener);
|
|
238
231
|
this.runtime.off("op", this.runtimeListener);
|
|
239
232
|
this.summaryWatcher.dispose();
|
|
240
|
-
|
|
233
|
+
this.heuristicRunner?.dispose();
|
|
241
234
|
this.heuristicRunner = undefined;
|
|
242
235
|
this.generator.dispose();
|
|
243
236
|
this.pendingAckTimer.clear();
|
|
@@ -262,8 +255,7 @@ export class RunningSummarizer {
|
|
|
262
255
|
this.heuristicRunnerMicroTaskExists = true;
|
|
263
256
|
Promise.resolve()
|
|
264
257
|
.then(() => {
|
|
265
|
-
|
|
266
|
-
(_a = this.heuristicRunner) === null || _a === void 0 ? void 0 : _a.run();
|
|
258
|
+
this.heuristicRunner?.run();
|
|
267
259
|
})
|
|
268
260
|
.finally(() => {
|
|
269
261
|
this.heuristicRunnerMicroTaskExists = false;
|
|
@@ -294,18 +286,17 @@ export class RunningSummarizer {
|
|
|
294
286
|
this.configuration.nonRuntimeHeuristicThreshold <= opsSinceLastAck));
|
|
295
287
|
}
|
|
296
288
|
async waitStop(allowLastSummary) {
|
|
297
|
-
var _a;
|
|
298
289
|
if (this.stopping) {
|
|
299
290
|
return;
|
|
300
291
|
}
|
|
301
292
|
this.stopping = true;
|
|
302
293
|
this.disposeEnqueuedSummary();
|
|
303
294
|
// This will try to run lastSummary if needed.
|
|
304
|
-
if (allowLastSummary &&
|
|
295
|
+
if (allowLastSummary && this.heuristicRunner?.shouldRunLastSummary()) {
|
|
305
296
|
if (this.summarizingLock === undefined) {
|
|
306
297
|
this.trySummarizeOnce(
|
|
307
298
|
// summarizeProps
|
|
308
|
-
{
|
|
299
|
+
{ summarizeReason: "lastSummary" },
|
|
309
300
|
// ISummarizeOptions, using defaults: { refreshLatestAck: false, fullTree: false }
|
|
310
301
|
{});
|
|
311
302
|
}
|
|
@@ -338,13 +329,12 @@ export class RunningSummarizer {
|
|
|
338
329
|
this.summarizeCount++;
|
|
339
330
|
}
|
|
340
331
|
afterSummaryAction() {
|
|
341
|
-
var _a;
|
|
342
332
|
const retry = this.tryWhileSummarizing;
|
|
343
333
|
this.tryWhileSummarizing = false;
|
|
344
334
|
// After summarizing, we should check to see if we need to summarize again.
|
|
345
335
|
// Rerun the heuristics and check for enqueued summaries.
|
|
346
336
|
if (!this.stopping && !this.tryRunEnqueuedSummary() && retry) {
|
|
347
|
-
|
|
337
|
+
this.heuristicRunner?.run();
|
|
348
338
|
}
|
|
349
339
|
}
|
|
350
340
|
/**
|
|
@@ -354,7 +344,7 @@ export class RunningSummarizer {
|
|
|
354
344
|
* @param before - set of instructions to run before running the action.
|
|
355
345
|
* @param action - action to perform.
|
|
356
346
|
* @param after - set of instructions to run after running the action.
|
|
357
|
-
* @returns
|
|
347
|
+
* @returns The result of the action.
|
|
358
348
|
*/
|
|
359
349
|
async lockedSummaryAction(before, action, after) {
|
|
360
350
|
assert(this.summarizingLock === undefined, 0x25b /* "Caller is responsible for checking lock" */);
|
|
@@ -375,11 +365,20 @@ export class RunningSummarizer {
|
|
|
375
365
|
* @param resultsBuilder - optional, result builder to use.
|
|
376
366
|
* @returns ISummarizeResult - result of running a summary.
|
|
377
367
|
*/
|
|
378
|
-
trySummarizeOnce(summarizeProps, options,
|
|
368
|
+
trySummarizeOnce(summarizeProps, options, resultsBuilder = new SummarizeResultBuilder()) {
|
|
379
369
|
this.lockedSummaryAction(() => {
|
|
380
370
|
this.beforeSummaryAction();
|
|
381
371
|
}, async () => {
|
|
382
|
-
const
|
|
372
|
+
const summaryLogger = createChildLogger({
|
|
373
|
+
logger: this.mc.logger,
|
|
374
|
+
properties: { all: summarizeProps },
|
|
375
|
+
});
|
|
376
|
+
const summaryOptions = {
|
|
377
|
+
...options,
|
|
378
|
+
summaryLogger,
|
|
379
|
+
cancellationToken: this.cancellationToken,
|
|
380
|
+
};
|
|
381
|
+
const summarizeResult = this.generator.summarize(summaryOptions, resultsBuilder);
|
|
383
382
|
// ensure we wait till the end of the process
|
|
384
383
|
return summarizeResult.receivedSummaryAckOrNack;
|
|
385
384
|
}, () => {
|
|
@@ -393,7 +392,7 @@ export class RunningSummarizer {
|
|
|
393
392
|
return resultsBuilder.build();
|
|
394
393
|
}
|
|
395
394
|
/** Heuristics summarize attempt. */
|
|
396
|
-
trySummarize(reason
|
|
395
|
+
trySummarize(reason) {
|
|
397
396
|
if (this.summarizingLock !== undefined) {
|
|
398
397
|
// lockedSummaryAction() will retry heuristic-based summary at the end of current attempt
|
|
399
398
|
// if it's still needed
|
|
@@ -403,79 +402,207 @@ export class RunningSummarizer {
|
|
|
403
402
|
this.lockedSummaryAction(() => {
|
|
404
403
|
this.beforeSummaryAction();
|
|
405
404
|
}, async () => {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
{ refreshLatestAck: true, fullTree: false },
|
|
410
|
-
{ refreshLatestAck: true, fullTree: false, delaySeconds: 2 * 60 },
|
|
411
|
-
{ refreshLatestAck: true, fullTree: true, delaySeconds: 10 * 60 },
|
|
412
|
-
];
|
|
413
|
-
let overrideDelaySeconds;
|
|
414
|
-
let summaryAttempts = 0;
|
|
415
|
-
let summaryAttemptsPerPhase = 0;
|
|
416
|
-
// Reducing the default number of attempts to defaultNumberofSummarizationAttempts.
|
|
417
|
-
let totalAttempts = (_a = this.mc.config.getNumber("Fluid.Summarizer.Attempts")) !== null && _a !== void 0 ? _a : defaultNumberSummarizationAttempts;
|
|
418
|
-
if (totalAttempts > attempts.length) {
|
|
419
|
-
this.mc.logger.sendTelemetryEvent({
|
|
420
|
-
eventName: "InvalidSummarizerAttempts",
|
|
421
|
-
attempts: totalAttempts,
|
|
422
|
-
});
|
|
423
|
-
totalAttempts = defaultNumberSummarizationAttempts;
|
|
424
|
-
}
|
|
425
|
-
else if (totalAttempts < 1) {
|
|
426
|
-
throw new UsageError("Invalid number of attempts.");
|
|
427
|
-
}
|
|
428
|
-
let lastResult;
|
|
429
|
-
for (let summaryAttemptPhase = 0; summaryAttemptPhase < totalAttempts;) {
|
|
430
|
-
if (this.cancellationToken.cancelled) {
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
// We only want to attempt 1 summary when reason is "lastSummary"
|
|
434
|
-
if (++summaryAttempts > 1 && reason === "lastSummary") {
|
|
435
|
-
return;
|
|
436
|
-
}
|
|
437
|
-
summaryAttemptsPerPhase++;
|
|
438
|
-
const _b = attempts[summaryAttemptPhase], { delaySeconds: regularDelaySeconds = 0 } = _b, options = __rest(_b, ["delaySeconds"]);
|
|
439
|
-
const summarizeProps = Object.assign({ reason,
|
|
440
|
-
summaryAttempts,
|
|
441
|
-
summaryAttemptsPerPhase, summaryAttemptPhase: summaryAttemptPhase + 1 }, options);
|
|
442
|
-
// Note: no need to account for cancellationToken.waitCancelled here, as
|
|
443
|
-
// this is accounted SummaryGenerator.summarizeCore that controls receivedSummaryAckOrNack.
|
|
444
|
-
const resultSummarize = this.generator.summarize(summarizeProps, options, cancellationToken);
|
|
445
|
-
const result = await resultSummarize.receivedSummaryAckOrNack;
|
|
446
|
-
if (result.success) {
|
|
447
|
-
return;
|
|
448
|
-
}
|
|
449
|
-
// Check for retryDelay that can come from summaryNack or upload summary flow.
|
|
450
|
-
// Retry the same step only once per retryAfter response.
|
|
451
|
-
overrideDelaySeconds = result.retryAfterSeconds;
|
|
452
|
-
if (overrideDelaySeconds === undefined || summaryAttemptsPerPhase > 1) {
|
|
453
|
-
summaryAttemptPhase++;
|
|
454
|
-
summaryAttemptsPerPhase = 0;
|
|
455
|
-
}
|
|
456
|
-
lastResult = result;
|
|
457
|
-
const delaySeconds = overrideDelaySeconds !== null && overrideDelaySeconds !== void 0 ? overrideDelaySeconds : regularDelaySeconds;
|
|
458
|
-
if (delaySeconds > 0) {
|
|
459
|
-
this.mc.logger.sendPerformanceEvent(Object.assign({ eventName: "SummarizeAttemptDelay", duration: delaySeconds, summaryNackDelay: overrideDelaySeconds !== undefined }, summarizeProps));
|
|
460
|
-
await delay(delaySeconds * 1000);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
// If all attempts failed, log error (with last attempt info) and close the summarizer container
|
|
464
|
-
this.mc.logger.sendErrorEvent({
|
|
465
|
-
eventName: "FailToSummarize",
|
|
466
|
-
reason,
|
|
467
|
-
message: lastResult === null || lastResult === void 0 ? void 0 : lastResult.message,
|
|
468
|
-
}, lastResult === null || lastResult === void 0 ? void 0 : lastResult.error);
|
|
469
|
-
this.stopSummarizerCallback("failToSummarize");
|
|
405
|
+
return this.mc.config.getBoolean("Fluid.Summarizer.UseDynamicRetries")
|
|
406
|
+
? this.trySummarizeWithRetries(reason)
|
|
407
|
+
: this.trySummarizeWithStaticAttempts(reason);
|
|
470
408
|
}, () => {
|
|
471
409
|
this.afterSummaryAction();
|
|
472
410
|
}).catch((error) => {
|
|
473
411
|
this.mc.logger.sendErrorEvent({ eventName: "UnexpectedSummarizeError" }, error);
|
|
474
412
|
});
|
|
475
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* Tries to summarize 2 times with pre-defined summary options. If an attempt fails with "retryAfterSeconds"
|
|
416
|
+
* param, that attempt is tried once more.
|
|
417
|
+
*/
|
|
418
|
+
async trySummarizeWithStaticAttempts(reason) {
|
|
419
|
+
const attemptOptions = [
|
|
420
|
+
{ refreshLatestAck: false, fullTree: false },
|
|
421
|
+
{ refreshLatestAck: true, fullTree: false },
|
|
422
|
+
];
|
|
423
|
+
let summaryAttempts = 0;
|
|
424
|
+
let summaryAttemptsPerPhase = 0;
|
|
425
|
+
let summaryAttemptPhase = 0;
|
|
426
|
+
while (summaryAttemptPhase < attemptOptions.length) {
|
|
427
|
+
if (this.cancellationToken.cancelled) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
// We only want to attempt 1 summary when reason is "lastSummary"
|
|
431
|
+
if (++summaryAttempts > 1 && reason === "lastSummary") {
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
summaryAttemptsPerPhase++;
|
|
435
|
+
const summarizeOptions = attemptOptions[summaryAttemptPhase];
|
|
436
|
+
const summarizeProps = {
|
|
437
|
+
summarizeReason: reason,
|
|
438
|
+
summaryAttempts,
|
|
439
|
+
summaryAttemptsPerPhase,
|
|
440
|
+
summaryAttemptPhase: summaryAttemptPhase + 1,
|
|
441
|
+
...summarizeOptions,
|
|
442
|
+
};
|
|
443
|
+
const summaryLogger = createChildLogger({
|
|
444
|
+
logger: this.mc.logger,
|
|
445
|
+
properties: { all: summarizeProps },
|
|
446
|
+
});
|
|
447
|
+
const summaryOptions = {
|
|
448
|
+
...summarizeOptions,
|
|
449
|
+
summaryLogger,
|
|
450
|
+
cancellationToken: this.cancellationToken,
|
|
451
|
+
};
|
|
452
|
+
// Note: no need to account for cancellationToken.waitCancelled here, as
|
|
453
|
+
// this is accounted SummaryGenerator.summarizeCore that controls receivedSummaryAckOrNack.
|
|
454
|
+
const resultSummarize = this.generator.summarize(summaryOptions);
|
|
455
|
+
const ackNackResult = await resultSummarize.receivedSummaryAckOrNack;
|
|
456
|
+
if (ackNackResult.success) {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
// Check for retryDelay that can come from summaryNack, upload summary or submit summary flows.
|
|
460
|
+
// Retry the same step only once per retryAfter response.
|
|
461
|
+
const submitResult = await resultSummarize.summarySubmitted;
|
|
462
|
+
const delaySeconds = !submitResult.success
|
|
463
|
+
? submitResult.data?.retryAfterSeconds
|
|
464
|
+
: ackNackResult.data?.retryAfterSeconds;
|
|
465
|
+
if (delaySeconds === undefined || summaryAttemptsPerPhase > 1) {
|
|
466
|
+
summaryAttemptPhase++;
|
|
467
|
+
summaryAttemptsPerPhase = 0;
|
|
468
|
+
}
|
|
469
|
+
if (delaySeconds !== undefined) {
|
|
470
|
+
this.mc.logger.sendPerformanceEvent({
|
|
471
|
+
eventName: "SummarizeAttemptDelay",
|
|
472
|
+
duration: delaySeconds,
|
|
473
|
+
summaryNackDelay: ackNackResult.data?.retryAfterSeconds !== undefined,
|
|
474
|
+
...summarizeProps,
|
|
475
|
+
});
|
|
476
|
+
await delay(delaySeconds * 1000);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
this.stopSummarizerCallback("failToSummarize");
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Tries to summarize with retries where retry is based on the failure params.
|
|
483
|
+
* For example, summarization may be retried for failures with "retryAfterSeconds" param.
|
|
484
|
+
*/
|
|
485
|
+
async trySummarizeWithRetries(reason) {
|
|
486
|
+
// Helper to set summarize options, telemetry properties and call summarize.
|
|
487
|
+
const attemptSummarize = (attemptNumber, finalAttempt) => {
|
|
488
|
+
const summarizeOptions = {
|
|
489
|
+
fullTree: false,
|
|
490
|
+
};
|
|
491
|
+
const summarizeProps = {
|
|
492
|
+
summarizeReason: reason,
|
|
493
|
+
summaryAttempts: attemptNumber,
|
|
494
|
+
...summarizeOptions,
|
|
495
|
+
finalAttempt,
|
|
496
|
+
};
|
|
497
|
+
const summaryLogger = createChildLogger({
|
|
498
|
+
logger: this.mc.logger,
|
|
499
|
+
properties: { all: summarizeProps },
|
|
500
|
+
});
|
|
501
|
+
const summaryOptions = {
|
|
502
|
+
...summarizeOptions,
|
|
503
|
+
summaryLogger,
|
|
504
|
+
cancellationToken: this.cancellationToken,
|
|
505
|
+
finalAttempt,
|
|
506
|
+
};
|
|
507
|
+
const summarizeResult = this.generator.summarize(summaryOptions);
|
|
508
|
+
return { summarizeProps, summarizeResult };
|
|
509
|
+
};
|
|
510
|
+
// The max number of attempts are based on the stage at which summarization failed. If it fails before it is
|
|
511
|
+
// submitted, a different value is used compared to if it fails after submission. Usually, in the former case,
|
|
512
|
+
// we would retry more often as its cheaper and retries are likely to succeed.
|
|
513
|
+
// This makes it harder to predict how many attempts would actually happen as that depends on how far an attempt
|
|
514
|
+
// made. To keep things simple, the max attempts is reset after every attempt based on where it failed. This may
|
|
515
|
+
// result in some failures not being retried depending on what happened before this attempt. That's fine because
|
|
516
|
+
// such scenarios are very unlikely and even if it happens, it would resolve when a new summarizer starts over.
|
|
517
|
+
// For example - When failure switches from one the submit failures to nack failure, only one more retry will
|
|
518
|
+
// happen irrespective of the value of `defaultMaxAttempts`.
|
|
519
|
+
let maxAttempts = defaultMaxAttempts;
|
|
520
|
+
let currentAttempt = 0;
|
|
521
|
+
let retryAfterSeconds;
|
|
522
|
+
let done = false;
|
|
523
|
+
let result = "success";
|
|
524
|
+
do {
|
|
525
|
+
currentAttempt++;
|
|
526
|
+
if (this.cancellationToken.cancelled) {
|
|
527
|
+
result = "canceled";
|
|
528
|
+
done = true;
|
|
529
|
+
break;
|
|
530
|
+
}
|
|
531
|
+
const { summarizeProps, summarizeResult } = attemptSummarize(currentAttempt, false /* finalAttempt */);
|
|
532
|
+
// Ack / nack is the final step, so if it succeeds we're done.
|
|
533
|
+
const ackNackResult = await summarizeResult.receivedSummaryAckOrNack;
|
|
534
|
+
if (ackNackResult.success) {
|
|
535
|
+
result = "success";
|
|
536
|
+
done = true;
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
// Update max attempts and retry params from the failure result.
|
|
540
|
+
// If submit summary failed, use the params from "summarySubmitted" result. Else, use the params
|
|
541
|
+
// from "receivedSummaryAckOrNack" result.
|
|
542
|
+
// Note: Check "summarySubmitted" result first because if it fails, ack nack would fail as well.
|
|
543
|
+
const submitSummaryResult = await summarizeResult.summarySubmitted;
|
|
544
|
+
if (!submitSummaryResult.success) {
|
|
545
|
+
maxAttempts = this.maxAttemptsForSubmitFailures;
|
|
546
|
+
retryAfterSeconds = submitSummaryResult.data?.retryAfterSeconds;
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
maxAttempts = defaultMaxAttempts;
|
|
550
|
+
retryAfterSeconds = ackNackResult.data?.retryAfterSeconds;
|
|
551
|
+
}
|
|
552
|
+
// Emit "summarize" event for this failed attempt.
|
|
553
|
+
result = "failure";
|
|
554
|
+
const eventProps = {
|
|
555
|
+
result,
|
|
556
|
+
currentAttempt,
|
|
557
|
+
maxAttempts,
|
|
558
|
+
error: ackNackResult.error,
|
|
559
|
+
};
|
|
560
|
+
this.emit("summarize", eventProps);
|
|
561
|
+
// If the failure doesn't have "retryAfterSeconds" or the max number of attempts have been done, we're done.
|
|
562
|
+
if (retryAfterSeconds === undefined || currentAttempt >= maxAttempts - 1) {
|
|
563
|
+
done = true;
|
|
564
|
+
}
|
|
565
|
+
// If the failure has "retryAfterSeconds", add a delay of that time. In this case, a final attempt will
|
|
566
|
+
// take place and we need to wait for "retryAfterSeconds" before that.
|
|
567
|
+
if (retryAfterSeconds !== undefined) {
|
|
568
|
+
this.mc.logger.sendPerformanceEvent({
|
|
569
|
+
eventName: "SummarizeAttemptDelay",
|
|
570
|
+
duration: retryAfterSeconds,
|
|
571
|
+
summaryNackDelay: ackNackResult.data?.retryAfterSeconds !== undefined,
|
|
572
|
+
stage: submitSummaryResult.data?.stage,
|
|
573
|
+
dynamicRetries: true,
|
|
574
|
+
...summarizeProps,
|
|
575
|
+
});
|
|
576
|
+
await delay(retryAfterSeconds * 1000);
|
|
577
|
+
}
|
|
578
|
+
} while (!done);
|
|
579
|
+
// If summarize attempt did not fail, emit "summarize" event and return. A failed attempt may be retried below.
|
|
580
|
+
if (result !== "failure") {
|
|
581
|
+
this.emit("summarize", { result, currentAttempt, maxAttempts });
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
// If summarization wasn't successful above and the failure contains "retryAfterSeconds", perform one last
|
|
585
|
+
// attempt. This gives a chance to the runtime to perform additional steps in the last attempt.
|
|
586
|
+
if (retryAfterSeconds !== undefined) {
|
|
587
|
+
const { summarizeResult } = attemptSummarize(++currentAttempt, true /* finalAttempt */);
|
|
588
|
+
// Ack / nack is the final step, so if it succeeds we're done.
|
|
589
|
+
const ackNackResult = await summarizeResult.receivedSummaryAckOrNack;
|
|
590
|
+
result = ackNackResult.success ? "success" : "failure";
|
|
591
|
+
const eventProps = {
|
|
592
|
+
result,
|
|
593
|
+
currentAttempt,
|
|
594
|
+
maxAttempts,
|
|
595
|
+
error: ackNackResult.success ? undefined : ackNackResult.error,
|
|
596
|
+
};
|
|
597
|
+
this.emit("summarize", eventProps);
|
|
598
|
+
}
|
|
599
|
+
// If summarization is still unsuccessful, stop the summarizer.
|
|
600
|
+
if (result === "failure") {
|
|
601
|
+
this.stopSummarizerCallback("failToSummarize");
|
|
602
|
+
}
|
|
603
|
+
}
|
|
476
604
|
/** {@inheritdoc (ISummarizer:interface).summarizeOnDemand} */
|
|
477
|
-
summarizeOnDemand(resultsBuilder = new SummarizeResultBuilder()
|
|
478
|
-
var { reason } = _a, options = __rest(_a, ["reason"]);
|
|
605
|
+
summarizeOnDemand(options, resultsBuilder = new SummarizeResultBuilder()) {
|
|
479
606
|
if (this.stopping) {
|
|
480
607
|
resultsBuilder.fail("RunningSummarizer stopped or disposed", undefined);
|
|
481
608
|
return resultsBuilder.build();
|
|
@@ -486,13 +613,13 @@ export class RunningSummarizer {
|
|
|
486
613
|
// The heuristics are blocking concurrent summarize attempts.
|
|
487
614
|
throw new UsageError("Attempted to run an already-running summarizer on demand");
|
|
488
615
|
}
|
|
489
|
-
const
|
|
616
|
+
const { reason, ...summarizeOptions } = options;
|
|
617
|
+
const result = this.trySummarizeOnce({ summarizeReason: `onDemand/${reason}` }, summarizeOptions, resultsBuilder);
|
|
490
618
|
return result;
|
|
491
619
|
}
|
|
492
620
|
/** {@inheritdoc (ISummarizer:interface).enqueueSummarize} */
|
|
493
|
-
enqueueSummarize(
|
|
494
|
-
|
|
495
|
-
const onDemandReason = `enqueue;${reason}`;
|
|
621
|
+
enqueueSummarize(options) {
|
|
622
|
+
const { reason, afterSequenceNumber = 0, override = false, ...summarizeOptions } = options;
|
|
496
623
|
let overridden = false;
|
|
497
624
|
if (this.enqueuedSummary !== undefined) {
|
|
498
625
|
if (!override) {
|
|
@@ -504,15 +631,20 @@ export class RunningSummarizer {
|
|
|
504
631
|
overridden = true;
|
|
505
632
|
}
|
|
506
633
|
this.enqueuedSummary = {
|
|
507
|
-
reason:
|
|
634
|
+
reason: `enqueue;${reason}`,
|
|
508
635
|
afterSequenceNumber,
|
|
509
|
-
|
|
636
|
+
summarizeOptions,
|
|
510
637
|
resultsBuilder: new SummarizeResultBuilder(),
|
|
511
638
|
};
|
|
512
639
|
const results = this.enqueuedSummary.resultsBuilder.build();
|
|
513
640
|
this.tryRunEnqueuedSummary();
|
|
514
641
|
return overridden
|
|
515
|
-
?
|
|
642
|
+
? {
|
|
643
|
+
...results,
|
|
644
|
+
alreadyEnqueued: true,
|
|
645
|
+
overridden: true,
|
|
646
|
+
}
|
|
647
|
+
: results;
|
|
516
648
|
}
|
|
517
649
|
tryRunEnqueuedSummary() {
|
|
518
650
|
if (this.stopping) {
|
|
@@ -525,10 +657,10 @@ export class RunningSummarizer {
|
|
|
525
657
|
// If no enqueued summary is ready or a summary is already in progress, take no action.
|
|
526
658
|
return false;
|
|
527
659
|
}
|
|
528
|
-
const { reason, resultsBuilder,
|
|
660
|
+
const { reason, resultsBuilder, summarizeOptions } = this.enqueuedSummary;
|
|
529
661
|
// Set to undefined first, so that subsequent enqueue attempt while summarize will occur later.
|
|
530
662
|
this.enqueuedSummary = undefined;
|
|
531
|
-
this.trySummarizeOnce({
|
|
663
|
+
this.trySummarizeOnce({ summarizeReason: `enqueuedSummary/${reason}` }, summarizeOptions, resultsBuilder);
|
|
532
664
|
return true;
|
|
533
665
|
}
|
|
534
666
|
disposeEnqueuedSummary() {
|