@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
package/src/channelCollection.ts
CHANGED
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
15
15
|
import { assert, Lazy, LazyPromise } from "@fluidframework/core-utils/internal";
|
|
16
16
|
import { FluidObjectHandle } from "@fluidframework/datastore/internal";
|
|
17
|
+
import type { ISnapshot } from "@fluidframework/driver-definitions/internal";
|
|
18
|
+
import {
|
|
19
|
+
ISnapshotTree,
|
|
20
|
+
ISequencedDocumentMessage,
|
|
21
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
17
22
|
import {
|
|
18
23
|
buildSnapshotTree,
|
|
19
24
|
getSnapshotTree,
|
|
20
25
|
isInstanceOfISnapshot,
|
|
21
26
|
} from "@fluidframework/driver-utils/internal";
|
|
22
|
-
import type { ISnapshot } from "@fluidframework/driver-definitions/internal";
|
|
23
|
-
import { ISequencedDocumentMessage, ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
24
27
|
import {
|
|
25
|
-
IGarbageCollectionData,
|
|
26
|
-
IInboundSignalMessage,
|
|
27
28
|
ISummaryTreeWithStats,
|
|
28
29
|
ITelemetryContext,
|
|
29
|
-
|
|
30
|
-
import {
|
|
30
|
+
IGarbageCollectionData,
|
|
31
31
|
AliasResult,
|
|
32
32
|
CreateSummarizerNodeSource,
|
|
33
33
|
IAttachMessage,
|
|
@@ -42,11 +42,14 @@ import {
|
|
|
42
42
|
InboundAttachMessage,
|
|
43
43
|
NamedFluidDataStoreRegistryEntries,
|
|
44
44
|
channelsTreeName,
|
|
45
|
+
IInboundSignalMessage,
|
|
46
|
+
gcDataBlobKey,
|
|
45
47
|
} from "@fluidframework/runtime-definitions/internal";
|
|
46
48
|
import {
|
|
47
49
|
GCDataBuilder,
|
|
48
50
|
RequestParser,
|
|
49
51
|
SummaryTreeBuilder,
|
|
52
|
+
addBlobToSummary,
|
|
50
53
|
convertSnapshotTreeToSummaryTree,
|
|
51
54
|
convertSummaryTreeToITree,
|
|
52
55
|
create404Response,
|
|
@@ -89,12 +92,7 @@ import {
|
|
|
89
92
|
} from "./dataStoreContext.js";
|
|
90
93
|
import { DataStoreContexts } from "./dataStoreContexts.js";
|
|
91
94
|
import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
92
|
-
import {
|
|
93
|
-
GCNodeType,
|
|
94
|
-
detectOutboundRoutesViaDDSKey,
|
|
95
|
-
IGCNodeUpdatedProps,
|
|
96
|
-
urlToGCNodePath,
|
|
97
|
-
} from "./gc/index.js";
|
|
95
|
+
import { GCNodeType, IGCNodeUpdatedProps, urlToGCNodePath } from "./gc/index.js";
|
|
98
96
|
import { ContainerMessageType, LocalContainerRuntimeMessage } from "./messageTypes.js";
|
|
99
97
|
import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs.js";
|
|
100
98
|
import {
|
|
@@ -149,7 +147,7 @@ export function wrapContext(context: IFluidParentContext): IFluidParentContext {
|
|
|
149
147
|
},
|
|
150
148
|
deltaManager: context.deltaManager,
|
|
151
149
|
storage: context.storage,
|
|
152
|
-
|
|
150
|
+
baseLogger: context.baseLogger,
|
|
153
151
|
get clientDetails() {
|
|
154
152
|
return context.clientDetails;
|
|
155
153
|
},
|
|
@@ -189,8 +187,8 @@ export function wrapContext(context: IFluidParentContext): IFluidParentContext {
|
|
|
189
187
|
uploadBlob: async (...args) => {
|
|
190
188
|
return context.uploadBlob(...args);
|
|
191
189
|
},
|
|
192
|
-
|
|
193
|
-
return context.
|
|
190
|
+
addedGCOutboundRoute: (...args) => {
|
|
191
|
+
return context.addedGCOutboundRoute(...args);
|
|
194
192
|
},
|
|
195
193
|
getCreateChildSummarizerNodeFn: (...args) => {
|
|
196
194
|
return context.getCreateChildSummarizerNodeFn?.(...args);
|
|
@@ -245,6 +243,13 @@ export function wrapContextForInnerChannel(
|
|
|
245
243
|
return context;
|
|
246
244
|
}
|
|
247
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Returns the type of the given local data store from its package path.
|
|
248
|
+
*/
|
|
249
|
+
export function getLocalDataStoreType(localDataStore: LocalFluidDataStoreContext) {
|
|
250
|
+
return localDataStore.packagePath[localDataStore.packagePath.length - 1];
|
|
251
|
+
}
|
|
252
|
+
|
|
248
253
|
/**
|
|
249
254
|
* This class encapsulates data store handling. Currently it is only used by the container runtime,
|
|
250
255
|
* but eventually could be hosted on any channel once we formalize the channel api boundary.
|
|
@@ -269,12 +274,6 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
269
274
|
readonly referencedDataStoreCount: number;
|
|
270
275
|
};
|
|
271
276
|
|
|
272
|
-
// Stores the ids of new data stores between two GC runs. This is used to notify the garbage collector of new
|
|
273
|
-
// root data stores that are added.
|
|
274
|
-
private dataStoresSinceLastGC: string[] = [];
|
|
275
|
-
// The handle to the container runtime. This is used mainly for GC purposes to represent outbound reference from
|
|
276
|
-
// the container runtime to other nodes.
|
|
277
|
-
private readonly containerRuntimeHandle: IFluidHandleInternal;
|
|
278
277
|
private readonly pendingAliasMap: Map<string, Promise<AliasResult>> = new Map<
|
|
279
278
|
string,
|
|
280
279
|
Promise<AliasResult>
|
|
@@ -294,11 +293,6 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
294
293
|
) {
|
|
295
294
|
this.mc = createChildMonitoringContext({ logger: baseLogger });
|
|
296
295
|
this.contexts = new DataStoreContexts(baseLogger);
|
|
297
|
-
this.containerRuntimeHandle = new FluidObjectHandle(
|
|
298
|
-
this.parentContext,
|
|
299
|
-
"/",
|
|
300
|
-
this.parentContext.IFluidHandleContext,
|
|
301
|
-
);
|
|
302
296
|
this.entryPoint = new FluidObjectHandle<FluidObject>(
|
|
303
297
|
new LazyPromise(async () => provideEntryPoint(this)),
|
|
304
298
|
"",
|
|
@@ -402,17 +396,15 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
402
396
|
private processAttachMessage(message: ISequencedDocumentMessage, local: boolean) {
|
|
403
397
|
const attachMessage = message.contents as InboundAttachMessage;
|
|
404
398
|
|
|
405
|
-
this.dataStoresSinceLastGC.push(attachMessage.id);
|
|
406
|
-
|
|
407
399
|
// We need to process the GC Data for both local and remote attach messages
|
|
408
|
-
const foundGCData = processAttachMessageGCData(
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
{
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
400
|
+
const foundGCData = processAttachMessageGCData(
|
|
401
|
+
attachMessage.snapshot,
|
|
402
|
+
(nodeId, toPath) => {
|
|
403
|
+
// nodeId is the relative path under the node being attached. Always starts with "/", but no trailing "/" after an id
|
|
404
|
+
const fromPath = `/${attachMessage.id}${nodeId === "/" ? "" : nodeId}`;
|
|
405
|
+
this.parentContext.addedGCOutboundRoute(fromPath, toPath, message.timestamp);
|
|
406
|
+
},
|
|
407
|
+
);
|
|
416
408
|
|
|
417
409
|
// Only log once per container to avoid noise/cost.
|
|
418
410
|
// Allows longitudinal tracking of various state (e.g. foundGCData), and some sampled details
|
|
@@ -506,13 +498,18 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
506
498
|
const aliasResult = this.processAliasMessageCore(
|
|
507
499
|
aliasMessage.internalId,
|
|
508
500
|
aliasMessage.alias,
|
|
501
|
+
message.timestamp,
|
|
509
502
|
);
|
|
510
503
|
if (local) {
|
|
511
504
|
resolve(aliasResult);
|
|
512
505
|
}
|
|
513
506
|
}
|
|
514
507
|
|
|
515
|
-
public processAliasMessageCore(
|
|
508
|
+
public processAliasMessageCore(
|
|
509
|
+
internalId: string,
|
|
510
|
+
alias: string,
|
|
511
|
+
messageTimestampMs?: number,
|
|
512
|
+
): boolean {
|
|
516
513
|
if (this.alreadyProcessed(alias)) {
|
|
517
514
|
return false;
|
|
518
515
|
}
|
|
@@ -532,12 +529,11 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
532
529
|
return false;
|
|
533
530
|
}
|
|
534
531
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
this.parentContext.
|
|
539
|
-
|
|
540
|
-
this.parentContext.addedGCOutboundReference?.(this.containerRuntimeHandle, handle);
|
|
532
|
+
// If message timestamp doesn't exist, this is called in a detached container. Don't notify GC in that case
|
|
533
|
+
// because it doesn't run in detached container and doesn't need to know about this route.
|
|
534
|
+
if (messageTimestampMs) {
|
|
535
|
+
this.parentContext.addedGCOutboundRoute("/", `/${internalId}`, messageTimestampMs);
|
|
536
|
+
}
|
|
541
537
|
|
|
542
538
|
this.aliasMap.set(alias, context.id);
|
|
543
539
|
this.aliasedDataStores.add(context.id);
|
|
@@ -550,9 +546,13 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
550
546
|
}
|
|
551
547
|
|
|
552
548
|
/** Package up the context's attach summary etc into an IAttachMessage */
|
|
553
|
-
private generateAttachMessage(localContext:
|
|
554
|
-
|
|
555
|
-
const
|
|
549
|
+
private generateAttachMessage(localContext: LocalFluidDataStoreContext): IAttachMessage {
|
|
550
|
+
// Get the attach summary.
|
|
551
|
+
const attachSummary = localContext.getAttachSummary();
|
|
552
|
+
|
|
553
|
+
// Get the GC data and add it to the attach summary.
|
|
554
|
+
const attachGCData = localContext.getAttachGCData();
|
|
555
|
+
addBlobToSummary(attachSummary, gcDataBlobKey, JSON.stringify(attachGCData));
|
|
556
556
|
|
|
557
557
|
// Attach message needs the summary in ITree format. Convert the ISummaryTree into an ITree.
|
|
558
558
|
const snapshot = convertSummaryTreeToITree(attachSummary.summary);
|
|
@@ -560,7 +560,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
560
560
|
return {
|
|
561
561
|
id: localContext.id,
|
|
562
562
|
snapshot,
|
|
563
|
-
type,
|
|
563
|
+
type: getLocalDataStoreType(localContext),
|
|
564
564
|
} satisfies IAttachMessage;
|
|
565
565
|
}
|
|
566
566
|
|
|
@@ -679,7 +679,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
679
679
|
channel,
|
|
680
680
|
id,
|
|
681
681
|
this,
|
|
682
|
-
createChildLogger({ logger: this.parentContext.
|
|
682
|
+
createChildLogger({ logger: this.parentContext.baseLogger }),
|
|
683
683
|
),
|
|
684
684
|
});
|
|
685
685
|
|
|
@@ -817,7 +817,6 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
817
817
|
message: ISequencedDocumentMessage,
|
|
818
818
|
local: boolean,
|
|
819
819
|
localMessageMetadata: unknown,
|
|
820
|
-
addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void,
|
|
821
820
|
) {
|
|
822
821
|
switch (message.type) {
|
|
823
822
|
case ContainerMessageType.Attach:
|
|
@@ -837,19 +836,13 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
837
836
|
|
|
838
837
|
this.processChannelOp(envelope.address, transformed, local, localMessageMetadata);
|
|
839
838
|
|
|
840
|
-
//
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
detectOutboundReferences(
|
|
848
|
-
envelope.address,
|
|
849
|
-
transformed.contents,
|
|
850
|
-
addedOutboundReference,
|
|
851
|
-
);
|
|
852
|
-
}
|
|
839
|
+
// Notify GC of any outbound references that were added by this op.
|
|
840
|
+
detectOutboundReferences(
|
|
841
|
+
envelope.address,
|
|
842
|
+
transformed.contents,
|
|
843
|
+
(fromPath: string, toPath: string) =>
|
|
844
|
+
this.parentContext.addedGCOutboundRoute(fromPath, toPath, message.timestamp),
|
|
845
|
+
);
|
|
853
846
|
break;
|
|
854
847
|
}
|
|
855
848
|
default:
|
|
@@ -985,14 +978,12 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
985
978
|
}
|
|
986
979
|
|
|
987
980
|
const idToLog =
|
|
988
|
-
originalRequest !== undefined
|
|
989
|
-
? urlToGCNodePath(originalRequest.url)
|
|
990
|
-
: dataStoreNodePath;
|
|
981
|
+
originalRequest !== undefined ? urlToGCNodePath(originalRequest.url) : dataStoreNodePath;
|
|
991
982
|
|
|
992
983
|
// Log the package details asynchronously since getInitialSnapshotDetails is async
|
|
993
|
-
const
|
|
994
|
-
if (
|
|
995
|
-
|
|
984
|
+
const recentlyDeletedContext = this.contexts.getRecentlyDeletedContext(id);
|
|
985
|
+
if (recentlyDeletedContext !== undefined) {
|
|
986
|
+
recentlyDeletedContext
|
|
996
987
|
.getInitialSnapshotDetails()
|
|
997
988
|
.then((details) => {
|
|
998
989
|
return details.pkg.join("/");
|
|
@@ -1094,112 +1085,126 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1094
1085
|
return this.contexts.size;
|
|
1095
1086
|
}
|
|
1096
1087
|
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
//
|
|
1109
|
-
//
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
const error = DataProcessingError.create(
|
|
1114
|
-
"Local data store detected in attaching state during summarize",
|
|
1115
|
-
"summarize",
|
|
1116
|
-
);
|
|
1117
|
-
throw error;
|
|
1118
|
-
}
|
|
1119
|
-
return context.attachState === AttachState.Attached;
|
|
1120
|
-
})
|
|
1121
|
-
.map(async ([contextId, context]) => {
|
|
1122
|
-
const contextSummary = await context.summarize(
|
|
1123
|
-
fullTree,
|
|
1124
|
-
trackState,
|
|
1125
|
-
telemetryContext,
|
|
1088
|
+
/**
|
|
1089
|
+
* Create a summary. Used when attaching or serializing a detached container.
|
|
1090
|
+
*/
|
|
1091
|
+
public getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
|
|
1092
|
+
const builder = new SummaryTreeBuilder();
|
|
1093
|
+
this.visitLocalBoundContextsDuringAttach(
|
|
1094
|
+
(contextId: string, context: FluidDataStoreContext) => {
|
|
1095
|
+
let dataStoreSummary: ISummarizeResult;
|
|
1096
|
+
if (context.isLoaded) {
|
|
1097
|
+
dataStoreSummary = context.getAttachSummary(telemetryContext);
|
|
1098
|
+
} else {
|
|
1099
|
+
// If this data store is not yet loaded, then there should be no changes in the snapshot from
|
|
1100
|
+
// which it was created as it is detached container. So just use the previous snapshot.
|
|
1101
|
+
assert(
|
|
1102
|
+
!!this.baseSnapshot,
|
|
1103
|
+
0x166 /* "BaseSnapshot should be there as detached container loaded from snapshot" */,
|
|
1126
1104
|
);
|
|
1127
|
-
|
|
1128
|
-
|
|
1105
|
+
dataStoreSummary = convertSnapshotTreeToSummaryTree(
|
|
1106
|
+
getSnapshotTree(this.baseSnapshot).trees[contextId],
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
builder.addWithStats(contextId, dataStoreSummary);
|
|
1110
|
+
},
|
|
1129
1111
|
);
|
|
1112
|
+
return builder.getSummaryTree();
|
|
1113
|
+
}
|
|
1130
1114
|
|
|
1131
|
-
|
|
1115
|
+
/**
|
|
1116
|
+
* Gets the GC data. Used when attaching or serializing a detached container.
|
|
1117
|
+
*/
|
|
1118
|
+
public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
|
|
1119
|
+
const builder = new GCDataBuilder();
|
|
1120
|
+
this.visitLocalBoundContextsDuringAttach(
|
|
1121
|
+
(contextId: string, context: FluidDataStoreContext) => {
|
|
1122
|
+
const contextGCData = context.getAttachGCData(telemetryContext);
|
|
1123
|
+
// Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.
|
|
1124
|
+
// This also gradually builds the id of each node to be a path from the root.
|
|
1125
|
+
builder.prefixAndAddNodes(contextId, contextGCData.gcNodes);
|
|
1126
|
+
},
|
|
1127
|
+
);
|
|
1128
|
+
// Get the outbound routes (aliased data stores) and add a GC node for this channel.
|
|
1129
|
+
builder.addNode("/", Array.from(this.aliasedDataStores));
|
|
1130
|
+
return builder.getGCData();
|
|
1132
1131
|
}
|
|
1133
1132
|
|
|
1134
1133
|
/**
|
|
1135
|
-
*
|
|
1134
|
+
* Helper method for preparing to attach this channel.
|
|
1135
|
+
* Runs the callback for each bound context to incorporate its data however the caller specifies
|
|
1136
1136
|
*/
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
let
|
|
1142
|
-
|
|
1143
|
-
|
|
1137
|
+
private visitLocalBoundContextsDuringAttach(
|
|
1138
|
+
visitor: (contextId: string, context: FluidDataStoreContext) => void,
|
|
1139
|
+
): void {
|
|
1140
|
+
const visitedContexts = new Set<string>();
|
|
1141
|
+
let visitedLength = -1;
|
|
1142
|
+
let notBoundContextsLength = -1;
|
|
1143
|
+
while (
|
|
1144
|
+
visitedLength !== visitedContexts.size &&
|
|
1145
|
+
notBoundContextsLength !== this.contexts.notBoundLength()
|
|
1146
|
+
) {
|
|
1147
|
+
// detect changes in the visitedContexts set, as on visiting a context
|
|
1148
|
+
// it could could make contexts available by removing other contexts
|
|
1149
|
+
// from the not bound context list, so we need to ensure those get processed as well.
|
|
1150
|
+
// only once the loop can run with no new contexts added to the visitedContexts set do we
|
|
1151
|
+
// know for sure all possible contexts have been visited.
|
|
1152
|
+
visitedLength = visitedContexts.size;
|
|
1144
1153
|
notBoundContextsLength = this.contexts.notBoundLength();
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
.map(([key, value]) => {
|
|
1159
|
-
let dataStoreSummary: ISummarizeResult;
|
|
1160
|
-
if (value.isLoaded) {
|
|
1161
|
-
dataStoreSummary = value.getAttachData(
|
|
1162
|
-
/* includeGCCData: */ false,
|
|
1163
|
-
telemetryContext,
|
|
1164
|
-
).attachSummary;
|
|
1165
|
-
} else {
|
|
1166
|
-
// If this data store is not yet loaded, then there should be no changes in the snapshot from
|
|
1167
|
-
// which it was created as it is detached container. So just use the previous snapshot.
|
|
1168
|
-
assert(
|
|
1169
|
-
!!this.baseSnapshot,
|
|
1170
|
-
0x166 /* "BaseSnapshot should be there as detached container loaded from snapshot" */,
|
|
1171
|
-
);
|
|
1172
|
-
dataStoreSummary = convertSnapshotTreeToSummaryTree(
|
|
1173
|
-
getSnapshotTree(this.baseSnapshot).trees[key],
|
|
1174
|
-
);
|
|
1175
|
-
}
|
|
1176
|
-
builder.addWithStats(key, dataStoreSummary);
|
|
1177
|
-
});
|
|
1178
|
-
} while (notBoundContextsLength !== this.contexts.notBoundLength());
|
|
1179
|
-
|
|
1180
|
-
return builder.getSummaryTree();
|
|
1154
|
+
for (const [contextId, context] of this.contexts) {
|
|
1155
|
+
if (
|
|
1156
|
+
!(
|
|
1157
|
+
visitedContexts.has(contextId) ||
|
|
1158
|
+
this.contexts.isNotBound(contextId) ||
|
|
1159
|
+
this.attachOpFiredForDataStore.has(contextId)
|
|
1160
|
+
)
|
|
1161
|
+
) {
|
|
1162
|
+
visitor(contextId, context);
|
|
1163
|
+
visitedContexts.add(contextId);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1181
1167
|
}
|
|
1182
1168
|
|
|
1183
1169
|
/**
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1186
|
-
* explicitly marked as referenced, notify GC of new root data stores that were added since the last GC run.
|
|
1170
|
+
* Helper method for preparing to summarize this channel.
|
|
1171
|
+
* Runs the callback for each bound context to incorporate its data however the caller specifies
|
|
1187
1172
|
*/
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1173
|
+
private async visitContextsDuringSummary(
|
|
1174
|
+
visitor: (contextId: string, context: FluidDataStoreContext) => Promise<void>,
|
|
1175
|
+
): Promise<void> {
|
|
1176
|
+
for (const [contextId, context] of this.contexts) {
|
|
1177
|
+
// Summarizer client and hence GC works only with clients with no local changes. A data store in
|
|
1178
|
+
// attaching state indicates an op was sent to attach a local data store, and the the attach op
|
|
1179
|
+
// had not yet round tripped back to the client.
|
|
1180
|
+
// Formerly assert 0x589
|
|
1181
|
+
if (context.attachState === AttachState.Attaching) {
|
|
1182
|
+
const error = DataProcessingError.create(
|
|
1183
|
+
"Local data store detected in attaching state",
|
|
1184
|
+
"summarize/getGCData",
|
|
1198
1185
|
);
|
|
1199
|
-
|
|
1186
|
+
throw error;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
if (context.attachState === AttachState.Attached) {
|
|
1190
|
+
await visitor(contextId, context);
|
|
1200
1191
|
}
|
|
1201
1192
|
}
|
|
1202
|
-
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
public async summarize(
|
|
1196
|
+
fullTree: boolean,
|
|
1197
|
+
trackState: boolean,
|
|
1198
|
+
telemetryContext?: ITelemetryContext,
|
|
1199
|
+
): Promise<ISummaryTreeWithStats> {
|
|
1200
|
+
const summaryBuilder = new SummaryTreeBuilder();
|
|
1201
|
+
await this.visitContextsDuringSummary(
|
|
1202
|
+
async (contextId: string, context: FluidDataStoreContext) => {
|
|
1203
|
+
const contextSummary = await context.summarize(fullTree, trackState, telemetryContext);
|
|
1204
|
+
summaryBuilder.addWithStats(contextId, contextSummary);
|
|
1205
|
+
},
|
|
1206
|
+
);
|
|
1207
|
+
return summaryBuilder.getSummaryTree();
|
|
1203
1208
|
}
|
|
1204
1209
|
|
|
1205
1210
|
/**
|
|
@@ -1217,30 +1222,13 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1217
1222
|
*/
|
|
1218
1223
|
public async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {
|
|
1219
1224
|
const builder = new GCDataBuilder();
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
// Formerly assert 0x589
|
|
1228
|
-
if (context.attachState === AttachState.Attaching) {
|
|
1229
|
-
const error = DataProcessingError.create(
|
|
1230
|
-
"Local data store detected in attaching state while running GC",
|
|
1231
|
-
"getGCData",
|
|
1232
|
-
);
|
|
1233
|
-
throw error;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
return context.attachState === AttachState.Attached;
|
|
1237
|
-
})
|
|
1238
|
-
.map(async ([contextId, context]) => {
|
|
1239
|
-
const contextGCData = await context.getGCData(fullGC);
|
|
1240
|
-
// Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.
|
|
1241
|
-
// This also gradually builds the id of each node to be a path from the root.
|
|
1242
|
-
builder.prefixAndAddNodes(contextId, contextGCData.gcNodes);
|
|
1243
|
-
}),
|
|
1225
|
+
await this.visitContextsDuringSummary(
|
|
1226
|
+
async (contextId: string, context: FluidDataStoreContext) => {
|
|
1227
|
+
const contextGCData = await context.getGCData(fullGC);
|
|
1228
|
+
// Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.
|
|
1229
|
+
// This also gradually builds the id of each node to be a path from the root.
|
|
1230
|
+
builder.prefixAndAddNodes(contextId, contextGCData.gcNodes);
|
|
1231
|
+
},
|
|
1244
1232
|
);
|
|
1245
1233
|
|
|
1246
1234
|
// Get the outbound routes and add a GC node for this channel.
|
|
@@ -1297,7 +1285,9 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1297
1285
|
* be deleted.
|
|
1298
1286
|
* @returns The routes of data stores and its objects that were deleted.
|
|
1299
1287
|
*/
|
|
1300
|
-
public deleteSweepReadyNodes(
|
|
1288
|
+
public deleteSweepReadyNodes(
|
|
1289
|
+
sweepReadyDataStoreRoutes: readonly string[],
|
|
1290
|
+
): readonly string[] {
|
|
1301
1291
|
for (const route of sweepReadyDataStoreRoutes) {
|
|
1302
1292
|
const pathParts = route.split("/");
|
|
1303
1293
|
const dataStoreId = pathParts[1];
|
|
@@ -1375,7 +1365,9 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1375
1365
|
/**
|
|
1376
1366
|
* Called by GC to retrieve the package path of a data store node with the given path.
|
|
1377
1367
|
*/
|
|
1378
|
-
public async getDataStorePackagePath(
|
|
1368
|
+
public async getDataStorePackagePath(
|
|
1369
|
+
nodePath: string,
|
|
1370
|
+
): Promise<readonly string[] | undefined> {
|
|
1379
1371
|
// If the node belongs to a data store, return its package path. For DDSes, we return the package path of the
|
|
1380
1372
|
// data store that contains it.
|
|
1381
1373
|
const context = this.contexts.get(nodePath.split("/")[1]);
|
|
@@ -1446,6 +1438,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
|
|
|
1446
1438
|
packagePath: details.pkg,
|
|
1447
1439
|
request,
|
|
1448
1440
|
headerData,
|
|
1441
|
+
timestampMs: undefined, // This will be added by the parent context if needed.
|
|
1449
1442
|
});
|
|
1450
1443
|
|
|
1451
1444
|
const dataStore = await dataStoreContext.realize();
|
|
@@ -1561,7 +1554,7 @@ export class ChannelCollectionFactory<T extends ChannelCollection = ChannelColle
|
|
|
1561
1554
|
const runtime = this.ctor(
|
|
1562
1555
|
context.baseSnapshot,
|
|
1563
1556
|
context, // parentContext
|
|
1564
|
-
context.
|
|
1557
|
+
context.baseLogger,
|
|
1565
1558
|
() => {}, // gcNodeUpdated
|
|
1566
1559
|
(_nodePath: string) => false, // isDataStoreDeleted
|
|
1567
1560
|
new Map(), // aliasMap
|
|
@@ -8,12 +8,12 @@ import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
|
8
8
|
import { IContainerRuntimeEvents } from "@fluidframework/container-runtime-definitions/internal";
|
|
9
9
|
import { IEventProvider } from "@fluidframework/core-interfaces";
|
|
10
10
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
11
|
-
import { isRuntimeMessage } from "@fluidframework/driver-utils/internal";
|
|
12
11
|
import {
|
|
13
12
|
IDocumentMessage,
|
|
14
|
-
ISequencedDocumentMessage,
|
|
15
13
|
MessageType,
|
|
16
|
-
|
|
14
|
+
ISequencedDocumentMessage,
|
|
15
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
16
|
+
import { isRuntimeMessage } from "@fluidframework/driver-utils/internal";
|
|
17
17
|
import {
|
|
18
18
|
IEventSampler,
|
|
19
19
|
ITelemetryLoggerExt,
|
|
@@ -95,6 +95,13 @@ class OpPerfTelemetry {
|
|
|
95
95
|
private readonly deltaLatencyLogger: ISampledTelemetryLogger;
|
|
96
96
|
|
|
97
97
|
private static readonly PROCESSED_OPS_SAMPLE_RATE = 500;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* A sampled logger to log Ops that have been processed by the current client, the NoOp sent and the
|
|
101
|
+
* size of the ops processed within one sampling window of this log event.
|
|
102
|
+
* The data from this logger will be used to monitor the efficiency of NoOp-heuristics or to get approximate collab window size.
|
|
103
|
+
* Note: no log events are sent when sampling is disabled, because logging at every op will be too noisy.
|
|
104
|
+
*/
|
|
98
105
|
private readonly opsLogger: ISampledTelemetryLogger;
|
|
99
106
|
|
|
100
107
|
/**
|
|
@@ -134,8 +141,7 @@ class OpPerfTelemetry {
|
|
|
134
141
|
return {
|
|
135
142
|
sample: () => {
|
|
136
143
|
eventCount++;
|
|
137
|
-
const shouldSample =
|
|
138
|
-
eventCount % OpPerfTelemetry.DELTA_LATENCY_SAMPLE_RATE === 0;
|
|
144
|
+
const shouldSample = eventCount % OpPerfTelemetry.DELTA_LATENCY_SAMPLE_RATE === 0;
|
|
139
145
|
if (shouldSample) {
|
|
140
146
|
eventCount = 0;
|
|
141
147
|
}
|
|
@@ -156,8 +162,7 @@ class OpPerfTelemetry {
|
|
|
156
162
|
return {
|
|
157
163
|
sample: () => {
|
|
158
164
|
eventCount++;
|
|
159
|
-
const shouldSample =
|
|
160
|
-
eventCount % OpPerfTelemetry.PROCESSED_OPS_SAMPLE_RATE === 0;
|
|
165
|
+
const shouldSample = eventCount % OpPerfTelemetry.PROCESSED_OPS_SAMPLE_RATE === 0;
|
|
161
166
|
if (shouldSample) {
|
|
162
167
|
eventCount = 0;
|
|
163
168
|
this.noOpCountForTelemetry = 0;
|
|
@@ -167,7 +172,11 @@ class OpPerfTelemetry {
|
|
|
167
172
|
},
|
|
168
173
|
};
|
|
169
174
|
})();
|
|
170
|
-
this.opsLogger = createSampledLogger(
|
|
175
|
+
this.opsLogger = createSampledLogger(
|
|
176
|
+
logger,
|
|
177
|
+
opsEventSampler,
|
|
178
|
+
true /* skipLoggingWhenSamplingIsDisabled */,
|
|
179
|
+
);
|
|
171
180
|
|
|
172
181
|
this.deltaManager.on("pong", (latency) => this.recordPingTime(latency));
|
|
173
182
|
this.deltaManager.on("submitOp", (message) => this.beforeOpSubmit(message));
|
|
@@ -201,10 +210,7 @@ class OpPerfTelemetry {
|
|
|
201
210
|
) {
|
|
202
211
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
203
212
|
const latencyStats = this.latencyStatistics.get(msg.clientSequenceNumber)!;
|
|
204
|
-
assert(
|
|
205
|
-
latencyStats !== undefined,
|
|
206
|
-
0x7c2 /* Latency stats for op should exist */,
|
|
207
|
-
);
|
|
213
|
+
assert(latencyStats !== undefined, 0x7c2 /* Latency stats for op should exist */);
|
|
208
214
|
assert(
|
|
209
215
|
latencyStats.opProcessingTimes.outboundPushEventTime === undefined,
|
|
210
216
|
0x2c8 /* "outboundPushEventTime should be undefined" */,
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
7
|
-
import {
|
|
7
|
+
import { IRequest, IResponse } from "@fluidframework/core-interfaces";
|
|
8
|
+
import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal";
|
|
8
9
|
import { generateHandleContextPath } from "@fluidframework/runtime-utils/internal";
|
|
9
10
|
|
|
10
11
|
import { ContainerRuntime } from "./containerRuntime.js";
|