@fluidframework/container-runtime 2.13.0 → 2.21.0
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/.eslintrc.cjs +71 -5
- package/CHANGELOG.md +84 -0
- package/api-report/container-runtime.legacy.alpha.api.md +38 -232
- package/dist/batchTracker.d.ts +1 -2
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager/blobManager.d.ts +5 -1
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +30 -13
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.d.ts +1 -0
- package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.js +7 -5
- package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
- package/dist/channelCollection.d.ts +23 -12
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +85 -53
- 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 +10 -6
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.d.ts +1 -1
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +87 -94
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +312 -226
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +7 -3
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +8 -4
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +41 -25
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +47 -29
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +6 -2
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +7 -2
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +1 -17
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +9 -6
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +95 -89
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +21 -7
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +48 -19
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +11 -0
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +5 -2
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +218 -70
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +40 -13
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +6 -2
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +14 -7
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +18 -6
- package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +2 -1
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +33 -11
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +35 -17
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.d.ts +42 -13
- package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +27 -9
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +1 -0
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +3 -1
- package/dist/gc/index.js.map +1 -1
- package/dist/inboundBatchAggregator.d.ts +34 -0
- package/dist/inboundBatchAggregator.d.ts.map +1 -0
- package/dist/inboundBatchAggregator.js +185 -0
- package/dist/inboundBatchAggregator.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layerCompatState.d.ts +19 -0
- package/dist/layerCompatState.d.ts.map +1 -0
- package/dist/layerCompatState.js +64 -0
- package/dist/layerCompatState.js.map +1 -0
- package/dist/legacy.d.ts +0 -4
- package/dist/messageTypes.d.ts +14 -5
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/metadata.d.ts +12 -4
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +6 -2
- package/dist/metadata.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +9 -3
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +3 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.d.ts +9 -3
- package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/dist/opLifecycle/duplicateBatchDetector.js +11 -5
- package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +3 -2
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +13 -19
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +6 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +16 -8
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +1 -2
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +9 -6
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +13 -10
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +16 -11
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +4 -4
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +17 -16
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +9 -3
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +3 -1
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/package.json +2 -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 +22 -11
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +24 -15
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +7 -0
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +8 -4
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +1 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +94 -31
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +28 -16
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -0
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +7 -2
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +17 -6
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +48 -19
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +10 -5
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +26 -11
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +1 -0
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +6 -2
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js +13 -5
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/index.d.ts.map +1 -1
- package/dist/summary/summarizerNode/index.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +24 -8
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +45 -36
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +13 -5
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +15 -7
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +253 -135
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +3 -4
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +10 -8
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +28 -9
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +3 -2
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +9 -3
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +22 -9
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +8 -4
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +20 -9
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/throttler.d.ts +26 -10
- package/dist/throttler.d.ts.map +1 -1
- package/dist/throttler.js +12 -4
- package/dist/throttler.js.map +1 -1
- package/lib/batchTracker.d.ts +1 -2
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +2 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts +5 -1
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +30 -13
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.d.ts +1 -0
- package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.js +7 -5
- package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
- package/lib/channelCollection.d.ts +23 -12
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +88 -54
- 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 +11 -7
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts +1 -1
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +87 -94
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +319 -228
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +7 -3
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +8 -4
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +41 -25
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +47 -29
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +6 -2
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +7 -2
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +1 -1
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +1 -17
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +9 -6
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +96 -90
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +21 -7
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +51 -20
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +11 -0
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +4 -2
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +218 -70
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +40 -13
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +6 -2
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +14 -7
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +18 -6
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +2 -1
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +33 -11
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +38 -18
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.d.ts +42 -13
- package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +27 -9
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +1 -0
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -0
- package/lib/gc/index.js.map +1 -1
- package/lib/inboundBatchAggregator.d.ts +34 -0
- package/lib/inboundBatchAggregator.d.ts.map +1 -0
- package/lib/inboundBatchAggregator.js +181 -0
- package/lib/inboundBatchAggregator.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/layerCompatState.d.ts +19 -0
- package/lib/layerCompatState.d.ts.map +1 -0
- package/lib/layerCompatState.js +60 -0
- package/lib/layerCompatState.js.map +1 -0
- package/lib/legacy.d.ts +0 -4
- package/lib/messageTypes.d.ts +14 -5
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/metadata.d.ts +12 -4
- package/lib/metadata.d.ts.map +1 -1
- package/lib/metadata.js +6 -2
- package/lib/metadata.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +9 -3
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +3 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.d.ts +9 -3
- package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
- package/lib/opLifecycle/duplicateBatchDetector.js +11 -5
- package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +3 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +14 -20
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +6 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +17 -9
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +1 -2
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +10 -7
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +13 -10
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +16 -11
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +4 -4
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +17 -16
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +9 -3
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +3 -1
- 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 +22 -11
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +25 -16
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +7 -0
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +8 -4
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +1 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +94 -31
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +28 -16
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -0
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +7 -2
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +17 -6
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +48 -19
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +10 -5
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +26 -11
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +1 -0
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +6 -2
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js +13 -5
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/index.d.ts.map +1 -1
- package/lib/summary/summarizerNode/index.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +24 -8
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +45 -36
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +48 -16
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +3 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +13 -5
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +15 -7
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +253 -135
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +3 -4
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +10 -8
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +28 -9
- 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 +9 -3
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +22 -9
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +8 -4
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +20 -9
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/throttler.d.ts +26 -10
- package/lib/throttler.d.ts.map +1 -1
- package/lib/throttler.js +12 -4
- package/lib/throttler.js.map +1 -1
- package/package.json +22 -31
- package/src/batchTracker.ts +34 -36
- package/src/blobManager/blobManager.ts +54 -33
- package/src/blobManager/blobManagerSnapSum.ts +10 -10
- package/src/channelCollection.ts +108 -82
- package/src/connectionTelemetry.ts +43 -19
- package/src/containerHandleContext.ts +2 -2
- package/src/containerRuntime.ts +492 -364
- package/src/dataStore.ts +17 -9
- package/src/dataStoreContext.ts +94 -73
- package/src/dataStoreContexts.ts +17 -12
- package/src/dataStoreRegistry.ts +1 -1
- package/src/deltaManagerProxies.ts +5 -5
- package/src/deltaScheduler.ts +24 -18
- package/src/gc/garbageCollection.ts +89 -40
- package/src/gc/gcConfigs.ts +13 -5
- package/src/gc/gcDefinitions.ts +224 -70
- package/src/gc/gcHelpers.ts +22 -11
- package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
- package/src/gc/gcSummaryDefinitions.ts +18 -6
- package/src/gc/gcSummaryStateTracker.ts +7 -3
- package/src/gc/gcTelemetry.ts +73 -30
- package/src/gc/gcUnreferencedStateTracker.ts +40 -16
- package/src/gc/index.ts +1 -0
- package/src/{scheduleManager.ts → inboundBatchAggregator.ts} +55 -122
- package/src/index.ts +0 -3
- package/src/layerCompatState.ts +75 -0
- package/src/messageTypes.ts +16 -5
- package/src/metadata.ts +12 -4
- package/src/opLifecycle/README.md +43 -34
- package/src/opLifecycle/batchManager.ts +12 -6
- package/src/opLifecycle/duplicateBatchDetector.ts +12 -6
- package/src/opLifecycle/opCompressor.ts +22 -25
- package/src/opLifecycle/opDecompressor.ts +23 -11
- package/src/opLifecycle/opGroupingManager.ts +16 -11
- package/src/opLifecycle/opSplitter.ts +24 -18
- package/src/opLifecycle/outbox.ts +35 -33
- package/src/opLifecycle/remoteMessageProcessor.ts +13 -5
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +49 -26
- package/src/summary/documentSchema.ts +41 -22
- package/src/summary/index.ts +0 -3
- package/src/summary/orderedClientElection.ts +114 -49
- package/src/summary/runWhileConnectedCoordinator.ts +12 -3
- package/src/summary/runningSummarizer.ts +79 -36
- package/src/summary/summarizer.ts +51 -25
- package/src/summary/summarizerClientElection.ts +4 -2
- package/src/summary/summarizerHeuristics.ts +23 -12
- package/src/summary/summarizerNode/index.ts +1 -0
- package/src/summary/summarizerNode/summarizerNode.ts +54 -43
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +48 -16
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +25 -15
- package/src/summary/summarizerTypes.ts +253 -139
- package/src/summary/summaryCollection.ts +41 -31
- package/src/summary/summaryFormat.ts +34 -13
- package/src/summary/summaryGenerator.ts +39 -18
- package/src/summary/summaryManager.ts +36 -24
- package/src/throttler.ts +23 -11
- package/container-runtime.test-files.tar +0 -0
- package/dist/scheduleManager.d.ts +0 -28
- package/dist/scheduleManager.d.ts.map +0 -1
- package/dist/scheduleManager.js +0 -233
- package/dist/scheduleManager.js.map +0 -1
- package/lib/scheduleManager.d.ts +0 -28
- package/lib/scheduleManager.d.ts.map +0 -1
- package/lib/scheduleManager.js +0 -229
- package/lib/scheduleManager.js.map +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.InboundBatchAggregator = void 0;
|
|
8
|
+
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
9
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
10
|
+
const internal_2 = require("@fluidframework/driver-utils/internal");
|
|
11
|
+
const internal_3 = require("@fluidframework/telemetry-utils/internal");
|
|
12
|
+
const packageVersion_js_1 = require("./packageVersion.js");
|
|
13
|
+
/**
|
|
14
|
+
* This class ensures that we aggregate a complete batch of incoming ops before processing them. It basically ensures
|
|
15
|
+
* that we never start processing ops in a batch IF we do not have all ops in the batch.
|
|
16
|
+
*/
|
|
17
|
+
class InboundBatchAggregator {
|
|
18
|
+
constructor(deltaManager, getClientId, logger) {
|
|
19
|
+
this.deltaManager = deltaManager;
|
|
20
|
+
this.getClientId = getClientId;
|
|
21
|
+
this.logger = logger;
|
|
22
|
+
this.localPaused = false;
|
|
23
|
+
this.timePaused = 0;
|
|
24
|
+
this.batchCount = 0;
|
|
25
|
+
/**
|
|
26
|
+
* Callback for DeltaManager's "op" event, for us to make decision if op processing should
|
|
27
|
+
* be paused or not after that.
|
|
28
|
+
*/
|
|
29
|
+
this.afterOpProcessing = (message) => {
|
|
30
|
+
(0, internal_1.assert)(!this.localPaused, 0x294 /* "can't have op processing paused if we are processing an op" */);
|
|
31
|
+
// If the inbound queue is ever empty, nothing to do!
|
|
32
|
+
if (this.deltaManager.inbound.length === 0) {
|
|
33
|
+
(0, internal_1.assert)(this.pauseSequenceNumber === undefined, 0x295 /* "there should be no pending batch if we have no ops" */);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
// The queue is
|
|
37
|
+
// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:
|
|
38
|
+
// - here (processing ops until reaching start of incomplete batch)
|
|
39
|
+
// - in trackPending(), when queue was empty and start of batch showed up.
|
|
40
|
+
// 2. resumed when batch end comes in (in trackPending())
|
|
41
|
+
// do we have incomplete batch to worry about?
|
|
42
|
+
if (this.pauseSequenceNumber !== undefined) {
|
|
43
|
+
if (message.sequenceNumber >= this.pauseSequenceNumber) {
|
|
44
|
+
throw internal_3.DataProcessingError.create(
|
|
45
|
+
// Former assert 0x296
|
|
46
|
+
"Incomplete batch", "InboundBatchAggregator", message, {
|
|
47
|
+
type: message.type,
|
|
48
|
+
contentType: typeof message.contents,
|
|
49
|
+
batch: message.metadata?.batch,
|
|
50
|
+
compression: message.compression,
|
|
51
|
+
pauseSeqNum: this.pauseSequenceNumber,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
// If the next op is the start of incomplete batch, then we can't process it until it's fully in - pause!
|
|
55
|
+
if (message.sequenceNumber + 1 === this.pauseSequenceNumber) {
|
|
56
|
+
this.pauseQueue();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Called for each incoming op (i.e. inbound "push" notification)
|
|
62
|
+
*/
|
|
63
|
+
this.trackPending = (message) => {
|
|
64
|
+
(0, internal_1.assert)(this.deltaManager.inbound.length > 0, 0x298 /* "we have something in the queue that generates this event" */);
|
|
65
|
+
(0, internal_1.assert)((this.currentBatchClientId === undefined) === (this.pauseSequenceNumber === undefined), 0x299 /* "non-synchronized state" */);
|
|
66
|
+
const metadata = message.metadata;
|
|
67
|
+
// batchMetadata will be true for the message that starts a batch, false for the one that ends it, and
|
|
68
|
+
// undefined for all other messages.
|
|
69
|
+
const batchMetadata = metadata?.batch;
|
|
70
|
+
// Protocol messages are never part of a runtime batch of messages
|
|
71
|
+
if (!(0, internal_2.isRuntimeMessage)(message)) {
|
|
72
|
+
// Protocol messages should never show up in the middle of the batch!
|
|
73
|
+
if (this.currentBatchClientId !== undefined) {
|
|
74
|
+
throw internal_3.DataProcessingError.create("Received a system message during batch processing", // Formerly known as assert 0x29a
|
|
75
|
+
"trackPending", message, {
|
|
76
|
+
runtimeVersion: packageVersion_js_1.pkgVersion,
|
|
77
|
+
batchClientId:
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
79
|
+
this.currentBatchClientId === null ? "null" : this.currentBatchClientId,
|
|
80
|
+
pauseSequenceNumber: this.pauseSequenceNumber,
|
|
81
|
+
localBatch: this.currentBatchClientId === this.getClientId(),
|
|
82
|
+
messageType: message.type,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
(0, internal_1.assert)(batchMetadata === undefined, 0x29b /* "system op in a batch?" */);
|
|
86
|
+
(0, internal_1.assert)(!this.localPaused, 0x29c /* "we should be processing ops when there is no active batch" */);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (this.currentBatchClientId === undefined && batchMetadata === undefined) {
|
|
90
|
+
(0, internal_1.assert)(!this.localPaused, 0x29d /* "we should be processing ops when there is no active batch" */);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
// If we got here, the message is part of a batch. Either starting, in progress, or ending.
|
|
94
|
+
// If this is not the start of the batch, error out if the message was sent by a client other than the one that
|
|
95
|
+
// started the current batch (it should not be possible for ops from other clients to get interleaved with a batch).
|
|
96
|
+
if (this.currentBatchClientId !== undefined &&
|
|
97
|
+
this.currentBatchClientId !== message.clientId) {
|
|
98
|
+
throw new internal_3.DataCorruptionError("OpBatchIncomplete", {
|
|
99
|
+
runtimeVersion: packageVersion_js_1.pkgVersion,
|
|
100
|
+
batchClientId:
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
102
|
+
this.currentBatchClientId === null ? "null" : this.currentBatchClientId,
|
|
103
|
+
pauseSequenceNumber: this.pauseSequenceNumber,
|
|
104
|
+
localBatch: this.currentBatchClientId === this.getClientId(),
|
|
105
|
+
localMessage: message.clientId === this.getClientId(),
|
|
106
|
+
...(0, internal_3.extractSafePropertiesFromMessage)(message),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
// The queue is
|
|
110
|
+
// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:
|
|
111
|
+
// - in afterOpProcessing() - processing ops until reaching start of incomplete batch
|
|
112
|
+
// - here, when queue was empty and start of batch showed up (batchMetadata === true below).
|
|
113
|
+
// 2. resumed when batch end comes in (batchMetadata === false below)
|
|
114
|
+
if (batchMetadata) {
|
|
115
|
+
(0, internal_1.assert)(this.currentBatchClientId === undefined, 0x29e /* "there can't be active batch" */);
|
|
116
|
+
(0, internal_1.assert)(!this.localPaused, 0x29f /* "we should be processing ops when there is no active batch" */);
|
|
117
|
+
this.pauseSequenceNumber = message.sequenceNumber;
|
|
118
|
+
// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)
|
|
119
|
+
this.currentBatchClientId = message.clientId;
|
|
120
|
+
// Start of the batch
|
|
121
|
+
// Only pause processing if queue has no other ops!
|
|
122
|
+
// If there are any other ops in the queue, processing will be stopped when they are processed!
|
|
123
|
+
if (this.deltaManager.inbound.length === 1) {
|
|
124
|
+
this.pauseQueue();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
else if (batchMetadata === false) {
|
|
128
|
+
(0, internal_1.assert)(this.pauseSequenceNumber !== undefined, 0x2a0 /* "batch presence was validated above" */);
|
|
129
|
+
// Batch is complete, we can process it!
|
|
130
|
+
this.resumeQueue(this.pauseSequenceNumber, message);
|
|
131
|
+
this.pauseSequenceNumber = undefined;
|
|
132
|
+
this.currentBatchClientId = undefined;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
// Continuation of current batch. Do nothing
|
|
136
|
+
(0, internal_1.assert)(this.currentBatchClientId !== undefined, 0x2a1 /* "logic error" */);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
// Listen for updates and peek at the inbound
|
|
140
|
+
this.deltaManager.inbound.on("push", this.trackPending);
|
|
141
|
+
const allPending = this.deltaManager.inbound.toArray();
|
|
142
|
+
for (const pending of allPending) {
|
|
143
|
+
this.trackPending(pending);
|
|
144
|
+
}
|
|
145
|
+
// We are intentionally directly listening to the "op" to inspect system ops as well.
|
|
146
|
+
// If we do not observe system ops, we are likely to hit an error when system ops
|
|
147
|
+
// precedes start of incomplete batch.
|
|
148
|
+
this.deltaManager.on("op", this.afterOpProcessing);
|
|
149
|
+
}
|
|
150
|
+
dispose() {
|
|
151
|
+
this.deltaManager.off("op", this.afterOpProcessing);
|
|
152
|
+
this.deltaManager.inbound.off("push", this.trackPending);
|
|
153
|
+
}
|
|
154
|
+
pauseQueue() {
|
|
155
|
+
(0, internal_1.assert)(!this.localPaused, 0x297 /* "always called from resumed state" */);
|
|
156
|
+
this.localPaused = true;
|
|
157
|
+
this.timePaused = (0, client_utils_1.performanceNow)();
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
159
|
+
this.deltaManager.inbound.pause();
|
|
160
|
+
}
|
|
161
|
+
resumeQueue(startBatch, messageEndBatch) {
|
|
162
|
+
const endBatch = messageEndBatch.sequenceNumber;
|
|
163
|
+
const duration = this.localPaused ? (0, client_utils_1.performanceNow)() - this.timePaused : undefined;
|
|
164
|
+
this.batchCount++;
|
|
165
|
+
if (this.batchCount % 1000 === 1) {
|
|
166
|
+
this.logger.sendTelemetryEvent({
|
|
167
|
+
eventName: "BatchStats",
|
|
168
|
+
sequenceNumber: endBatch,
|
|
169
|
+
length: endBatch - startBatch + 1,
|
|
170
|
+
msnDistance: endBatch - messageEndBatch.minimumSequenceNumber,
|
|
171
|
+
duration,
|
|
172
|
+
batchCount: this.batchCount,
|
|
173
|
+
interrupted: this.localPaused,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
// Return early if no change in value
|
|
177
|
+
if (!this.localPaused) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
this.localPaused = false;
|
|
181
|
+
this.deltaManager.inbound.resume();
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
exports.InboundBatchAggregator = InboundBatchAggregator;
|
|
185
|
+
//# sourceMappingURL=inboundBatchAggregator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inboundBatchAggregator.js","sourceRoot":"","sources":["../src/inboundBatchAggregator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAE9D,kEAA6D;AAE7D,oEAAyE;AACzE,uEAKkD;AAGlD,2DAAiD;AAQjD;;;GAGG;AACH,MAAa,sBAAsB;IAOlC,YACkB,YAA+B,EAC/B,WAAqC,EACrC,MAA2B;QAF3B,iBAAY,GAAZ,YAAY,CAAmB;QAC/B,gBAAW,GAAX,WAAW,CAA0B;QACrC,WAAM,GAAN,MAAM,CAAqB;QAPrC,gBAAW,GAAG,KAAK,CAAC;QACpB,eAAU,GAAG,CAAC,CAAC;QACf,eAAU,GAAG,CAAC,CAAC;QA0BvB;;;WAGG;QACc,sBAAiB,GAAG,CAAC,O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CAAC,CAAC;QAC1E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,IAAA,6BAAc,GAAE,CAAC;QACnC,mEAAmE;QACnE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACnC,CAAC;IAEO,WAAW,CAAC,UAAkB,EAAE,eAA0C;QACjF,MAAM,QAAQ,GAAG,eAAe,CAAC,cAAc,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,6BAAc,GAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;QAEnF,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;gBAC9B,SAAS,EAAE,YAAY;gBACvB,cAAc,EAAE,QAAQ;gBACxB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,CAAC;gBACjC,WAAW,EAAE,QAAQ,GAAG,eAAe,CAAC,qBAAqB;gBAC7D,QAAQ;gBACR,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;aAC7B,CAAC,CAAC;QACJ,CAAC;QAED,qCAAqC;QACrC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACvB,OAAO;QACR,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;CACD;AAtOD,wDAsOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport { IDeltaManagerFull } from \"@fluidframework/container-definitions/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport { isRuntimeMessage } from \"@fluidframework/driver-utils/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tDataCorruptionError,\n\tDataProcessingError,\n\textractSafePropertiesFromMessage,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { IBatchMetadata } from \"./metadata.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\ntype IRuntimeMessageMetadata =\n\t| undefined\n\t| {\n\t\t\tbatch?: boolean;\n\t };\n\n/**\n * This class ensures that we aggregate a complete batch of incoming ops before processing them. It basically ensures\n * that we never start processing ops in a batch IF we do not have all ops in the batch.\n */\nexport class InboundBatchAggregator {\n\tprivate pauseSequenceNumber: number | undefined;\n\tprivate currentBatchClientId: string | undefined;\n\tprivate localPaused = false;\n\tprivate timePaused = 0;\n\tprivate batchCount = 0;\n\n\tconstructor(\n\t\tprivate readonly deltaManager: IDeltaManagerFull,\n\t\tprivate readonly getClientId: () => string | undefined,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t) {\n\t\t// Listen for updates and peek at the inbound\n\t\tthis.deltaManager.inbound.on(\"push\", this.trackPending);\n\n\t\tconst allPending = this.deltaManager.inbound.toArray();\n\t\tfor (const pending of allPending) {\n\t\t\tthis.trackPending(pending);\n\t\t}\n\n\t\t// We are intentionally directly listening to the \"op\" to inspect system ops as well.\n\t\t// If we do not observe system ops, we are likely to hit an error when system ops\n\t\t// precedes start of incomplete batch.\n\t\tthis.deltaManager.on(\"op\", this.afterOpProcessing);\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.deltaManager.off(\"op\", this.afterOpProcessing);\n\t\tthis.deltaManager.inbound.off(\"push\", this.trackPending);\n\t}\n\n\t/**\n\t * Callback for DeltaManager's \"op\" event, for us to make decision if op processing should\n\t * be paused or not after that.\n\t */\n\tprivate readonly afterOpProcessing = (message: ISequencedDocumentMessage): void => {\n\t\tassert(\n\t\t\t!this.localPaused,\n\t\t\t0x294 /* \"can't have op processing paused if we are processing an op\" */,\n\t\t);\n\n\t\t// If the inbound queue is ever empty, nothing to do!\n\t\tif (this.deltaManager.inbound.length === 0) {\n\t\t\tassert(\n\t\t\t\tthis.pauseSequenceNumber === undefined,\n\t\t\t\t0x295 /* \"there should be no pending batch if we have no ops\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// The queue is\n\t\t// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:\n\t\t// - here (processing ops until reaching start of incomplete batch)\n\t\t// - in trackPending(), when queue was empty and start of batch showed up.\n\t\t// 2. resumed when batch end comes in (in trackPending())\n\n\t\t// do we have incomplete batch to worry about?\n\t\tif (this.pauseSequenceNumber !== undefined) {\n\t\t\tif (message.sequenceNumber >= this.pauseSequenceNumber) {\n\t\t\t\tthrow DataProcessingError.create(\n\t\t\t\t\t// Former assert 0x296\n\t\t\t\t\t\"Incomplete batch\",\n\t\t\t\t\t\"InboundBatchAggregator\",\n\t\t\t\t\tmessage,\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: message.type,\n\t\t\t\t\t\tcontentType: typeof message.contents,\n\t\t\t\t\t\tbatch: (message.metadata as IBatchMetadata | undefined)?.batch,\n\t\t\t\t\t\tcompression: message.compression,\n\t\t\t\t\t\tpauseSeqNum: this.pauseSequenceNumber,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If the next op is the start of incomplete batch, then we can't process it until it's fully in - pause!\n\t\t\tif (message.sequenceNumber + 1 === this.pauseSequenceNumber) {\n\t\t\t\tthis.pauseQueue();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Called for each incoming op (i.e. inbound \"push\" notification)\n\t */\n\tprivate readonly trackPending = (message: ISequencedDocumentMessage): void => {\n\t\tassert(\n\t\t\tthis.deltaManager.inbound.length > 0,\n\t\t\t0x298 /* \"we have something in the queue that generates this event\" */,\n\t\t);\n\n\t\tassert(\n\t\t\t(this.currentBatchClientId === undefined) === (this.pauseSequenceNumber === undefined),\n\t\t\t0x299 /* \"non-synchronized state\" */,\n\t\t);\n\n\t\tconst metadata = message.metadata as IRuntimeMessageMetadata;\n\t\t// batchMetadata will be true for the message that starts a batch, false for the one that ends it, and\n\t\t// undefined for all other messages.\n\t\tconst batchMetadata = metadata?.batch;\n\n\t\t// Protocol messages are never part of a runtime batch of messages\n\t\tif (!isRuntimeMessage(message)) {\n\t\t\t// Protocol messages should never show up in the middle of the batch!\n\t\t\tif (this.currentBatchClientId !== undefined) {\n\t\t\t\tthrow DataProcessingError.create(\n\t\t\t\t\t\"Received a system message during batch processing\", // Formerly known as assert 0x29a\n\t\t\t\t\t\"trackPending\",\n\t\t\t\t\tmessage,\n\t\t\t\t\t{\n\t\t\t\t\t\truntimeVersion: pkgVersion,\n\t\t\t\t\t\tbatchClientId:\n\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\t\t\t\tthis.currentBatchClientId === null ? \"null\" : this.currentBatchClientId,\n\t\t\t\t\t\tpauseSequenceNumber: this.pauseSequenceNumber,\n\t\t\t\t\t\tlocalBatch: this.currentBatchClientId === this.getClientId(),\n\t\t\t\t\t\tmessageType: message.type,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tassert(batchMetadata === undefined, 0x29b /* \"system op in a batch?\" */);\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29c /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.currentBatchClientId === undefined && batchMetadata === undefined) {\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29d /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// If we got here, the message is part of a batch. Either starting, in progress, or ending.\n\n\t\t// If this is not the start of the batch, error out if the message was sent by a client other than the one that\n\t\t// started the current batch (it should not be possible for ops from other clients to get interleaved with a batch).\n\t\tif (\n\t\t\tthis.currentBatchClientId !== undefined &&\n\t\t\tthis.currentBatchClientId !== message.clientId\n\t\t) {\n\t\t\tthrow new DataCorruptionError(\"OpBatchIncomplete\", {\n\t\t\t\truntimeVersion: pkgVersion,\n\t\t\t\tbatchClientId:\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\t\tthis.currentBatchClientId === null ? \"null\" : this.currentBatchClientId,\n\t\t\t\tpauseSequenceNumber: this.pauseSequenceNumber,\n\t\t\t\tlocalBatch: this.currentBatchClientId === this.getClientId(),\n\t\t\t\tlocalMessage: message.clientId === this.getClientId(),\n\t\t\t\t...extractSafePropertiesFromMessage(message),\n\t\t\t});\n\t\t}\n\n\t\t// The queue is\n\t\t// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:\n\t\t// - in afterOpProcessing() - processing ops until reaching start of incomplete batch\n\t\t// - here, when queue was empty and start of batch showed up (batchMetadata === true below).\n\t\t// 2. resumed when batch end comes in (batchMetadata === false below)\n\n\t\tif (batchMetadata) {\n\t\t\tassert(\n\t\t\t\tthis.currentBatchClientId === undefined,\n\t\t\t\t0x29e /* \"there can't be active batch\" */,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29f /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\tthis.pauseSequenceNumber = message.sequenceNumber;\n\t\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\n\t\t\tthis.currentBatchClientId = message.clientId as string;\n\t\t\t// Start of the batch\n\t\t\t// Only pause processing if queue has no other ops!\n\t\t\t// If there are any other ops in the queue, processing will be stopped when they are processed!\n\t\t\tif (this.deltaManager.inbound.length === 1) {\n\t\t\t\tthis.pauseQueue();\n\t\t\t}\n\t\t} else if (batchMetadata === false) {\n\t\t\tassert(\n\t\t\t\tthis.pauseSequenceNumber !== undefined,\n\t\t\t\t0x2a0 /* \"batch presence was validated above\" */,\n\t\t\t);\n\t\t\t// Batch is complete, we can process it!\n\t\t\tthis.resumeQueue(this.pauseSequenceNumber, message);\n\t\t\tthis.pauseSequenceNumber = undefined;\n\t\t\tthis.currentBatchClientId = undefined;\n\t\t} else {\n\t\t\t// Continuation of current batch. Do nothing\n\t\t\tassert(this.currentBatchClientId !== undefined, 0x2a1 /* \"logic error\" */);\n\t\t}\n\t};\n\n\tprivate pauseQueue(): void {\n\t\tassert(!this.localPaused, 0x297 /* \"always called from resumed state\" */);\n\t\tthis.localPaused = true;\n\t\tthis.timePaused = performanceNow();\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tthis.deltaManager.inbound.pause();\n\t}\n\n\tprivate resumeQueue(startBatch: number, messageEndBatch: ISequencedDocumentMessage): void {\n\t\tconst endBatch = messageEndBatch.sequenceNumber;\n\t\tconst duration = this.localPaused ? performanceNow() - this.timePaused : undefined;\n\n\t\tthis.batchCount++;\n\t\tif (this.batchCount % 1000 === 1) {\n\t\t\tthis.logger.sendTelemetryEvent({\n\t\t\t\teventName: \"BatchStats\",\n\t\t\t\tsequenceNumber: endBatch,\n\t\t\t\tlength: endBatch - startBatch + 1,\n\t\t\t\tmsnDistance: endBatch - messageEndBatch.minimumSequenceNumber,\n\t\t\t\tduration,\n\t\t\t\tbatchCount: this.batchCount,\n\t\t\t\tinterrupted: this.localPaused,\n\t\t\t});\n\t\t}\n\n\t\t// Return early if no change in value\n\t\tif (!this.localPaused) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.localPaused = false;\n\n\t\tthis.deltaManager.inbound.resume();\n\t}\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { IBlobManagerLoadInfo } from "./blobManager/index.js";
|
|
|
8
8
|
export { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
9
9
|
export { detectOutboundReferences, RuntimeHeaders, ChannelCollectionFactory, AllowTombstoneRequestHeaderKey, } from "./channelCollection.js";
|
|
10
10
|
export { GCNodeType, IGCMetadata, GCFeatureMatrix, GCVersion, IGCRuntimeOptions, IMarkPhaseStats, ISweepPhaseStats, IGCNodeUpdatedProps, IGCStats, } from "./gc/index.js";
|
|
11
|
-
export { IAckedSummary, ISummarizer, ISummarizeResults, ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer,
|
|
11
|
+
export { IAckedSummary, ISummarizer, ISummarizeResults, ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer, SummaryCollection, EnqueueSummarizeResult, IAckSummaryResult, IBaseSummarizeResult, IBroadcastSummaryResult, ICancellationToken, IConnectableRuntime, IContainerRuntimeMetadata, ICreateContainerMetadata, IEnqueueSummarizeOptions, IGenerateSummaryTreeResult, IGeneratedSummaryStats, INackSummaryResult, IOnDemandSummarizeOptions, IRefreshSummaryAckOptions, ISubmitSummaryOpResult, ISubmitSummaryOptions, ISerializedElection, ISummarizeOptions, ISummarizerInternalsProvider, ISummarizerRuntime, ISummarizingWarning, IUploadSummaryResult, SubmitSummaryResult, SummarizeResultPart, IClientSummaryWatcher, ISummary, ISummaryCollectionOpEvents, ISummaryAckMessage, ISummaryMetadataMessage, ISummaryNackMessage, ISummaryOpMessage, OpActionEventListener, OpActionEventName, ICancellableSummarizerController, SubmitSummaryFailureData, SummaryStage, IRetriableFailureError, IdCompressorMode, IDocumentSchema, DocumentSchemaValueType, IDocumentSchemaCurrent, currentDocumentVersionSchema, DocumentsSchemaController, IDocumentSchemaChangeMessage, IDocumentSchemaFeatures, ReadFluidDataStoreAttributes, IFluidDataStoreAttributes0, IFluidDataStoreAttributes1, IFluidDataStoreAttributes2, OmitAttributesVersions, } from "./summary/index.js";
|
|
12
12
|
export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle/index.js";
|
|
13
13
|
export { ChannelCollection } from "./channelCollection.js";
|
|
14
14
|
export { IFluidDataStoreContextInternal, ISnapshotDetails, LocalFluidDataStoreContext, LocalFluidDataStoreContextBase, FluidDataStoreContext, IFluidDataStoreContextProps, ILocalFluidDataStoreContextProps, ILocalDetachedFluidDataStoreContextProps, IFluidDataStoreContextEvents, } from "./dataStoreContext.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,wBAAwB,EACxB,gCAAgC,EAChC,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,oBAAoB,EACpB,8BAA8B,GAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EACN,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,8BAA8B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,UAAU,EACV,WAAW,EACX,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC1B,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,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B,OAAA;AAE/B,0CAUuB;AATtB,sGAAA,UAAU,OAAA;AAUX,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6DAqB+B;AAb9B,2HAAA,oBAAoB,OAAA;AAEpB,uHAAA,gBAAgB,OAAA;AAChB,uHAAA,gBAAgB,OAAA;AAChB,+HAAA,wBAAwB,OAAA;AACxB,iIAAA,0BAA0B,OAAA;AAC1B,gIAAA,yBAAyB,OAAA;AAEzB,kIAAA,2BAA2B,OAAA;AAE3B,4HAAA,qBAAqB,OAAA;AAErB,gIAAA,yBAAyB,OAAA;AAE1B,qDAG2B;AAF1B,uHAAA,oBAAoB,OAAA;AAIrB,+DAAgE;AAAvD,8HAAA,sBAAsB,OAAA;AAC/B,+DAKgC;AAJ/B,gIAAA,wBAAwB,OAAA;AACxB,sHAAA,cAAc,OAAA;AACd,gIAAA,wBAAwB,OAAA;AACxB,sIAAA,8BAA8B,OAAA;AAE/B,0CAUuB;AATtB,sGAAA,UAAU,OAAA;AAUX,+CA0D4B;AArD3B,sHAAA,0BAA0B,OAAA;AAC1B,sGAAA,UAAU,OAAA;AACV,6GAAA,iBAAiB,OAAA;AA0CjB,wHAAA,4BAA4B,OAAA;AAC5B,qHAAA,yBAAyB,OAAA;AAS1B,mDAA0E;AAArD,gHAAA,oBAAoB,OAAA;AACzC,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA;AAC1B,6DAU+B;AAP9B,iIAAA,0BAA0B,OAAA;AAC1B,qIAAA,8BAA8B,OAAA;AAC9B,4HAAA,qBAAqB,OAAA;AAMtB,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tISummaryRuntimeOptions,\n\tISummaryBaseConfiguration,\n\tISummaryConfigurationHeuristics,\n\tISummaryConfigurationDisableSummarizer,\n\tISummaryConfigurationDisableHeuristics,\n\tIContainerRuntimeOptions,\n\tIContainerRuntimeOptionsInternal,\n\tloadContainerRuntime,\n\tLoadContainerRuntimeParams,\n\tagentSchedulerId,\n\tContainerRuntime,\n\tDeletedResponseHeaderKey,\n\tTombstoneResponseHeaderKey,\n\tInactiveResponseHeaderKey,\n\tISummaryConfiguration,\n\tDefaultSummaryConfiguration,\n\tICompressionRuntimeOptions,\n\tCompressionAlgorithms,\n\tRuntimeHeaderData,\n\tdisabledCompressionConfig,\n} from \"./containerRuntime.js\";\nexport {\n\tContainerMessageType,\n\tUnknownContainerRuntimeMessage,\n} from \"./messageTypes.js\";\nexport { IBlobManagerLoadInfo } from \"./blobManager/index.js\";\nexport { FluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nexport {\n\tdetectOutboundReferences,\n\tRuntimeHeaders,\n\tChannelCollectionFactory,\n\tAllowTombstoneRequestHeaderKey,\n} from \"./channelCollection.js\";\nexport {\n\tGCNodeType,\n\tIGCMetadata,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tIGCRuntimeOptions,\n\tIMarkPhaseStats,\n\tISweepPhaseStats,\n\tIGCNodeUpdatedProps,\n\tIGCStats,\n} from \"./gc/index.js\";\nexport {\n\tIAckedSummary,\n\tISummarizer,\n\tISummarizeResults,\n\tISummaryCancellationToken,\n\tneverCancelledSummaryToken,\n\tSummarizer,\n\tSummaryCollection,\n\tEnqueueSummarizeResult,\n\tIAckSummaryResult,\n\tIBaseSummarizeResult,\n\tIBroadcastSummaryResult,\n\tICancellationToken,\n\tIConnectableRuntime,\n\tIContainerRuntimeMetadata,\n\tICreateContainerMetadata,\n\tIEnqueueSummarizeOptions,\n\tIGenerateSummaryTreeResult,\n\tIGeneratedSummaryStats,\n\tINackSummaryResult,\n\tIOnDemandSummarizeOptions,\n\tIRefreshSummaryAckOptions,\n\tISubmitSummaryOpResult,\n\tISubmitSummaryOptions,\n\tISerializedElection,\n\tISummarizeOptions,\n\tISummarizerInternalsProvider,\n\tISummarizerRuntime,\n\tISummarizingWarning,\n\tIUploadSummaryResult,\n\tSubmitSummaryResult,\n\tSummarizeResultPart,\n\tIClientSummaryWatcher,\n\tISummary,\n\tISummaryCollectionOpEvents,\n\tISummaryAckMessage,\n\tISummaryMetadataMessage,\n\tISummaryNackMessage,\n\tISummaryOpMessage,\n\tOpActionEventListener,\n\tOpActionEventName,\n\tICancellableSummarizerController,\n\tSubmitSummaryFailureData,\n\tSummaryStage,\n\tIRetriableFailureError,\n\tIdCompressorMode,\n\tIDocumentSchema,\n\tDocumentSchemaValueType,\n\tIDocumentSchemaCurrent,\n\tcurrentDocumentVersionSchema,\n\tDocumentsSchemaController,\n\tIDocumentSchemaChangeMessage,\n\tIDocumentSchemaFeatures,\n\tReadFluidDataStoreAttributes,\n\tIFluidDataStoreAttributes0,\n\tIFluidDataStoreAttributes1,\n\tIFluidDataStoreAttributes2,\n\tOmitAttributesVersions,\n} from \"./summary/index.js\";\nexport { IChunkedOp, unpackRuntimeMessage } from \"./opLifecycle/index.js\";\nexport { ChannelCollection } from \"./channelCollection.js\";\nexport {\n\tIFluidDataStoreContextInternal,\n\tISnapshotDetails,\n\tLocalFluidDataStoreContext,\n\tLocalFluidDataStoreContextBase,\n\tFluidDataStoreContext,\n\tIFluidDataStoreContextProps,\n\tILocalFluidDataStoreContextProps,\n\tILocalDetachedFluidDataStoreContextProps,\n\tIFluidDataStoreContextEvents,\n} from \"./dataStoreContext.js\";\nexport { DataStoreContexts } from \"./dataStoreContexts.js\";\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { type ILayerCompatDetails, type ILayerCompatSupportRequirements } from "@fluid-internal/client-utils";
|
|
6
|
+
import type { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
7
|
+
/**
|
|
8
|
+
* Runtime's compatibility details that is exposed to the Loader layer.
|
|
9
|
+
*/
|
|
10
|
+
export declare const RuntimeCompatDetails: ILayerCompatDetails;
|
|
11
|
+
/**
|
|
12
|
+
* The requirements that the Loader layer must meet to be compatible with this Runtime.
|
|
13
|
+
*/
|
|
14
|
+
export declare const LoaderSupportRequirements: ILayerCompatSupportRequirements;
|
|
15
|
+
/**
|
|
16
|
+
* Validates that the Loader layer is compatible with this Runtime.
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateLoaderCompatibility(maybeLoaderCompatDetails: ILayerCompatDetails | undefined, disposeFn: (error?: ICriticalContainerError) => void): void;
|
|
19
|
+
//# sourceMappingURL=layerCompatState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerCompatState.d.ts","sourceRoot":"","sources":["../src/layerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAKrF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,mBAalC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,+BAUvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,2BAA2B,CAC1C,wBAAwB,EAAE,mBAAmB,GAAG,SAAS,EACzD,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,KAAK,IAAI,GAClD,IAAI,CAoBN"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.validateLoaderCompatibility = exports.LoaderSupportRequirements = exports.RuntimeCompatDetails = void 0;
|
|
8
|
+
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
9
|
+
const internal_1 = require("@fluidframework/telemetry-utils/internal");
|
|
10
|
+
const packageVersion_js_1 = require("./packageVersion.js");
|
|
11
|
+
/**
|
|
12
|
+
* Runtime's compatibility details that is exposed to the Loader layer.
|
|
13
|
+
*/
|
|
14
|
+
exports.RuntimeCompatDetails = {
|
|
15
|
+
/**
|
|
16
|
+
* The package version of the Runtime layer.
|
|
17
|
+
*/
|
|
18
|
+
pkgVersion: packageVersion_js_1.pkgVersion,
|
|
19
|
+
/**
|
|
20
|
+
* The current generation of the Runtime layer.
|
|
21
|
+
*/
|
|
22
|
+
generation: 1,
|
|
23
|
+
/**
|
|
24
|
+
* The features supported by the Runtime layer across the Runtime / Loader boundary.
|
|
25
|
+
*/
|
|
26
|
+
supportedFeatures: new Set(),
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The requirements that the Loader layer must meet to be compatible with this Runtime.
|
|
30
|
+
*/
|
|
31
|
+
exports.LoaderSupportRequirements = {
|
|
32
|
+
/**
|
|
33
|
+
* Minimum generation that Loader must be at to be compatible with Runtime.
|
|
34
|
+
*/
|
|
35
|
+
minSupportedGeneration: 0,
|
|
36
|
+
/**
|
|
37
|
+
* The features that the Loader must support to be compatible with Runtime. Note that 0 is used here for
|
|
38
|
+
* Loader layers before the introduction of the layer compatibility enforcement.
|
|
39
|
+
*/
|
|
40
|
+
requiredFeatures: [],
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Validates that the Loader layer is compatible with this Runtime.
|
|
44
|
+
*/
|
|
45
|
+
function validateLoaderCompatibility(maybeLoaderCompatDetails, disposeFn) {
|
|
46
|
+
const layerCheckResult = (0, client_utils_1.checkLayerCompatibility)(exports.LoaderSupportRequirements, maybeLoaderCompatDetails);
|
|
47
|
+
if (!layerCheckResult.isCompatible) {
|
|
48
|
+
const error = new internal_1.UsageError("Runtime is not compatible with Loader", {
|
|
49
|
+
errorDetails: JSON.stringify({
|
|
50
|
+
runtimeVersion: exports.RuntimeCompatDetails.pkgVersion,
|
|
51
|
+
loaderVersion: maybeLoaderCompatDetails?.pkgVersion,
|
|
52
|
+
runtimeGeneration: exports.RuntimeCompatDetails.generation,
|
|
53
|
+
loaderGeneration: maybeLoaderCompatDetails?.generation,
|
|
54
|
+
minSupportedGeneration: exports.LoaderSupportRequirements.minSupportedGeneration,
|
|
55
|
+
isGenerationCompatible: layerCheckResult.isGenerationCompatible,
|
|
56
|
+
unsupportedFeatures: layerCheckResult.unsupportedFeatures,
|
|
57
|
+
}),
|
|
58
|
+
});
|
|
59
|
+
disposeFn(error);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.validateLoaderCompatibility = validateLoaderCompatibility;
|
|
64
|
+
//# sourceMappingURL=layerCompatState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerCompatState.js","sourceRoot":"","sources":["../src/layerCompatState.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAIsC;AAEtC,uEAAsE;AAEtE,2DAAiD;AAEjD;;GAEG;AACU,QAAA,oBAAoB,GAAwB;IACxD;;OAEG;IACH,UAAU,EAAV,8BAAU;IACV;;OAEG;IACH,UAAU,EAAE,CAAC;IACb;;OAEG;IACH,iBAAiB,EAAE,IAAI,GAAG,EAAU;CACpC,CAAC;AAEF;;GAEG;AACU,QAAA,yBAAyB,GAAoC;IACzE;;OAEG;IACH,sBAAsB,EAAE,CAAC;IACzB;;;OAGG;IACH,gBAAgB,EAAE,EAAE;CACpB,CAAC;AAEF;;GAEG;AACH,SAAgB,2BAA2B,CAC1C,wBAAyD,EACzD,SAAoD;IAEpD,MAAM,gBAAgB,GAAG,IAAA,sCAAuB,EAC/C,iCAAyB,EACzB,wBAAwB,CACxB,CAAC;IACF,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,qBAAU,CAAC,uCAAuC,EAAE;YACrE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;gBAC5B,cAAc,EAAE,4BAAoB,CAAC,UAAU;gBAC/C,aAAa,EAAE,wBAAwB,EAAE,UAAU;gBACnD,iBAAiB,EAAE,4BAAoB,CAAC,UAAU;gBAClD,gBAAgB,EAAE,wBAAwB,EAAE,UAAU;gBACtD,sBAAsB,EAAE,iCAAyB,CAAC,sBAAsB;gBACxE,sBAAsB,EAAE,gBAAgB,CAAC,sBAAsB;gBAC/D,mBAAmB,EAAE,gBAAgB,CAAC,mBAAmB;aACzD,CAAC;SACF,CAAC,CAAC;QACH,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,MAAM,KAAK,CAAC;IACb,CAAC;AACF,CAAC;AAvBD,kEAuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tcheckLayerCompatibility,\n\ttype ILayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"@fluid-internal/client-utils\";\nimport type { ICriticalContainerError } from \"@fluidframework/container-definitions\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * Runtime's compatibility details that is exposed to the Loader layer.\n */\nexport const RuntimeCompatDetails: ILayerCompatDetails = {\n\t/**\n\t * The package version of the Runtime layer.\n\t */\n\tpkgVersion,\n\t/**\n\t * The current generation of the Runtime layer.\n\t */\n\tgeneration: 1,\n\t/**\n\t * The features supported by the Runtime layer across the Runtime / Loader boundary.\n\t */\n\tsupportedFeatures: new Set<string>(),\n};\n\n/**\n * The requirements that the Loader layer must meet to be compatible with this Runtime.\n */\nexport const LoaderSupportRequirements: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Loader must be at to be compatible with Runtime.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Loader must support to be compatible with Runtime. Note that 0 is used here for\n\t * Loader layers before the introduction of the layer compatibility enforcement.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * Validates that the Loader layer is compatible with this Runtime.\n */\nexport function validateLoaderCompatibility(\n\tmaybeLoaderCompatDetails: ILayerCompatDetails | undefined,\n\tdisposeFn: (error?: ICriticalContainerError) => void,\n): void {\n\tconst layerCheckResult = checkLayerCompatibility(\n\t\tLoaderSupportRequirements,\n\t\tmaybeLoaderCompatDetails,\n\t);\n\tif (!layerCheckResult.isCompatible) {\n\t\tconst error = new UsageError(\"Runtime is not compatible with Loader\", {\n\t\t\terrorDetails: JSON.stringify({\n\t\t\t\truntimeVersion: RuntimeCompatDetails.pkgVersion,\n\t\t\t\tloaderVersion: maybeLoaderCompatDetails?.pkgVersion,\n\t\t\t\truntimeGeneration: RuntimeCompatDetails.generation,\n\t\t\t\tloaderGeneration: maybeLoaderCompatDetails?.generation,\n\t\t\t\tminSupportedGeneration: LoaderSupportRequirements.minSupportedGeneration,\n\t\t\t\tisGenerationCompatible: layerCheckResult.isGenerationCompatible,\n\t\t\t\tunsupportedFeatures: layerCheckResult.unsupportedFeatures,\n\t\t\t}),\n\t\t});\n\t\tdisposeFn(error);\n\t\tthrow error;\n\t}\n}\n"]}
|
package/dist/legacy.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export {
|
|
|
13
13
|
AllowTombstoneRequestHeaderKey,
|
|
14
14
|
CompressionAlgorithms,
|
|
15
15
|
ContainerMessageType,
|
|
16
|
-
ContainerRuntime,
|
|
17
16
|
DefaultSummaryConfiguration,
|
|
18
17
|
DeletedResponseHeaderKey,
|
|
19
18
|
DocumentSchemaValueType,
|
|
@@ -56,11 +55,9 @@ export {
|
|
|
56
55
|
ISerializedElection,
|
|
57
56
|
ISubmitSummaryOpResult,
|
|
58
57
|
ISubmitSummaryOptions,
|
|
59
|
-
ISummarizeEventProps,
|
|
60
58
|
ISummarizeOptions,
|
|
61
59
|
ISummarizeResults,
|
|
62
60
|
ISummarizer,
|
|
63
|
-
ISummarizerEvents,
|
|
64
61
|
ISummarizerInternalsProvider,
|
|
65
62
|
ISummarizerRuntime,
|
|
66
63
|
ISummary,
|
|
@@ -89,7 +86,6 @@ export {
|
|
|
89
86
|
SubmitSummaryResult,
|
|
90
87
|
SummarizeResultPart,
|
|
91
88
|
Summarizer,
|
|
92
|
-
SummarizerStopReason,
|
|
93
89
|
SummaryCollection,
|
|
94
90
|
SummaryStage,
|
|
95
91
|
TombstoneResponseHeaderKey,
|
package/dist/messageTypes.d.ts
CHANGED
|
@@ -44,9 +44,13 @@ export declare enum ContainerMessageType {
|
|
|
44
44
|
* This way stringified values can be compared.
|
|
45
45
|
*/
|
|
46
46
|
interface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TContents> {
|
|
47
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Type of the op, within the ContainerRuntime's domain
|
|
49
|
+
*/
|
|
48
50
|
type: TType;
|
|
49
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Domain-specific contents, interpreted according to the type
|
|
53
|
+
*/
|
|
50
54
|
contents: TContents;
|
|
51
55
|
}
|
|
52
56
|
export type ContainerRuntimeDataStoreOpMessage = TypedContainerRuntimeMessage<ContainerMessageType.FluidDataStoreOp, IEnvelope>;
|
|
@@ -64,12 +68,15 @@ export type ContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage
|
|
|
64
68
|
* @internal
|
|
65
69
|
*/
|
|
66
70
|
export interface UnknownContainerRuntimeMessage {
|
|
67
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Invalid type of the op, within the ContainerRuntime's domain. This value should never exist at runtime.
|
|
68
73
|
* This is useful for type narrowing but should never be used as an actual message type at runtime.
|
|
69
74
|
* Actual value will not be "__unknown...", but the type `Exclude<string, ContainerMessageType>` is not supported.
|
|
70
75
|
*/
|
|
71
76
|
type: "__unknown_container_message_type__never_use_as_value__";
|
|
72
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Domain-specific contents, but not decipherable by an unknown op.
|
|
79
|
+
*/
|
|
73
80
|
contents: unknown;
|
|
74
81
|
}
|
|
75
82
|
/**
|
|
@@ -81,7 +88,9 @@ export type InboundContainerRuntimeMessage = ContainerRuntimeDataStoreOpMessage
|
|
|
81
88
|
* These are messages generated by the local runtime, before the outbox's op virtualization step.
|
|
82
89
|
*/
|
|
83
90
|
export type LocalContainerRuntimeMessage = ContainerRuntimeDataStoreOpMessage | OutboundContainerRuntimeAttachMessage | ContainerRuntimeBlobAttachMessage | ContainerRuntimeRejoinMessage | ContainerRuntimeAliasMessage | ContainerRuntimeIdAllocationMessage | ContainerRuntimeGCMessage | UnknownContainerRuntimeMessage | ContainerRuntimeDocumentSchemaMessage;
|
|
84
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* A {@link TypedContainerRuntimeMessage} that is being sent to the server from the container runtime.
|
|
93
|
+
*/
|
|
85
94
|
export type OutboundContainerRuntimeMessage = ContainerRuntimeDataStoreOpMessage | OutboundContainerRuntimeAttachMessage | ContainerRuntimeChunkedOpMessage | ContainerRuntimeBlobAttachMessage | ContainerRuntimeRejoinMessage | ContainerRuntimeAliasMessage | ContainerRuntimeIdAllocationMessage | ContainerRuntimeGCMessage | ContainerRuntimeDocumentSchemaMessage;
|
|
86
95
|
/**
|
|
87
96
|
* An unpacked ISequencedDocumentMessage with the inner TypedContainerRuntimeMessage type/contents/etc
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EACN,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MA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xC,kCAAkC,GAClC,qCAAqC,GACrC,gCAAgC,GAChC,iCAAiC,GACjC,6BAA6B,GAC7B,4BAA4B,GAC5B,mCAAmC,GACnC,yBAAyB,GACzB,qCAAqC,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACzD,yBAAyB,EACzB,MAAM,GAAG,UAAU,CACnB,GACA,8BAA8B,CAAC"}
|
package/dist/messageTypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgBH;;;GAGG;AACH,IAAY,oBAoCX;AApCD,WAAY,oBAAoB;IAC/B,iCAAiC;IACjC,sDAA8B,CAAA;IAE9B,sBAAsB;IACtB,yCAAiB,CAAA;IAEjB,qBAAqB;IACrB,+CAAuB,CAAA;IAEvB,yFAAyF;IACzF,iDAAyB,CAAA;IAEzB,oDAAoD;IACpD,yCAAiB,CAAA;IAEjB,sCAAsC;IACtC,uCAAe,CAAA;IAEf;;;;OAIG;IACH,qDAA6B,CAAA;IAE7B;;OAEG;IACH,uDAA+B,CAAA;IAE/B;;;OAGG;IACH,iCAAS,CAAA;AACV,CAAC,EApCW,oBAAoB,oCAApB,oBAAoB,QAoC/B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport type { IdCreationRange } from \"@fluidframework/id-compressor/internal\";\nimport {\n\tIAttachMessage,\n\tIEnvelope,\n\tInboundAttachMessage,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { IDataStoreAliasMessage } from \"./dataStore.js\";\nimport { GarbageCollectionMessage } from \"./gc/index.js\";\nimport { IChunkedOp } from \"./opLifecycle/index.js\";\n// eslint-disable-next-line import/no-deprecated\nimport { IDocumentSchemaChangeMessage } from \"./summary/index.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport enum ContainerMessageType {\n\t// An op to be delivered to store\n\tFluidDataStoreOp = \"component\",\n\n\t// Creates a new store\n\tAttach = \"attach\",\n\n\t// Chunked operation.\n\tChunkedOp = \"chunkedOp\",\n\n\t// Signifies that a blob has been attached and should not be garbage collected by storage\n\tBlobAttach = \"blobAttach\",\n\n\t// Ties our new clientId to our old one on reconnect\n\tRejoin = \"rejoin\",\n\n\t// Sets the alias of a root data store\n\tAlias = \"alias\",\n\n\t/**\n\t * An op containing an IdRange of Ids allocated using the runtime's IdCompressor since\n\t * the last allocation op was sent.\n\t * See the [IdCompressor README](./id-compressor/README.md) for more details.\n\t */\n\tIdAllocation = \"idAllocation\",\n\n\t/**\n\t * An op that changes document schema\n\t */\n\tDocumentSchemaChange = \"schema\",\n\n\t/**\n\t * Garbage collection specific op. This is sent by the summarizer client when GC runs. It's used to synchronize GC\n\t * state across all clients.\n\t */\n\tGC = \"GC\",\n}\n\n/**\n * The unpacked runtime message / details to be handled or dispatched by the ContainerRuntime.\n * Message type are differentiated via a `type` string and contain different contents depending on their type.\n *\n * IMPORTANT: when creating one to be serialized, set the properties in the order they appear here.\n * This way stringified values can be compared.\n */\ninterface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TContents> {\n\t/**\n\t * Type of the op, within the ContainerRuntime's domain\n\t */\n\ttype: TType;\n\t/**\n\t * Domain-specific contents, interpreted according to the type\n\t */\n\tcontents: TContents;\n}\n\nexport type ContainerRuntimeDataStoreOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.FluidDataStoreOp,\n\tIEnvelope\n>;\nexport type InboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tInboundAttachMessage\n>;\nexport type OutboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tIAttachMessage\n>;\nexport type ContainerRuntimeChunkedOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.ChunkedOp,\n\tIChunkedOp\n>;\nexport type ContainerRuntimeBlobAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.BlobAttach,\n\tundefined\n>;\nexport type ContainerRuntimeRejoinMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Rejoin,\n\tundefined\n>;\nexport type ContainerRuntimeAliasMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Alias,\n\tIDataStoreAliasMessage\n>;\nexport type ContainerRuntimeIdAllocationMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.IdAllocation,\n\tIdCreationRange\n>;\nexport type ContainerRuntimeGCMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.GC,\n\tGarbageCollectionMessage\n>;\nexport type ContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.DocumentSchemaChange,\n\t// eslint-disable-next-line import/no-deprecated\n\tIDocumentSchemaChangeMessage\n>;\n\n/**\n * Represents an unrecognized TypedContainerRuntimeMessage, e.g. a message from a future version of the container runtime.\n * @internal\n */\nexport interface UnknownContainerRuntimeMessage {\n\t/**\n\t * Invalid type of the op, within the ContainerRuntime's domain. This value should never exist at runtime.\n\t * This is useful for type narrowing but should never be used as an actual message type at runtime.\n\t * Actual value will not be \"__unknown...\", but the type `Exclude<string, ContainerMessageType>` is not supported.\n\t */\n\ttype: \"__unknown_container_message_type__never_use_as_value__\";\n\n\t/**\n\t * Domain-specific contents, but not decipherable by an unknown op.\n\t */\n\tcontents: unknown;\n}\n\n/**\n * A {@link TypedContainerRuntimeMessage} that is received from the server and will be processed by the container runtime.\n */\nexport type InboundContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| InboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeChunkedOpMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t// Inbound messages may include unknown types from other clients, so we include that as a special case here\n\t| UnknownContainerRuntimeMessage\n\t| ContainerRuntimeDocumentSchemaMessage;\n\n/**\n * A {@link TypedContainerRuntimeMessage} that has been generated by the container runtime but is not yet being sent to the server.\n * These are messages generated by the local runtime, before the outbox's op virtualization step.\n */\nexport type LocalContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| OutboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t// In rare cases (e.g. related to stashed ops) we could have a local message of an unknown type\n\t| UnknownContainerRuntimeMessage\n\t| ContainerRuntimeDocumentSchemaMessage;\n\n/**\n * A {@link TypedContainerRuntimeMessage} that is being sent to the server from the container runtime.\n */\nexport type OutboundContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| OutboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeChunkedOpMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t| ContainerRuntimeDocumentSchemaMessage;\n\n/**\n * An unpacked ISequencedDocumentMessage with the inner TypedContainerRuntimeMessage type/contents/etc\n * promoted up to the outer object\n */\nexport type InboundSequencedContainerRuntimeMessage = Omit<\n\tISequencedDocumentMessage,\n\t\"type\" | \"contents\"\n> &\n\tInboundContainerRuntimeMessage;\n"]}
|
package/dist/metadata.d.ts
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { BatchId } from "./opLifecycle/index.js";
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Syntactic sugar for casting
|
|
8
|
+
*/
|
|
7
9
|
export declare function asBatchMetadata(metadata: unknown): Partial<IBatchMetadata> | undefined;
|
|
8
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Syntactic sugar for casting
|
|
12
|
+
*/
|
|
9
13
|
export declare function asEmptyBatchLocalOpMetadata(localOpMetadata: unknown): IEmptyBatchMetadata | undefined;
|
|
10
14
|
/**
|
|
11
15
|
* Properties put on the localOpMetadata object for empty batches
|
|
@@ -17,9 +21,13 @@ export interface IEmptyBatchMetadata {
|
|
|
17
21
|
* Properties put on the op metadata object for batch tracking
|
|
18
22
|
*/
|
|
19
23
|
export interface IBatchMetadata {
|
|
20
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Set on first/last messages of a multi-message batch, to true/false respectively
|
|
26
|
+
*/
|
|
21
27
|
batch?: boolean;
|
|
22
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Maybe set on first message of a batch, to the batchId generated when resubmitting (set/fixed on first resubmit)
|
|
30
|
+
*/
|
|
23
31
|
batchId?: BatchId;
|
|
24
32
|
}
|
|
25
33
|
/**
|
package/dist/metadata.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,CAEtF;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAC1C,eAAe,EAAE,OAAO,GACtB,mBAAmB,GAAG,SAAS,CAEjC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAEnC,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
package/dist/metadata.js
CHANGED
|
@@ -5,12 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.asEmptyBatchLocalOpMetadata = exports.asBatchMetadata = void 0;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Syntactic sugar for casting
|
|
10
|
+
*/
|
|
9
11
|
function asBatchMetadata(metadata) {
|
|
10
12
|
return metadata;
|
|
11
13
|
}
|
|
12
14
|
exports.asBatchMetadata = asBatchMetadata;
|
|
13
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Syntactic sugar for casting
|
|
17
|
+
*/
|
|
14
18
|
function asEmptyBatchLocalOpMetadata(localOpMetadata) {
|
|
15
19
|
return localOpMetadata;
|
|
16
20
|
}
|
package/dist/metadata.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACH,SAAgB,eAAe,CAAC,QAAiB;IAChD,OAAO,QAA+C,CAAC;AACxD,CAAC;AAFD,0CAEC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CAC1C,eAAwB;IAExB,OAAO,eAAkD,CAAC;AAC3D,CAAC;AAJD,kEAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { BatchId } from \"./opLifecycle/index.js\";\n\n/**\n * Syntactic sugar for casting\n */\nexport function asBatchMetadata(metadata: unknown): Partial<IBatchMetadata> | undefined {\n\treturn metadata as Partial<IBatchMetadata> | undefined;\n}\n\n/**\n * Syntactic sugar for casting\n */\nexport function asEmptyBatchLocalOpMetadata(\n\tlocalOpMetadata: unknown,\n): IEmptyBatchMetadata | undefined {\n\treturn localOpMetadata as IEmptyBatchMetadata | undefined;\n}\n\n/**\n * Properties put on the localOpMetadata object for empty batches\n */\nexport interface IEmptyBatchMetadata {\n\t// Set to true on localOpMetadata for empty batches\n\temptyBatch?: boolean;\n}\n/**\n * Properties put on the op metadata object for batch tracking\n */\nexport interface IBatchMetadata {\n\t/**\n\t * Set on first/last messages of a multi-message batch, to true/false respectively\n\t */\n\tbatch?: boolean;\n\t/**\n\t * Maybe set on first message of a batch, to the batchId generated when resubmitting (set/fixed on first resubmit)\n\t */\n\tbatchId?: BatchId;\n}\n\n/**\n * Blob handling makes assumptions about what might be on the metadata. This interface codifies those assumptions, but does not validate them.\n */\nexport interface IBlobMetadata {\n\tblobId?: string;\n\tlocalId?: string;\n}\n\n/**\n * ContainerRuntime needs to know if this is a replayed savedOp as those need to be skipped in stashed ops scenarios.\n */\nexport interface ISavedOpMetadata {\n\tsavedOp?: boolean;\n}\n"]}
|
|
@@ -13,16 +13,22 @@ export interface IBatchManagerOptions {
|
|
|
13
13
|
* If true, the outbox is allowed to rebase the batch during flushing.
|
|
14
14
|
*/
|
|
15
15
|
readonly canRebase: boolean;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* If true, don't compare batchID of incoming batches to this. e.g. ID Allocation Batch IDs should be ignored
|
|
18
|
+
*/
|
|
17
19
|
readonly ignoreBatchId?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface BatchSequenceNumbers {
|
|
20
22
|
referenceSequenceNumber?: number;
|
|
21
23
|
clientSequenceNumber?: number;
|
|
22
24
|
}
|
|
23
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Type alias for the batchId stored in batch metadata
|
|
27
|
+
*/
|
|
24
28
|
export type BatchId = string;
|
|
25
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Compose original client ID and client sequence number into BatchId to stamp on the message during reconnect
|
|
31
|
+
*/
|
|
26
32
|
export declare function generateBatchId(originalClientId: string, batchStartCsn: number): BatchId;
|
|
27
33
|
/**
|
|
28
34
|
* Get the effective batch ID for the input argument.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batchManager.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/batchManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IAEzD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B
|
|
1
|
+
{"version":3,"file":"batchManager.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/batchManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,0BAA0B,EAAE,MA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