@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,17 +3,17 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Deferred } from "@fluidframework/core-utils";
|
|
7
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
8
8
|
import {
|
|
9
9
|
ITelemetryLoggerExt,
|
|
10
|
-
|
|
10
|
+
createChildLogger,
|
|
11
11
|
IFluidErrorBase,
|
|
12
12
|
LoggingError,
|
|
13
|
+
UsageError,
|
|
13
14
|
wrapErrorAndLog,
|
|
14
15
|
} from "@fluidframework/telemetry-utils";
|
|
15
16
|
import { ILoader, LoaderHeader } from "@fluidframework/container-definitions";
|
|
16
|
-
import { UsageError } from "@fluidframework/container-utils";
|
|
17
17
|
import { DriverHeader } from "@fluidframework/driver-definitions";
|
|
18
18
|
import { requestFluidObject } from "@fluidframework/runtime-utils";
|
|
19
19
|
import { FluidObject, IFluidHandleContext, IRequest } from "@fluidframework/core-interfaces";
|
|
@@ -30,6 +30,12 @@ import {
|
|
|
30
30
|
ISummarizerRuntime,
|
|
31
31
|
ISummarizingWarning,
|
|
32
32
|
SummarizerStopReason,
|
|
33
|
+
IOnDemandSummarizeOptions,
|
|
34
|
+
ISummarizeResults,
|
|
35
|
+
IEnqueueSummarizeOptions,
|
|
36
|
+
EnqueueSummarizeResult,
|
|
37
|
+
ISummarizerEvents,
|
|
38
|
+
ISummarizeEventProps,
|
|
33
39
|
} from "./summarizerTypes";
|
|
34
40
|
import { SummarizeHeuristicData } from "./summarizerHeuristics";
|
|
35
41
|
import { SummarizeResultBuilder } from "./summaryGenerator";
|
|
@@ -61,7 +67,7 @@ export const createSummarizingWarning = (errorMessage: string, logged: boolean)
|
|
|
61
67
|
* It is the main entry point for summary work.
|
|
62
68
|
* It is created only by summarizing container (i.e. one with clientType === "summarizer")
|
|
63
69
|
*/
|
|
64
|
-
export class Summarizer extends
|
|
70
|
+
export class Summarizer extends TypedEventEmitter<ISummarizerEvents> implements ISummarizer {
|
|
65
71
|
public get ISummarizer() {
|
|
66
72
|
return this;
|
|
67
73
|
}
|
|
@@ -90,7 +96,7 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
90
96
|
) => Promise<ICancellableSummarizerController>,
|
|
91
97
|
) {
|
|
92
98
|
super();
|
|
93
|
-
this.logger =
|
|
99
|
+
this.logger = createChildLogger({ logger: this.runtime.logger, namespace: "Summarizer" });
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
/**
|
|
@@ -210,7 +216,7 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
210
216
|
* Should we try to run a last summary for the given stop reason?
|
|
211
217
|
* Currently only allows "parentNotConnected"
|
|
212
218
|
* @param stopReason - SummarizerStopReason
|
|
213
|
-
* @returns
|
|
219
|
+
* @returns `true` if the stop reason can run a last summary, otherwise `false`.
|
|
214
220
|
*/
|
|
215
221
|
public static stopReasonCanRunLastSummary(stopReason: SummarizerStopReason): boolean {
|
|
216
222
|
return stopReason === "parentNotConnected";
|
|
@@ -225,7 +231,7 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
225
231
|
* @param onBehalfOf - ID of the client that requested that the summarizer start
|
|
226
232
|
* @param runCoordinator - cancellation token
|
|
227
233
|
* @param newConfig - Summary configuration to override the existing config when invoking the RunningSummarizer.
|
|
228
|
-
* @returns
|
|
234
|
+
* @returns A promise that is fulfilled when the RunningSummarizer is ready.
|
|
229
235
|
*/
|
|
230
236
|
private async start(
|
|
231
237
|
onBehalfOf: string,
|
|
@@ -277,11 +283,15 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
277
283
|
this.runtime,
|
|
278
284
|
);
|
|
279
285
|
this.runningSummarizer = runningSummarizer;
|
|
286
|
+
this.runningSummarizer.on("summarize", this.handleSummarizeEvent);
|
|
280
287
|
this.starting = false;
|
|
281
|
-
|
|
282
288
|
return runningSummarizer;
|
|
283
289
|
}
|
|
284
290
|
|
|
291
|
+
private readonly handleSummarizeEvent = (eventProps: ISummarizeEventProps) => {
|
|
292
|
+
this.emit("summarize", eventProps);
|
|
293
|
+
};
|
|
294
|
+
|
|
285
295
|
/**
|
|
286
296
|
* Disposes of resources after running. This cleanup will
|
|
287
297
|
* clear any outstanding timers and reset some of the state
|
|
@@ -294,12 +304,13 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
294
304
|
|
|
295
305
|
this._disposed = true;
|
|
296
306
|
if (this.runningSummarizer) {
|
|
307
|
+
this.runningSummarizer.off("summarize", this.handleSummarizeEvent);
|
|
297
308
|
this.runningSummarizer.dispose();
|
|
298
309
|
this.runningSummarizer = undefined;
|
|
299
310
|
}
|
|
300
311
|
}
|
|
301
312
|
|
|
302
|
-
public
|
|
313
|
+
public summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults {
|
|
303
314
|
try {
|
|
304
315
|
if (this._disposed || this.runningSummarizer?.disposed) {
|
|
305
316
|
throw new UsageError("Summarizer is already disposed.");
|
|
@@ -318,7 +329,7 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
318
329
|
const builder = new SummarizeResultBuilder();
|
|
319
330
|
if (this.runningSummarizer) {
|
|
320
331
|
// Summarizer is already running. Go ahead and start.
|
|
321
|
-
return this.runningSummarizer.summarizeOnDemand(
|
|
332
|
+
return this.runningSummarizer.summarizeOnDemand(options, builder);
|
|
322
333
|
}
|
|
323
334
|
|
|
324
335
|
// Summarizer isn't running, so we need to start it, which is an async operation.
|
|
@@ -335,7 +346,7 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
335
346
|
startP
|
|
336
347
|
.then(async (runningSummarizer) => {
|
|
337
348
|
// Successfully started the summarizer. Run it.
|
|
338
|
-
runningSummarizer.summarizeOnDemand(
|
|
349
|
+
runningSummarizer.summarizeOnDemand(options, builder);
|
|
339
350
|
// Wait for a command to stop or loss of connectivity before tearing down the summarizer and client.
|
|
340
351
|
const stopReason = await Promise.race([
|
|
341
352
|
this.stopDeferred.promise,
|
|
@@ -357,9 +368,9 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
357
368
|
} catch (error) {
|
|
358
369
|
throw SummarizingWarning.wrap(error, false /* logged */, this.logger);
|
|
359
370
|
}
|
|
360
|
-
}
|
|
371
|
+
}
|
|
361
372
|
|
|
362
|
-
public
|
|
373
|
+
public enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult {
|
|
363
374
|
if (
|
|
364
375
|
this._disposed ||
|
|
365
376
|
this.runningSummarizer === undefined ||
|
|
@@ -367,8 +378,8 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
367
378
|
) {
|
|
368
379
|
throw new UsageError("Summarizer is not running or already disposed.");
|
|
369
380
|
}
|
|
370
|
-
return this.runningSummarizer.enqueueSummarize(
|
|
371
|
-
}
|
|
381
|
+
return this.runningSummarizer.enqueueSummarize(options);
|
|
382
|
+
}
|
|
372
383
|
|
|
373
384
|
public recordSummaryAttempt?(summaryRefSeqNum?: number) {
|
|
374
385
|
this._heuristicData?.recordAttempt(summaryRefSeqNum);
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IEvent, IEventProvider } from "@fluidframework/
|
|
6
|
+
import { IEvent, IEventProvider } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
8
|
-
import { TypedEventEmitter } from "@
|
|
8
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
9
9
|
import { IClientDetails, MessageType } from "@fluidframework/protocol-definitions";
|
|
10
10
|
import {
|
|
11
11
|
IOrderedClientElection,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
7
|
-
import { Timer } from "@fluidframework/
|
|
7
|
+
import { Timer } from "@fluidframework/core-utils";
|
|
8
8
|
import { ISummaryConfigurationHeuristics } from "../containerRuntime";
|
|
9
9
|
import {
|
|
10
10
|
ISummarizeHeuristicData,
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
IRefreshSummaryResult,
|
|
8
8
|
ISummarizerNodeRootContract,
|
|
9
|
-
|
|
9
|
+
ValidateSummaryResult,
|
|
10
10
|
} from "./summarizerNodeUtils";
|
|
11
11
|
export { IRootSummarizerNode, createRootSummarizerNode } from "./summarizerNode";
|
|
12
12
|
export { IRootSummarizerNodeWithGC, createRootSummarizerNodeWithGC } from "./summarizerNodeWithGc";
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { ITelemetryBaseLogger, ITelemetryErrorEvent } from "@fluidframework/core-interfaces";
|
|
6
7
|
import {
|
|
7
8
|
ISummarizerNode,
|
|
8
9
|
ISummarizerNodeConfig,
|
|
@@ -20,31 +21,26 @@ import {
|
|
|
20
21
|
ISnapshotTree,
|
|
21
22
|
SummaryObject,
|
|
22
23
|
} from "@fluidframework/protocol-definitions";
|
|
23
|
-
import { ITelemetryErrorEvent } from "@fluidframework/common-definitions";
|
|
24
24
|
import {
|
|
25
25
|
ITelemetryLoggerExt,
|
|
26
|
-
|
|
26
|
+
createChildLogger,
|
|
27
27
|
LoggingError,
|
|
28
28
|
PerformanceEvent,
|
|
29
29
|
TelemetryDataTag,
|
|
30
|
+
tagCodeArtifacts,
|
|
30
31
|
} from "@fluidframework/telemetry-utils";
|
|
31
|
-
import { assert, unreachableCase } from "@fluidframework/
|
|
32
|
-
import {
|
|
33
|
-
convertToSummaryTree,
|
|
34
|
-
calculateStats,
|
|
35
|
-
mergeStats,
|
|
36
|
-
ReadAndParseBlob,
|
|
37
|
-
} from "@fluidframework/runtime-utils";
|
|
32
|
+
import { assert, unreachableCase } from "@fluidframework/core-utils";
|
|
33
|
+
import { convertToSummaryTree, calculateStats, mergeStats } from "@fluidframework/runtime-utils";
|
|
38
34
|
import {
|
|
39
35
|
EscapedPath,
|
|
40
36
|
ICreateChildDetails,
|
|
41
|
-
IFetchSnapshotResult,
|
|
42
37
|
IInitialSummary,
|
|
38
|
+
IRefreshSummaryResult,
|
|
43
39
|
ISummarizerNodeRootContract,
|
|
44
40
|
parseSummaryForSubtrees,
|
|
45
41
|
parseSummaryTreeForSubtrees,
|
|
46
|
-
RefreshSummaryResult,
|
|
47
42
|
SummaryNode,
|
|
43
|
+
ValidateSummaryResult,
|
|
48
44
|
} from "./summarizerNodeUtils";
|
|
49
45
|
|
|
50
46
|
export interface IRootSummarizerNode extends ISummarizerNode, ISummarizerNodeRootContract {}
|
|
@@ -84,30 +80,28 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
84
80
|
* Use createRootSummarizerNode to create root node, or createChild to create child nodes.
|
|
85
81
|
*/
|
|
86
82
|
public constructor(
|
|
87
|
-
baseLogger:
|
|
83
|
+
baseLogger: ITelemetryBaseLogger,
|
|
88
84
|
private readonly summarizeInternalFn: SummarizeInternalFn,
|
|
89
85
|
config: ISummarizerNodeConfig,
|
|
90
86
|
private _changeSequenceNumber: number,
|
|
91
87
|
/** Undefined means created without summary */
|
|
92
88
|
private _latestSummary?: SummaryNode,
|
|
93
89
|
private readonly initialSummary?: IInitialSummary,
|
|
94
|
-
protected wipSummaryLogger?:
|
|
90
|
+
protected wipSummaryLogger?: ITelemetryBaseLogger,
|
|
95
91
|
/** A unique id of this node to be logged when sending telemetry. */
|
|
96
92
|
protected telemetryNodeId?: string,
|
|
97
93
|
) {
|
|
98
94
|
this.canReuseHandle = config.canReuseHandle ?? true;
|
|
99
95
|
// All logs posted by the summarizer node should include the telemetryNodeId.
|
|
100
|
-
this.logger =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
value: this.telemetryNodeId,
|
|
105
|
-
},
|
|
96
|
+
this.logger = createChildLogger({
|
|
97
|
+
logger: baseLogger,
|
|
98
|
+
properties: {
|
|
99
|
+
all: tagCodeArtifacts({ id: this.telemetryNodeId }),
|
|
106
100
|
},
|
|
107
101
|
});
|
|
108
102
|
}
|
|
109
103
|
|
|
110
|
-
public startSummary(referenceSequenceNumber: number, summaryLogger:
|
|
104
|
+
public startSummary(referenceSequenceNumber: number, summaryLogger: ITelemetryBaseLogger) {
|
|
111
105
|
assert(
|
|
112
106
|
this.wipSummaryLogger === undefined,
|
|
113
107
|
0x19f /* "wipSummaryLogger should not be set yet in startSummary" */,
|
|
@@ -193,24 +187,117 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
193
187
|
}
|
|
194
188
|
|
|
195
189
|
/**
|
|
196
|
-
*
|
|
190
|
+
* Validates that the in-progress summary is correct, i.e., summarize should have run for all non-skipped
|
|
191
|
+
* nodes. This will only be called for the root summarizer node and is called by it recursively on all child nodes.
|
|
192
|
+
*
|
|
193
|
+
* @returns ValidateSummaryResult which contains a boolean success indicating whether the validation was successful.
|
|
194
|
+
* In case of failure, additional information is returned indicating type of failure and where it was.
|
|
197
195
|
*/
|
|
198
|
-
public
|
|
199
|
-
this.
|
|
196
|
+
public validateSummary(): ValidateSummaryResult {
|
|
197
|
+
return this.validateSummaryCore(false /* parentSkipRecursion */);
|
|
200
198
|
}
|
|
201
199
|
|
|
202
200
|
/**
|
|
203
|
-
*
|
|
201
|
+
* Validates that the in-progress summary is correct for all nodes, i.e., summarize should have run for all
|
|
202
|
+
* non-skipped nodes.
|
|
203
|
+
* @param parentSkipRecursion - true if the parent of this node skipped recursing the child nodes when summarizing.
|
|
204
|
+
* In that case, the children will not have work-in-progress state.
|
|
205
|
+
*
|
|
206
|
+
* @returns ValidateSummaryResult which contains a boolean success indicating whether the validation was successful.
|
|
207
|
+
* In case of failure, additional information is returned indicating type of failure and where it was.
|
|
208
|
+
*/
|
|
209
|
+
protected validateSummaryCore(parentSkipRecursion: boolean): ValidateSummaryResult {
|
|
210
|
+
if (this.wasSummarizeMissed(parentSkipRecursion)) {
|
|
211
|
+
return {
|
|
212
|
+
success: false,
|
|
213
|
+
reason: "NodeDidNotSummarize",
|
|
214
|
+
id: {
|
|
215
|
+
tag: TelemetryDataTag.CodeArtifact,
|
|
216
|
+
value: this.telemetryNodeId,
|
|
217
|
+
},
|
|
218
|
+
// These errors are usually transient and should go away when summarize is retried.
|
|
219
|
+
retryAfterSeconds: 1,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
if (parentSkipRecursion) {
|
|
223
|
+
return { success: true };
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
for (const child of this.children.values()) {
|
|
227
|
+
const result = child.validateSummaryCore(this.wipSkipRecursion || parentSkipRecursion);
|
|
228
|
+
// If any child fails, return the failure.
|
|
229
|
+
if (!result.success) {
|
|
230
|
+
return result;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return { success: true };
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
private wasSummarizeMissed(parentSkipRecursion: boolean): boolean {
|
|
237
|
+
assert(
|
|
238
|
+
this.wipSummaryLogger !== undefined,
|
|
239
|
+
0x6fc /* wipSummaryLogger should have been set in startSummary or ctor */,
|
|
240
|
+
);
|
|
241
|
+
assert(this.wipReferenceSequenceNumber !== undefined, 0x6fd /* Not tracking a summary */);
|
|
242
|
+
|
|
243
|
+
// If the parent node skipped recursion, it did not call summarize on this node. So, summarize was not missed
|
|
244
|
+
// but was intentionally not called.
|
|
245
|
+
// Otherwise, summarize should have been called on this node and wipLocalPaths must be set.
|
|
246
|
+
if (parentSkipRecursion || this.wipLocalPaths !== undefined) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The absence of wip local path indicates that summarize was not called for this node. Return failure.
|
|
252
|
+
* This can happen if:
|
|
253
|
+
* 1. A child node was created after summarize was already called on the parent. For example, a data store
|
|
254
|
+
* is realized (loaded) after summarize was called on it creating summarizer nodes for its DDSes. In this case,
|
|
255
|
+
* parentSkipRecursion will be true and the if block above would handle it.
|
|
256
|
+
* 2. A new node was created but summarize was never called on it. This can mean that the summary that is
|
|
257
|
+
* generated may not have the data from this node. We should not continue, log and throw an error. This
|
|
258
|
+
* will help us identify these cases and take appropriate action.
|
|
259
|
+
*
|
|
260
|
+
* This happens due to scenarios such as data store created during summarize. Such errors should go away when
|
|
261
|
+
* summarize is attempted again.
|
|
262
|
+
*/
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Called after summary has been uploaded to the server. Add the work-in-progress state to the pending summary
|
|
268
|
+
* queue. We track this until we get an ack from the server for this summary.
|
|
269
|
+
* @param proposalHandle - The handle of the summary that was uploaded to the server.
|
|
270
|
+
*/
|
|
271
|
+
public completeSummary(proposalHandle: string, validate: boolean) {
|
|
272
|
+
this.completeSummaryCore(
|
|
273
|
+
proposalHandle,
|
|
274
|
+
undefined /* parentPath */,
|
|
275
|
+
false /* parentSkipRecursion */,
|
|
276
|
+
validate,
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Recursive implementation for completeSummary, with additional internal-only parameters.
|
|
282
|
+
* @param proposalHandle - The handle of the summary that was uploaded to the server.
|
|
283
|
+
* @param parentPath - The path of the parent node which is used to build the path of this node.
|
|
284
|
+
* @param parentSkipRecursion - true if the parent of this node skipped recursing the child nodes when summarizing.
|
|
285
|
+
* In that case, the children will not have work-in-progress state.
|
|
286
|
+
* @param validate - true to validate that the in-progress summary is correct for all nodes.
|
|
204
287
|
*/
|
|
205
288
|
protected completeSummaryCore(
|
|
206
289
|
proposalHandle: string,
|
|
207
290
|
parentPath: EscapedPath | undefined,
|
|
208
291
|
parentSkipRecursion: boolean,
|
|
292
|
+
validate: boolean,
|
|
209
293
|
) {
|
|
210
|
-
|
|
211
|
-
this.
|
|
212
|
-
|
|
213
|
-
|
|
294
|
+
if (validate && this.wasSummarizeMissed(parentSkipRecursion)) {
|
|
295
|
+
this.throwUnexpectedError({
|
|
296
|
+
eventName: "NodeDidNotSummarize",
|
|
297
|
+
proposalHandle,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
|
|
214
301
|
assert(this.wipReferenceSequenceNumber !== undefined, 0x1a4 /* "Not tracking a summary" */);
|
|
215
302
|
let localPathsToUse = this.wipLocalPaths;
|
|
216
303
|
|
|
@@ -239,22 +326,9 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
239
326
|
}
|
|
240
327
|
}
|
|
241
328
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
* is realized (loaded) after summarize was called on it creating summarizer nodes for its DDSes. In this case,
|
|
246
|
-
* parentSkipRecursion will be true and the if block above would handle it.
|
|
247
|
-
* 2. A new node was created but summarize was never called on it. This can mean that the summary that is
|
|
248
|
-
* generated may not have the data from this node. We should not continue, log and throw an error. This
|
|
249
|
-
* will help us identify these cases and take appropriate action.
|
|
250
|
-
*/
|
|
251
|
-
if (localPathsToUse === undefined) {
|
|
252
|
-
this.throwUnexpectedError({
|
|
253
|
-
eventName: "NodeNotSummarized",
|
|
254
|
-
proposalHandle,
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
|
|
329
|
+
// If localPathsToUse is undefined, it means summarize didn't run for this node and in that case the validate
|
|
330
|
+
// step should have failed.
|
|
331
|
+
assert(localPathsToUse !== undefined, 0x6fe /* summarize didn't run for node */);
|
|
258
332
|
const summary = new SummaryNode({
|
|
259
333
|
...localPathsToUse,
|
|
260
334
|
referenceSequenceNumber: this.wipReferenceSequenceNumber,
|
|
@@ -266,6 +340,7 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
266
340
|
proposalHandle,
|
|
267
341
|
fullPathForChildren,
|
|
268
342
|
this.wipSkipRecursion || parentSkipRecursion,
|
|
343
|
+
validate,
|
|
269
344
|
);
|
|
270
345
|
}
|
|
271
346
|
// Note that this overwrites existing pending summary with
|
|
@@ -290,31 +365,21 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
290
365
|
|
|
291
366
|
/**
|
|
292
367
|
* Refreshes the latest summary tracked by this node. If we have a pending summary for the given proposal handle,
|
|
293
|
-
* it becomes the latest summary. If the current summary is already ahead
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
* @returns A RefreshSummaryResult type which returns information based on the following three scenarios:
|
|
297
|
-
*
|
|
298
|
-
* 1. The latest summary was not updated.
|
|
299
|
-
*
|
|
300
|
-
* 2. The latest summary was updated and the summary corresponding to the params was being tracked.
|
|
368
|
+
* it becomes the latest summary. If the current summary is already ahead, we skip the update.
|
|
369
|
+
* If the current summary is behind, then we do not refresh.
|
|
301
370
|
*
|
|
302
|
-
*
|
|
303
|
-
* case, the latest summary is updated based on the downloaded snapshot which is also returned.
|
|
371
|
+
* @returns true if the summary is tracked by this node, false otherwise.
|
|
304
372
|
*/
|
|
305
373
|
public async refreshLatestSummary(
|
|
306
|
-
proposalHandle: string
|
|
374
|
+
proposalHandle: string,
|
|
307
375
|
summaryRefSeq: number,
|
|
308
|
-
|
|
309
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
310
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
311
|
-
): Promise<RefreshSummaryResult> {
|
|
376
|
+
): Promise<IRefreshSummaryResult> {
|
|
312
377
|
const eventProps: {
|
|
313
378
|
proposalHandle: string | undefined;
|
|
314
379
|
summaryRefSeq: number;
|
|
315
380
|
referenceSequenceNumber: number;
|
|
316
|
-
|
|
317
|
-
|
|
381
|
+
isSummaryTracked?: boolean;
|
|
382
|
+
pendingSummaryFound?: boolean;
|
|
318
383
|
} = {
|
|
319
384
|
proposalHandle,
|
|
320
385
|
summaryRefSeq,
|
|
@@ -335,75 +400,22 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
335
400
|
});
|
|
336
401
|
}
|
|
337
402
|
|
|
338
|
-
|
|
339
|
-
|
|
403
|
+
let isSummaryTracked = false;
|
|
404
|
+
let isSummaryNewer = false;
|
|
340
405
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
proposalHandle,
|
|
344
|
-
maybeSummaryNode.referenceSequenceNumber,
|
|
345
|
-
);
|
|
346
|
-
eventProps.wasSummaryTracked = true;
|
|
347
|
-
eventProps.latestSummaryUpdated = true;
|
|
348
|
-
event.end(eventProps);
|
|
349
|
-
return {
|
|
350
|
-
latestSummaryUpdated: true,
|
|
351
|
-
wasSummaryTracked: true,
|
|
352
|
-
summaryRefSeq,
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const props = {
|
|
357
|
-
summaryRefSeq,
|
|
358
|
-
pendingSize: this.pendingSummaries.size ?? undefined,
|
|
359
|
-
};
|
|
360
|
-
this.logger.sendTelemetryEvent({
|
|
361
|
-
eventName: "PendingSummaryNotFound",
|
|
362
|
-
proposalHandle,
|
|
363
|
-
referenceSequenceNumber: this.referenceSequenceNumber,
|
|
364
|
-
details: JSON.stringify(props),
|
|
365
|
-
});
|
|
406
|
+
if (summaryRefSeq > this.referenceSequenceNumber) {
|
|
407
|
+
isSummaryNewer = true;
|
|
366
408
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
// Fetch the latest snapshot and refresh state from it. Note that we need to use the reference sequence number
|
|
376
|
-
// of the fetched snapshot and not the "summaryRefSeq" that was passed in.
|
|
377
|
-
const { snapshotTree, snapshotRefSeq: fetchedSnapshotRefSeq } =
|
|
378
|
-
await fetchLatestSnapshot();
|
|
379
|
-
|
|
380
|
-
// Possible re-entrancy. We may have updated latest summary state while fetching the snapshot. If the fetched
|
|
381
|
-
// snapshot is older than the latest tracked summary, ignore it.
|
|
382
|
-
if (this.referenceSequenceNumber >= fetchedSnapshotRefSeq) {
|
|
383
|
-
eventProps.latestSummaryUpdated = false;
|
|
384
|
-
event.end(eventProps);
|
|
385
|
-
return { latestSummaryUpdated: false };
|
|
409
|
+
const maybeSummaryNode = this.pendingSummaries.get(proposalHandle);
|
|
410
|
+
if (maybeSummaryNode !== undefined) {
|
|
411
|
+
this.refreshLatestSummaryFromPending(
|
|
412
|
+
proposalHandle,
|
|
413
|
+
maybeSummaryNode.referenceSequenceNumber,
|
|
414
|
+
);
|
|
415
|
+
isSummaryTracked = true;
|
|
386
416
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
fetchedSnapshotRefSeq,
|
|
390
|
-
snapshotTree,
|
|
391
|
-
undefined,
|
|
392
|
-
EscapedPath.create(""),
|
|
393
|
-
correlatedSummaryLogger,
|
|
394
|
-
readAndParseBlob,
|
|
395
|
-
);
|
|
396
|
-
|
|
397
|
-
eventProps.latestSummaryUpdated = true;
|
|
398
|
-
eventProps.wasSummaryTracked = false;
|
|
399
|
-
eventProps.summaryRefSeq = fetchedSnapshotRefSeq;
|
|
400
|
-
event.end(eventProps);
|
|
401
|
-
return {
|
|
402
|
-
latestSummaryUpdated: true,
|
|
403
|
-
wasSummaryTracked: false,
|
|
404
|
-
snapshotTree,
|
|
405
|
-
summaryRefSeq: fetchedSnapshotRefSeq,
|
|
406
|
-
};
|
|
417
|
+
event.end({ ...eventProps, isSummaryNewer, pendingSummaryFound: isSummaryTracked });
|
|
418
|
+
return { isSummaryTracked, isSummaryNewer };
|
|
407
419
|
},
|
|
408
420
|
{ start: true, end: true, cancel: "error" },
|
|
409
421
|
);
|
|
@@ -445,59 +457,6 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
445
457
|
}
|
|
446
458
|
}
|
|
447
459
|
|
|
448
|
-
protected async refreshLatestSummaryFromSnapshot(
|
|
449
|
-
referenceSequenceNumber: number,
|
|
450
|
-
snapshotTree: ISnapshotTree,
|
|
451
|
-
basePath: EscapedPath | undefined,
|
|
452
|
-
localPath: EscapedPath,
|
|
453
|
-
correlatedSummaryLogger: ITelemetryLoggerExt,
|
|
454
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
455
|
-
): Promise<void> {
|
|
456
|
-
// Possible re-entrancy. If we have already seen a summary later than this one, ignore it.
|
|
457
|
-
if (this.referenceSequenceNumber >= referenceSequenceNumber) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
this.refreshLatestSummaryCore(referenceSequenceNumber);
|
|
462
|
-
|
|
463
|
-
this._latestSummary = new SummaryNode({
|
|
464
|
-
referenceSequenceNumber,
|
|
465
|
-
basePath,
|
|
466
|
-
localPath,
|
|
467
|
-
});
|
|
468
|
-
|
|
469
|
-
const pathParts: string[] = [];
|
|
470
|
-
const { childrenTree, childrenPathPart } = parseSummaryForSubtrees(snapshotTree);
|
|
471
|
-
if (childrenPathPart !== undefined) {
|
|
472
|
-
pathParts.push(childrenPathPart);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
if (pathParts.length > 0) {
|
|
476
|
-
this._latestSummary.additionalPath = EscapedPath.createAndConcat(pathParts);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
// Propagate update to all child nodes
|
|
480
|
-
const pathForChildren = this._latestSummary.fullPathForChildren;
|
|
481
|
-
await Promise.all(
|
|
482
|
-
Array.from(this.children)
|
|
483
|
-
.filter(([id]) => {
|
|
484
|
-
// Assuming subtrees missing from snapshot are newer than the snapshot,
|
|
485
|
-
// but might be nice to assert this using earliest seq for node.
|
|
486
|
-
return childrenTree.trees[id] !== undefined;
|
|
487
|
-
})
|
|
488
|
-
.map(async ([id, child]) => {
|
|
489
|
-
return child.refreshLatestSummaryFromSnapshot(
|
|
490
|
-
referenceSequenceNumber,
|
|
491
|
-
childrenTree.trees[id],
|
|
492
|
-
pathForChildren,
|
|
493
|
-
EscapedPath.create(id),
|
|
494
|
-
correlatedSummaryLogger,
|
|
495
|
-
readAndParseBlob,
|
|
496
|
-
);
|
|
497
|
-
}),
|
|
498
|
-
);
|
|
499
|
-
}
|
|
500
|
-
|
|
501
460
|
private refreshLatestSummaryCore(referenceSequenceNumber: number): void {
|
|
502
461
|
for (const [key, value] of this.pendingSummaries) {
|
|
503
462
|
if (value.referenceSequenceNumber < referenceSequenceNumber) {
|
|
@@ -727,10 +686,9 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
727
686
|
const error = new LoggingError(eventProps.eventName, {
|
|
728
687
|
...eventProps,
|
|
729
688
|
referenceSequenceNumber: this.wipReferenceSequenceNumber,
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
},
|
|
689
|
+
...tagCodeArtifacts({
|
|
690
|
+
id: this.telemetryNodeId,
|
|
691
|
+
}),
|
|
734
692
|
});
|
|
735
693
|
this.logger.sendErrorEvent(eventProps, error);
|
|
736
694
|
throw error;
|