@fluidframework/container-runtime 2.0.0-rc.4.0.6 → 2.0.0-rc.5.0.1
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 +46 -0
- package/api-extractor/api-extractor-lint-bundle.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.esm.json +5 -0
- package/api-extractor/api-extractor-lint-public.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-public.esm.json +5 -0
- package/api-extractor.json +1 -1
- package/api-report/{container-runtime.api.md → container-runtime.alpha.api.md} +33 -516
- package/api-report/container-runtime.beta.api.md +73 -0
- package/api-report/container-runtime.public.api.md +73 -0
- package/biome.jsonc +4 -0
- package/container-runtime.test-files.tar +0 -0
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +3 -20
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +1 -35
- package/dist/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +21 -12
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +113 -110
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +14 -14
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.d.ts +2 -1
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +17 -34
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +109 -145
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +30 -44
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +26 -40
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +4 -3
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +1 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +1 -3
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +5 -5
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +29 -30
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +12 -31
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +10 -38
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +1 -5
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +2 -3
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +2 -35
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +9 -62
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +2 -2
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +3 -9
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +1 -1
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +1 -3
- package/dist/gc/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/messageTypes.d.ts +6 -22
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +2 -2
- 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.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +11 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +13 -2
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +1 -2
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +10 -3
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +7 -0
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +4 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +13 -8
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +10 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +13 -18
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +2 -2
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.d.ts +1 -1
- package/dist/opProperties.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/pendingStateManager.js +15 -5
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js.map +1 -1
- package/dist/storageServiceWithAttachBlobs.js.map +1 -1
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +2 -3
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +2 -2
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +4 -2
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +35 -13
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +1 -6
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +23 -110
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +1 -1
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +4 -1
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +2 -2
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +2 -3
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +16 -16
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -3
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +5 -2
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +17 -29
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +1 -1
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +11 -11
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +2 -3
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +2 -2
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +7 -8
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +27 -24
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +1 -2
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/throttler.d.ts.map +1 -1
- package/dist/throttler.js +3 -1
- package/dist/throttler.js.map +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +3 -20
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +2 -36
- package/lib/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +21 -12
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +114 -112
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +2 -2
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts +2 -1
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +17 -34
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +106 -142
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +30 -44
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +29 -43
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +1 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +4 -3
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +1 -3
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +5 -5
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +30 -31
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +13 -32
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +10 -38
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +0 -4
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +2 -3
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +2 -35
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +4 -57
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +2 -2
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +3 -9
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +1 -1
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -1
- package/lib/gc/index.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/messageTypes.d.ts +6 -22
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +2 -2
- 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 +11 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +13 -2
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +1 -2
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +10 -3
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +7 -0
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +4 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +13 -8
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +10 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +13 -18
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.d.ts +1 -1
- package/lib/opProperties.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/pendingStateManager.js +15 -5
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js.map +1 -1
- package/lib/storageServiceWithAttachBlobs.js.map +1 -1
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +2 -3
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +2 -2
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +4 -2
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +35 -13
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +1 -6
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +22 -109
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +1 -1
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +4 -1
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +2 -3
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +14 -14
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +5 -2
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +17 -29
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +1 -1
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +3 -3
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +2 -3
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +2 -2
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +7 -8
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +26 -23
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +1 -2
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/throttler.d.ts.map +1 -1
- package/lib/throttler.js +3 -1
- package/lib/throttler.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +92 -28
- package/src/batchTracker.ts +5 -2
- package/src/blobManager.ts +21 -61
- package/src/channelCollection.ts +179 -186
- package/src/connectionTelemetry.ts +18 -12
- package/src/containerHandleContext.ts +2 -1
- package/src/containerRuntime.ts +166 -214
- package/src/dataStore.ts +2 -1
- package/src/dataStoreContext.ts +79 -98
- package/src/dataStoreContexts.ts +7 -2
- package/src/deltaManagerProxies.ts +15 -6
- package/src/deltaScheduler.ts +5 -4
- package/src/gc/garbageCollection.md +0 -8
- package/src/gc/garbageCollection.ts +66 -57
- package/src/gc/gcConfigs.ts +15 -37
- package/src/gc/gcDefinitions.ts +20 -39
- package/src/gc/gcHelpers.ts +8 -4
- package/src/gc/gcSummaryDefinitions.ts +1 -1
- package/src/gc/gcSummaryStateTracker.ts +11 -74
- package/src/gc/gcTelemetry.ts +4 -11
- package/src/gc/index.ts +0 -2
- package/src/index.ts +1 -2
- package/src/messageTypes.ts +8 -24
- package/src/opLifecycle/README.md +120 -160
- package/src/opLifecycle/definitions.ts +2 -2
- package/src/opLifecycle/index.ts +5 -1
- package/src/opLifecycle/opCompressor.ts +13 -2
- package/src/opLifecycle/opDecompressor.ts +3 -7
- package/src/opLifecycle/opGroupingManager.ts +12 -8
- package/src/opLifecycle/opSplitter.ts +22 -11
- package/src/opLifecycle/outbox.ts +14 -32
- package/src/opLifecycle/remoteMessageProcessor.ts +4 -1
- package/src/opProperties.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +20 -7
- package/src/scheduleManager.ts +4 -1
- package/src/summary/documentSchema.ts +4 -7
- package/src/summary/images/appTree.png +0 -0
- package/src/summary/images/protocolAndAppTree.png +0 -0
- package/src/summary/images/summaryTree.png +0 -0
- package/src/summary/index.ts +5 -2
- package/src/summary/orderedClientElection.ts +100 -22
- package/src/summary/runningSummarizer.ts +54 -124
- package/src/summary/summarizer.ts +5 -2
- package/src/summary/summarizerClientElection.ts +4 -2
- package/src/summary/summarizerNode/summarizerNode.ts +23 -30
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +9 -3
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +11 -11
- package/src/summary/summarizerTypes.ts +32 -33
- package/src/summary/summaryCollection.ts +6 -3
- package/src/summary/summaryFormat.ts +18 -10
- package/src/summary/summaryFormats.md +160 -0
- package/src/summary/summaryGenerator.ts +47 -30
- package/src/summary/summaryManager.ts +6 -9
- package/src/throttler.ts +3 -1
- package/tsconfig.json +2 -0
- package/tsdoc.json +4 -0
|
@@ -9,12 +9,12 @@ import { IDisposable, IEvent } from "@fluidframework/core-interfaces";
|
|
|
9
9
|
import { assert, Deferred } from "@fluidframework/core-utils/internal";
|
|
10
10
|
import {
|
|
11
11
|
IDocumentMessage,
|
|
12
|
-
ISequencedDocumentMessage,
|
|
13
12
|
ISummaryAck,
|
|
14
13
|
ISummaryContent,
|
|
15
14
|
ISummaryNack,
|
|
16
15
|
MessageType,
|
|
17
|
-
|
|
16
|
+
ISequencedDocumentMessage,
|
|
17
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
18
18
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -298,7 +298,10 @@ export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEve
|
|
|
298
298
|
this.summaryWatchers.delete(clientId);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
public setPendingAckTimerTimeoutCallback(
|
|
301
|
+
public setPendingAckTimerTimeoutCallback(
|
|
302
|
+
maxAckWaitTime: number,
|
|
303
|
+
timeoutCallback: () => void,
|
|
304
|
+
) {
|
|
302
305
|
this.maxAckWaitTime = maxAckWaitTime;
|
|
303
306
|
this.pendingAckTimerTimeoutCallback = timeoutCallback;
|
|
304
307
|
}
|
|
@@ -4,18 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import {
|
|
7
|
+
import { SummaryType } from "@fluidframework/driver-definitions";
|
|
8
|
+
import {
|
|
9
|
+
IDocumentStorageService,
|
|
10
|
+
ISnapshotTree,
|
|
11
|
+
ISequencedDocumentMessage,
|
|
12
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
8
13
|
import {
|
|
9
14
|
blobHeadersBlobName as blobNameForBlobHeaders,
|
|
10
15
|
readAndParse,
|
|
11
16
|
} from "@fluidframework/driver-utils/internal";
|
|
12
17
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "@fluidframework/
|
|
17
|
-
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
18
|
-
import { channelsTreeName, gcTreeKey } from "@fluidframework/runtime-definitions/internal";
|
|
18
|
+
ISummaryTreeWithStats,
|
|
19
|
+
channelsTreeName,
|
|
20
|
+
gcTreeKey,
|
|
21
|
+
} from "@fluidframework/runtime-definitions/internal";
|
|
19
22
|
|
|
20
23
|
import { IGCMetadata } from "../gc/index.js";
|
|
21
24
|
|
|
@@ -25,7 +28,10 @@ import { IDocumentSchema } from "./documentSchema.js";
|
|
|
25
28
|
* @deprecated - This interface will no longer be exported in the future(AB#8004).
|
|
26
29
|
* @alpha
|
|
27
30
|
*/
|
|
28
|
-
export type OmitAttributesVersions<T> = Omit<
|
|
31
|
+
export type OmitAttributesVersions<T> = Omit<
|
|
32
|
+
T,
|
|
33
|
+
"snapshotFormatVersion" | "summaryFormatVersion"
|
|
34
|
+
>;
|
|
29
35
|
|
|
30
36
|
/**
|
|
31
37
|
* @deprecated - This interface will no longer be exported in the future(AB#8004).
|
|
@@ -84,7 +90,9 @@ export type ReadFluidDataStoreAttributes =
|
|
|
84
90
|
| IFluidDataStoreAttributes0
|
|
85
91
|
| IFluidDataStoreAttributes1
|
|
86
92
|
| IFluidDataStoreAttributes2;
|
|
87
|
-
export type WriteFluidDataStoreAttributes =
|
|
93
|
+
export type WriteFluidDataStoreAttributes =
|
|
94
|
+
| IFluidDataStoreAttributes1
|
|
95
|
+
| IFluidDataStoreAttributes2;
|
|
88
96
|
|
|
89
97
|
export function getAttributesFormatVersion(attributes: ReadFluidDataStoreAttributes): number {
|
|
90
98
|
if (attributes.summaryFormatVersion) {
|
|
@@ -172,7 +180,7 @@ export const extractSummaryMetadataMessage = (
|
|
|
172
180
|
sequenceNumber: message.sequenceNumber,
|
|
173
181
|
timestamp: message.timestamp,
|
|
174
182
|
type: message.type,
|
|
175
|
-
|
|
183
|
+
};
|
|
176
184
|
|
|
177
185
|
export function getMetadataFormatVersion(metadata?: IContainerRuntimeMetadata): number {
|
|
178
186
|
/**
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Summary and snapshot formats
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
- [Introduction](#introduction)
|
|
6
|
+
- [Summary Format](#summary-format)
|
|
7
|
+
- [Snapshot Format](#snapshot-format)
|
|
8
|
+
- [Summary / Snapshot Tree Visualization](#summary--snapshot-tree-visualization)
|
|
9
|
+
- [Protocol Tree](#protocol-tree)
|
|
10
|
+
- [App Tree](#app-tree)
|
|
11
|
+
- [Summary Tree distinction](#summary-tree-distinction)
|
|
12
|
+
|
|
13
|
+
## Introduction
|
|
14
|
+
|
|
15
|
+
This document describes the format of summaries and snapshots. For learning the differences between summaries and snapshots, see the FAQ section [here](https://fluidframework.com/docs/faq/#whats-the-difference-between-a-summary-and-a-snapshot).
|
|
16
|
+
|
|
17
|
+
The goal of this document is to describe the fundamental structure of a summary / snapshot tree as produced by the runtime, to explain the various node types within the tree along with their respective data, and to show the distinctions between a summary tree and a snapshot tree.
|
|
18
|
+
|
|
19
|
+
## Summary Format
|
|
20
|
+
|
|
21
|
+
Summary is uploaded to storage and is the container's state at a point in time. A summary is represented by an `ISummaryTree` which is defined in [this file](../../../../../common/lib/protocol-definitions/src/summary.ts) and has the following basic structure (some optional properties are removed for simplicity):
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
export interface ISummaryTree {
|
|
25
|
+
type: SummaryType.Tree;
|
|
26
|
+
tree: { [path: string]: SummaryObject };
|
|
27
|
+
}
|
|
28
|
+
export type SummaryType =
|
|
29
|
+
| SummaryType.Attachment
|
|
30
|
+
| SummaryType.Blob
|
|
31
|
+
| SummaryType.Handle
|
|
32
|
+
| SummaryType.Tree;
|
|
33
|
+
export type SummaryObject = ISummaryTree | ISummaryBlob | ISummaryHandle | ISummaryAttachment;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Each tree node in a summary tree is represented by the `ISummaryTree` interface above and contains the following:
|
|
37
|
+
|
|
38
|
+
- `type` - `SummaryType.Tree`
|
|
39
|
+
- `tree` - A list of children of the tree node. Each child node has the following format:
|
|
40
|
+
|
|
41
|
+
`<tree name>`: `<SummaryObject>` where `tree name` is the name given to the child node and `SummaryObject` is one of the following:
|
|
42
|
+
|
|
43
|
+
- `ISummaryTree` - A subtree which has the same structure as this node. For example, container runtime will have subtrees for its data store which in turn will have subtrees for its DDSes.
|
|
44
|
+
|
|
45
|
+
- `ISummaryBlob` - A blob that has some content for this node. For example, a DDS's node has a ".attributes" blob for its attributes such as type, snapshot versions, etc. It may have additional blobs for the actual user content in the DDS.
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
export interface ISummaryBlob {
|
|
49
|
+
type: SummaryType.Blob;
|
|
50
|
+
content: string | Uint8Array;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- `ISummaryAttachment` - This is used for attachment blobs that are uploaded to and downloaded from storage directly. The contents of these blobs are not part of the summary. Storage returns an ID after the attachment has been uploaded and this ID is included in the summary attachment. For example, a DDS can upload some of its large content directly to storage and include its ID in the summary.
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
export interface ISummaryAttachment {
|
|
58
|
+
type: SummaryType.Attachment;
|
|
59
|
+
id: string;
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- `ISummaryHandle` - A summary handle is used for incremental summaries. If a node hasn't changed since the last successful summary, instead of sending it's entire contents, it can send a "handle" which is a path to its summary tree object in the last summary. For example, if a data store or DDS did not change since the last summary, the runtime will use a handle for the entire data store instead of re-sending the entire subtree. The same concept applies for a summary blob or a summary attachment and the "handleType" should be set according to the type of the node. An example of "handle" that a DDS sends would be something like: "/_dataStoreId_/_ddsId_".
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
export interface ISummaryHandle {
|
|
67
|
+
type: SummaryType.Handle;
|
|
68
|
+
handleType: SummaryTypeNoHandle;
|
|
69
|
+
handle: string;
|
|
70
|
+
}
|
|
71
|
+
export type SummaryTypeNoHandle =
|
|
72
|
+
| SummaryType.Tree
|
|
73
|
+
| SummaryType.Blob
|
|
74
|
+
| SummaryType.Attachment;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Snapshot Format
|
|
78
|
+
|
|
79
|
+
Snapshot is downloaded from the storage (typically on document load) and is the container's state at a point in time. A snapshot is represented by an `ISnapshotTree` which is defined in [this file](../../../../../common/lib/protocol-definitions/src/storage.ts) and has the following basic structure (some optional properties are removed for simplicity):
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
export interface ISnapshotTree {
|
|
83
|
+
blobs: { [path: string]: string };
|
|
84
|
+
trees: { [path: string]: ISnapshotTree };
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Each node in a snapshot tree is represented by the above interface and contains the following:
|
|
89
|
+
|
|
90
|
+
- `blobs` - A list of blobs that have the contents for the node. For example, a DDS's node has a ".attributes" blob for its attributes such as type, snapshot versions, etc. It may have additional blobs for the actual user content in the DDS. Each blob in the list has the following format:
|
|
91
|
+
|
|
92
|
+
`<blob name>`: `<unique blob id>` where `blob name` is the name given to the blob by the node and `unique blob id` is the id that uniquely represents the blob's content in storage.
|
|
93
|
+
|
|
94
|
+
When a node needs the content of a blob, it fetches it from storage by calling `readBlob` and providing the `unique blob id`.
|
|
95
|
+
|
|
96
|
+
> Note: Summary attachments (described in summary format) are also part of this list.
|
|
97
|
+
|
|
98
|
+
- `trees` - A list of subtrees of the node. For example, container runtime will have subtrees for its data store which in turn will have subtrees for its DDSes. Each subtree in the list has the following format:
|
|
99
|
+
|
|
100
|
+
`<tree name>`: `<snapshot tree>` where `tree name` is the name given to the subtree by the node and `snapshot tree` is its content in `ISnapshotTree` format.
|
|
101
|
+
|
|
102
|
+
## Summary / Snapshot Tree Visualization
|
|
103
|
+
|
|
104
|
+
This section shows what a typical summary or snapshot tree in a container looks like. Some key things to note:
|
|
105
|
+
|
|
106
|
+
- The diagrams in this section show some examples of existing blobs / trees that are added at each node and doesn't show an exhaustive list.
|
|
107
|
+
- The blue boxes represent tree nodes.
|
|
108
|
+
- The green boxes represent blobs.
|
|
109
|
+
- The purple boxes represent attachments.
|
|
110
|
+
- The orange boxes represent other nodes - either existing nodes that are not shown or new nodes that may be added in the future. A node can be a tree, blob or attachment.
|
|
111
|
+
|
|
112
|
+
A typical tree uploaded to or downloaded from storage looks like the following:
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
`Protocol tree` - This is the tree named `.protocol` and contains protocol level information for the container. These are used by the container to initialize.
|
|
116
|
+
|
|
117
|
+
`App tree` - This is the tree named `.app` and contains the container's state and data. The subtree under .app is what is generated by the container runtime.
|
|
118
|
+
|
|
119
|
+
### Protocol tree
|
|
120
|
+
|
|
121
|
+
The contents of the protocol tree are:
|
|
122
|
+
|
|
123
|
+
- `attributes blob` - Attributes such as the sequence number the summary was taken at.
|
|
124
|
+
- `quorum members blob` - The members in the quorum at the time summary was taken.
|
|
125
|
+
- `quorum proposals blob` - The quorum proposals at the time summary was taken.
|
|
126
|
+
- `quorum values blob` - The quorum values at the time summary was taken.
|
|
127
|
+
- Other blobs and trees may be added at this level as needed.
|
|
128
|
+
|
|
129
|
+
### App tree
|
|
130
|
+
|
|
131
|
+
This is what the ".app" tree looks like which is generated by the container runtime during summary upload. The same is passed to container runtime during snapshot download:
|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
- `Container`: The root represents the container or container runtime node. Its contents are described below:
|
|
135
|
+
|
|
136
|
+
- `.metadata blob` - The container level metadata such as creation time, create version, etc.
|
|
137
|
+
- `.aliases blob` - The list of aliases for data stores and the corresponding internal id.
|
|
138
|
+
- `.idCompressor blob` - The data for the ID compressor.
|
|
139
|
+
- `.blobs tree` - The snapshot for the attachment blobs added by the blob manager. The individual attachment blobs are present as summary attachments (`ISummaryAttachment`).
|
|
140
|
+
- `gc tree` - The snapshot for garbage collection added by the garbage collector.
|
|
141
|
+
- `.channels tree` - The subtrees for all the data stores.
|
|
142
|
+
- There may be other blobs and trees added at this level as needed.
|
|
143
|
+
|
|
144
|
+
- `Data store`: Data store snapshot trees are under ".channels" subtree of container runtime's tree. Its contents are described below:
|
|
145
|
+
|
|
146
|
+
- `.component blob` - The attributes for a data store such as the package name, snapshot version, etc.
|
|
147
|
+
- `.channels tree` - The subtrees for all its DDSs.
|
|
148
|
+
- There may be other blobs and trees added at this level as needed.
|
|
149
|
+
|
|
150
|
+
- `DDS`: DDS snapshot trees are under ".channels" subtree of its parent data store's tree. Its contents are described below:
|
|
151
|
+
- `.attributes blob` - The attributes for a DDS such as the type, snapshot version, etc.
|
|
152
|
+
- `.header blob` - Added by some DDSs and may contains its data. Note that all DDSs may not add this.
|
|
153
|
+
- A DDS may add other blobs and / or trees to represent its data. Basically, a DDS can write its data in any form
|
|
154
|
+
|
|
155
|
+
### Summary tree distinction
|
|
156
|
+
|
|
157
|
+
In the visualization above, a summary tree differs from a snapshot tree in the following way:
|
|
158
|
+
A summary tree supports incremental summaries via summary handles. Any node in the tree that has not changed since the previous successful summary can send a summary handle (`ISummaryHandle`) instead of sending its entire contents in a full summary. The following diagram shows this with an example where certain parts of the summary tree use a summary handle. It is a zoomed in version of the same app tree as above where nodes where summary handles are marked in red:
|
|
159
|
+
|
|
160
|
+

|
|
@@ -11,9 +11,8 @@ import {
|
|
|
11
11
|
IPromiseTimerResult,
|
|
12
12
|
Timer,
|
|
13
13
|
} from "@fluidframework/core-utils/internal";
|
|
14
|
-
import { DriverErrorTypes } from "@fluidframework/driver-definitions/internal";
|
|
14
|
+
import { DriverErrorTypes, MessageType } from "@fluidframework/driver-definitions/internal";
|
|
15
15
|
import { getRetryDelaySecondsFromError } from "@fluidframework/driver-utils/internal";
|
|
16
|
-
import { MessageType } from "@fluidframework/protocol-definitions";
|
|
17
16
|
import {
|
|
18
17
|
isFluidError,
|
|
19
18
|
ITelemetryLoggerExt,
|
|
@@ -35,6 +34,7 @@ import {
|
|
|
35
34
|
SubmitSummaryResult,
|
|
36
35
|
SummarizeResultPart,
|
|
37
36
|
SummaryGeneratorTelemetry,
|
|
37
|
+
type IRetriableFailureError,
|
|
38
38
|
} from "./summarizerTypes.js";
|
|
39
39
|
import { IClientSummaryWatcher } from "./summaryCollection.js";
|
|
40
40
|
|
|
@@ -127,8 +127,10 @@ const summarizeErrors = {
|
|
|
127
127
|
disconnect: "Summary cancelled due to summarizer or main client disconnect",
|
|
128
128
|
} as const;
|
|
129
129
|
|
|
130
|
+
export type SummarizeErrorCode = keyof typeof summarizeErrors;
|
|
131
|
+
|
|
130
132
|
// Helper functions to report failures and return.
|
|
131
|
-
export const getFailMessage = (errorCode:
|
|
133
|
+
export const getFailMessage = (errorCode: SummarizeErrorCode) =>
|
|
132
134
|
`${errorCode}: ${summarizeErrors[errorCode]}`;
|
|
133
135
|
|
|
134
136
|
export class SummarizeResultBuilder {
|
|
@@ -150,7 +152,7 @@ export class SummarizeResultBuilder {
|
|
|
150
152
|
*/
|
|
151
153
|
public fail(
|
|
152
154
|
message: string,
|
|
153
|
-
error:
|
|
155
|
+
error: IRetriableFailureError,
|
|
154
156
|
submitFailureResult?: SubmitSummaryFailureData,
|
|
155
157
|
nackSummaryResult?: INackSummaryResult,
|
|
156
158
|
) {
|
|
@@ -184,8 +186,7 @@ export class SummarizeResultBuilder {
|
|
|
184
186
|
/**
|
|
185
187
|
* Errors type for errors hit during summary that may be retriable.
|
|
186
188
|
*/
|
|
187
|
-
export class RetriableSummaryError extends LoggingError {
|
|
188
|
-
public readonly canRetry = this.retryAfterSeconds !== undefined;
|
|
189
|
+
export class RetriableSummaryError extends LoggingError implements IRetriableFailureError {
|
|
189
190
|
constructor(
|
|
190
191
|
message: string,
|
|
191
192
|
public readonly retryAfterSeconds?: number,
|
|
@@ -221,9 +222,8 @@ export class SummaryGenerator {
|
|
|
221
222
|
/**
|
|
222
223
|
* Generates summary and listens for broadcast and ack/nack.
|
|
223
224
|
* Returns true for ack, false for nack, and undefined for failure or timeout.
|
|
224
|
-
* @param
|
|
225
|
-
* @param
|
|
226
|
-
* fullTree to generate tree without any summary handles even if unchanged
|
|
225
|
+
* @param summaryOptions - options controlling how the summary is generated or submitted.
|
|
226
|
+
* @param resultsBuilder - optional, result builder to use to build pass or fail result.
|
|
227
227
|
*/
|
|
228
228
|
public summarize(
|
|
229
229
|
summaryOptions: ISubmitSummaryOptions,
|
|
@@ -273,8 +273,8 @@ export class SummaryGenerator {
|
|
|
273
273
|
* be provided. For op broadcast failures, only errors / properties should be provided.
|
|
274
274
|
*/
|
|
275
275
|
const fail = (
|
|
276
|
-
errorCode:
|
|
277
|
-
error
|
|
276
|
+
errorCode: SummarizeErrorCode,
|
|
277
|
+
error: IRetriableFailureError,
|
|
278
278
|
properties?: SummaryGeneratorTelemetry,
|
|
279
279
|
submitFailureResult?: SubmitSummaryFailureData,
|
|
280
280
|
nackSummaryResult?: INackSummaryResult,
|
|
@@ -294,11 +294,9 @@ export class SummaryGenerator {
|
|
|
294
294
|
...properties,
|
|
295
295
|
reason,
|
|
296
296
|
category,
|
|
297
|
-
retryAfterSeconds:
|
|
298
|
-
submitFailureResult?.retryAfterSeconds ??
|
|
299
|
-
nackSummaryResult?.retryAfterSeconds,
|
|
297
|
+
retryAfterSeconds: error.retryAfterSeconds,
|
|
300
298
|
},
|
|
301
|
-
error
|
|
299
|
+
error,
|
|
302
300
|
); // disconnect & summaryAckTimeout do not have proper error.
|
|
303
301
|
|
|
304
302
|
resultsBuilder.fail(reason, error, submitFailureResult, nackSummaryResult);
|
|
@@ -320,8 +318,7 @@ export class SummaryGenerator {
|
|
|
320
318
|
minimumSequenceNumber: summaryData.minimumSequenceNumber,
|
|
321
319
|
opsSinceLastAttempt: referenceSequenceNumber - lastAttemptRefSeqNum,
|
|
322
320
|
opsSinceLastSummary:
|
|
323
|
-
referenceSequenceNumber -
|
|
324
|
-
this.heuristicData.lastSuccessfulSummary.refSequenceNumber,
|
|
321
|
+
referenceSequenceNumber - this.heuristicData.lastSuccessfulSummary.refSequenceNumber,
|
|
325
322
|
stage: summaryData.stage,
|
|
326
323
|
};
|
|
327
324
|
summarizeTelemetryProps = this.addSummaryDataToTelemetryProps(
|
|
@@ -330,9 +327,11 @@ export class SummaryGenerator {
|
|
|
330
327
|
);
|
|
331
328
|
|
|
332
329
|
if (summaryData.stage !== "submit") {
|
|
333
|
-
|
|
330
|
+
const errorCode: SummarizeErrorCode = "submitSummaryFailure";
|
|
331
|
+
const retriableError =
|
|
332
|
+
summaryData.error ?? new RetriableSummaryError(getFailMessage(errorCode));
|
|
333
|
+
return fail(errorCode, retriableError, summarizeTelemetryProps, {
|
|
334
334
|
stage: summaryData.stage,
|
|
335
|
-
retryAfterSeconds: getRetryDelaySecondsFromError(summaryData.error),
|
|
336
335
|
});
|
|
337
336
|
}
|
|
338
337
|
|
|
@@ -346,7 +345,7 @@ export class SummaryGenerator {
|
|
|
346
345
|
* state change of multiple data stores. So, the total number of data stores that are summarized should not
|
|
347
346
|
* exceed the number of ops since last summary + number of data store whose reference state changed.
|
|
348
347
|
*/
|
|
349
|
-
if (!submitSummaryOptions.fullTree
|
|
348
|
+
if (!submitSummaryOptions.fullTree) {
|
|
350
349
|
const { summarizedDataStoreCount, gcStateUpdatedDataStoreCount = 0 } =
|
|
351
350
|
summaryData.summaryStats;
|
|
352
351
|
if (
|
|
@@ -368,11 +367,14 @@ export class SummaryGenerator {
|
|
|
368
367
|
} catch (error) {
|
|
369
368
|
return fail(
|
|
370
369
|
"submitSummaryFailure",
|
|
371
|
-
wrapError(
|
|
370
|
+
wrapError(
|
|
371
|
+
error,
|
|
372
|
+
(message) =>
|
|
373
|
+
new RetriableSummaryError(message, getRetryDelaySecondsFromError(error)),
|
|
374
|
+
),
|
|
372
375
|
undefined /* properties */,
|
|
373
376
|
{
|
|
374
377
|
stage: "unknown",
|
|
375
|
-
retryAfterSeconds: getRetryDelaySecondsFromError(error),
|
|
376
378
|
},
|
|
377
379
|
);
|
|
378
380
|
} finally {
|
|
@@ -393,10 +395,17 @@ export class SummaryGenerator {
|
|
|
393
395
|
cancellationToken,
|
|
394
396
|
);
|
|
395
397
|
if (waitBroadcastResult.result === "cancelled") {
|
|
396
|
-
|
|
398
|
+
const errorCode: SummarizeErrorCode = "disconnect";
|
|
399
|
+
return fail(errorCode, new RetriableSummaryError(getFailMessage(errorCode)));
|
|
397
400
|
}
|
|
398
401
|
if (waitBroadcastResult.result !== "done") {
|
|
399
|
-
|
|
402
|
+
// The summary op may not have been received within the timeout due to a transient error. So,
|
|
403
|
+
// fail with a retriable error to re-attempt the summary if possible.
|
|
404
|
+
const errorCode: SummarizeErrorCode = "summaryOpWaitTimeout";
|
|
405
|
+
return fail(
|
|
406
|
+
errorCode,
|
|
407
|
+
new RetriableSummaryError(getFailMessage(errorCode), 0 /* retryAfterSeconds */),
|
|
408
|
+
);
|
|
400
409
|
}
|
|
401
410
|
const summarizeOp = waitBroadcastResult.value;
|
|
402
411
|
|
|
@@ -422,10 +431,17 @@ export class SummaryGenerator {
|
|
|
422
431
|
cancellationToken,
|
|
423
432
|
);
|
|
424
433
|
if (waitAckNackResult.result === "cancelled") {
|
|
425
|
-
|
|
434
|
+
const errorCode: SummarizeErrorCode = "disconnect";
|
|
435
|
+
return fail(errorCode, new RetriableSummaryError(getFailMessage(errorCode)));
|
|
426
436
|
}
|
|
427
437
|
if (waitAckNackResult.result !== "done") {
|
|
428
|
-
|
|
438
|
+
const errorCode: SummarizeErrorCode = "summaryAckWaitTimeout";
|
|
439
|
+
// The summary ack may not have been received within the timeout due to a transient error. So,
|
|
440
|
+
// fail with a retriable error to re-attempt the summary if possible.
|
|
441
|
+
return fail(
|
|
442
|
+
errorCode,
|
|
443
|
+
new RetriableSummaryError(getFailMessage(errorCode), 0 /* retryAfterSeconds */),
|
|
444
|
+
);
|
|
429
445
|
}
|
|
430
446
|
const ackNackOp = waitAckNackResult.value;
|
|
431
447
|
this.pendingAckTimer.clear();
|
|
@@ -469,9 +485,10 @@ export class SummaryGenerator {
|
|
|
469
485
|
const errorMessage = summaryNack?.message;
|
|
470
486
|
const retryAfterSeconds = summaryNack?.retryAfter;
|
|
471
487
|
|
|
488
|
+
const errorCode: SummarizeErrorCode = "summaryNack";
|
|
489
|
+
|
|
472
490
|
// pre-0.58 error message prefix: summaryNack
|
|
473
|
-
const error = new
|
|
474
|
-
retryAfterSeconds,
|
|
491
|
+
const error = new RetriableSummaryError(getFailMessage(errorCode), retryAfterSeconds, {
|
|
475
492
|
errorMessage,
|
|
476
493
|
});
|
|
477
494
|
|
|
@@ -481,11 +498,11 @@ export class SummaryGenerator {
|
|
|
481
498
|
);
|
|
482
499
|
// This will only set resultsBuilder.receivedSummaryAckOrNack, as other promises are already set.
|
|
483
500
|
return fail(
|
|
484
|
-
|
|
501
|
+
errorCode,
|
|
485
502
|
error,
|
|
486
503
|
{ ...summarizeTelemetryProps, nackRetryAfter: retryAfterSeconds },
|
|
487
504
|
undefined /* submitFailureResult */,
|
|
488
|
-
{ summaryNackOp: ackNackOp, ackNackDuration
|
|
505
|
+
{ summaryNackOp: ackNackOp, ackNackDuration },
|
|
489
506
|
);
|
|
490
507
|
}
|
|
491
508
|
} finally {
|
|
@@ -89,7 +89,10 @@ export interface ISummaryManagerConfig {
|
|
|
89
89
|
* It observes changes in calculated summarizer and reacts to changes by either creating summarizer client or
|
|
90
90
|
* stopping existing summarizer client.
|
|
91
91
|
*/
|
|
92
|
-
export class SummaryManager
|
|
92
|
+
export class SummaryManager
|
|
93
|
+
extends TypedEventEmitter<ISummarizerEvents>
|
|
94
|
+
implements IDisposable
|
|
95
|
+
{
|
|
93
96
|
private readonly logger: ITelemetryLoggerExt;
|
|
94
97
|
private readonly opsToBypassInitialDelay: number;
|
|
95
98
|
private readonly initialDelayMs: number;
|
|
@@ -263,10 +266,7 @@ export class SummaryManager extends TypedEventEmitter<ISummarizerEvents> impleme
|
|
|
263
266
|
// when the electedClient will be replaced with the new summarizer client.
|
|
264
267
|
// The alternative would be to let connectedState.clientId !== clientElection.electedClientId when
|
|
265
268
|
// state === Starting || state === Running.
|
|
266
|
-
assert(
|
|
267
|
-
this.state === SummaryManagerState.Starting,
|
|
268
|
-
0x263 /* "Expected: starting" */,
|
|
269
|
-
);
|
|
269
|
+
assert(this.state === SummaryManagerState.Starting, 0x263 /* "Expected: starting" */);
|
|
270
270
|
this.state = SummaryManagerState.Running;
|
|
271
271
|
|
|
272
272
|
const summarizer = await this.createSummarizerFn();
|
|
@@ -326,10 +326,7 @@ export class SummaryManager extends TypedEventEmitter<ISummarizerEvents> impleme
|
|
|
326
326
|
// means it also lost connection), and error happened on load (we do not have summarizer).
|
|
327
327
|
// We could annotate the error raised in Container.load where the container closed during load with no error
|
|
328
328
|
// and check for that case here, but that does not seem to be necessary.
|
|
329
|
-
if (
|
|
330
|
-
this.getShouldSummarizeState().shouldSummarize ||
|
|
331
|
-
this.summarizer !== undefined
|
|
332
|
-
) {
|
|
329
|
+
if (this.getShouldSummarizeState().shouldSummarize || this.summarizer !== undefined) {
|
|
333
330
|
// Report any failure as an error unless it was due to cancellation (like "disconnected" error)
|
|
334
331
|
// If failure happened on container load, we may not yet realized that socket disconnected, so check
|
|
335
332
|
// offlineError.
|
package/src/throttler.ts
CHANGED
|
@@ -52,7 +52,9 @@ export class Throttler implements IThrottler {
|
|
|
52
52
|
* by adding the delay time to the actual time.
|
|
53
53
|
*/
|
|
54
54
|
public get latestAttemptTime() {
|
|
55
|
-
return this.startTimes.length > 0
|
|
55
|
+
return this.startTimes.length > 0
|
|
56
|
+
? this.startTimes[this.startTimes.length - 1]
|
|
57
|
+
: undefined;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
constructor(
|
package/tsconfig.json
CHANGED
package/tsdoc.json
ADDED