@fluidframework/container-runtime 2.0.0-dev-rc.2.0.0.246488 → 2.0.0-dev-rc.3.0.0.250606
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/api-report/container-runtime.api.md +78 -25
- package/dist/batchTracker.d.ts +1 -1
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +2 -2
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +3 -3
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +3 -3
- package/dist/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +5 -5
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +44 -11
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +2 -2
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +3 -3
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/container-runtime-alpha.d.ts +205 -11
- package/dist/container-runtime-beta.d.ts +16 -2
- package/dist/container-runtime-public.d.ts +16 -2
- package/dist/container-runtime-untrimmed.d.ts +205 -24
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +32 -26
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +213 -119
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +2 -2
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +4 -4
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +18 -18
- 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.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaScheduler.d.ts +1 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +1 -1
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +1 -1
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +1 -1
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +11 -5
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js +4 -0
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +1 -19
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +3 -3
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +3 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +2 -3
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +15 -4
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +60 -61
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +2 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +9 -11
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +11 -3
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +48 -38
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +7 -12
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +8 -0
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +36 -35
- package/dist/opLifecycle/remoteMessageProcessor.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 +1 -1
- package/dist/pendingStateManager.d.ts.map +1 -1
- 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 +2 -2
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +178 -0
- package/dist/summary/documentSchema.d.ts.map +1 -0
- package/dist/summary/documentSchema.js +345 -0
- package/dist/summary/documentSchema.js.map +1 -0
- package/dist/summary/index.d.ts +2 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +4 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +2 -2
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +3 -2
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +2 -2
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +2 -2
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +2 -2
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +2 -2
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +2 -2
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +1 -1
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +2 -2
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +3 -3
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +1 -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 +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +3 -3
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -2
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +1 -1
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +5 -16
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +2 -2
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +2 -2
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +1 -1
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +2 -2
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +2 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +3 -3
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +5 -5
- package/lib/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +5 -5
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +46 -13
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +2 -2
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +3 -3
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/container-runtime-alpha.d.ts +205 -11
- package/lib/container-runtime-beta.d.ts +16 -2
- package/lib/container-runtime-public.d.ts +16 -2
- package/lib/container-runtime-untrimmed.d.ts +205 -24
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +32 -26
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +175 -81
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +2 -2
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +4 -4
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +3 -3
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaScheduler.d.ts +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +1 -1
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +3 -3
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +1 -1
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +1 -1
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +1 -1
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +1 -1
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/messageTypes.d.ts +11 -5
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js +4 -0
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +1 -19
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +3 -3
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js +2 -2
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +2 -3
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +15 -4
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +60 -61
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +2 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +7 -10
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +11 -3
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +46 -37
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +7 -12
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +8 -0
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +36 -35
- package/lib/opLifecycle/remoteMessageProcessor.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 +1 -1
- package/lib/pendingStateManager.d.ts.map +1 -1
- 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 +2 -2
- package/lib/scheduleManager.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +178 -0
- package/lib/summary/documentSchema.d.ts.map +1 -0
- package/lib/summary/documentSchema.js +341 -0
- package/lib/summary/documentSchema.js.map +1 -0
- package/lib/summary/index.d.ts +2 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -0
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +2 -2
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +3 -2
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +2 -2
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +3 -3
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +2 -2
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +3 -3
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +2 -2
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +1 -1
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +2 -2
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +4 -4
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +1 -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 +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +3 -3
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -2
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -1
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +5 -16
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +2 -2
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +3 -3
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +1 -1
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +2 -2
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/test/blobManager.spec.js +3 -3
- package/lib/test/blobManager.spec.js.map +1 -1
- package/lib/test/containerRuntime.spec.js +6 -4
- package/lib/test/containerRuntime.spec.js.map +1 -1
- package/lib/test/dataStoreContext.spec.js +4 -4
- package/lib/test/dataStoreContext.spec.js.map +1 -1
- package/lib/test/dataStoreCreation.spec.js +1 -1
- package/lib/test/dataStoreCreation.spec.js.map +1 -1
- package/lib/test/dataStoreRegistry.spec.js.map +1 -1
- package/lib/test/documentSchema.spec.js +282 -0
- package/lib/test/documentSchema.spec.js.map +1 -0
- package/lib/test/fuzz/fuzzUtils.js +11 -7
- package/lib/test/fuzz/fuzzUtils.js.map +1 -1
- package/lib/test/fuzz/summarizer.fuzz.spec.js +9 -7
- package/lib/test/fuzz/summarizer.fuzz.spec.js.map +1 -1
- package/lib/test/fuzz/summarizerFuzzMocks.js +43 -25
- package/lib/test/fuzz/summarizerFuzzMocks.js.map +1 -1
- package/lib/test/fuzz/summarizerFuzzSuite.js +7 -4
- package/lib/test/fuzz/summarizerFuzzSuite.js.map +1 -1
- package/lib/test/gc/garbageCollection.spec.js +5 -5
- package/lib/test/gc/garbageCollection.spec.js.map +1 -1
- package/lib/test/gc/gcConfigs.spec.js +2 -2
- package/lib/test/gc/gcConfigs.spec.js.map +1 -1
- package/lib/test/gc/gcHelpers.spec.js.map +1 -1
- package/lib/test/gc/gcStats.spec.js +2 -2
- package/lib/test/gc/gcStats.spec.js.map +1 -1
- package/lib/test/gc/gcSummaryStateTracker.spec.js +1 -1
- package/lib/test/gc/gcSummaryStateTracker.spec.js.map +1 -1
- package/lib/test/gc/gcTelemetry.spec.js +3 -3
- package/lib/test/gc/gcTelemetry.spec.js.map +1 -1
- package/lib/test/gc/gcUnreferencedStateTracker.spec.js +1 -1
- package/lib/test/gc/gcUnreferencedStateTracker.spec.js.map +1 -1
- package/lib/test/getPendingBlobs.spec.js +1 -1
- package/lib/test/getPendingBlobs.spec.js.map +1 -1
- package/lib/test/hardwareStats.spec.js +1 -1
- package/lib/test/hardwareStats.spec.js.map +1 -1
- package/lib/test/opLifecycle/OpGroupingManager.spec.js +95 -118
- package/lib/test/opLifecycle/OpGroupingManager.spec.js.map +1 -1
- package/lib/test/opLifecycle/batchManager.spec.js +1 -1
- package/lib/test/opLifecycle/batchManager.spec.js.map +1 -1
- package/lib/test/opLifecycle/opCompressor.spec.js +0 -1
- package/lib/test/opLifecycle/opCompressor.spec.js.map +1 -1
- package/lib/test/opLifecycle/opDecompressor.spec.js +60 -55
- package/lib/test/opLifecycle/opDecompressor.spec.js.map +1 -1
- package/lib/test/opLifecycle/opSplitter.spec.js +56 -41
- package/lib/test/opLifecycle/opSplitter.spec.js.map +1 -1
- package/lib/test/opLifecycle/outbox.spec.js +118 -10
- package/lib/test/opLifecycle/outbox.spec.js.map +1 -1
- package/lib/test/opLifecycle/remoteMessageProcessor.spec.js +115 -91
- package/lib/test/opLifecycle/remoteMessageProcessor.spec.js.map +1 -1
- package/lib/test/pendingStateManager.spec.js +1 -1
- package/lib/test/pendingStateManager.spec.js.map +1 -1
- package/lib/test/scheduleManager.spec.js +1 -1
- package/lib/test/scheduleManager.spec.js.map +1 -1
- package/lib/test/summarizerNode.spec.js +1 -1
- package/lib/test/summarizerNode.spec.js.map +1 -1
- package/lib/test/summarizerNodeWithGc.spec.js +1 -1
- package/lib/test/summarizerNodeWithGc.spec.js.map +1 -1
- package/lib/test/summary/runningSummarizer.spec.js +4 -4
- package/lib/test/summary/runningSummarizer.spec.js.map +1 -1
- package/lib/test/summary/summarizer.spec.js.map +1 -1
- package/lib/test/summary/summarizerClientElection.spec.js +2 -2
- package/lib/test/summary/summarizerClientElection.spec.js.map +1 -1
- package/lib/test/summary/summarizerHeuristics.spec.js +1 -1
- package/lib/test/summary/summarizerHeuristics.spec.js.map +1 -1
- package/lib/test/summary/summaryCollection.spec.js +1 -1
- package/lib/test/summary/summaryCollection.spec.js.map +1 -1
- package/lib/test/summary/summaryManager.spec.js +3 -3
- package/lib/test/summary/summaryManager.spec.js.map +1 -1
- package/lib/test/throttler.spec.js +1 -1
- package/lib/test/throttler.spec.js.map +1 -1
- package/lib/test/types/validateContainerRuntimePrevious.generated.js +6 -4
- package/lib/test/types/validateContainerRuntimePrevious.generated.js.map +1 -1
- package/package.json +35 -21
- package/src/batchTracker.ts +3 -3
- package/src/blobManager.ts +15 -15
- package/src/channelCollection.ts +75 -35
- package/src/connectionTelemetry.ts +10 -10
- package/src/containerHandleContext.ts +1 -1
- package/src/containerRuntime.ts +352 -197
- package/src/dataStore.ts +2 -2
- package/src/dataStoreContext.ts +19 -19
- package/src/dataStoreContexts.ts +2 -2
- package/src/dataStoreRegistry.ts +1 -1
- package/src/deltaScheduler.ts +1 -1
- package/src/gc/garbageCollection.ts +12 -12
- package/src/gc/gcConfigs.ts +11 -11
- package/src/gc/gcDefinitions.ts +2 -2
- package/src/gc/gcHelpers.ts +2 -2
- package/src/gc/gcSummaryStateTracker.ts +4 -4
- package/src/gc/gcTelemetry.ts +6 -6
- package/src/index.ts +8 -1
- package/src/messageTypes.ts +18 -5
- package/src/opLifecycle/README.md +89 -0
- package/src/opLifecycle/definitions.ts +1 -20
- package/src/opLifecycle/index.ts +3 -9
- package/src/opLifecycle/opCompressor.ts +4 -5
- package/src/opLifecycle/opDecompressor.ts +83 -100
- package/src/opLifecycle/opGroupingManager.ts +9 -12
- package/src/opLifecycle/opSplitter.ts +73 -47
- package/src/opLifecycle/outbox.ts +13 -31
- package/src/opLifecycle/remoteMessageProcessor.ts +41 -59
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +2 -2
- package/src/scheduleManager.ts +7 -7
- package/src/summary/documentSchema.ts +553 -0
- package/src/summary/index.ts +10 -1
- package/src/summary/orderedClientElection.ts +6 -5
- package/src/summary/runWhileConnectedCoordinator.ts +1 -1
- package/src/summary/runningSummarizer.ts +19 -19
- package/src/summary/summarizer.ts +14 -14
- package/src/summary/summarizerClientElection.ts +2 -2
- package/src/summary/summarizerHeuristics.ts +2 -2
- package/src/summary/summarizerNode/summarizerNode.ts +15 -15
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +1 -1
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +4 -4
- package/src/summary/summarizerTypes.ts +3 -3
- package/src/summary/summaryCollection.ts +3 -3
- package/src/summary/summaryFormat.ts +8 -19
- package/src/summary/summaryGenerator.ts +10 -10
- package/src/summary/summaryManager.ts +4 -4
package/lib/containerRuntime.js
CHANGED
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { AttachState, LoaderHeader, } from "@fluidframework/container-definitions";
|
|
6
|
-
import { assert, Deferred, delay, LazyPromise, PromiseCache } from "@fluidframework/core-utils";
|
|
7
5
|
import { Trace, TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
8
|
-
import {
|
|
6
|
+
import { AttachState, LoaderHeader, } from "@fluidframework/container-definitions";
|
|
7
|
+
import { assert, Deferred, LazyPromise, PromiseCache, delay } from "@fluidframework/core-utils";
|
|
9
8
|
import { DriverHeader, FetchSource, } from "@fluidframework/driver-definitions";
|
|
10
9
|
import { readAndParse } from "@fluidframework/driver-utils";
|
|
11
10
|
import { MessageType, SummaryType, } from "@fluidframework/protocol-definitions";
|
|
12
|
-
import { FlushMode, FlushModeExperimental,
|
|
13
|
-
import {
|
|
11
|
+
import { FlushMode, FlushModeExperimental, channelsTreeName, gcTreeKey, } from "@fluidframework/runtime-definitions";
|
|
12
|
+
import { GCDataBuilder, RequestParser, TelemetryContext, addBlobToSummary, addSummarizeResultToSummary, calculateStats, create404Response, exceptionToResponse, responseToException, seqFromTree, } from "@fluidframework/runtime-utils";
|
|
13
|
+
import { DataCorruptionError, DataProcessingError, GenericError, LoggingError, PerformanceEvent, TaggedLoggerAdapter, UsageError, createChildLogger, createChildMonitoringContext, createSampledLogger, loggerToMonitoringContext, raiseConnectedEvent, wrapError, } from "@fluidframework/telemetry-utils";
|
|
14
14
|
import { v4 as uuid } from "uuid";
|
|
15
|
-
import {
|
|
16
|
-
import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
17
|
-
import { ReportOpPerfTelemetry } from "./connectionTelemetry.js";
|
|
18
|
-
import { PendingStateManager, } from "./pendingStateManager.js";
|
|
19
|
-
import { pkgVersion } from "./packageVersion.js";
|
|
15
|
+
import { BindBatchTracker } from "./batchTracker.js";
|
|
20
16
|
import { BlobManager } from "./blobManager.js";
|
|
21
17
|
import { ChannelCollection, getSummaryForDatastores, wrapContext } from "./channelCollection.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { GarbageCollector, GCNodeType, gcGenerationOptionName, } from "./gc/index.js";
|
|
18
|
+
import { ReportOpPerfTelemetry } from "./connectionTelemetry.js";
|
|
19
|
+
import { ContainerFluidHandleContext } from "./containerHandleContext.js";
|
|
25
20
|
import { channelToDataStore } from "./dataStore.js";
|
|
26
|
-
import {
|
|
27
|
-
import { ScheduleManager } from "./scheduleManager.js";
|
|
28
|
-
import { OpCompressor, OpDecompressor, Outbox, OpSplitter, RemoteMessageProcessor, OpGroupingManager, getLongStack, } from "./opLifecycle/index.js";
|
|
21
|
+
import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
29
22
|
import { DeltaManagerSummarizerProxy } from "./deltaManagerSummarizerProxy.js";
|
|
23
|
+
import { GCNodeType, GarbageCollector, gcGenerationOptionName, } from "./gc/index.js";
|
|
30
24
|
import { ContainerMessageType, } from "./messageTypes.js";
|
|
25
|
+
import { OpCompressor, OpDecompressor, OpGroupingManager, OpSplitter, Outbox, RemoteMessageProcessor, getLongStack, } from "./opLifecycle/index.js";
|
|
26
|
+
import { pkgVersion } from "./packageVersion.js";
|
|
27
|
+
import { PendingStateManager, } from "./pendingStateManager.js";
|
|
28
|
+
import { ScheduleManager } from "./scheduleManager.js";
|
|
29
|
+
import { DocumentsSchemaController, OrderedClientCollection, OrderedClientElection, RetriableSummaryError, RunWhileConnectedCoordinator, Summarizer, SummarizerClientElection, SummaryCollection, SummaryManager, aliasBlobName, blobsTreeName, chunksBlobName, createRootSummarizerNodeWithGC, electedSummarizerBlobName, extractSummaryMetadataMessage, idCompressorBlobName, metadataBlobName, rootHasIsolatedChannels, summarizerClientType, wrapSummaryInChannelsTree, } from "./summary/index.js";
|
|
30
|
+
import { Throttler, formExponentialFn } from "./throttler.js";
|
|
31
31
|
/**
|
|
32
32
|
* Utility to implement compat behaviors given an unknown message type
|
|
33
33
|
* The parameters are typed to support compile-time enforcement of handling all known types/behaviors
|
|
@@ -82,6 +82,11 @@ export var CompressionAlgorithms;
|
|
|
82
82
|
(function (CompressionAlgorithms) {
|
|
83
83
|
CompressionAlgorithms["lz4"] = "lz4";
|
|
84
84
|
})(CompressionAlgorithms || (CompressionAlgorithms = {}));
|
|
85
|
+
/** @alpha */
|
|
86
|
+
export const disabledCompressionConfig = {
|
|
87
|
+
minimumBatchSizeInBytes: Infinity,
|
|
88
|
+
compressionAlgorithm: CompressionAlgorithms.lz4,
|
|
89
|
+
};
|
|
85
90
|
const maxConsecutiveReconnectsKey = "Fluid.ContainerRuntime.MaxConsecutiveReconnects";
|
|
86
91
|
const defaultFlushMode = FlushMode.TurnBased;
|
|
87
92
|
// The actual limit is 1Mb (socket.io and Kafka limits)
|
|
@@ -105,26 +110,12 @@ export const defaultPendingOpsRetryDelayMs = 1000;
|
|
|
105
110
|
* This delay's goal is to prevent tight restart loops
|
|
106
111
|
*/
|
|
107
112
|
const defaultCloseSummarizerDelayMs = 5000; // 5 seconds
|
|
108
|
-
/**
|
|
109
|
-
* @deprecated use ContainerRuntimeMessageType instead
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
export var RuntimeMessage;
|
|
113
|
-
(function (RuntimeMessage) {
|
|
114
|
-
RuntimeMessage["FluidDataStoreOp"] = "component";
|
|
115
|
-
RuntimeMessage["Attach"] = "attach";
|
|
116
|
-
RuntimeMessage["ChunkedOp"] = "chunkedOp";
|
|
117
|
-
RuntimeMessage["BlobAttach"] = "blobAttach";
|
|
118
|
-
RuntimeMessage["Rejoin"] = "rejoin";
|
|
119
|
-
RuntimeMessage["Alias"] = "alias";
|
|
120
|
-
RuntimeMessage["Operation"] = "op";
|
|
121
|
-
})(RuntimeMessage || (RuntimeMessage = {}));
|
|
122
113
|
/**
|
|
123
114
|
* @deprecated please use version in driver-utils
|
|
124
115
|
* @internal
|
|
125
116
|
*/
|
|
126
117
|
export function isRuntimeMessage(message) {
|
|
127
|
-
return Object.values(
|
|
118
|
+
return Object.values(ContainerMessageType).includes(message.type);
|
|
128
119
|
}
|
|
129
120
|
/**
|
|
130
121
|
* Legacy ID for the built-in AgentScheduler. To minimize disruption while removing it, retaining this as a
|
|
@@ -198,6 +189,17 @@ async function createSummarizer(loader, url) {
|
|
|
198
189
|
}
|
|
199
190
|
return fluidObject.ISummarizer;
|
|
200
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Extract last message from the snapshot metadata.
|
|
194
|
+
* Uses legacy property if not using explicit schema control, otherwise uses the new property.
|
|
195
|
+
* This allows new runtime to make documents not openable for old runtimes, one explicit document schema control is enabled.
|
|
196
|
+
* Please see addMetadataToSummary() as well
|
|
197
|
+
*/
|
|
198
|
+
function lastMessageFromMetadata(metadata) {
|
|
199
|
+
return metadata?.documentSchema?.runtime?.explicitSchemaControl
|
|
200
|
+
? metadata?.lastMessage
|
|
201
|
+
: metadata?.message;
|
|
202
|
+
}
|
|
201
203
|
/**
|
|
202
204
|
* Represents the runtime of the container. Contains helper functions/state of the container.
|
|
203
205
|
* It will define the store level mappings.
|
|
@@ -235,7 +237,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
235
237
|
},
|
|
236
238
|
});
|
|
237
239
|
const mc = loggerToMonitoringContext(logger);
|
|
238
|
-
const { summaryOptions = {}, gcOptions = {}, loadSequenceNumberVerification = "close", flushMode = defaultFlushMode, compressionOptions = defaultCompressionConfig, maxBatchSizeInBytes = defaultMaxBatchSizeInBytes, enableRuntimeIdCompressor
|
|
240
|
+
const { summaryOptions = {}, gcOptions = {}, loadSequenceNumberVerification = "close", flushMode = defaultFlushMode, compressionOptions = defaultCompressionConfig, maxBatchSizeInBytes = defaultMaxBatchSizeInBytes, enableRuntimeIdCompressor, chunkSizeInBytes = defaultChunkSizeInBytes, enableOpReentryCheck = false, enableGroupedBatching = false, explicitSchemaControl = false, } = runtimeOptions;
|
|
239
241
|
const registry = new FluidDataStoreRegistry(registryEntries);
|
|
240
242
|
const tryFetchBlob = async (blobName) => {
|
|
241
243
|
const blobId = context.baseSnapshot?.blobs[blobName];
|
|
@@ -260,14 +262,21 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
260
262
|
assert(context.storage !== undefined, 0x256 /* "storage undefined in attached container" */);
|
|
261
263
|
return readAndParse(context.storage, id);
|
|
262
264
|
});
|
|
265
|
+
const messageAtLastSummary = lastMessageFromMetadata(metadata);
|
|
263
266
|
// Verify summary runtime sequence number matches protocol sequence number.
|
|
264
|
-
const runtimeSequenceNumber =
|
|
267
|
+
const runtimeSequenceNumber = messageAtLastSummary?.sequenceNumber;
|
|
265
268
|
// When we load with pending state, we reuse an old snapshot so we don't expect these numbers to match
|
|
266
269
|
if (!context.pendingLocalState && runtimeSequenceNumber !== undefined) {
|
|
267
270
|
const protocolSequenceNumber = context.deltaManager.initialSequenceNumber;
|
|
268
271
|
// Unless bypass is explicitly set, then take action when sequence numbers mismatch.
|
|
269
272
|
if (loadSequenceNumberVerification !== "bypass" &&
|
|
270
273
|
runtimeSequenceNumber !== protocolSequenceNumber) {
|
|
274
|
+
// Message to OCEs:
|
|
275
|
+
// You can hit this error with runtimeSequenceNumber === -1 in < 2.0 RC3 builds.
|
|
276
|
+
// This would indicate that explicit schema control is enabled in current (2.0 RC3+) builds and it
|
|
277
|
+
// results in addMetadataToSummary() creating a poison pill for older runtimes in the form of a -1 sequence number.
|
|
278
|
+
// Older runtimes do not understand new schema, and thus could corrupt document if they proceed, thus we are using
|
|
279
|
+
// this poison pill to prevent them from proceeding.
|
|
271
280
|
// "Load from summary, runtime metadata sequenceNumber !== initialSequenceNumber"
|
|
272
281
|
const error = new DataCorruptionError(
|
|
273
282
|
// pre-0.58 error message: SummaryMetadataMismatch
|
|
@@ -281,7 +290,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
281
290
|
}
|
|
282
291
|
}
|
|
283
292
|
// Enabling the IdCompressor is a one-way operation and we only want to
|
|
284
|
-
// allow new containers to turn it on
|
|
293
|
+
// allow new containers to turn it on.
|
|
285
294
|
let idCompressorMode;
|
|
286
295
|
if (existing) {
|
|
287
296
|
// This setting has to be sticky for correctness:
|
|
@@ -290,20 +299,20 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
290
299
|
// 2) if it's ON, then all sessions should load compressor right away
|
|
291
300
|
// 3) Same logic applies for "delayed" mode
|
|
292
301
|
// Maybe in the future we will need to enabled (and figure how to do it safely) "delayed" -> "on" change.
|
|
293
|
-
// We could do "off" -> "on"
|
|
294
|
-
// this will allow clients to eventually to disregard "off" setting (when it's safe so) and start
|
|
302
|
+
// We could do "off" -> "on" transition too, if all clients start loading compressor (but not using it initially) and
|
|
303
|
+
// do so for a while - this will allow clients to eventually to disregard "off" setting (when it's safe so) and start
|
|
304
|
+
// using compressor in future sessions.
|
|
295
305
|
// Everyting is possible, but it needs to be designed and executed carefully, when such need arises.
|
|
296
|
-
idCompressorMode = metadata?.
|
|
306
|
+
idCompressorMode = metadata?.documentSchema?.runtime
|
|
307
|
+
?.idCompressorMode;
|
|
297
308
|
}
|
|
298
309
|
else {
|
|
299
|
-
|
|
300
|
-
const enabled = mc.config.getBoolean("Fluid.ContainerRuntime.IdCompressorEnabled");
|
|
301
|
-
switch (enabled) {
|
|
310
|
+
switch (mc.config.getBoolean("Fluid.ContainerRuntime.IdCompressorEnabled")) {
|
|
302
311
|
case true:
|
|
303
312
|
idCompressorMode = "on";
|
|
304
313
|
break;
|
|
305
314
|
case false:
|
|
306
|
-
idCompressorMode =
|
|
315
|
+
idCompressorMode = undefined;
|
|
307
316
|
break;
|
|
308
317
|
default:
|
|
309
318
|
idCompressorMode = enableRuntimeIdCompressor;
|
|
@@ -336,6 +345,24 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
336
345
|
return createIdCompressor(compressorLogger);
|
|
337
346
|
}
|
|
338
347
|
};
|
|
348
|
+
const disableGroupedBatching = mc.config.getBoolean("Fluid.ContainerRuntime.DisableGroupedBatching");
|
|
349
|
+
const disableCompression = mc.config.getBoolean("Fluid.ContainerRuntime.CompressionDisabled");
|
|
350
|
+
const compressionLz4 = disableCompression !== true &&
|
|
351
|
+
compressionOptions.minimumBatchSizeInBytes !== Infinity &&
|
|
352
|
+
compressionOptions.compressionAlgorithm === "lz4";
|
|
353
|
+
const opGroupingEnabled = disableGroupedBatching !== true && enableGroupedBatching;
|
|
354
|
+
const documentSchemaController = new DocumentsSchemaController(existing, metadata?.documentSchema, {
|
|
355
|
+
explicitSchemaControl,
|
|
356
|
+
compressionLz4,
|
|
357
|
+
idCompressorMode,
|
|
358
|
+
opGroupingEnabled,
|
|
359
|
+
}, (schema) => {
|
|
360
|
+
runtime.onSchemaChange(schema);
|
|
361
|
+
});
|
|
362
|
+
const featureGatesForTelemetry = {
|
|
363
|
+
disableGroupedBatching,
|
|
364
|
+
disableCompression,
|
|
365
|
+
};
|
|
339
366
|
const runtime = new containerRuntimeCtor(context, registry, metadata, electedSummarizerData, chunks ?? [], aliases ?? [], {
|
|
340
367
|
summaryOptions,
|
|
341
368
|
gcOptions,
|
|
@@ -344,10 +371,12 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
344
371
|
compressionOptions,
|
|
345
372
|
maxBatchSizeInBytes,
|
|
346
373
|
chunkSizeInBytes,
|
|
347
|
-
|
|
374
|
+
// Requires<> drops undefined from IdCompressorType
|
|
375
|
+
enableRuntimeIdCompressor: enableRuntimeIdCompressor,
|
|
348
376
|
enableOpReentryCheck,
|
|
349
377
|
enableGroupedBatching,
|
|
350
|
-
|
|
378
|
+
explicitSchemaControl,
|
|
379
|
+
}, containerScope, logger, existing, blobManagerSnapshot, context.storage, createIdCompressorFn, documentSchemaController, featureGatesForTelemetry, provideEntryPoint, requestHandler, undefined);
|
|
351
380
|
// Apply stashed ops with a reference sequence number equal to the sequence number of the snapshot,
|
|
352
381
|
// or zero. This must be done before Container replays saved ops.
|
|
353
382
|
await runtime.pendingStateManager.applyStashedOpsAt(runtimeSequenceNumber ?? 0);
|
|
@@ -376,6 +405,12 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
376
405
|
get attachState() {
|
|
377
406
|
return this._getAttachState();
|
|
378
407
|
}
|
|
408
|
+
get documentSchema() {
|
|
409
|
+
return this.documentsSchemaController.sessionSchema.runtime;
|
|
410
|
+
}
|
|
411
|
+
get idCompressorMode() {
|
|
412
|
+
return this.documentSchema.idCompressorMode;
|
|
413
|
+
}
|
|
379
414
|
/**
|
|
380
415
|
* See IContainerRuntimeBase.idCompressor() for details.
|
|
381
416
|
*/
|
|
@@ -456,7 +491,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
456
491
|
return this.garbageCollector.throwOnTombstoneUsage;
|
|
457
492
|
}
|
|
458
493
|
/***/
|
|
459
|
-
constructor(context, registry, metadata, electedSummarizerData, chunks, dataStoreAliasMap, runtimeOptions, containerScope, logger, existing, blobManagerSnapshot, _storage, createIdCompressor,
|
|
494
|
+
constructor(context, registry, metadata, electedSummarizerData, chunks, dataStoreAliasMap, runtimeOptions, containerScope, logger, existing, blobManagerSnapshot, _storage, createIdCompressor, documentsSchemaController, featureGatesForTelemetry, provideEntryPoint, requestHandler, summaryConfiguration = {
|
|
460
495
|
// the defaults
|
|
461
496
|
...DefaultSummaryConfiguration,
|
|
462
497
|
// the runtime configuration overrides
|
|
@@ -470,18 +505,13 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
470
505
|
this.logger = logger;
|
|
471
506
|
this._storage = _storage;
|
|
472
507
|
this.createIdCompressor = createIdCompressor;
|
|
473
|
-
this.
|
|
508
|
+
this.documentsSchemaController = documentsSchemaController;
|
|
474
509
|
this.requestHandler = requestHandler;
|
|
475
510
|
this.summaryConfiguration = summaryConfiguration;
|
|
476
511
|
this.imminentClosure = false;
|
|
477
512
|
// We accumulate Id compressor Ops while Id compressor is not loaded yet (only for "delayed" mode)
|
|
478
513
|
// Once it loads, it will process all such ops and we will stop accumulating further ops - ops will be processes as they come in.
|
|
479
514
|
this.pendingIdCompressorOps = [];
|
|
480
|
-
/**
|
|
481
|
-
* True if we have ID compressor loading in-flight (async operation). Useful only for
|
|
482
|
-
* this.idCompressorMode === "delayed" mode
|
|
483
|
-
*/
|
|
484
|
-
this.compressorLoadInitiated = false;
|
|
485
515
|
this.defaultMaxConsecutiveReconnects = 7;
|
|
486
516
|
this._orderSequentiallyCalls = 0;
|
|
487
517
|
this.flushTaskExists = false;
|
|
@@ -511,6 +541,20 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
511
541
|
expiry: { policy: "absolute", durationMs: 60000 },
|
|
512
542
|
});
|
|
513
543
|
const { options, clientDetails, connected, baseSnapshot, submitFn, submitBatchFn, submitSummaryFn, submitSignalFn, disposeFn, closeFn, deltaManager, quorum, audience, loader, pendingLocalState, supportedFeatures, } = context;
|
|
544
|
+
this.mc = createChildMonitoringContext({
|
|
545
|
+
logger: this.logger,
|
|
546
|
+
namespace: "ContainerRuntime",
|
|
547
|
+
});
|
|
548
|
+
// If we support multiple algorithms in the future, then we would need to manage it here carefully.
|
|
549
|
+
// We can use runtimeOptions.compressionOptions.compressionAlgorithm, but only if it's in the schema list!
|
|
550
|
+
// If it's not in the list, then we will need to either use no compression, or fallback to some other (supported by format)
|
|
551
|
+
// compression.
|
|
552
|
+
const compressionOptions = {
|
|
553
|
+
minimumBatchSizeInBytes: this.documentSchema.compressionLz4
|
|
554
|
+
? runtimeOptions.compressionOptions.minimumBatchSizeInBytes
|
|
555
|
+
: Number.POSITIVE_INFINITY,
|
|
556
|
+
compressionAlgorithm: CompressionAlgorithms.lz4,
|
|
557
|
+
};
|
|
514
558
|
this.innerDeltaManager = deltaManager;
|
|
515
559
|
this.deltaManager = new DeltaManagerSummarizerProxy(this.innerDeltaManager);
|
|
516
560
|
// Here we could wrap/intercept on these functions to block/modify outgoing messages if needed.
|
|
@@ -544,10 +588,6 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
544
588
|
this.disposeFn = disposeFn ?? closeFn;
|
|
545
589
|
// In cases of summarizer, we want to dispose instead since consumer doesn't interact with this container
|
|
546
590
|
this.closeFn = this.isSummarizerClient ? this.disposeFn : closeFn;
|
|
547
|
-
this.mc = createChildMonitoringContext({
|
|
548
|
-
logger: this.logger,
|
|
549
|
-
namespace: "ContainerRuntime",
|
|
550
|
-
});
|
|
551
591
|
let loadSummaryNumber;
|
|
552
592
|
// Get the container creation metadata. For new container, we initialize these. For existing containers,
|
|
553
593
|
// get the values from the metadata blob.
|
|
@@ -568,7 +608,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
568
608
|
loadSummaryNumber = 0;
|
|
569
609
|
}
|
|
570
610
|
this.nextSummaryNumber = loadSummaryNumber + 1;
|
|
571
|
-
this.messageAtLastSummary = metadata
|
|
611
|
+
this.messageAtLastSummary = lastMessageFromMetadata(metadata);
|
|
572
612
|
// Note that we only need to pull the *initial* connected state from the context.
|
|
573
613
|
// Later updates come through calls to setConnectionState.
|
|
574
614
|
this._connected = connected;
|
|
@@ -693,13 +733,6 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
693
733
|
isActiveConnection: () => this.innerDeltaManager.active,
|
|
694
734
|
isAttached: () => this.attachState !== AttachState.Detached,
|
|
695
735
|
}, pendingRuntimeState?.pending, this.logger);
|
|
696
|
-
const disableCompression = this.mc.config.getBoolean("Fluid.ContainerRuntime.CompressionDisabled");
|
|
697
|
-
const compressionOptions = disableCompression === true
|
|
698
|
-
? {
|
|
699
|
-
minimumBatchSizeInBytes: Number.POSITIVE_INFINITY,
|
|
700
|
-
compressionAlgorithm: CompressionAlgorithms.lz4,
|
|
701
|
-
}
|
|
702
|
-
: runtimeOptions.compressionOptions;
|
|
703
736
|
const disablePartialFlush = this.mc.config.getBoolean("Fluid.ContainerRuntime.DisablePartialFlush");
|
|
704
737
|
const legacySendBatchFn = makeLegacySendBatchFn(this.submitFn, this.innerDeltaManager);
|
|
705
738
|
this.outbox = new Outbox({
|
|
@@ -804,10 +837,10 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
804
837
|
disableIsolatedChannels: metadata?.disableIsolatedChannels,
|
|
805
838
|
gcVersion: metadata?.gcFeature,
|
|
806
839
|
options: JSON.stringify(runtimeOptions),
|
|
807
|
-
idCompressorModeMetadata: metadata?.idCompressorMode,
|
|
840
|
+
idCompressorModeMetadata: metadata?.documentSchema?.runtime?.idCompressorMode,
|
|
808
841
|
idCompressorMode: this.idCompressorMode,
|
|
809
842
|
featureGates: JSON.stringify({
|
|
810
|
-
|
|
843
|
+
...featureGatesForTelemetry,
|
|
811
844
|
disableOpReentryCheck,
|
|
812
845
|
disableChunking,
|
|
813
846
|
disableAttachReorder: this.disableAttachReorder,
|
|
@@ -830,6 +863,20 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
830
863
|
// saved state, i.e. all the ops marked by Loader layer sa savedOp === true.
|
|
831
864
|
this.skipSavedCompressorOps = pendingRuntimeState?.pendingIdCompressorState !== undefined;
|
|
832
865
|
}
|
|
866
|
+
onSchemaChange(schema) {
|
|
867
|
+
// Most of the settings will be picked up only by new sessions (i.e. after reload).
|
|
868
|
+
// We can make it better in the future (i.e. start to use op compression right away), but for simplicity
|
|
869
|
+
// this is not done.
|
|
870
|
+
// But ID compressor is special. It's possible, that in future, we will remove "stickiness" of ID compressor setting
|
|
871
|
+
// and will allow to start using it. If that were to happen, we want to ensure that we do not break eventual consistency
|
|
872
|
+
// promises. To do so, we need to initialize id compressor right away.
|
|
873
|
+
// As it's implemented right now (with async initialization), this will only work for "off" -> "delayed" transitions.
|
|
874
|
+
// Anything else is too risky, and requires ability to initialize ID compressor synchronously!
|
|
875
|
+
if (schema.runtime.idCompressorMode !== undefined) {
|
|
876
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
877
|
+
this.loadIdCompressor();
|
|
878
|
+
}
|
|
879
|
+
}
|
|
833
880
|
getCreateChildSummarizerNodeFn(id, createParam) {
|
|
834
881
|
return (summarizeInternal, getGCDataFn) => this.summarizerNode.createChild(summarizeInternal, id, createParam, undefined, getGCDataFn);
|
|
835
882
|
}
|
|
@@ -1047,18 +1094,30 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1047
1094
|
}
|
|
1048
1095
|
/** Adds the container's metadata to the given summary tree. */
|
|
1049
1096
|
addMetadataToSummary(summaryTree) {
|
|
1097
|
+
// The last message processed at the time of summary. If there are no new messages, use the message from the
|
|
1098
|
+
// last summary.
|
|
1099
|
+
const message = extractSummaryMetadataMessage(this.deltaManager.lastMessage) ??
|
|
1100
|
+
this.messageAtLastSummary;
|
|
1101
|
+
const documentSchema = this.documentsSchemaController.summarizeDocumentSchema(this.deltaManager.lastSequenceNumber);
|
|
1102
|
+
// Is document schema explicit control on?
|
|
1103
|
+
const explitiSchemaControl = documentSchema?.runtime.explicitSchemaControl;
|
|
1050
1104
|
const metadata = {
|
|
1051
1105
|
...this.createContainerMetadata,
|
|
1052
1106
|
// Increment the summary number for the next summary that will be generated.
|
|
1053
1107
|
summaryNumber: this.nextSummaryNumber++,
|
|
1054
1108
|
summaryFormatVersion: 1,
|
|
1055
1109
|
...this.garbageCollector.getMetadata(),
|
|
1056
|
-
// The last message processed at the time of summary. If there are no new messages, use the message from the
|
|
1057
|
-
// last summary.
|
|
1058
|
-
message: extractSummaryMetadataMessage(this.deltaManager.lastMessage) ??
|
|
1059
|
-
this.messageAtLastSummary,
|
|
1060
1110
|
telemetryDocumentId: this.telemetryDocumentId,
|
|
1061
|
-
|
|
1111
|
+
// If explicit document schema control is not on, use legacy way to supply last message (using 'message' property).
|
|
1112
|
+
// Otherwise use new 'lastMessage' property, but also put content into the 'message' property that cases old
|
|
1113
|
+
// runtimes (that preceed document schema control capabilities) to close container on load due to mismatch in
|
|
1114
|
+
// last message's sequence number.
|
|
1115
|
+
// See also lastMessageFromMetadata()
|
|
1116
|
+
message: explitiSchemaControl
|
|
1117
|
+
? { sequenceNumber: -1 }
|
|
1118
|
+
: message,
|
|
1119
|
+
lastMessage: explitiSchemaControl ? message : undefined,
|
|
1120
|
+
documentSchema,
|
|
1062
1121
|
};
|
|
1063
1122
|
addBlobToSummary(summaryTree, metadataBlobName, JSON.stringify(metadata));
|
|
1064
1123
|
}
|
|
@@ -1169,7 +1228,9 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1169
1228
|
case ContainerMessageType.Alias:
|
|
1170
1229
|
return this.channelCollection.applyStashedOp(opContents);
|
|
1171
1230
|
case ContainerMessageType.IdAllocation:
|
|
1172
|
-
assert(this.idCompressorMode !==
|
|
1231
|
+
assert(this.idCompressorMode !== undefined, 0x8f1 /* ID compressor should be in use */);
|
|
1232
|
+
return;
|
|
1233
|
+
case ContainerMessageType.DocumentSchemaChange:
|
|
1173
1234
|
return;
|
|
1174
1235
|
case ContainerMessageType.BlobAttach:
|
|
1175
1236
|
return;
|
|
@@ -1200,10 +1261,11 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1200
1261
|
}
|
|
1201
1262
|
}
|
|
1202
1263
|
}
|
|
1203
|
-
|
|
1204
|
-
if (
|
|
1205
|
-
this.
|
|
1206
|
-
this.
|
|
1264
|
+
async loadIdCompressor() {
|
|
1265
|
+
if (this._idCompressor === undefined &&
|
|
1266
|
+
this.idCompressorMode !== undefined &&
|
|
1267
|
+
this._loadIdCompressor === undefined) {
|
|
1268
|
+
this._loadIdCompressor = this.createIdCompressor()
|
|
1207
1269
|
.then((compressor) => {
|
|
1208
1270
|
this._idCompressor = compressor;
|
|
1209
1271
|
for (const range of this.pendingIdCompressorOps) {
|
|
@@ -1213,8 +1275,16 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1213
1275
|
})
|
|
1214
1276
|
.catch((error) => {
|
|
1215
1277
|
this.logger.sendErrorEvent({ eventName: "IdCompressorDelayedLoad" }, error);
|
|
1278
|
+
throw error;
|
|
1216
1279
|
});
|
|
1217
1280
|
}
|
|
1281
|
+
return this._loadIdCompressor;
|
|
1282
|
+
}
|
|
1283
|
+
setConnectionState(connected, clientId) {
|
|
1284
|
+
if (connected && this.idCompressorMode === "delayed") {
|
|
1285
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
1286
|
+
this.loadIdCompressor();
|
|
1287
|
+
}
|
|
1218
1288
|
if (connected === false && this.delayConnectClientId !== undefined) {
|
|
1219
1289
|
this.delayConnectClientId = undefined;
|
|
1220
1290
|
this.mc.logger.sendTelemetryEvent({
|
|
@@ -1223,6 +1293,9 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1223
1293
|
// Don't propagate "disconnected" event because we didn't propagate the previous "connected" event
|
|
1224
1294
|
return;
|
|
1225
1295
|
}
|
|
1296
|
+
if (!connected) {
|
|
1297
|
+
this.documentsSchemaController.onDisconnect();
|
|
1298
|
+
}
|
|
1226
1299
|
// If there are stashed blobs in the pending state, we need to delay
|
|
1227
1300
|
// propagation of the "connected" event until we have uploaded them to
|
|
1228
1301
|
// ensure we don't submit ops referencing a blob that has not been uploaded
|
|
@@ -1397,6 +1470,9 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1397
1470
|
assert(false, "should not even get here");
|
|
1398
1471
|
case ContainerMessageType.Rejoin:
|
|
1399
1472
|
break;
|
|
1473
|
+
case ContainerMessageType.DocumentSchemaChange:
|
|
1474
|
+
this.documentsSchemaController.processDocumentSchemaOp(messageWithContext.message.contents, messageWithContext.local, messageWithContext.message.sequenceNumber);
|
|
1475
|
+
break;
|
|
1400
1476
|
default: {
|
|
1401
1477
|
// If we didn't necessarily expect a runtime message type, then no worries - just return
|
|
1402
1478
|
// e.g. this case applies to system ops, or legacy ops that would have fallen into the above cases anyway.
|
|
@@ -1627,6 +1703,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1627
1703
|
break;
|
|
1628
1704
|
}
|
|
1629
1705
|
case ContainerMessageType.IdAllocation:
|
|
1706
|
+
case ContainerMessageType.DocumentSchemaChange:
|
|
1630
1707
|
case ContainerMessageType.GC: {
|
|
1631
1708
|
return false;
|
|
1632
1709
|
}
|
|
@@ -1702,6 +1779,8 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
1702
1779
|
// Wrap data store summaries in .channels subtree.
|
|
1703
1780
|
wrapSummaryInChannelsTree(summarizeResult);
|
|
1704
1781
|
const pathPartsForChildren = [channelsTreeName];
|
|
1782
|
+
// Ensure that ID compressor had a chance to load, if we are using delayed mode.
|
|
1783
|
+
await this.loadIdCompressor();
|
|
1705
1784
|
this.addContainerStateToSummary(summarizeResult, fullTree, trackState, telemetryContext);
|
|
1706
1785
|
return {
|
|
1707
1786
|
...summarizeResult,
|
|
@@ -2244,19 +2323,18 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
2244
2323
|
const idAllocationBatchMessage = {
|
|
2245
2324
|
contents: JSON.stringify(idAllocationMessage),
|
|
2246
2325
|
referenceSequenceNumber: this.deltaManager.lastSequenceNumber,
|
|
2247
|
-
metadata: undefined,
|
|
2248
|
-
localOpMetadata: undefined,
|
|
2249
|
-
type: ContainerMessageType.IdAllocation,
|
|
2250
2326
|
};
|
|
2251
2327
|
this.outbox.submitIdAllocation(idAllocationBatchMessage);
|
|
2252
2328
|
}
|
|
2253
2329
|
}
|
|
2254
2330
|
}
|
|
2255
|
-
submit(containerRuntimeMessage, localOpMetadata = undefined, metadata
|
|
2331
|
+
submit(containerRuntimeMessage, localOpMetadata = undefined, metadata) {
|
|
2256
2332
|
this.verifyNotClosed();
|
|
2257
2333
|
this.verifyCanSubmitOps();
|
|
2258
2334
|
// There should be no ops in detached container state!
|
|
2259
2335
|
assert(this.attachState !== AttachState.Detached, 0x132 /* "sending ops in detached container" */);
|
|
2336
|
+
assert(metadata === undefined ||
|
|
2337
|
+
containerRuntimeMessage.type === ContainerMessageType.BlobAttach, "metadata");
|
|
2260
2338
|
const serializedContent = JSON.stringify(containerRuntimeMessage);
|
|
2261
2339
|
// Note that the real (non-proxy) delta manager is used here to get the readonly info. This is because
|
|
2262
2340
|
// container runtime's ability to submit ops depend on the actual readonly state of the delta manager.
|
|
@@ -2269,7 +2347,6 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
2269
2347
|
const type = containerRuntimeMessage.type;
|
|
2270
2348
|
const message = {
|
|
2271
2349
|
contents: serializedContent,
|
|
2272
|
-
type,
|
|
2273
2350
|
metadata,
|
|
2274
2351
|
localOpMetadata,
|
|
2275
2352
|
referenceSequenceNumber: this.deltaManager.lastSequenceNumber,
|
|
@@ -2284,6 +2361,19 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
2284
2361
|
}
|
|
2285
2362
|
else {
|
|
2286
2363
|
this.submitIdAllocationOpIfNeeded();
|
|
2364
|
+
// Allow document schema controller to send a message if it needs to propose change in document schema.
|
|
2365
|
+
// If it needs to send a message, it will call provided callback with payload of such message and rely
|
|
2366
|
+
// on this callback to do actual sending.
|
|
2367
|
+
this.documentsSchemaController.onMessageSent((contents) => {
|
|
2368
|
+
const msg = {
|
|
2369
|
+
type: ContainerMessageType.DocumentSchemaChange,
|
|
2370
|
+
contents,
|
|
2371
|
+
};
|
|
2372
|
+
this.outbox.submit({
|
|
2373
|
+
contents: JSON.stringify(msg),
|
|
2374
|
+
referenceSequenceNumber: this.deltaManager.lastSequenceNumber,
|
|
2375
|
+
});
|
|
2376
|
+
});
|
|
2287
2377
|
// If this is attach message for new data store, and we are in a batch, send this op out of order
|
|
2288
2378
|
// Is it safe:
|
|
2289
2379
|
// Yes, this should be safe reordering. Newly created data stores are not visible through API surface.
|
|
@@ -2455,6 +2545,11 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
2455
2545
|
case ContainerMessageType.GC:
|
|
2456
2546
|
this.submit(message);
|
|
2457
2547
|
break;
|
|
2548
|
+
case ContainerMessageType.DocumentSchemaChange:
|
|
2549
|
+
// There is no need to resend this message. Document schema controller will properly resend it again (if needed)
|
|
2550
|
+
// on a first occasion (any ops sent after reconnect). There is a good chance, though, that it will not want to
|
|
2551
|
+
// send any ops, as some other client already changed schema.
|
|
2552
|
+
break;
|
|
2458
2553
|
default: {
|
|
2459
2554
|
// This case should be very rare - it would imply an op was stashed from a
|
|
2460
2555
|
// future version of runtime code and now is being applied on an older version.
|
|
@@ -2657,8 +2752,7 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
2657
2752
|
}
|
|
2658
2753
|
}
|
|
2659
2754
|
get groupedBatchingEnabled() {
|
|
2660
|
-
|
|
2661
|
-
return killSwitch !== true && this.runtimeOptions.enableGroupedBatching;
|
|
2755
|
+
return this.documentSchema.opGroupingEnabled === true;
|
|
2662
2756
|
}
|
|
2663
2757
|
}
|
|
2664
2758
|
//# sourceMappingURL=containerRuntime.js.map
|