@fluidframework/container-runtime 2.0.0-internal.8.0.1 → 2.0.0-rc.1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +1 -7
- package/api-extractor-esm.json +4 -0
- package/api-extractor-lint.json +1 -10
- package/api-extractor.json +1 -9
- package/api-report/container-runtime.api.md +18 -17
- package/dist/blobManager.d.ts +8 -3
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +15 -4
- package/dist/blobManager.js.map +1 -1
- package/dist/container-runtime-alpha.d.ts +265 -17
- package/dist/container-runtime-beta.d.ts +0 -42
- package/dist/container-runtime-public.d.ts +0 -42
- package/dist/container-runtime-untrimmed.d.ts +32 -17
- package/dist/containerRuntime.d.ts +8 -4
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +15 -29
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +5 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +10 -3
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +10 -3
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +51 -8
- package/dist/dataStores.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +15 -4
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +26 -19
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +29 -6
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +5 -3
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +13 -6
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +18 -9
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/index.d.ts +1 -1
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +2 -1
- package/dist/gc/index.js.map +1 -1
- package/dist/messageTypes.d.ts +1 -1
- package/dist/messageTypes.js +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +1 -1
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.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 +4 -1
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +5 -0
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +46 -17
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +1 -1
- package/dist/summary/summarizer.js +1 -1
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +3 -1
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +7 -7
- package/dist/summary/summaryCollection.js +1 -1
- package/dist/summary/summaryCollection.js.map +1 -1
- package/lib/{batchTracker.d.ts → batchTracker.d.mts} +1 -1
- package/lib/batchTracker.d.mts.map +1 -0
- package/lib/{batchTracker.js → batchTracker.mjs} +1 -1
- package/lib/batchTracker.mjs.map +1 -0
- package/lib/{blobManager.d.ts → blobManager.d.mts} +9 -4
- package/lib/blobManager.d.mts.map +1 -0
- package/lib/{blobManager.js → blobManager.mjs} +17 -6
- package/lib/blobManager.mjs.map +1 -0
- package/lib/{connectionTelemetry.d.ts → connectionTelemetry.d.mts} +1 -1
- package/lib/connectionTelemetry.d.mts.map +1 -0
- package/lib/{connectionTelemetry.js → connectionTelemetry.mjs} +1 -1
- package/lib/connectionTelemetry.mjs.map +1 -0
- package/lib/{container-runtime-alpha.d.ts → container-runtime-alpha.d.mts} +265 -17
- package/lib/{container-runtime-beta.d.ts → container-runtime-beta.d.mts} +0 -42
- package/lib/{container-runtime-public.d.ts → container-runtime-public.d.mts} +0 -42
- package/lib/{container-runtime-untrimmed.d.ts → container-runtime-untrimmed.d.mts} +32 -17
- package/lib/{containerHandleContext.d.ts → containerHandleContext.d.mts} +2 -2
- package/lib/containerHandleContext.d.mts.map +1 -0
- package/lib/{containerHandleContext.js → containerHandleContext.mjs} +1 -1
- package/lib/containerHandleContext.mjs.map +1 -0
- package/lib/{containerRuntime.d.ts → containerRuntime.d.mts} +14 -14
- package/lib/containerRuntime.d.mts.map +1 -0
- package/lib/{containerRuntime.js → containerRuntime.mjs} +31 -22
- package/lib/containerRuntime.mjs.map +1 -0
- package/lib/{dataStore.d.ts → dataStore.d.mts} +3 -3
- package/lib/dataStore.d.mts.map +1 -0
- package/lib/{dataStore.js → dataStore.mjs} +1 -1
- package/lib/dataStore.mjs.map +1 -0
- package/lib/{dataStoreContext.d.ts → dataStoreContext.d.mts} +7 -4
- package/lib/dataStoreContext.d.mts.map +1 -0
- package/lib/{dataStoreContext.js → dataStoreContext.mjs} +13 -6
- package/lib/dataStoreContext.mjs.map +1 -0
- package/lib/{dataStoreContexts.d.ts → dataStoreContexts.d.mts} +2 -2
- package/lib/dataStoreContexts.d.mts.map +1 -0
- package/lib/{dataStoreContexts.js → dataStoreContexts.mjs} +1 -1
- package/lib/dataStoreContexts.mjs.map +1 -0
- package/lib/{dataStoreRegistry.d.ts → dataStoreRegistry.d.mts} +1 -1
- package/lib/dataStoreRegistry.d.mts.map +1 -0
- package/lib/{dataStoreRegistry.js → dataStoreRegistry.mjs} +1 -5
- package/lib/dataStoreRegistry.mjs.map +1 -0
- package/lib/{dataStores.d.ts → dataStores.d.mts} +17 -10
- package/lib/dataStores.d.mts.map +1 -0
- package/lib/{dataStores.js → dataStores.mjs} +58 -16
- package/lib/dataStores.mjs.map +1 -0
- package/lib/{deltaManagerProxyBase.d.ts → deltaManagerProxyBase.d.mts} +1 -1
- package/lib/deltaManagerProxyBase.d.mts.map +1 -0
- package/lib/{deltaManagerProxyBase.js → deltaManagerProxyBase.mjs} +1 -1
- package/lib/deltaManagerProxyBase.mjs.map +1 -0
- package/lib/{deltaManagerSummarizerProxy.d.ts → deltaManagerSummarizerProxy.d.mts} +2 -2
- package/lib/deltaManagerSummarizerProxy.d.mts.map +1 -0
- package/lib/{deltaManagerSummarizerProxy.js → deltaManagerSummarizerProxy.mjs} +3 -3
- package/lib/deltaManagerSummarizerProxy.mjs.map +1 -0
- package/lib/{deltaScheduler.d.ts → deltaScheduler.d.mts} +1 -1
- package/lib/deltaScheduler.d.mts.map +1 -0
- package/lib/{deltaScheduler.js → deltaScheduler.mjs} +1 -1
- package/lib/deltaScheduler.mjs.map +1 -0
- package/lib/{error.d.ts → error.d.mts} +1 -1
- package/lib/error.d.mts.map +1 -0
- package/lib/{error.js → error.mjs} +1 -1
- package/lib/error.mjs.map +1 -0
- package/lib/gc/{garbageCollection.d.ts → garbageCollection.d.mts} +5 -5
- package/lib/gc/garbageCollection.d.mts.map +1 -0
- package/lib/gc/{garbageCollection.js → garbageCollection.mjs} +28 -17
- package/lib/gc/garbageCollection.mjs.map +1 -0
- package/lib/gc/{gcConfigs.d.ts → gcConfigs.d.mts} +3 -3
- package/lib/gc/gcConfigs.d.mts.map +1 -0
- package/lib/gc/{gcConfigs.js → gcConfigs.mjs} +29 -22
- package/lib/gc/gcConfigs.mjs.map +1 -0
- package/lib/gc/{gcDefinitions.d.ts → gcDefinitions.d.mts} +33 -10
- package/lib/gc/gcDefinitions.d.mts.map +1 -0
- package/lib/gc/{gcDefinitions.js → gcDefinitions.mjs} +5 -3
- package/lib/gc/gcDefinitions.mjs.map +1 -0
- package/lib/gc/{gcHelpers.d.ts → gcHelpers.d.mts} +3 -3
- package/lib/gc/{gcHelpers.d.ts.map → gcHelpers.d.mts.map} +1 -1
- package/lib/gc/{gcHelpers.js → gcHelpers.mjs} +1 -1
- package/lib/gc/gcHelpers.mjs.map +1 -0
- package/lib/gc/{gcReferenceGraphAlgorithm.d.ts → gcReferenceGraphAlgorithm.d.mts} +2 -2
- package/lib/gc/gcReferenceGraphAlgorithm.d.mts.map +1 -0
- package/lib/gc/{gcReferenceGraphAlgorithm.js → gcReferenceGraphAlgorithm.mjs} +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.mjs.map +1 -0
- package/lib/gc/{gcSummaryDefinitions.d.ts → gcSummaryDefinitions.d.mts} +1 -1
- package/lib/gc/gcSummaryDefinitions.d.mts.map +1 -0
- package/lib/gc/{gcSummaryDefinitions.js → gcSummaryDefinitions.mjs} +1 -1
- package/lib/gc/gcSummaryDefinitions.mjs.map +1 -0
- package/lib/gc/{gcSummaryStateTracker.d.ts → gcSummaryStateTracker.d.mts} +4 -4
- package/lib/gc/gcSummaryStateTracker.d.mts.map +1 -0
- package/lib/gc/{gcSummaryStateTracker.js → gcSummaryStateTracker.mjs} +2 -2
- package/lib/gc/gcSummaryStateTracker.mjs.map +1 -0
- package/lib/gc/{gcTelemetry.d.ts → gcTelemetry.d.mts} +18 -11
- package/lib/gc/gcTelemetry.d.mts.map +1 -0
- package/lib/gc/{gcTelemetry.js → gcTelemetry.mjs} +20 -11
- package/lib/gc/gcTelemetry.mjs.map +1 -0
- package/lib/gc/{gcUnreferencedStateTracker.d.ts → gcUnreferencedStateTracker.d.mts} +2 -2
- package/lib/gc/gcUnreferencedStateTracker.d.mts.map +1 -0
- package/lib/gc/{gcUnreferencedStateTracker.js → gcUnreferencedStateTracker.mjs} +2 -2
- package/lib/gc/gcUnreferencedStateTracker.mjs.map +1 -0
- package/lib/gc/{index.d.ts → index.d.mts} +9 -9
- package/lib/gc/index.d.mts.map +1 -0
- package/lib/gc/{index.js → index.mjs} +8 -8
- package/lib/gc/index.mjs.map +1 -0
- package/lib/{index.d.ts → index.d.mts} +8 -8
- package/lib/index.d.mts.map +1 -0
- package/lib/{index.js → index.mjs} +7 -9
- package/lib/index.mjs.map +1 -0
- package/lib/{messageTypes.d.ts → messageTypes.d.mts} +5 -5
- package/lib/messageTypes.d.mts.map +1 -0
- package/lib/{messageTypes.js → messageTypes.mjs} +2 -2
- package/lib/messageTypes.mjs.map +1 -0
- package/lib/{metadata.d.ts → metadata.d.mts} +1 -1
- package/lib/metadata.d.mts.map +1 -0
- package/lib/{metadata.js → metadata.mjs} +1 -1
- package/lib/metadata.mjs.map +1 -0
- package/lib/opLifecycle/{batchManager.d.ts → batchManager.d.mts} +3 -3
- package/lib/opLifecycle/batchManager.d.mts.map +1 -0
- package/lib/opLifecycle/{batchManager.js → batchManager.mjs} +1 -1
- package/lib/opLifecycle/batchManager.mjs.map +1 -0
- package/lib/opLifecycle/{definitions.d.ts → definitions.d.mts} +3 -3
- package/lib/opLifecycle/definitions.d.mts.map +1 -0
- package/lib/opLifecycle/{definitions.js → definitions.mjs} +1 -1
- package/lib/opLifecycle/definitions.mjs.map +1 -0
- package/lib/opLifecycle/index.d.mts +13 -0
- package/lib/opLifecycle/index.d.mts.map +1 -0
- package/lib/opLifecycle/index.mjs +12 -0
- package/lib/opLifecycle/index.mjs.map +1 -0
- package/lib/opLifecycle/{opCompressor.d.ts → opCompressor.d.mts} +2 -2
- package/lib/opLifecycle/opCompressor.d.mts.map +1 -0
- package/lib/opLifecycle/{opCompressor.js → opCompressor.mjs} +3 -3
- package/lib/opLifecycle/opCompressor.mjs.map +1 -0
- package/lib/opLifecycle/{opDecompressor.d.ts → opDecompressor.d.mts} +2 -2
- package/lib/opLifecycle/opDecompressor.d.mts.map +1 -0
- package/lib/opLifecycle/{opDecompressor.js → opDecompressor.mjs} +2 -2
- package/lib/opLifecycle/opDecompressor.mjs.map +1 -0
- package/lib/opLifecycle/{opGroupingManager.d.ts → opGroupingManager.d.mts} +2 -2
- package/lib/opLifecycle/opGroupingManager.d.mts.map +1 -0
- package/lib/opLifecycle/{opGroupingManager.js → opGroupingManager.mjs} +1 -1
- package/lib/opLifecycle/opGroupingManager.mjs.map +1 -0
- package/lib/opLifecycle/{opSplitter.d.ts → opSplitter.d.mts} +2 -2
- package/lib/opLifecycle/opSplitter.d.mts.map +1 -0
- package/lib/opLifecycle/{opSplitter.js → opSplitter.mjs} +3 -3
- package/lib/opLifecycle/opSplitter.mjs.map +1 -0
- package/lib/opLifecycle/{outbox.d.ts → outbox.d.mts} +11 -11
- package/lib/opLifecycle/outbox.d.mts.map +1 -0
- package/lib/opLifecycle/{outbox.js → outbox.mjs} +6 -3
- package/lib/opLifecycle/outbox.mjs.map +1 -0
- package/lib/opLifecycle/{remoteMessageProcessor.d.ts → remoteMessageProcessor.d.mts} +5 -5
- package/lib/opLifecycle/remoteMessageProcessor.d.mts.map +1 -0
- package/lib/opLifecycle/{remoteMessageProcessor.js → remoteMessageProcessor.mjs} +2 -2
- package/lib/opLifecycle/remoteMessageProcessor.mjs.map +1 -0
- package/lib/{opProperties.d.ts → opProperties.d.mts} +1 -1
- package/lib/opProperties.d.mts.map +1 -0
- package/lib/{opProperties.js → opProperties.mjs} +1 -1
- package/lib/opProperties.mjs.map +1 -0
- package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
- package/lib/packageVersion.d.mts.map +1 -0
- package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
- package/lib/packageVersion.mjs.map +1 -0
- package/lib/{pendingStateManager.d.ts → pendingStateManager.d.mts} +2 -2
- package/lib/pendingStateManager.d.mts.map +1 -0
- package/lib/{pendingStateManager.js → pendingStateManager.mjs} +2 -2
- package/lib/pendingStateManager.mjs.map +1 -0
- package/lib/{scheduleManager.d.ts → scheduleManager.d.mts} +1 -5
- package/lib/scheduleManager.d.mts.map +1 -0
- package/lib/{scheduleManager.js → scheduleManager.mjs} +3 -3
- package/lib/scheduleManager.mjs.map +1 -0
- package/lib/{storageServiceWithAttachBlobs.d.ts → storageServiceWithAttachBlobs.d.mts} +1 -1
- package/lib/storageServiceWithAttachBlobs.d.mts.map +1 -0
- package/lib/{storageServiceWithAttachBlobs.js → storageServiceWithAttachBlobs.mjs} +1 -1
- package/lib/storageServiceWithAttachBlobs.mjs.map +1 -0
- package/lib/summary/{index.d.ts → index.d.mts} +13 -13
- package/lib/summary/index.d.mts.map +1 -0
- package/lib/summary/{index.js → index.mjs} +12 -12
- package/lib/summary/index.mjs.map +1 -0
- package/lib/summary/{orderedClientElection.d.ts → orderedClientElection.d.mts} +1 -5
- package/lib/summary/orderedClientElection.d.mts.map +1 -0
- package/lib/summary/{orderedClientElection.js → orderedClientElection.mjs} +2 -2
- package/lib/summary/orderedClientElection.mjs.map +1 -0
- package/lib/summary/{runWhileConnectedCoordinator.d.ts → runWhileConnectedCoordinator.d.mts} +3 -3
- package/lib/summary/runWhileConnectedCoordinator.d.mts.map +1 -0
- package/lib/summary/{runWhileConnectedCoordinator.js → runWhileConnectedCoordinator.mjs} +1 -1
- package/lib/summary/runWhileConnectedCoordinator.mjs.map +1 -0
- package/lib/summary/{runningSummarizer.d.ts → runningSummarizer.d.mts} +10 -5
- package/lib/summary/runningSummarizer.d.mts.map +1 -0
- package/lib/summary/{runningSummarizer.js → runningSummarizer.mjs} +50 -21
- package/lib/summary/runningSummarizer.mjs.map +1 -0
- package/lib/summary/{summarizer.d.ts → summarizer.d.mts} +6 -6
- package/lib/summary/summarizer.d.mts.map +1 -0
- package/lib/summary/{summarizer.js → summarizer.mjs} +5 -5
- package/lib/summary/summarizer.mjs.map +1 -0
- package/lib/summary/{summarizerClientElection.d.ts → summarizerClientElection.d.mts} +3 -3
- package/lib/summary/summarizerClientElection.d.mts.map +1 -0
- package/lib/summary/{summarizerClientElection.js → summarizerClientElection.mjs} +1 -1
- package/lib/summary/summarizerClientElection.mjs.map +1 -0
- package/lib/summary/{summarizerHeuristics.d.ts → summarizerHeuristics.d.mts} +4 -4
- package/lib/summary/summarizerHeuristics.d.mts.map +1 -0
- package/lib/summary/{summarizerHeuristics.js → summarizerHeuristics.mjs} +1 -1
- package/lib/summary/summarizerHeuristics.mjs.map +1 -0
- package/lib/summary/summarizerNode/{index.d.ts → index.d.mts} +4 -4
- package/lib/summary/summarizerNode/index.d.mts.map +1 -0
- package/lib/summary/summarizerNode/{index.js → index.mjs} +3 -3
- package/lib/summary/summarizerNode/index.mjs.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNode.d.ts → summarizerNode.d.mts} +2 -2
- package/lib/summary/summarizerNode/summarizerNode.d.mts.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNode.js → summarizerNode.mjs} +2 -2
- package/lib/summary/summarizerNode/summarizerNode.mjs.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeUtils.d.ts → summarizerNodeUtils.d.mts} +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.mts.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeUtils.js → summarizerNodeUtils.mjs} +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.mjs.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeWithGc.d.ts → summarizerNodeWithGc.d.mts} +3 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.mts.map +1 -0
- package/lib/summary/summarizerNode/{summarizerNodeWithGc.js → summarizerNodeWithGc.mjs} +4 -4
- package/lib/summary/summarizerNode/summarizerNodeWithGc.mjs.map +1 -0
- package/lib/summary/{summarizerTypes.d.ts → summarizerTypes.d.mts} +7 -5
- package/lib/summary/summarizerTypes.d.mts.map +1 -0
- package/lib/summary/{summarizerTypes.js → summarizerTypes.mjs} +1 -1
- package/lib/summary/summarizerTypes.mjs.map +1 -0
- package/lib/summary/{summaryCollection.d.ts → summaryCollection.d.mts} +8 -8
- package/lib/summary/summaryCollection.d.mts.map +1 -0
- package/lib/summary/{summaryCollection.js → summaryCollection.mjs} +2 -2
- package/lib/summary/summaryCollection.mjs.map +1 -0
- package/lib/summary/{summaryFormat.d.ts → summaryFormat.d.mts} +2 -2
- package/lib/summary/summaryFormat.d.mts.map +1 -0
- package/lib/summary/{summaryFormat.js → summaryFormat.mjs} +1 -1
- package/lib/summary/summaryFormat.mjs.map +1 -0
- package/lib/summary/{summaryGenerator.d.ts → summaryGenerator.d.mts} +3 -3
- package/lib/summary/summaryGenerator.d.mts.map +1 -0
- package/lib/summary/{summaryGenerator.js → summaryGenerator.mjs} +1 -1
- package/lib/summary/summaryGenerator.mjs.map +1 -0
- package/lib/summary/{summaryManager.d.ts → summaryManager.d.mts} +5 -5
- package/lib/summary/summaryManager.d.mts.map +1 -0
- package/lib/summary/{summaryManager.js → summaryManager.mjs} +2 -2
- package/lib/summary/summaryManager.mjs.map +1 -0
- package/lib/{throttler.d.ts → throttler.d.mts} +1 -1
- package/lib/throttler.d.mts.map +1 -0
- package/lib/{throttler.js → throttler.mjs} +1 -1
- package/lib/throttler.mjs.map +1 -0
- package/package.json +145 -39
- package/src/blobManager.ts +15 -4
- package/src/containerRuntime.ts +15 -4
- package/src/dataStoreContext.ts +11 -4
- package/src/dataStores.ts +61 -7
- package/src/gc/garbageCollection.ts +18 -4
- package/src/gc/gcConfigs.ts +28 -20
- package/src/gc/gcDefinitions.ts +30 -6
- package/src/gc/gcTelemetry.ts +19 -9
- package/src/gc/index.ts +3 -0
- package/src/messageTypes.ts +1 -1
- package/src/opLifecycle/definitions.ts +1 -1
- package/src/opLifecycle/outbox.ts +5 -2
- package/src/packageVersion.ts +1 -1
- package/src/summary/runWhileConnectedCoordinator.ts +1 -1
- package/src/summary/runningSummarizer.ts +58 -25
- package/src/summary/summarizer.ts +1 -1
- package/src/summary/summarizerTypes.ts +3 -1
- package/src/summary/summaryCollection.ts +7 -7
- package/tsconfig.json +6 -4
- package/lib/batchTracker.d.ts.map +0 -1
- package/lib/batchTracker.js.map +0 -1
- package/lib/blobManager.d.ts.map +0 -1
- package/lib/blobManager.js.map +0 -1
- package/lib/connectionTelemetry.d.ts.map +0 -1
- package/lib/connectionTelemetry.js.map +0 -1
- package/lib/containerHandleContext.d.ts.map +0 -1
- package/lib/containerHandleContext.js.map +0 -1
- package/lib/containerRuntime.d.ts.map +0 -1
- package/lib/containerRuntime.js.map +0 -1
- package/lib/dataStore.d.ts.map +0 -1
- package/lib/dataStore.js.map +0 -1
- package/lib/dataStoreContext.d.ts.map +0 -1
- package/lib/dataStoreContext.js.map +0 -1
- package/lib/dataStoreContexts.d.ts.map +0 -1
- package/lib/dataStoreContexts.js.map +0 -1
- package/lib/dataStoreRegistry.d.ts.map +0 -1
- package/lib/dataStoreRegistry.js.map +0 -1
- package/lib/dataStores.d.ts.map +0 -1
- package/lib/dataStores.js.map +0 -1
- package/lib/deltaManagerProxyBase.d.ts.map +0 -1
- package/lib/deltaManagerProxyBase.js.map +0 -1
- package/lib/deltaManagerSummarizerProxy.d.ts.map +0 -1
- package/lib/deltaManagerSummarizerProxy.js.map +0 -1
- package/lib/deltaScheduler.d.ts.map +0 -1
- package/lib/deltaScheduler.js.map +0 -1
- package/lib/error.d.ts.map +0 -1
- package/lib/error.js.map +0 -1
- package/lib/gc/garbageCollection.d.ts.map +0 -1
- package/lib/gc/garbageCollection.js.map +0 -1
- package/lib/gc/gcConfigs.d.ts.map +0 -1
- package/lib/gc/gcConfigs.js.map +0 -1
- package/lib/gc/gcDefinitions.d.ts.map +0 -1
- package/lib/gc/gcDefinitions.js.map +0 -1
- package/lib/gc/gcHelpers.js.map +0 -1
- package/lib/gc/gcReferenceGraphAlgorithm.d.ts.map +0 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +0 -1
- package/lib/gc/gcSummaryDefinitions.d.ts.map +0 -1
- package/lib/gc/gcSummaryDefinitions.js.map +0 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +0 -1
- package/lib/gc/gcSummaryStateTracker.js.map +0 -1
- package/lib/gc/gcTelemetry.d.ts.map +0 -1
- package/lib/gc/gcTelemetry.js.map +0 -1
- package/lib/gc/gcUnreferencedStateTracker.d.ts.map +0 -1
- package/lib/gc/gcUnreferencedStateTracker.js.map +0 -1
- package/lib/gc/index.d.ts.map +0 -1
- package/lib/gc/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/messageTypes.d.ts.map +0 -1
- package/lib/messageTypes.js.map +0 -1
- package/lib/metadata.d.ts.map +0 -1
- package/lib/metadata.js.map +0 -1
- package/lib/opLifecycle/batchManager.d.ts.map +0 -1
- package/lib/opLifecycle/batchManager.js.map +0 -1
- package/lib/opLifecycle/definitions.d.ts.map +0 -1
- package/lib/opLifecycle/definitions.js.map +0 -1
- package/lib/opLifecycle/index.d.ts +0 -13
- package/lib/opLifecycle/index.d.ts.map +0 -1
- package/lib/opLifecycle/index.js +0 -12
- package/lib/opLifecycle/index.js.map +0 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +0 -1
- package/lib/opLifecycle/opCompressor.js.map +0 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +0 -1
- package/lib/opLifecycle/opDecompressor.js.map +0 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +0 -1
- package/lib/opLifecycle/opGroupingManager.js.map +0 -1
- package/lib/opLifecycle/opSplitter.d.ts.map +0 -1
- package/lib/opLifecycle/opSplitter.js.map +0 -1
- package/lib/opLifecycle/outbox.d.ts.map +0 -1
- package/lib/opLifecycle/outbox.js.map +0 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +0 -1
- package/lib/opLifecycle/remoteMessageProcessor.js.map +0 -1
- package/lib/opProperties.d.ts.map +0 -1
- package/lib/opProperties.js.map +0 -1
- package/lib/packageVersion.d.ts.map +0 -1
- package/lib/packageVersion.js.map +0 -1
- package/lib/pendingStateManager.d.ts.map +0 -1
- package/lib/pendingStateManager.js.map +0 -1
- package/lib/scheduleManager.d.ts.map +0 -1
- package/lib/scheduleManager.js.map +0 -1
- package/lib/storageServiceWithAttachBlobs.d.ts.map +0 -1
- package/lib/storageServiceWithAttachBlobs.js.map +0 -1
- package/lib/summary/index.d.ts.map +0 -1
- package/lib/summary/index.js.map +0 -1
- package/lib/summary/orderedClientElection.d.ts.map +0 -1
- package/lib/summary/orderedClientElection.js.map +0 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +0 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +0 -1
- package/lib/summary/runningSummarizer.d.ts.map +0 -1
- package/lib/summary/runningSummarizer.js.map +0 -1
- package/lib/summary/summarizer.d.ts.map +0 -1
- package/lib/summary/summarizer.js.map +0 -1
- package/lib/summary/summarizerClientElection.d.ts.map +0 -1
- package/lib/summary/summarizerClientElection.js.map +0 -1
- package/lib/summary/summarizerHeuristics.d.ts.map +0 -1
- package/lib/summary/summarizerHeuristics.js.map +0 -1
- package/lib/summary/summarizerNode/index.d.ts.map +0 -1
- package/lib/summary/summarizerNode/index.js.map +0 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +0 -1
- package/lib/summary/summarizerNode/summarizerNode.js.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +0 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +0 -1
- package/lib/summary/summarizerTypes.d.ts.map +0 -1
- package/lib/summary/summarizerTypes.js.map +0 -1
- package/lib/summary/summaryCollection.d.ts.map +0 -1
- package/lib/summary/summaryCollection.js.map +0 -1
- package/lib/summary/summaryFormat.d.ts.map +0 -1
- package/lib/summary/summaryFormat.js.map +0 -1
- package/lib/summary/summaryGenerator.d.ts.map +0 -1
- package/lib/summary/summaryGenerator.js.map +0 -1
- package/lib/summary/summaryManager.d.ts.map +0 -1
- package/lib/summary/summaryManager.js.map +0 -1
- package/lib/throttler.d.ts.map +0 -1
- package/lib/throttler.js.map +0 -1
- package/tsconfig.esnext.json +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcHelpers.mjs","sourceRoot":"","sources":["../../src/gc/gcHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,MAAM,EAAE,MAAM,4BAA4B;OAE5C,EACN,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,GAGlB,MAAM,qCAAqC;AAQ5C,MAAM,UAAU,YAAY,CAAC,QAAsB;IAClD,IAAI,CAAC,QAAQ,EAAE;QACd,0CAA0C;QAC1C,OAAO,CAAC,CAAC;KACT;IACD,OAAO,QAAQ,CAAC,SAAS,IAAI,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CACjC,aAA8B,EAC9B,iBAAqC;IAErC,uEAAuE;IACvE,IAAI,iBAAiB,KAAK,SAAS,EAAE;QACpC,OAAO,IAAI,CAAC;KACZ;IAED,2FAA2F;IAC3F,MAAM,gBAAgB,GAAG,aAAa,CAAC,mBAAmB,IAAI,aAAa,CAAC,YAAY,CAAC;IAEzF,OAAO,iBAAiB,KAAK,gBAAgB,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAgC;IACrE,MAAM,aAAa,GAA2C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9F,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,aAAa,GAA4B,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/D,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,aAAa,EAAE;QAC/C,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,C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,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC;IACzF,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE;QAC/B,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACzF,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAEvD,MAAM,cAAc,GAAG,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtD,MAAM,CACL,cAAc,EAAE,UAAU,KAAK,SAAS,EACxC,KAAK,CAAC,kEAAkE,CACxE,CAAC;QAEF,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC/C;IACD,OAAO,iBAAiB,CAAC;AAC1B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,GAAW;IACxD,OAAO,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAChD,qBAA4B,EAC5B,cAAsD;IAEtD,yDAAyD;IACzD,OAAO,cAAc,KAAK,QAAQ,CAAC;AACpC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tgcBlobPrefix,\n\tgcDeletedBlobKey,\n\tgcTombstoneBlobKey,\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"@fluidframework/runtime-definitions\";\nimport { GCFeatureMatrix, GCVersion, IGCMetadata } from \"./gcDefinitions\";\nimport {\n\tIGarbageCollectionNodeData,\n\tIGarbageCollectionSnapshotData,\n\tIGarbageCollectionState,\n} from \"./gcSummaryDefinitions\";\n\nexport function getGCVersion(metadata?: IGCMetadata): GCVersion {\n\tif (!metadata) {\n\t\t// Force to 0/disallowed in prior versions\n\t\treturn 0;\n\t}\n\treturn metadata.gcFeature ?? 0;\n}\n\n/**\n * Indicates whether Sweep is allowed for this document based on the persisted GC Feature Matrix and current gcGeneration.\n * This applies to the entire Sweep Phase the same - both Tombstone Enforcement (i.e. should loading a Tombstone fail?) and Deletion.\n *\n * In order to protect old documents that were created at a time when known bugs exist that violate GC's invariants\n * such that enforcing GC Sweep would cause legitimate data loss, the container author may increment the generation value for Sweep\n * such that containers created with a different value will not be subjected to GC Sweep.\n *\n * If no generation is provided, Sweep will be enabled for all documents.\n *\n * For backwards compatibility, the current generation value is also compared against the persisted gcTombstoneGeneration if present.\n *\n * @param featureMatrix - The GC Feature Matrix, containing the persisted generation value\n * @param currentGeneration - The current app-provided gcGeneration value\n * @returns true if GC Sweep should be allowed for this document\n */\nexport function shouldAllowGcSweep(\n\tfeatureMatrix: GCFeatureMatrix,\n\tcurrentGeneration: number | undefined,\n): boolean {\n\t// If no Generation value is provided for this session, default to true\n\tif (currentGeneration === undefined) {\n\t\treturn true;\n\t}\n\n\t// tombstoneGeneration is the predecessor and needs to be supported for back-compat reasons\n\tconst targetGeneration = featureMatrix.tombstoneGeneration ?? featureMatrix.gcGeneration;\n\n\treturn currentGeneration === targetGeneration;\n}\n\n/**\n * Sorts the given GC state as per the id of the GC nodes. It also sorts the outbound routes array of each node.\n */\nexport function generateSortedGCState(gcState: IGarbageCollectionState): IGarbageCollectionState {\n\tconst sortableArray: [string, IGarbageCollectionNodeData][] = Object.entries(gcState.gcNodes);\n\tsortableArray.sort(([a], [b]) => a.localeCompare(b));\n\tconst sortedGCState: IGarbageCollectionState = { gcNodes: {} };\n\tfor (const [nodeId, nodeData] of sortableArray) {\n\t\tnodeData.outboundRoutes.sort();\n\t\tsortedGCState.gcNodes[nodeId] = nodeData;\n\t}\n\treturn sortedGCState;\n}\n\n/**\n * Concatenates the given GC states and returns the concatenated GC state.\n */\nexport function concatGarbageCollectionStates(\n\tgcState1: IGarbageCollectionState,\n\tgcState2: IGarbageCollectionState,\n): IGarbageCollectionState {\n\tconst combinedGCNodes: { [id: string]: IGarbageCollectionNodeData } = {};\n\tfor (const [nodeId, nodeData] of Object.entries(gcState1.gcNodes)) {\n\t\tcombinedGCNodes[nodeId] = {\n\t\t\toutboundRoutes: Array.from(nodeData.outboundRoutes),\n\t\t\tunreferencedTimestampMs: nodeData.unreferencedTimestampMs,\n\t\t};\n\t}\n\n\tfor (const [nodeId, nodeData] of Object.entries(gcState2.gcNodes)) {\n\t\tlet combineNodeData = combinedGCNodes[nodeId];\n\t\tif (combineNodeData === undefined) {\n\t\t\tcombineNodeData = {\n\t\t\t\toutboundRoutes: Array.from(nodeData.outboundRoutes),\n\t\t\t\tunreferencedTimestampMs: nodeData.unreferencedTimestampMs,\n\t\t\t};\n\t\t} else {\n\t\t\t// Validate that same node doesn't have different unreferenced timestamp.\n\t\t\tif (\n\t\t\t\tnodeData.unreferencedTimestampMs !== undefined &&\n\t\t\t\tcombineNodeData.unreferencedTimestampMs !== undefined\n\t\t\t) {\n\t\t\t\tassert(\n\t\t\t\t\tnodeData.unreferencedTimestampMs === combineNodeData.unreferencedTimestampMs,\n\t\t\t\t\t0x5d7 /* Two entries for the same GC node with different unreferenced timestamp */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tcombineNodeData = {\n\t\t\t\toutboundRoutes: [\n\t\t\t\t\t...new Set([...nodeData.outboundRoutes, ...combineNodeData.outboundRoutes]),\n\t\t\t\t],\n\t\t\t\tunreferencedTimestampMs:\n\t\t\t\t\tnodeData.unreferencedTimestampMs ?? combineNodeData.unreferencedTimestampMs,\n\t\t\t};\n\t\t}\n\t\tcombinedGCNodes[nodeId] = combineNodeData;\n\t}\n\treturn { gcNodes: combinedGCNodes };\n}\n\n/**\n * Helper function that clones the GC data.\n * @param gcData - The GC data to clone.\n * @returns a clone of the given GC data.\n */\nexport function cloneGCData(gcData: IGarbageCollectionData): IGarbageCollectionData {\n\tconst clonedGCNodes: { [id: string]: string[] } = {};\n\tfor (const [id, outboundRoutes] of Object.entries(gcData.gcNodes)) {\n\t\tclonedGCNodes[id] = Array.from(outboundRoutes);\n\t}\n\treturn {\n\t\tgcNodes: clonedGCNodes,\n\t};\n}\n\n/**\n * Concatenates the given GC data and returns the concatenated GC data.\n */\nexport function concatGarbageCollectionData(\n\tgcData1: IGarbageCollectionData,\n\tgcData2: IGarbageCollectionData,\n) {\n\tconst combinedGCData: IGarbageCollectionData = cloneGCData(gcData1);\n\tfor (const [id, routes] of Object.entries(gcData2.gcNodes)) {\n\t\tif (combinedGCData.gcNodes[id] === undefined) {\n\t\t\tcombinedGCData.gcNodes[id] = Array.from(routes);\n\t\t} else {\n\t\t\tconst combinedRoutes = [...routes, ...combinedGCData.gcNodes[id]];\n\t\t\tcombinedGCData.gcNodes[id] = [...new Set(combinedRoutes)];\n\t\t}\n\t}\n\treturn combinedGCData;\n}\n\n/**\n * Gets the base garbage collection state from the given snapshot tree. It contains GC state, deleted nodes and\n * tombstones. The GC state may be written into multiple blobs. Merge the GC state from all such blobs into one.\n */\nexport async function getGCDataFromSnapshot(\n\tgcSnapshotTree: ISnapshotTree,\n\treadAndParseBlob: <T>(id: string) => Promise<T>,\n): Promise<IGarbageCollectionSnapshotData> {\n\tlet rootGCState: IGarbageCollectionState = { gcNodes: {} };\n\tlet tombstones: string[] | undefined;\n\tlet deletedNodes: string[] | undefined;\n\tfor (const key of Object.keys(gcSnapshotTree.blobs)) {\n\t\t// Update deleted nodes blob.\n\t\tif (key === gcDeletedBlobKey) {\n\t\t\tdeletedNodes = await readAndParseBlob<string[]>(gcSnapshotTree.blobs[key]);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Update tombstone blob.\n\t\tif (key === gcTombstoneBlobKey) {\n\t\t\ttombstones = await readAndParseBlob<string[]>(gcSnapshotTree.blobs[key]);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Skip blobs that do not start with the GC prefix.\n\t\tif (!key.startsWith(gcBlobPrefix)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst blobId = gcSnapshotTree.blobs[key];\n\t\tif (blobId === undefined) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst gcState = await readAndParseBlob<IGarbageCollectionState>(blobId);\n\t\tassert(gcState !== undefined, 0x5d8 /* GC blob missing from snapshot */);\n\t\t// Merge the GC state of this blob into the root GC state.\n\t\trootGCState = concatGarbageCollectionStates(rootGCState, gcState);\n\t}\n\treturn { gcState: rootGCState, tombstones, deletedNodes };\n}\n\n/**\n * Helper function that unpacks the GC details of the children from a given node's GC details.\n * @param gcDetails - The GC details of a node.\n * @returns A map of GC details of each children of the the given node.\n */\nexport function unpackChildNodesGCDetails(gcDetails: IGarbageCollectionDetailsBase) {\n\tconst childGCDetailsMap: Map<string, IGarbageCollectionDetailsBase> = new Map();\n\n\t// If GC data is not available, bail out.\n\tif (gcDetails.gcData === undefined) {\n\t\treturn childGCDetailsMap;\n\t}\n\n\tconst gcNodes = gcDetails.gcData.gcNodes;\n\tfor (const [id, outboundRoutes] of Object.entries(gcNodes)) {\n\t\t// Skip self-node since only children GC data is to be generated.\n\t\tif (id === \"/\") {\n\t\t\tcontinue;\n\t\t}\n\n\t\tassert(id.startsWith(\"/\"), 0x5d9 /* node id should always be an absolute route */);\n\t\tconst childId = id.split(\"/\")[1];\n\t\tlet childGCNodeId = id.slice(childId.length + 1);\n\t\t// GC node id always begins with \"/\". Handle the special case where a child's id in the parent's GC nodes is\n\t\t// of format `/root`. In this case, the childId is root and childGCNodeId is \"\". Make childGCNodeId = \"/\".\n\t\tif (childGCNodeId === \"\") {\n\t\t\tchildGCNodeId = \"/\";\n\t\t}\n\n\t\tlet childGCDetails = childGCDetailsMap.get(childId);\n\t\tif (childGCDetails === undefined) {\n\t\t\tchildGCDetails = { gcData: { gcNodes: {} }, usedRoutes: [] };\n\t\t}\n\t\t// gcData should not undefined as its always at least initialized as empty above.\n\t\tassert(\n\t\t\tchildGCDetails.gcData !== undefined,\n\t\t\t0x5da /* Child GC data should have been initialized */,\n\t\t);\n\t\tchildGCDetails.gcData.gcNodes[childGCNodeId] = [...new Set(outboundRoutes)];\n\t\tchildGCDetailsMap.set(childId, childGCDetails);\n\t}\n\n\tif (gcDetails.usedRoutes === undefined) {\n\t\treturn childGCDetailsMap;\n\t}\n\n\t// Remove the node's self used route, if any, and generate the children used routes.\n\tconst usedRoutes = gcDetails.usedRoutes.filter((route) => route !== \"\" && route !== \"/\");\n\tfor (const route of usedRoutes) {\n\t\tassert(route.startsWith(\"/\"), 0x5db /* Used route should always be an absolute route */);\n\t\tconst childId = route.split(\"/\")[1];\n\t\tconst childUsedRoute = route.slice(childId.length + 1);\n\n\t\tconst childGCDetails = childGCDetailsMap.get(childId);\n\t\tassert(\n\t\t\tchildGCDetails?.usedRoutes !== undefined,\n\t\t\t0x5dc /* This should have be initialized when generate GC nodes above */,\n\t\t);\n\n\t\tchildGCDetails.usedRoutes.push(childUsedRoute);\n\t\tchildGCDetailsMap.set(childId, childGCDetails);\n\t}\n\treturn childGCDetailsMap;\n}\n\n/**\n * Trims the leading and trailing slashes from the given string.\n * @param str - A string that may contain leading and / or trailing slashes.\n * @returns A new string without leading and trailing slashes.\n */\nexport function trimLeadingAndTrailingSlashes(str: string) {\n\treturn str.replace(/^\\/+|\\/+$/g, \"\");\n}\n\n/**\n * Utility to implement compat behaviors given an unknown message type\n * The parameters are typed to support compile-time enforcement of handling all known types/behaviors\n *\n * @param _unknownGCMessageType - Typed as never to ensure all known types have been\n * handled before calling this function (e.g. in a switch statement).\n * @param compatBehavior - Typed redundantly with CompatModeBehavior to ensure handling is added when updating that type\n */\nexport function compatBehaviorAllowsGCMessageType(\n\t_unknownGCMessageType: never,\n\tcompatBehavior: \"Ignore\" | \"FailToProcess\" | undefined,\n): boolean {\n\t// undefined defaults to same behavior as \"FailToProcess\"\n\treturn compatBehavior === \"Ignore\";\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IGCResult } from "./gcDefinitions";
|
|
5
|
+
import { IGCResult } from "./gcDefinitions.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* Runs garbage collection on the given reference graph.
|
|
8
8
|
* @param referenceGraph - The reference graph to run GC on. It's a list of nodes where each node has an id and set of
|
|
@@ -13,4 +13,4 @@ import { IGCResult } from "./gcDefinitions";
|
|
|
13
13
|
export declare function runGarbageCollection(referenceGraph: {
|
|
14
14
|
[id: string]: string[];
|
|
15
15
|
}, rootIds: string[]): IGCResult;
|
|
16
|
-
//# sourceMappingURL=gcReferenceGraphAlgorithm.d.
|
|
16
|
+
//# sourceMappingURL=gcReferenceGraphAlgorithm.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcReferenceGraphAlgorithm.d.mts","sourceRoot":"","sources":["../../src/gc/gcReferenceGraphAlgorithm.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,SAAS,EAAE;AAEpB;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,cAAc,EAAE;IAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,EAC1C,OAAO,EAAE,MAAM,EAAE,GACf,SAAS,CAkCX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcReferenceGraphAlgorithm.mjs","sourceRoot":"","sources":["../../src/gc/gcReferenceGraphAlgorithm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CACnC,cAA0C,EAC1C,OAAiB;IAEjB,gGAAgG;IAChG,MAAM,OAAO,GAAgB,IAAI,GAAG,EAAE,CAAC;IAEvC,oGAAoG;IACpG,qCAAqC;IACrC,MAAM,aAAa,GAAa,CAAC,GAAG,OAAO,CAAC,CAAC;IAC7C,KAAK,MAAM,EAAE,IAAI,aAAa,EAAE;QAC/B,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YACpB,SAAS;SACT;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEhB,iGAAiG;QACjG,mBAAmB;QACnB,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,SAAS,EAAE;YACzB,aAAa,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;SAC9B;KACD;IAED,MAAM,iBAAiB,GAAa,EAAE,CAAC;IACvC,MAAM,cAAc,GAAa,EAAE,CAAC;IACpC,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;QAC7C,uFAAuF;QACvF,qCAAqC;QACrC,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YACpB,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SAC3B;aAAM;YACN,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACxB;KACD;IACD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC;AAC9C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IGCResult } from \"./gcDefinitions\";\n\n/**\n * Runs garbage collection on the given reference graph.\n * @param referenceGraph - The reference graph to run GC on. It's a list of nodes where each node has an id and set of\n * routes to other nodes in the graph.\n * @param rootIds - The ids of root nodes that are considered referenced.\n * @returns the ids of referenced nodes and the ids of deleted nodes in the referenced graph.\n */\nexport function runGarbageCollection(\n\treferenceGraph: { [id: string]: string[] },\n\trootIds: string[],\n): IGCResult {\n\t// This set keeps track of nodes that we have visited. It is used to detect cycles in the graph.\n\tconst visited: Set<string> = new Set();\n\n\t// This tracks the ids of referenced nodes. The nodes corresponding to rootIds are always considered\n\t// referenced so we start with those.\n\tconst referencedIds: string[] = [...rootIds];\n\tfor (const id of referencedIds) {\n\t\t// If we have already seen this node, ignore and continue. Else, add it to visited list.\n\t\tif (visited.has(id)) {\n\t\t\tcontinue;\n\t\t}\n\t\tvisited.add(id);\n\n\t\t// Get the node for the referenced id and add its outbound routes to referencedIds since they are\n\t\t// also referenced.\n\t\tconst routes = referenceGraph[id];\n\t\tif (routes !== undefined) {\n\t\t\treferencedIds.push(...routes);\n\t\t}\n\t}\n\n\tconst referencedNodeIds: string[] = [];\n\tconst deletedNodeIds: string[] = [];\n\tfor (const id of Object.keys(referenceGraph)) {\n\t\t// The nodes from the reference graph whose ids are in the visited list are referenced.\n\t\t// The rest of the nodes are deleted.\n\t\tif (visited.has(id)) {\n\t\t\treferencedNodeIds.push(id);\n\t\t} else {\n\t\t\tdeletedNodeIds.push(id);\n\t\t}\n\t}\n\treturn { referencedNodeIds, deletedNodeIds };\n}\n"]}
|
|
@@ -49,4 +49,4 @@ export interface IGarbageCollectionSummaryDetailsLegacy {
|
|
|
49
49
|
/** If this node is unreferenced, the time when it was marked as such. */
|
|
50
50
|
unrefTimestamp?: number;
|
|
51
51
|
}
|
|
52
|
-
//# sourceMappingURL=gcSummaryDefinitions.d.
|
|
52
|
+
//# sourceMappingURL=gcSummaryDefinitions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcSummaryDefinitions.d.mts","sourceRoot":"","sources":["../../src/gc/gcSummaryDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,sBAAsB,EAAE,MAAM,qCAAqC;AAE5E;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACvC,OAAO,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,0BAA0B,CAAA;KAAE,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,8FAA8F;IAC9F,OAAO,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC7C,uDAAuD;IACvD,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACjC,oDAAoD;IACpD,YAAY,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,sCAAsC;IACtD,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,gCAAgC;IAChC,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcSummaryDefinitions.mjs","sourceRoot":"","sources":["../../src/gc/gcSummaryDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IGarbageCollectionData } from \"@fluidframework/runtime-definitions\";\n\n/**\n * The garbage collection data of each node in the reference graph. Each node's GC data is written in the summary\n * in this format.\n */\nexport interface IGarbageCollectionNodeData {\n\t/**\n\t * The set of routes to other nodes in the graph.\n\t */\n\toutboundRoutes: string[];\n\t/**\n\t * If the node is unreferenced, the timestamp of when it was marked unreferenced.\n\t */\n\tunreferencedTimestampMs?: number;\n}\n\n/**\n * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their\n * GC data. The GC data is written in the summary in this format.\n */\nexport interface IGarbageCollectionState {\n\tgcNodes: { [id: string]: IGarbageCollectionNodeData };\n}\n\n/**\n * The GC data that is read from a snapshot. It contains the Garbage CollectionState state and tombstone state.\n */\nexport interface IGarbageCollectionSnapshotData {\n\t/** The garbage collection state. It is a list of nodes in the container and their GC data. */\n\tgcState: IGarbageCollectionState | undefined;\n\t/** A list of nodes that have been tombstoned by GC. */\n\ttombstones: string[] | undefined;\n\t/** A list of nodes that have been deleted by GC. */\n\tdeletedNodes: string[] | undefined;\n}\n\n/**\n * @deprecated IGarbageCollectionState is written in the root of the summary now.\n * Legacy GC details from when the GC details were written at the data store's summary tree.\n */\nexport interface IGarbageCollectionSummaryDetailsLegacy {\n\t/** A list of routes to Fluid objects that are used in this node. */\n\tusedRoutes?: string[];\n\t/** The GC data of this node. */\n\tgcData?: IGarbageCollectionData;\n\t/** If this node is unreferenced, the time when it was marked as such. */\n\tunrefTimestamp?: number;\n}\n"]}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { ISummarizeResult } from "@fluidframework/runtime-definitions";
|
|
6
|
-
import { IRefreshSummaryResult } from "../summary";
|
|
7
|
-
import { IGarbageCollectorConfigs, IGCStats } from "./gcDefinitions";
|
|
8
|
-
import { IGarbageCollectionSnapshotData, IGarbageCollectionState } from "./gcSummaryDefinitions";
|
|
6
|
+
import { IRefreshSummaryResult } from "../summary/index.mjs";
|
|
7
|
+
import { IGarbageCollectorConfigs, IGCStats } from "./gcDefinitions.mjs";
|
|
8
|
+
import { IGarbageCollectionSnapshotData, IGarbageCollectionState } from "./gcSummaryDefinitions.mjs";
|
|
9
9
|
export declare const gcStateBlobKey: string;
|
|
10
10
|
/**
|
|
11
11
|
* The GC data that is tracked for a summary.
|
|
@@ -91,4 +91,4 @@ export declare class GCSummaryStateTracker {
|
|
|
91
91
|
*/
|
|
92
92
|
updateStateFromGCRunStats(stats: IGCStats): void;
|
|
93
93
|
}
|
|
94
|
-
//# sourceMappingURL=gcSummaryStateTracker.d.
|
|
94
|
+
//# sourceMappingURL=gcSummaryStateTracker.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcSummaryStateTracker.d.mts","sourceRoot":"","sources":["../../src/gc/gcSummaryStateTracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAKN,gBAAgB,EAEhB,MAAM,qCAAqC;OAErC,EAAE,qBAAqB,EAAE;OACzB,EAAa,wBAAwB,EAAE,QAAQ,EAAE;OAEjD,EAAE,8BAA8B,EAAE,uBAAuB,EAAE;AAElE,eAAO,MAAM,cAAc,QAAyB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED;;;;;GAKG;AACH,qBAAa,qBAAqB;IAkBhC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhBzB,OAAO,CAAC,sBAAsB,CAAY;IAG1C,OAAO,CAAC,iBAAiB,CAAqC;IAE9D,OAAO,CAAC,kBAAkB,CAAqC;IAG/D,OAAO,CAAC,uBAAuB,CAAU;IAIlC,8BAA8B,EAAE,MAAM,CAAK;gBAIhC,OAAO,EAAE,IAAI,CAC7B,wBAAwB,EACxB,aAAa,GAAG,eAAe,GAAG,yBAAyB,GAAG,mBAAmB,CACjF,EAED,sBAAsB,EAAE,OAAO;IAShC;;;;;;;;;;;;;OAaG;IACH,IAAW,oBAAoB,IAAI,OAAO,CAEzC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAW,yBAAyB,IAAI,OAAO,CAM9C;IAED;;OAEG;IACI,mBAAmB,CAAC,gBAAgB,EAAE,8BAA8B,GAAG,SAAS;IAevF;;;;;OAKG;IACI,SAAS,CACf,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,uBAAuB,EAChC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,UAAU,EAAE,MAAM,EAAE,GAClB,gBAAgB,GAAG,SAAS;IAiE/B;;;;;;;;;OASG;IACH,OAAO,CAAC,kBAAkB;IAqD1B;;OAEG;IACU,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB/E;;OAEG;IACI,yBAAyB,CAAC,KAAK,EAAE,QAAQ;CAGhD"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { SummaryType } from "@fluidframework/protocol-definitions";
|
|
6
6
|
import { gcBlobPrefix, gcDeletedBlobKey, gcTombstoneBlobKey, gcTreeKey, } from "@fluidframework/runtime-definitions";
|
|
7
7
|
import { mergeStats, SummaryTreeBuilder } from "@fluidframework/runtime-utils";
|
|
8
|
-
import { generateSortedGCState } from "./gcHelpers";
|
|
8
|
+
import { generateSortedGCState } from "./gcHelpers.mjs";
|
|
9
9
|
export const gcStateBlobKey = `${gcBlobPrefix}_root`;
|
|
10
10
|
/**
|
|
11
11
|
* Encapsulates the garbage collection state that is tracked across summaries.
|
|
@@ -206,4 +206,4 @@ export class GCSummaryStateTracker {
|
|
|
206
206
|
this.updatedDSCountSinceLastSummary += stats.updatedDataStoreCount;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
//# sourceMappingURL=gcSummaryStateTracker.
|
|
209
|
+
//# sourceMappingURL=gcSummaryStateTracker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcSummaryStateTracker.mjs","sourceRoot":"","sources":["../../src/gc/gcSummaryStateTracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,WAAW,EAAE,MAAM,sCAAsC;OAC3D,EACN,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,GAGT,MAAM,qCAAqC;OACrC,EAAE,UAAU,EAAE,kBAA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AkB,EAAE,oBAAoB,CAAC,CAAC;aAC1D;SACD;QAED,0DAA0D;QAC1D,IAAI,sBAAsB,KAAK,SAAS,EAAE;YACzC,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;SAChC;QAED,iGAAiG;QACjG,IACC,IAAI,CAAC,iBAAiB,EAAE,sBAAsB,KAAK,sBAAsB;YACzE,UAAU,EACT;YACD,OAAO,CAAC,SAAS,CAChB,gBAAgB,EAChB,WAAW,CAAC,IAAI,EAChB,IAAI,SAAS,IAAI,gBAAgB,EAAE,CACnC,CAAC;SACF;aAAM;YACN,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC;SAC1D;QACD,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,oBAAoB,CAAC,MAA6B;QAC9D,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE;YAC7B,OAAO;SACP;QAED,2GAA2G;QAC3G,4GAA4G;QAC5G,+FAA+F;QAC/F,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAExD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;YAC9B,OAAO;SACP;QAED,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAC7D,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC;QACjD,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACpC,IAAI,CAAC,8BAA8B,GAAG,CAAC,CAAC;QACxC,OAAO;IACR,CAAC;IAED;;OAEG;IACI,yBAAyB,CAAC,KAAe;QAC/C,IAAI,CAAC,8BAA8B,IAAI,KAAK,CAAC,qBAAqB,CAAC;IACpE,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SummaryType } from \"@fluidframework/protocol-definitions\";\nimport {\n\tgcBlobPrefix,\n\tgcDeletedBlobKey,\n\tgcTombstoneBlobKey,\n\tgcTreeKey,\n\tISummarizeResult,\n\tISummaryTreeWithStats,\n} from \"@fluidframework/runtime-definitions\";\nimport { mergeStats, SummaryTreeBuilder } from \"@fluidframework/runtime-utils\";\nimport { IRefreshSummaryResult } from \"../summary\";\nimport { GCVersion, IGarbageCollectorConfigs, IGCStats } from \"./gcDefinitions\";\nimport { generateSortedGCState } from \"./gcHelpers\";\nimport { IGarbageCollectionSnapshotData, IGarbageCollectionState } from \"./gcSummaryDefinitions\";\n\nexport const gcStateBlobKey = `${gcBlobPrefix}_root`;\n\n/**\n * The GC data that is tracked for a summary.\n */\nexport interface IGCSummaryTrackingData {\n\tserializedGCState: string | undefined;\n\tserializedTombstones: string | undefined;\n\tserializedDeletedNodes: string | undefined;\n}\n\n/**\n * Encapsulates the garbage collection state that is tracked across summaries.\n * It maintains the GC state as per the latest summary in by the server. It updates state when a summary tracked by this\n * client is acked by the server or from a snapshot is downloaded from the server.\n * On summarize, it decides whether to write new state or re-use previous summary's state.\n */\nexport class GCSummaryStateTracker {\n\t// This is the version of GC data in the latest summary being tracked.\n\tprivate latestSummaryGCVersion: GCVersion;\n\n\t// Keeps track of the GC data from the latest summary successfully acked by the server.\n\tprivate latestSummaryData: IGCSummaryTrackingData | undefined;\n\t// Keeps track of the GC data from the last summary submitted to the server but not yet acked.\n\tprivate pendingSummaryData: IGCSummaryTrackingData | undefined;\n\n\t// Tracks whether there was GC was run in latest summary being tracked.\n\tprivate wasGCRunInLatestSummary: boolean;\n\n\t// Tracks the count of data stores whose state updated since the last summary, i.e., they went from referenced\n\t// to unreferenced or vice-versa.\n\tpublic updatedDSCountSinceLastSummary: number = 0;\n\n\tconstructor(\n\t\t// Tells whether GC should run or not.\n\t\tprivate readonly configs: Pick<\n\t\t\tIGarbageCollectorConfigs,\n\t\t\t\"shouldRunGC\" | \"tombstoneMode\" | \"gcVersionInBaseSnapshot\" | \"gcVersionInEffect\"\n\t\t>,\n\t\t// Tells whether GC was run in the base snapshot this container loaded from.\n\t\twasGCRunInBaseSnapshot: boolean,\n\t) {\n\t\tthis.wasGCRunInLatestSummary = wasGCRunInBaseSnapshot;\n\t\t// For existing document, the latest summary is the one that we loaded from. So, use its GC version as the\n\t\t// latest tracked GC version. For new documents, we will be writing the first summary with the current version.\n\t\tthis.latestSummaryGCVersion =\n\t\t\tthis.configs.gcVersionInBaseSnapshot ?? this.configs.gcVersionInEffect;\n\t}\n\n\t/**\n\t * Tells whether the GC state needs to be reset. This can happen under 3 conditions:\n\t *\n\t * 1. The base snapshot contains GC state but GC is disabled. This will happen the first time GC is disabled after\n\t * it was enabled before. GC state needs to be removed from summary and all nodes should be marked referenced.\n\t *\n\t * 2. The base snapshot does not have GC state but GC is enabled. This will happen the very first time GC runs on\n\t * a document and the first time GC is enabled after is was disabled before.\n\t *\n\t * 3. GC is enabled and the latest summary state is refreshed from a snapshot that had GC disabled and vice-versa.\n\t *\n\t * Note that the state will be reset only once for the first summary generated after this returns true. After that,\n\t * this will return false.\n\t */\n\tpublic get doesGCStateNeedReset(): boolean {\n\t\treturn this.wasGCRunInLatestSummary !== this.configs.shouldRunGC;\n\t}\n\n\t/**\n\t * Tells whether the GC state needs to be reset in the next summary. We need to do this if:\n\t *\n\t * 1. GC was enabled and is now disabled. The GC state needs to be removed and everything becomes referenced.\n\t *\n\t * 2. GC was disabled and is now enabled. The GC state needs to be regenerated and added to summary.\n\t *\n\t * 3. GC is enabled and the latest summary state is refreshed from a snapshot that had GC disabled and vice-versa.\n\t *\n\t * 4. The GC version in the latest summary is different from the current GC version. This can happen if:\n\t *\n\t * 4.1. The summary this client loaded with has data from a different GC version.\n\t *\n\t * 4.2. This client's latest summary was updated from a snapshot that has a different GC version.\n\t */\n\tpublic get doesSummaryStateNeedReset(): boolean {\n\t\treturn (\n\t\t\tthis.doesGCStateNeedReset ||\n\t\t\t(this.configs.shouldRunGC &&\n\t\t\t\tthis.latestSummaryGCVersion !== this.configs.gcVersionInEffect)\n\t\t);\n\t}\n\n\t/**\n\t * Called during GC initialization. Initialize the latest summary data from the base snapshot data.\n\t */\n\tpublic initializeBaseState(baseSnapshotData: IGarbageCollectionSnapshotData | undefined) {\n\t\tif (baseSnapshotData === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If tracking state across summaries, update latest summary data from the snapshot's GC data.\n\t\tthis.latestSummaryData = {\n\t\t\tserializedGCState: baseSnapshotData.gcState\n\t\t\t\t? JSON.stringify(generateSortedGCState(baseSnapshotData.gcState))\n\t\t\t\t: undefined,\n\t\t\tserializedTombstones: JSON.stringify(baseSnapshotData.tombstones),\n\t\t\tserializedDeletedNodes: JSON.stringify(baseSnapshotData.deletedNodes),\n\t\t};\n\t}\n\n\t/**\n\t * Summarizes three component of the GC data - GC state, tombstones and deleted nodes.\n\t * It does incremental summary, i.e., it writes summary tree / summary blob only for the component that changed.\n\t * For components that did not change, a summary handle is returned that points to the previous successful summary.\n\t * If none of the components changed, it returns a summary handle for the entire GC data.\n\t */\n\tpublic summarize(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean,\n\t\tgcState: IGarbageCollectionState,\n\t\tdeletedNodes: Set<string>,\n\t\ttombstones: string[],\n\t): ISummarizeResult | undefined {\n\t\tif (!this.configs.shouldRunGC) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializedGCState = JSON.stringify(generateSortedGCState(gcState));\n\t\t// Serialize and write deleted nodes, if any. This is done irrespective of whether sweep is enabled or not so\n\t\t// to identify deleted nodes' usage.\n\t\tconst serializedDeletedNodes =\n\t\t\tdeletedNodes.size > 0 ? JSON.stringify(Array.from(deletedNodes).sort()) : undefined;\n\t\t// If running in tombstone mode, serialize and write tombstones, if any.\n\t\tconst serializedTombstones = this.configs.tombstoneMode\n\t\t\t? tombstones.length > 0\n\t\t\t\t? JSON.stringify(tombstones.sort())\n\t\t\t\t: undefined\n\t\t\t: undefined;\n\n\t\t/**\n\t\t * Incremental summary of GC data - If none of GC state, deleted nodes or tombstones changed since last summary,\n\t\t * write summary handle instead of summary tree for GC.\n\t\t * Otherwise, write the GC summary tree. In the tree, for each of these that changed, write a summary blob and\n\t\t * for each of these that did not change, write a summary handle.\n\t\t */\n\t\tthis.pendingSummaryData = {\n\t\t\tserializedGCState,\n\t\t\tserializedTombstones,\n\t\t\tserializedDeletedNodes,\n\t\t};\n\n\t\tif (trackState && !fullTree && this.latestSummaryData !== undefined) {\n\t\t\t// If nothing changed since last summary, send a summary handle for the entire GC data.\n\t\t\tif (\n\t\t\t\tthis.latestSummaryData.serializedGCState === serializedGCState &&\n\t\t\t\tthis.latestSummaryData.serializedTombstones === serializedTombstones &&\n\t\t\t\tthis.latestSummaryData.serializedDeletedNodes === serializedDeletedNodes\n\t\t\t) {\n\t\t\t\tconst stats = mergeStats();\n\t\t\t\tstats.handleNodeCount++;\n\t\t\t\treturn {\n\t\t\t\t\tsummary: {\n\t\t\t\t\t\ttype: SummaryType.Handle,\n\t\t\t\t\t\thandle: `/${gcTreeKey}`,\n\t\t\t\t\t\thandleType: SummaryType.Tree,\n\t\t\t\t\t},\n\t\t\t\t\tstats,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// If some state changed, build a GC summary tree.\n\t\t\treturn this.buildGCSummaryTree(\n\t\t\t\tserializedGCState,\n\t\t\t\tserializedTombstones,\n\t\t\t\tserializedDeletedNodes,\n\t\t\t\ttrue /* trackState */,\n\t\t\t);\n\t\t}\n\t\t// If not tracking GC state, build a GC summary tree without any summary handles.\n\t\treturn this.buildGCSummaryTree(\n\t\t\tserializedGCState,\n\t\t\tserializedTombstones,\n\t\t\tserializedDeletedNodes,\n\t\t\tfalse /* trackState */,\n\t\t);\n\t}\n\n\t/**\n\t * Builds the GC summary tree which contains GC state, deleted nodes and tombstones.\n\t * If trackState is false, all of GC state, deleted nodes and tombstones are written as summary blobs.\n\t * If trackState is true, only states that changed are written. Rest are written as handles.\n\t * @param serializedGCState - The GC state serialized as string.\n\t * @param serializedTombstones - The tombstone state serialized as string.\n\t * @param serializedDeletedNodes - Deleted nodes serialized as string.\n\t * @param trackState - Whether we are tracking GC state across summaries.\n\t * @returns the GC summary tree.\n\t */\n\tprivate buildGCSummaryTree(\n\t\tserializedGCState: string,\n\t\tserializedTombstones: string | undefined,\n\t\tserializedDeletedNodes: string | undefined,\n\t\ttrackState: boolean,\n\t): ISummaryTreeWithStats {\n\t\tconst builder = new SummaryTreeBuilder();\n\n\t\t// If the GC state hasn't changed, write a summary handle, else write a summary blob for it.\n\t\tif (this.latestSummaryData?.serializedGCState === serializedGCState && trackState) {\n\t\t\tbuilder.addHandle(gcStateBlobKey, SummaryType.Blob, `/${gcTreeKey}/${gcStateBlobKey}`);\n\t\t} else {\n\t\t\tbuilder.addBlob(gcStateBlobKey, serializedGCState);\n\t\t}\n\n\t\t// If tombstones exist, write a summary handle if it hasn't changed. If it has changed, write a\n\t\t// summary blob.\n\t\tif (serializedTombstones !== undefined) {\n\t\t\tif (\n\t\t\t\tthis.latestSummaryData?.serializedTombstones === serializedTombstones &&\n\t\t\t\ttrackState\n\t\t\t) {\n\t\t\t\tbuilder.addHandle(\n\t\t\t\t\tgcTombstoneBlobKey,\n\t\t\t\t\tSummaryType.Blob,\n\t\t\t\t\t`/${gcTreeKey}/${gcTombstoneBlobKey}`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tbuilder.addBlob(gcTombstoneBlobKey, serializedTombstones);\n\t\t\t}\n\t\t}\n\n\t\t// If there are no deleted nodes, return the summary tree.\n\t\tif (serializedDeletedNodes === undefined) {\n\t\t\treturn builder.getSummaryTree();\n\t\t}\n\n\t\t// If the deleted nodes hasn't changed, write a summary handle, else write a summary blob for it.\n\t\tif (\n\t\t\tthis.latestSummaryData?.serializedDeletedNodes === serializedDeletedNodes &&\n\t\t\ttrackState\n\t\t) {\n\t\t\tbuilder.addHandle(\n\t\t\t\tgcDeletedBlobKey,\n\t\t\t\tSummaryType.Blob,\n\t\t\t\t`/${gcTreeKey}/${gcDeletedBlobKey}`,\n\t\t\t);\n\t\t} else {\n\t\t\tbuilder.addBlob(gcDeletedBlobKey, serializedDeletedNodes);\n\t\t}\n\t\treturn builder.getSummaryTree();\n\t}\n\n\t/**\n\t * Called to refresh the latest summary state. This happens when either a pending summary is acked.\n\t */\n\tpublic async refreshLatestSummary(result: IRefreshSummaryResult): Promise<void> {\n\t\tif (!result.isSummaryTracked) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the summary is tracked, this client is the one that generated it. So, update wasGCRunInLatestSummary.\n\t\t// Note that this has to be updated if GC did not run too. Otherwise, `gcStateNeedsReset` will always return\n\t\t// true in scenarios where GC is currently disabled but enabled in the snapshot we loaded from.\n\t\tthis.wasGCRunInLatestSummary = this.configs.shouldRunGC;\n\n\t\tif (!this.configs.shouldRunGC) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.latestSummaryGCVersion = this.configs.gcVersionInEffect;\n\t\tthis.latestSummaryData = this.pendingSummaryData;\n\t\tthis.pendingSummaryData = undefined;\n\t\tthis.updatedDSCountSinceLastSummary = 0;\n\t\treturn;\n\t}\n\n\t/**\n\t * Called to update the state from a GC run's stats. Used to update the count of data stores whose state updated.\n\t */\n\tpublic updateStateFromGCRunStats(stats: IGCStats) {\n\t\tthis.updatedDSCountSinceLastSummary += stats.updatedDataStoreCount;\n\t}\n}\n"]}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import { ITelemetryGenericEvent } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { IGarbageCollectionData } from "@fluidframework/runtime-definitions";
|
|
7
7
|
import { ITelemetryLoggerExt, MonitoringContext } from "@fluidframework/telemetry-utils";
|
|
8
|
-
import { RuntimeHeaderData } from "../containerRuntime";
|
|
9
|
-
import { ICreateContainerMetadata } from "../summary";
|
|
10
|
-
import { GCNodeType, IGarbageCollectorConfigs } from "./gcDefinitions";
|
|
11
|
-
import { UnreferencedStateTracker } from "./gcUnreferencedStateTracker";
|
|
8
|
+
import { RuntimeHeaderData } from "../containerRuntime.mjs";
|
|
9
|
+
import { ICreateContainerMetadata } from "../summary/index.mjs";
|
|
10
|
+
import { GCNodeType, IGarbageCollectorConfigs } from "./gcDefinitions.mjs";
|
|
11
|
+
import { UnreferencedStateTracker } from "./gcUnreferencedStateTracker.mjs";
|
|
12
12
|
type NodeUsageType = "Changed" | "Loaded" | "Revived";
|
|
13
13
|
/** Properties that are common to IUnreferencedEventProps and INodeUsageProps */
|
|
14
14
|
interface ICommonProps {
|
|
@@ -26,13 +26,20 @@ interface INodeUsageProps extends ICommonProps {
|
|
|
26
26
|
fromId?: string;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.
|
|
30
|
-
*
|
|
29
|
+
* Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.
|
|
30
|
+
*
|
|
31
|
+
* These events are not logged as errors, just generic events, since there can be false positives:
|
|
32
|
+
*
|
|
31
33
|
* 1. inactiveObject telemetry - When an inactive node is used - A node that has been unreferenced for inactiveTimeoutMs.
|
|
32
|
-
* 2.
|
|
33
|
-
* 3.
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* 2. tombstoneReadyObject telemetry - When a tombstone-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs.
|
|
35
|
+
* 3. sweepReadyObject telemetry - When a sweep-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs + sweepGracePeriodMs.
|
|
36
|
+
*
|
|
37
|
+
* These events are logged as errors since they are based on the core GC logic:
|
|
38
|
+
*
|
|
39
|
+
* 1. Tombstone telemetry - When a tombstoned node is used - A node that has been marked as tombstone.
|
|
40
|
+
* 2. Unknown outbound reference telemetry - When a node is referenced but GC was not notified of it when the new reference appeared.
|
|
41
|
+
*
|
|
42
|
+
* Note: The telemetry for a Deleted node being used is logged elsewhere in this package.
|
|
36
43
|
*/
|
|
37
44
|
export declare class GCTelemetryTracker {
|
|
38
45
|
private readonly mc;
|
|
@@ -89,4 +96,4 @@ export declare function sendGCUnexpectedUsageEvent(mc: MonitoringContext, event:
|
|
|
89
96
|
gcTombstoneEnforcementAllowed: boolean | undefined;
|
|
90
97
|
}, packagePath: readonly string[] | undefined, error?: unknown): void;
|
|
91
98
|
export {};
|
|
92
|
-
//# sourceMappingURL=gcTelemetry.d.
|
|
99
|
+
//# sourceMappingURL=gcTelemetry.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcTelemetry.d.mts","sourceRoot":"","sources":["../../src/gc/gcTelemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,sBAAsB,EAAE,MAAM,iCAAiC;OACjE,EAAE,sBAAsB,EAAE,MAAM,qCAAqC;OACrE,EAEN,mBAAmB,EACnB,iBAAiB,EAEjB,MAAM,iCAAiC;OACjC,EAAE,iBAAiB,EAAE;OACrB,EAAE,wBAAwB,EAAE;OAC5B,EACN,UAAU,EAEV,wBAAwB,EAMxB;OACM,EAAE,wBAAwB,EAAE;AAEnC,KAAK,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD,gFAAgF;AAChF,UAAU,YAAY;IACrB,SAAS,EAAE,aAAa,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAuBD,kEAAkE;AAClE,UAAU,eAAgB,SAAQ,YAAY;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,kBAAkB;IAQ7B,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OA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EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC1C,KAAK,CAAC,EAAE,OAAO,QAaf"}
|
|
@@ -3,15 +3,22 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { generateStack, tagCodeArtifacts, } from "@fluidframework/telemetry-utils";
|
|
6
|
-
import { GCNodeType, UnreferencedState, disableTombstoneKey, throwOnTombstoneUsageKey, throwOnTombstoneLoadOverrideKey, runSweepKey, } from "./gcDefinitions";
|
|
6
|
+
import { GCNodeType, UnreferencedState, disableTombstoneKey, throwOnTombstoneUsageKey, throwOnTombstoneLoadOverrideKey, runSweepKey, } from "./gcDefinitions.mjs";
|
|
7
7
|
/**
|
|
8
|
-
* Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.
|
|
9
|
-
*
|
|
8
|
+
* Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.
|
|
9
|
+
*
|
|
10
|
+
* These events are not logged as errors, just generic events, since there can be false positives:
|
|
11
|
+
*
|
|
10
12
|
* 1. inactiveObject telemetry - When an inactive node is used - A node that has been unreferenced for inactiveTimeoutMs.
|
|
11
|
-
* 2.
|
|
12
|
-
* 3.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* 2. tombstoneReadyObject telemetry - When a tombstone-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs.
|
|
14
|
+
* 3. sweepReadyObject telemetry - When a sweep-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs + sweepGracePeriodMs.
|
|
15
|
+
*
|
|
16
|
+
* These events are logged as errors since they are based on the core GC logic:
|
|
17
|
+
*
|
|
18
|
+
* 1. Tombstone telemetry - When a tombstoned node is used - A node that has been marked as tombstone.
|
|
19
|
+
* 2. Unknown outbound reference telemetry - When a node is referenced but GC was not notified of it when the new reference appeared.
|
|
20
|
+
*
|
|
21
|
+
* Note: The telemetry for a Deleted node being used is logged elsewhere in this package.
|
|
15
22
|
*/
|
|
16
23
|
export class GCTelemetryTracker {
|
|
17
24
|
constructor(mc, configs, isSummarizerClient, createContainerMetadata, getNodeType, getNodeStateTracker, getNodePackagePath) {
|
|
@@ -70,10 +77,10 @@ export class GCTelemetryTracker {
|
|
|
70
77
|
case UnreferencedState.Inactive:
|
|
71
78
|
return this.configs.inactiveTimeoutMs;
|
|
72
79
|
case UnreferencedState.TombstoneReady:
|
|
73
|
-
return this.configs.
|
|
80
|
+
return this.configs.tombstoneTimeoutMs;
|
|
74
81
|
case UnreferencedState.SweepReady:
|
|
75
|
-
return (this.configs.
|
|
76
|
-
this.configs.
|
|
82
|
+
return (this.configs.tombstoneTimeoutMs &&
|
|
83
|
+
this.configs.tombstoneTimeoutMs + this.configs.sweepGracePeriodMs);
|
|
77
84
|
default:
|
|
78
85
|
return undefined;
|
|
79
86
|
}
|
|
@@ -268,6 +275,8 @@ export class GCTelemetryTracker {
|
|
|
268
275
|
fromPkg: fromPkg?.join("/"),
|
|
269
276
|
}),
|
|
270
277
|
};
|
|
278
|
+
// These are logged as generic events and not errors because there can be false positives. The Tombstone
|
|
279
|
+
// and Delete errors are separately logged and are reliable.
|
|
271
280
|
logger.sendTelemetryEvent(event);
|
|
272
281
|
}
|
|
273
282
|
}
|
|
@@ -290,4 +299,4 @@ export function sendGCUnexpectedUsageEvent(mc, event, packagePath, error) {
|
|
|
290
299
|
});
|
|
291
300
|
mc.logger.sendTelemetryEvent(event, error);
|
|
292
301
|
}
|
|
293
|
-
//# sourceMappingURL=gcTelemetry.
|
|
302
|
+
//# sourceMappingURL=gcTelemetry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcTelemetry.mjs","sourceRoot":"","sources":["../../src/gc/gcTelemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAII,EACN,aAAa,EAGb,gBAAgB,GAChB,MAAM,iCAAiC;OAGjC,EACN,UAAU,EACV,iBAAiB,EAEjB,mBAAmB,EACnB,wBAAwB,EACxB,+BAA+B,EAC/B,WAAW,GAEX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,CAAC,UAAU,CAAC,WAAW,CAAC;KAClD,CAAC,CAAC;IAEH,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryGenericEvent } from \"@fluidframework/core-interfaces\";\nimport { IGarbageCollectionData } from \"@fluidframework/runtime-definitions\";\nimport {\n\tgenerateStack,\n\tITelemetryLoggerExt,\n\tMonitoringContext,\n\ttagCodeArtifacts,\n} from \"@fluidframework/telemetry-utils\";\nimport { RuntimeHeaderData } from \"../containerRuntime\";\nimport { ICreateContainerMetadata } from \"../summary\";\nimport {\n\tGCNodeType,\n\tUnreferencedState,\n\tIGarbageCollectorConfigs,\n\tdisableTombstoneKey,\n\tthrowOnTombstoneUsageKey,\n\tthrowOnTombstoneLoadOverrideKey,\n\trunSweepKey,\n\tGCFeatureMatrix,\n} from \"./gcDefinitions\";\nimport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker\";\n\ntype NodeUsageType = \"Changed\" | \"Loaded\" | \"Revived\";\n\n/** Properties that are common to IUnreferencedEventProps and INodeUsageProps */\ninterface ICommonProps {\n\tusageType: NodeUsageType;\n\tcompletedGCRuns: number;\n\tisTombstoned: boolean;\n\tlastSummaryTime?: number;\n\theaders?: RuntimeHeaderData;\n}\n\n/** The event that is logged when unreferenced node is used after a certain time. */\ninterface IUnreferencedEventProps extends ICreateContainerMetadata, ICommonProps {\n\tstate: UnreferencedState;\n\tid: {\n\t\tvalue: string;\n\t\ttag: string;\n\t};\n\ttype: GCNodeType;\n\tunrefTime: number;\n\tage: number;\n\t// Expanding GC feature matrix. Without doing this, the configs cannot be logged in telemetry directly.\n\tgcConfigs: Omit<IGarbageCollectorConfigs, \"persistedGcFeatureMatrix\"> & {\n\t\t[K in keyof GCFeatureMatrix]: GCFeatureMatrix[K];\n\t};\n\ttimeout?: number;\n\tfromId?: {\n\t\tvalue: string;\n\t\ttag: string;\n\t};\n}\n\n/** Properties passed to nodeUsed function when a node is used. */\ninterface INodeUsageProps extends ICommonProps {\n\tid: string;\n\tcurrentReferenceTimestampMs: number | undefined;\n\tpackagePath: readonly string[] | undefined;\n\tfromId?: string;\n}\n\n/**\n * Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.\n *\n * These events are not logged as errors, just generic events, since there can be false positives:\n *\n * 1. inactiveObject telemetry - When an inactive node is used - A node that has been unreferenced for inactiveTimeoutMs.\n * 2. tombstoneReadyObject telemetry - When a tombstone-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs.\n * 3. sweepReadyObject telemetry - When a sweep-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs + sweepGracePeriodMs.\n *\n * These events are logged as errors since they are based on the core GC logic:\n *\n * 1. Tombstone telemetry - When a tombstoned node is used - A node that has been marked as tombstone.\n * 2. Unknown outbound reference telemetry - When a node is referenced but GC was not notified of it when the new reference appeared.\n *\n * Note: The telemetry for a Deleted node being used is logged elsewhere in this package.\n */\nexport class GCTelemetryTracker {\n\t// Keeps track of unreferenced events that are logged for a node. This is used to limit the log generation to one\n\t// per event per node.\n\tprivate readonly loggedUnreferencedEvents: Set<string> = new Set();\n\t// Queue for unreferenced events that should be logged the next time GC runs.\n\tprivate pendingEventsQueue: IUnreferencedEventProps[] = [];\n\n\tconstructor(\n\t\tprivate readonly mc: MonitoringContext,\n\t\tprivate readonly configs: IGarbageCollectorConfigs,\n\t\tprivate readonly isSummarizerClient: boolean,\n\t\tprivate readonly createContainerMetadata: ICreateContainerMetadata,\n\t\tprivate readonly getNodeType: (nodeId: string) => GCNodeType,\n\t\tprivate readonly getNodeStateTracker: (\n\t\t\tnodeId: string,\n\t\t) => UnreferencedStateTracker | undefined,\n\t\tprivate readonly getNodePackagePath: (\n\t\t\tnodePath: string,\n\t\t) => Promise<readonly string[] | undefined>,\n\t) {}\n\n\t/**\n\t * Returns whether an event should be logged for a node that isn't active anymore. This does not apply to\n\t * tombstoned nodes for which an event is always logged. Some scenarios where we won't log:\n\t * 1. When a DDS is changed. The corresponding data store's event will be logged instead.\n\t * 2. An event is logged only once per container instance per event per node.\n\t */\n\tprivate shouldLogNonActiveEvent(\n\t\tnodeType: GCNodeType,\n\t\tusageType: NodeUsageType,\n\t\tnodeStateTracker: UnreferencedStateTracker,\n\t\tuniqueEventId: string,\n\t) {\n\t\tif (nodeStateTracker.state === UnreferencedState.Active) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (nodeType === GCNodeType.Other) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// For sub data store (DDS) nodes, if they are changed, its data store will also be changed,\n\t\t// so skip logging to make the telemetry less noisy.\n\t\tif (nodeType === GCNodeType.SubDataStore && usageType === \"Changed\") {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Non-tombstone events are logged once per event per node. A unique id is generated by joining\n\t\t// node state (inactive / sweep ready), node's id and usage (loaded / changed / revived).\n\t\tif (this.loggedUnreferencedEvents.has(uniqueEventId)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Called when a node is used. If the node is not active or tombstoned, log telemetry indicating object is used\n\t * when it should not have been.\n\t */\n\tpublic nodeUsed(nodeUsageProps: INodeUsageProps) {\n\t\t// If there is no reference timestamp to work with, no ops have been processed after creation. If so, skip\n\t\t// logging as nothing interesting would have happened worth logging.\n\t\tif (nodeUsageProps.currentReferenceTimestampMs === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nodeStateTracker = this.getNodeStateTracker(nodeUsageProps.id);\n\t\tconst nodeType = this.getNodeType(nodeUsageProps.id);\n\t\tconst timeout = (() => {\n\t\t\tswitch (nodeStateTracker?.state) {\n\t\t\t\tcase UnreferencedState.Inactive:\n\t\t\t\t\treturn this.configs.inactiveTimeoutMs;\n\t\t\t\tcase UnreferencedState.TombstoneReady:\n\t\t\t\t\treturn this.configs.tombstoneTimeoutMs;\n\t\t\t\tcase UnreferencedState.SweepReady:\n\t\t\t\t\treturn (\n\t\t\t\t\t\tthis.configs.tombstoneTimeoutMs &&\n\t\t\t\t\t\tthis.configs.tombstoneTimeoutMs + this.configs.sweepGracePeriodMs\n\t\t\t\t\t);\n\t\t\t\tdefault:\n\t\t\t\t\treturn undefined;\n\t\t\t}\n\t\t})();\n\t\tconst {\n\t\t\tusageType,\n\t\t\tcurrentReferenceTimestampMs,\n\t\t\tpackagePath,\n\t\t\tid: untaggedId,\n\t\t\tfromId: untaggedFromId,\n\t\t\t...propsToLog\n\t\t} = nodeUsageProps;\n\t\tconst { persistedGcFeatureMatrix, ...configs } = this.configs;\n\t\tconst unrefEventProps: Omit<IUnreferencedEventProps, \"state\" | \"usageType\"> = {\n\t\t\ttype: nodeType,\n\t\t\tunrefTime: nodeStateTracker?.unreferencedTimestampMs ?? -1,\n\t\t\tage:\n\t\t\t\tnodeStateTracker !== undefined\n\t\t\t\t\t? nodeUsageProps.currentReferenceTimestampMs -\n\t\t\t\t\t nodeStateTracker.unreferencedTimestampMs\n\t\t\t\t\t: -1,\n\t\t\ttimeout,\n\t\t\t...tagCodeArtifacts({ id: untaggedId, fromId: untaggedFromId }),\n\t\t\t...propsToLog,\n\t\t\t...this.createContainerMetadata,\n\t\t\tgcConfigs: { ...configs, ...persistedGcFeatureMatrix },\n\t\t};\n\n\t\t// If the node that is used is tombstoned, log a tombstone telemetry.\n\t\t// Note that this is done before checking if \"nodeStateTracker\" is undefined below because unreferenced\n\t\t// tracking may not have yet been enabled. That happens only after the client transitions to write mode.\n\t\tif (nodeUsageProps.isTombstoned) {\n\t\t\tthis.logTombstoneUsageTelemetry(nodeUsageProps, unrefEventProps, nodeType, usageType);\n\t\t}\n\n\t\t// After logging tombstone telemetry, if the node's unreferenced state is not tracked, there is nothing\n\t\t// else to log.\n\t\tif (nodeStateTracker === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst state = nodeStateTracker.state;\n\t\tconst uniqueEventId = `${state}-${nodeUsageProps.id}-${nodeUsageProps.usageType}`;\n\n\t\tif (\n\t\t\t!this.shouldLogNonActiveEvent(\n\t\t\t\tnodeType,\n\t\t\t\tnodeUsageProps.usageType,\n\t\t\t\tnodeStateTracker,\n\t\t\t\tuniqueEventId,\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the unique event id so that we don't generate a log for this event again in this session.\n\t\tthis.loggedUnreferencedEvents.add(uniqueEventId);\n\n\t\t// For summarizer client, queue the event so it is logged the next time GC runs if the event is still valid.\n\t\t// For non-summarizer client, log the event now since GC won't run on it. This may result in false positives\n\t\t// but it's a good signal nonetheless and we can consume it with a grain of salt.\n\t\t// Inactive errors are usages of Objects that are unreferenced for at least a period of 7 days.\n\t\t// SweepReady errors are usages of Objects that will be deleted by GC Sweep!\n\t\tif (this.isSummarizerClient) {\n\t\t\tthis.pendingEventsQueue.push({\n\t\t\t\t...unrefEventProps,\n\t\t\t\tusageType: nodeUsageProps.usageType,\n\t\t\t\tstate,\n\t\t\t});\n\t\t} else {\n\t\t\t// For non-summarizer clients, only log \"Loaded\" type events since these objects may not be loaded in the\n\t\t\t// summarizer clients if they are based off of user actions (such as scrolling to content for these objects)\n\t\t\t// Events generated:\n\t\t\t// InactiveObject_Loaded, SweepReadyObject_Loaded\n\t\t\tif (nodeUsageProps.usageType === \"Loaded\") {\n\t\t\t\tconst { id, fromId, headers, gcConfigs, ...detailedProps } = unrefEventProps;\n\t\t\t\tconst event = {\n\t\t\t\t\teventName: `${state}Object_${nodeUsageProps.usageType}`,\n\t\t\t\t\t...tagCodeArtifacts({ pkg: nodeUsageProps.packagePath?.join(\"/\") }),\n\t\t\t\t\tstack: generateStack(),\n\t\t\t\t\tid,\n\t\t\t\t\tfromId,\n\t\t\t\t\theaders: { ...headers },\n\t\t\t\t\tdetails: detailedProps,\n\t\t\t\t\tgcConfigs,\n\t\t\t\t};\n\n\t\t\t\t// These are logged as generic events and not errors because there can be false positives. The Tombstone\n\t\t\t\t// and Delete errors are separately logged and are reliable.\n\t\t\t\tthis.mc.logger.sendTelemetryEvent(event);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Logs telemetry when a tombstoned object is changed, revived or loaded.\n\t */\n\tprivate logTombstoneUsageTelemetry(\n\t\tnodeUsageProps: INodeUsageProps,\n\t\tunrefEventProps: Omit<IUnreferencedEventProps, \"state\" | \"usageType\">,\n\t\tnodeType: GCNodeType,\n\t\tusageType: NodeUsageType,\n\t) {\n\t\t// This will log the following events:\n\t\t// GC_Tombstone_DataStore_Requested, GC_Tombstone_DataStore_Changed, GC_Tombstone_DataStore_Revived\n\t\t// GC_Tombstone_SubDataStore_Requested, GC_Tombstone_SubDataStore_Changed, GC_Tombstone_SubDataStore_Revived\n\t\t// GC_Tombstone_Blob_Requested, GC_Tombstone_Blob_Changed, GC_Tombstone_Blob_Revived\n\t\tconst { id, fromId, headers, gcConfigs, ...detailedProps } = unrefEventProps;\n\t\tconst eventUsageName = usageType === \"Loaded\" ? \"Requested\" : usageType;\n\t\tconst event = {\n\t\t\teventName: `GC_Tombstone_${nodeType}_${eventUsageName}`,\n\t\t\tpkg: tagCodeArtifacts({ pkg: nodeUsageProps.packagePath?.join(\"/\") }).pkg,\n\t\t\tstack: generateStack(),\n\t\t\tid,\n\t\t\tfromId,\n\t\t\theaders: { ...headers },\n\t\t\tdetails: detailedProps,\n\t\t\tgcConfigs,\n\t\t\ttombstoneFlags: {\n\t\t\t\tDisableTombstone: this.mc.config.getBoolean(disableTombstoneKey),\n\t\t\t\tThrowOnTombstoneUsage: this.mc.config.getBoolean(throwOnTombstoneUsageKey),\n\t\t\t\tThrowOnTombstoneLoad: this.mc.config.getBoolean(throwOnTombstoneLoadOverrideKey),\n\t\t\t},\n\t\t\tsweepFlags: {\n\t\t\t\tEnableSweepFlag: this.mc.config.getBoolean(runSweepKey),\n\t\t\t},\n\t\t};\n\n\t\tif (\n\t\t\t(usageType === \"Loaded\" &&\n\t\t\t\tthis.configs.throwOnTombstoneLoad &&\n\t\t\t\t!headers?.allowTombstone) ||\n\t\t\t(usageType === \"Changed\" && this.configs.throwOnTombstoneUsage)\n\t\t) {\n\t\t\tthis.mc.logger.sendErrorEvent(event);\n\t\t} else {\n\t\t\tthis.mc.logger.sendTelemetryEvent(event);\n\t\t}\n\t}\n\n\t/**\n\t * Log all new references or outbound routes in the current graph that haven't been explicitly notified to GC.\n\t * The principle is that every new reference or outbound route must be notified to GC via the\n\t * addedOutboundReference method. It it hasn't, its a bug and we want to identify these scenarios.\n\t *\n\t * In more simple terms:\n\t * Missing Explicit References = Current References - Previous References - Explicitly Added References;\n\t *\n\t * @param currentGCData - The GC data (reference graph) from the current GC run.\n\t * @param previousGCData - The GC data (reference graph) from the previous GC run.\n\t * @param explicitReferences - New references added explicity between the previous and the current run.\n\t */\n\tpublic logIfMissingExplicitReferences(\n\t\tcurrentGCData: IGarbageCollectionData,\n\t\tpreviousGCData: IGarbageCollectionData,\n\t\texplicitReferences: Map<string, string[]>,\n\t\tlogger: ITelemetryLoggerExt,\n\t) {\n\t\tfor (const [nodeId, currentOutboundRoutes] of Object.entries(currentGCData.gcNodes)) {\n\t\t\tconst previousRoutes = previousGCData.gcNodes[nodeId] ?? [];\n\t\t\tconst explicitRoutes = explicitReferences.get(nodeId) ?? [];\n\n\t\t\t/**\n\t\t\t * 1. For routes in the current GC data, routes that were not present in previous GC data and did not have\n\t\t\t * explicit references should be added to missing explicit routes list.\n\t\t\t * 2. Only include data store and blob routes since GC only works for these two.\n\t\t\t * Note: Due to a bug with de-duped blobs, only adding data store routes for now.\n\t\t\t * 3. Ignore DDS routes to their parent datastores since those were added implicitly. So, there won't be\n\t\t\t * explicit routes to them.\n\t\t\t */\n\t\t\tconst missingExplicitRoutes: string[] = [];\n\t\t\tfor (const route of currentOutboundRoutes) {\n\t\t\t\tconst nodeType = this.getNodeType(route);\n\t\t\t\tif (\n\t\t\t\t\t(nodeType === GCNodeType.DataStore || nodeType === GCNodeType.Blob) &&\n\t\t\t\t\t!nodeId.startsWith(route) &&\n\t\t\t\t\t!previousRoutes.includes(route) &&\n\t\t\t\t\t!explicitRoutes.includes(route)\n\t\t\t\t) {\n\t\t\t\t\tmissingExplicitRoutes.push(route);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (missingExplicitRoutes.length > 0) {\n\t\t\t\tlogger.sendErrorEvent({\n\t\t\t\t\teventName: \"gcUnknownOutboundReferences\",\n\t\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\t\tid: nodeId,\n\t\t\t\t\t\troutes: JSON.stringify(missingExplicitRoutes),\n\t\t\t\t\t}),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Log events that are pending in pendingEventsQueue. This is called after GC runs in the summarizer client\n\t * so that the state of an unreferenced node is updated.\n\t */\n\tpublic async logPendingEvents(logger: ITelemetryLoggerExt) {\n\t\t// Events sent come only from the summarizer client. In between summaries, events are pushed to a queue and at\n\t\t// summary time they are then logged.\n\t\t// Events generated:\n\t\t// InactiveObject_Loaded, InactiveObject_Changed, InactiveObject_Revived\n\t\t// SweepReadyObject_Loaded, SweepReadyObject_Changed, SweepReadyObject_Revived\n\t\tfor (const eventProps of this.pendingEventsQueue) {\n\t\t\t// const { usageType, state, id, fromId, ...propsToLog } = eventProps;\n\t\t\tconst { usageType, state, id, fromId, headers, gcConfigs, ...detailedProps } =\n\t\t\t\teventProps;\n\t\t\t/**\n\t\t\t * Revived event is logged only if the node is active. If the node is not active, the reference to it was\n\t\t\t * from another unreferenced node and this scenario is not interesting to log.\n\t\t\t * Loaded and Changed events are logged only if the node is not active. If the node is active, it was\n\t\t\t * revived and a Revived event will be logged for it.\n\t\t\t */\n\t\t\tconst nodeStateTracker = this.getNodeStateTracker(eventProps.id.value);\n\t\t\tconst active =\n\t\t\t\tnodeStateTracker === undefined ||\n\t\t\t\tnodeStateTracker.state === UnreferencedState.Active;\n\t\t\tif ((usageType === \"Revived\") === active) {\n\t\t\t\tconst pkg = await this.getNodePackagePath(eventProps.id.value);\n\t\t\t\tconst fromPkg = eventProps.fromId\n\t\t\t\t\t? await this.getNodePackagePath(eventProps.fromId.value)\n\t\t\t\t\t: undefined;\n\t\t\t\tconst event = {\n\t\t\t\t\teventName: `${state}Object_${usageType}`,\n\t\t\t\t\tid,\n\t\t\t\t\tfromId,\n\t\t\t\t\theaders: { ...headers },\n\t\t\t\t\tdetails: detailedProps,\n\t\t\t\t\tgcConfigs,\n\t\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\t\tpkg: pkg?.join(\"/\"),\n\t\t\t\t\t\tfromPkg: fromPkg?.join(\"/\"),\n\t\t\t\t\t}),\n\t\t\t\t};\n\n\t\t\t\t// These are logged as generic events and not errors because there can be false positives. The Tombstone\n\t\t\t\t// and Delete errors are separately logged and are reliable.\n\t\t\t\tlogger.sendTelemetryEvent(event);\n\t\t\t}\n\t\t}\n\t\tthis.pendingEventsQueue = [];\n\t}\n}\n\n/**\n * Consolidates info / logic for logging when we encounter unexpected usage of GC'd objects. For example, when a\n * tombstoned or deleted object is loaded.\n */\nexport function sendGCUnexpectedUsageEvent(\n\tmc: MonitoringContext,\n\tevent: ITelemetryGenericEvent & {\n\t\tcategory: \"error\" | \"generic\";\n\t\tgcTombstoneEnforcementAllowed: boolean | undefined;\n\t},\n\tpackagePath: readonly string[] | undefined,\n\terror?: unknown,\n) {\n\tevent.pkg = tagCodeArtifacts({ pkg: packagePath?.join(\"/\") })?.pkg;\n\tevent.tombstoneFlags = JSON.stringify({\n\t\tDisableTombstone: mc.config.getBoolean(disableTombstoneKey),\n\t\tThrowOnTombstoneUsage: mc.config.getBoolean(throwOnTombstoneUsageKey),\n\t\tThrowOnTombstoneLoad: mc.config.getBoolean(throwOnTombstoneLoadOverrideKey),\n\t});\n\tevent.sweepFlags = JSON.stringify({\n\t\tEnableSweepFlag: mc.config.getBoolean(runSweepKey),\n\t});\n\n\tmc.logger.sendTelemetryEvent(event, error);\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { UnreferencedState } from "./gcDefinitions";
|
|
5
|
+
import { UnreferencedState } from "./gcDefinitions.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* Helper class that tracks the state of an unreferenced node such as the time it was unreferenced and if it can
|
|
8
8
|
* be tombstoned or deleted by the sweep phase.
|
|
@@ -37,4 +37,4 @@ export declare class UnreferencedStateTracker {
|
|
|
37
37
|
/** Stop tracking this node. Reset the unreferenced timers and state, if any. */
|
|
38
38
|
stopTracking(): void;
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=gcUnreferencedStateTracker.d.
|
|
40
|
+
//# sourceMappingURL=gcUnreferencedStateTracker.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcUnreferencedStateTracker.d.mts","sourceRoot":"","sources":["../../src/gc/gcUnreferencedStateTracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAII,EAAE,iBAAiB,EAAE;AAoB5B;;;GAGG;AACH,qBAAa,wBAAwB;aAcnB,uBAAuB,EAAE,MAAM;IAC/C,+DAA+D;IAC/D,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAGlC,8GAA8G;IAC9G,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,kGAAkG;IAClG,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IArBpC,OAAO,CAAC,MAAM,CAA+C;IAC7D,IAAW,KAAK,IAAI,iBAAiB,CAEpC;IAED,2EAA2E;IAC3E,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;IAC1D,uEAAuE;IACvE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA4B;IAC3D,mEAAmE;IACnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4B;gBAGtC,uBAAuB,EAAE,MAAM;IAC/C,+DAA+D;IAC9C,iBAAiB,EAAE,MAAM;IAC1C,kGAAkG;IAClG,2BAA2B,EAAE,MAAM;IACnC,8GAA8G;IAC7F,kBAAkB,EAAE,MAAM,GAAG,SAAS;IACvD,kGAAkG;IACjF,kBAAkB,EAAE,MAAM;IA4CrC,cAAc,CAAC,2BAA2B,EAAE,MAAM;IA4CzD,OAAO,CAAC,WAAW;IAMnB,gFAAgF;IACzE,YAAY;CAInB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { assert, Timer } from "@fluidframework/core-utils";
|
|
6
6
|
import { validatePrecondition } from "@fluidframework/telemetry-utils";
|
|
7
|
-
import { UnreferencedState } from "./gcDefinitions";
|
|
7
|
+
import { UnreferencedState } from "./gcDefinitions.mjs";
|
|
8
8
|
/** A wrapper around common-utils Timer that requires the timeout when calling start/restart */
|
|
9
9
|
class TimerWithNoDefaultTimeout extends Timer {
|
|
10
10
|
constructor(callback) {
|
|
@@ -111,4 +111,4 @@ export class UnreferencedStateTracker {
|
|
|
111
111
|
this._state = UnreferencedState.Active;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
//# sourceMappingURL=gcUnreferencedStateTracker.
|
|
114
|
+
//# sourceMappingURL=gcUnreferencedStateTracker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcUnreferencedStateTracker.mjs","sourceRoot":"","sources":["../../src/gc/gcUnreferencedStateTracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,4BAA4B;OACnD,EAAE,oBAAoB,EAAE,MAAM,iCAAiC;OAC/D,EAAE,iBAAiB,EAAE;AAE5B,+FAA+F;AAC/F,MAAM,yBAA0B,SAAQ,KAAK;IAC5C,YAA6B,QAAoB;QAChD,2FAA2F;QAC3F,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC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B,EAChD;YACD,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,cAAc,CAAC;YAE/C,IAAI,CAAC,UAAU,CAAC,OAAO,CACtB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,GAAG,sBAAsB,CAC1E,CAAC;YACF,OAAO;SACP;QAED,mFAAmF;QACnF,kEAAkE;QAClE,IAAI,sBAAsB,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACrD,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC;YAEzC,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE;gBAC1C,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,GAAG,sBAAsB,CAAC,CAAC;aAC9E;YACD,OAAO;SACP;QAED,qGAAqG;QACrG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,GAAG,sBAAsB,CAAC,CAAC;IAC7E,CAAC;IAEO,WAAW;QAClB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC5B,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,gFAAgF;IACzE,YAAY;QAClB,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC;IACxC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, Timer } from \"@fluidframework/core-utils\";\nimport { validatePrecondition } from \"@fluidframework/telemetry-utils\";\nimport { UnreferencedState } from \"./gcDefinitions\";\n\n/** A wrapper around common-utils Timer that requires the timeout when calling start/restart */\nclass TimerWithNoDefaultTimeout extends Timer {\n\tconstructor(private readonly callback: () => void) {\n\t\t// The default timeout/handlers will never be used since start/restart pass overrides below\n\t\tsuper(0, () => {\n\t\t\tthrow new Error(\"DefaultHandler should not be used\");\n\t\t});\n\t}\n\n\tstart(timeoutMs: number) {\n\t\tsuper.start(timeoutMs, this.callback);\n\t}\n\n\trestart(timeoutMs: number): void {\n\t\tsuper.restart(timeoutMs, this.callback);\n\t}\n}\n\n/**\n * Helper class that tracks the state of an unreferenced node such as the time it was unreferenced and if it can\n * be tombstoned or deleted by the sweep phase.\n */\nexport class UnreferencedStateTracker {\n\tprivate _state: UnreferencedState = UnreferencedState.Active;\n\tpublic get state(): UnreferencedState {\n\t\treturn this._state;\n\t}\n\n\t/** Timer to indicate when an unreferenced object is considered Inactive */\n\tprivate readonly inactiveTimer: TimerWithNoDefaultTimeout;\n\t/** Timer to indicate when an unreferenced object is Tombstone-Ready */\n\tprivate readonly tombstoneTimer: TimerWithNoDefaultTimeout;\n\t/** Timer to indicate when an unreferenced object is Sweep-Ready */\n\tprivate readonly sweepTimer: TimerWithNoDefaultTimeout;\n\n\tconstructor(\n\t\tpublic readonly unreferencedTimestampMs: number,\n\t\t/** The time after which node transitions to Inactive state. */\n\t\tprivate readonly inactiveTimeoutMs: number,\n\t\t/** The current reference timestamp used to track how long this node has been unreferenced for. */\n\t\tcurrentReferenceTimestampMs: number,\n\t\t/** The time after which node transitions to TombstoneReady state; undefined if session expiry is disabled. */\n\t\tprivate readonly tombstoneTimeoutMs: number | undefined,\n\t\t/** The delay from TombstoneReady to SweepReady (only applies if tombstoneTimeoutMs is defined) */\n\t\tprivate readonly sweepGracePeriodMs: number,\n\t) {\n\t\tvalidatePrecondition(\n\t\t\tthis.tombstoneTimeoutMs === undefined ||\n\t\t\t\tthis.tombstoneTimeoutMs >= this.inactiveTimeoutMs,\n\t\t\t\"inactiveTimeoutMs must not be greater than the tombstoneTimeoutMs\",\n\t\t);\n\n\t\tthis.sweepTimer = new TimerWithNoDefaultTimeout(() => {\n\t\t\tthis._state = UnreferencedState.SweepReady;\n\t\t\tassert(\n\t\t\t\t!this.inactiveTimer.hasTimer && !this.tombstoneTimer.hasTimer,\n\t\t\t\t0x863 /* inactiveTimer or tombstoneTimer still running after sweepTimer fired! */,\n\t\t\t);\n\t\t});\n\n\t\tthis.tombstoneTimer = new TimerWithNoDefaultTimeout(() => {\n\t\t\tthis._state = UnreferencedState.TombstoneReady;\n\t\t\tassert(\n\t\t\t\t!this.inactiveTimer.hasTimer,\n\t\t\t\t0x864 /* inactiveTimer still running after tombstoneTimer fired! */,\n\t\t\t); // aka 0x3b1\n\n\t\t\tif (this.sweepGracePeriodMs > 0) {\n\t\t\t\t// After the node becomes tombstone ready, start the sweep timer after which the node will be ready for sweep.\n\t\t\t\tthis.sweepTimer.restart(this.sweepGracePeriodMs);\n\t\t\t} else {\n\t\t\t\tthis._state = UnreferencedState.SweepReady;\n\t\t\t}\n\t\t});\n\n\t\tthis.inactiveTimer = new TimerWithNoDefaultTimeout(() => {\n\t\t\tthis._state = UnreferencedState.Inactive;\n\n\t\t\t// After the node becomes inactive, start the tombstone timer after which the node will be ready for tombstone.\n\t\t\tif (this.tombstoneTimeoutMs !== undefined) {\n\t\t\t\tthis.tombstoneTimer.restart(this.tombstoneTimeoutMs - this.inactiveTimeoutMs);\n\t\t\t}\n\t\t});\n\n\t\tthis.updateTracking(currentReferenceTimestampMs);\n\t}\n\n\t/* Updates the unreferenced state based on the provided timestamp. */\n\tpublic updateTracking(currentReferenceTimestampMs: number) {\n\t\tconst unreferencedDurationMs = currentReferenceTimestampMs - this.unreferencedTimestampMs;\n\n\t\t// Below we will set the appropriate timer (or none). Any running timers are superceded by the new currentReferenceTimestampMs\n\t\tthis.clearTimers();\n\n\t\t// If the node has been unreferenced long enough, update the state to SweepReady.\n\t\tif (\n\t\t\tthis.tombstoneTimeoutMs !== undefined &&\n\t\t\tunreferencedDurationMs >= this.tombstoneTimeoutMs + this.sweepGracePeriodMs\n\t\t) {\n\t\t\tthis._state = UnreferencedState.SweepReady;\n\t\t\treturn;\n\t\t}\n\n\t\t// If the node has been unreferenced long enough, update the state to TombstoneReady.\n\t\t// Also, start a timer for the remainder of the sweep delay.\n\t\tif (\n\t\t\tthis.tombstoneTimeoutMs !== undefined &&\n\t\t\tunreferencedDurationMs >= this.tombstoneTimeoutMs\n\t\t) {\n\t\t\tthis._state = UnreferencedState.TombstoneReady;\n\n\t\t\tthis.sweepTimer.restart(\n\t\t\t\tthis.tombstoneTimeoutMs + this.sweepGracePeriodMs - unreferencedDurationMs,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// If the node has been unreferenced for long enough, update the state to inactive.\n\t\t// Also, start a timer for the remainder of the tombstone timeout.\n\t\tif (unreferencedDurationMs >= this.inactiveTimeoutMs) {\n\t\t\tthis._state = UnreferencedState.Inactive;\n\n\t\t\tif (this.tombstoneTimeoutMs !== undefined) {\n\t\t\t\tthis.tombstoneTimer.restart(this.tombstoneTimeoutMs - unreferencedDurationMs);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// The node is still active. Ensure the inactive timer is running with the proper remaining duration.\n\t\tthis.inactiveTimer.restart(this.inactiveTimeoutMs - unreferencedDurationMs);\n\t}\n\n\tprivate clearTimers() {\n\t\tthis.inactiveTimer.clear();\n\t\tthis.tombstoneTimer.clear();\n\t\tthis.sweepTimer.clear();\n\t}\n\n\t/** Stop tracking this node. Reset the unreferenced timers and state, if any. */\n\tpublic stopTracking() {\n\t\tthis.clearTimers();\n\t\tthis._state = UnreferencedState.Active;\n\t}\n}\n"]}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { GarbageCollector } from "./garbageCollection";
|
|
6
|
-
export { nextGCVersion, defaultInactiveTimeoutMs, defaultSweepGracePeriodMs, defaultSessionExpiryDurationMs, GCNodeType, gcTestModeKey, gcDisableThrowOnTombstoneLoadOptionName, gcGenerationOptionName, GCFeatureMatrix, GCVersion, gcVersionUpgradeToV4Key, IGarbageCollectionRuntime, IGarbageCollector, IGarbageCollectorConfigs, IGarbageCollectorCreateParams, IGCMetadata, IGCResult, IGCRuntimeOptions, IMarkPhaseStats, ISweepPhaseStats, IGCStats, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, disableAttachmentBlobSweepKey, disableDatastoreSweepKey, UnreferencedState, throwOnTombstoneLoadOverrideKey, GarbageCollectionMessage, } from "./gcDefinitions";
|
|
7
|
-
export { cloneGCData, concatGarbageCollectionStates, trimLeadingAndTrailingSlashes, unpackChildNodesGCDetails, } from "./gcHelpers";
|
|
8
|
-
export { runGarbageCollection } from "./gcReferenceGraphAlgorithm";
|
|
9
|
-
export { IGarbageCollectionNodeData, IGarbageCollectionSnapshotData, IGarbageCollectionState, IGarbageCollectionSummaryDetailsLegacy, } from "./gcSummaryDefinitions";
|
|
10
|
-
export { gcStateBlobKey, GCSummaryStateTracker, IGCSummaryTrackingData, } from "./gcSummaryStateTracker";
|
|
11
|
-
export { GCTelemetryTracker, sendGCUnexpectedUsageEvent } from "./gcTelemetry";
|
|
12
|
-
export { UnreferencedStateTracker } from "./gcUnreferencedStateTracker";
|
|
13
|
-
//# sourceMappingURL=index.d.
|
|
5
|
+
export { GarbageCollector } from "./garbageCollection.mjs";
|
|
6
|
+
export { nextGCVersion, defaultInactiveTimeoutMs, defaultSweepGracePeriodMs, defaultSessionExpiryDurationMs, GCNodeType, gcTestModeKey, gcDisableThrowOnTombstoneLoadOptionName, gcGenerationOptionName, GCFeatureMatrix, GCVersion, gcVersionUpgradeToV4Key, IGarbageCollectionRuntime, IGarbageCollector, IGarbageCollectorConfigs, IGarbageCollectorCreateParams, IGCMetadata, IGCMetadata_Deprecated, IGCResult, IGCRuntimeOptions, IMarkPhaseStats, ISweepPhaseStats, IGCStats, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, disableAttachmentBlobSweepKey, disableDatastoreSweepKey, detectOutboundRoutesViaDDSKey, UnreferencedState, throwOnTombstoneLoadOverrideKey, GarbageCollectionMessage, ISweepMessage, } from "./gcDefinitions.mjs";
|
|
7
|
+
export { cloneGCData, concatGarbageCollectionStates, trimLeadingAndTrailingSlashes, unpackChildNodesGCDetails, } from "./gcHelpers.mjs";
|
|
8
|
+
export { runGarbageCollection } from "./gcReferenceGraphAlgorithm.mjs";
|
|
9
|
+
export { IGarbageCollectionNodeData, IGarbageCollectionSnapshotData, IGarbageCollectionState, IGarbageCollectionSummaryDetailsLegacy, } from "./gcSummaryDefinitions.mjs";
|
|
10
|
+
export { gcStateBlobKey, GCSummaryStateTracker, IGCSummaryTrackingData, } from "./gcSummaryStateTracker.mjs";
|
|
11
|
+
export { GCTelemetryTracker, sendGCUnexpectedUsageEvent } from "./gcTelemetry.mjs";
|
|
12
|
+
export { UnreferencedStateTracker } from "./gcUnreferencedStateTracker.mjs";
|
|
13
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,gBAAgB,EAAE;OACpB,EACN,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,UAAU,EACV,aAAa,EACb,uCAAuC,EACvC,sBAAsB,EACtB,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,6BAA6B,EAC7B,WAAW,EACX,sBAAsB,EACtB,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,iBAAiB,EACjB,+BAA+B,EAC/B,wBAAwB,EACxB,aAAa,GACb;OACM,EACN,WAAW,EACX,6BAA6B,EAC7B,6BAA6B,EAC7B,yBAAyB,GACzB;OACM,EAAE,oBAAoB,EAAE;OACxB,EACN,0BAA0B,EAC1B,8BAA8B,EAC9B,uBAAuB,EACvB,sCAAsC,GACtC;OACM,EACN,cAAc,EACd,qBAAqB,EACrB,sBAAsB,GACtB;OACM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE;OAClD,EAAE,wBAAwB,EAAE"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { GarbageCollector } from "./garbageCollection";
|
|
6
|
-
export { nextGCVersion, defaultInactiveTimeoutMs, defaultSweepGracePeriodMs, defaultSessionExpiryDurationMs, GCNodeType, gcTestModeKey, gcDisableThrowOnTombstoneLoadOptionName, gcGenerationOptionName, gcVersionUpgradeToV4Key, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, disableAttachmentBlobSweepKey, disableDatastoreSweepKey, UnreferencedState, throwOnTombstoneLoadOverrideKey, } from "./gcDefinitions";
|
|
7
|
-
export { cloneGCData, concatGarbageCollectionStates, trimLeadingAndTrailingSlashes, unpackChildNodesGCDetails, } from "./gcHelpers";
|
|
8
|
-
export { runGarbageCollection } from "./gcReferenceGraphAlgorithm";
|
|
9
|
-
export { gcStateBlobKey, GCSummaryStateTracker, } from "./gcSummaryStateTracker";
|
|
10
|
-
export { GCTelemetryTracker, sendGCUnexpectedUsageEvent } from "./gcTelemetry";
|
|
11
|
-
export { UnreferencedStateTracker } from "./gcUnreferencedStateTracker";
|
|
12
|
-
//# sourceMappingURL=index.
|
|
5
|
+
export { GarbageCollector } from "./garbageCollection.mjs";
|
|
6
|
+
export { nextGCVersion, defaultInactiveTimeoutMs, defaultSweepGracePeriodMs, defaultSessionExpiryDurationMs, GCNodeType, gcTestModeKey, gcDisableThrowOnTombstoneLoadOptionName, gcGenerationOptionName, gcVersionUpgradeToV4Key, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, disableAttachmentBlobSweepKey, disableDatastoreSweepKey, detectOutboundRoutesViaDDSKey, UnreferencedState, throwOnTombstoneLoadOverrideKey, } from "./gcDefinitions.mjs";
|
|
7
|
+
export { cloneGCData, concatGarbageCollectionStates, trimLeadingAndTrailingSlashes, unpackChildNodesGCDetails, } from "./gcHelpers.mjs";
|
|
8
|
+
export { runGarbageCollection } from "./gcReferenceGraphAlgorithm.mjs";
|
|
9
|
+
export { gcStateBlobKey, GCSummaryStateTracker, } from "./gcSummaryStateTracker.mjs";
|
|
10
|
+
export { GCTelemetryTracker, sendGCUnexpectedUsageEvent } from "./gcTelemetry.mjs";
|
|
11
|
+
export { UnreferencedStateTracker } from "./gcUnreferencedStateTracker.mjs";
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,gBAAgB,EAAE;OACpB,EACN,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,UAAU,EACV,aAAa,EACb,uCAAuC,EACvC,sBAAsB,EAGtB,uBAAuB,EAYvB,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,iBAAiB,EACjB,+BAA+B,GAG/B;OACM,EACN,WAAW,EACX,6BAA6B,EAC7B,6BAA6B,EAC7B,yBAAyB,GACzB;OACM,EAAE,oBAAoB,EAAE;OAOxB,EACN,cAAc,EACd,qBAAqB,GAErB;OACM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE;OAClD,EAAE,wBAAwB,EAAE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { GarbageCollector } from \"./garbageCollection\";\nexport {\n\tnextGCVersion,\n\tdefaultInactiveTimeoutMs,\n\tdefaultSweepGracePeriodMs,\n\tdefaultSessionExpiryDurationMs,\n\tGCNodeType,\n\tgcTestModeKey,\n\tgcDisableThrowOnTombstoneLoadOptionName,\n\tgcGenerationOptionName,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tgcVersionUpgradeToV4Key,\n\tIGarbageCollectionRuntime,\n\tIGarbageCollector,\n\tIGarbageCollectorConfigs,\n\tIGarbageCollectorCreateParams,\n\tIGCMetadata,\n\tIGCMetadata_Deprecated,\n\tIGCResult,\n\tIGCRuntimeOptions,\n\tIMarkPhaseStats,\n\tISweepPhaseStats,\n\tIGCStats,\n\toneDayMs,\n\trunGCKey,\n\trunSessionExpiryKey,\n\trunSweepKey,\n\tstableGCVersion,\n\tdisableAttachmentBlobSweepKey,\n\tdisableDatastoreSweepKey,\n\tdetectOutboundRoutesViaDDSKey,\n\tUnreferencedState,\n\tthrowOnTombstoneLoadOverrideKey,\n\tGarbageCollectionMessage,\n\tISweepMessage,\n} from \"./gcDefinitions\";\nexport {\n\tcloneGCData,\n\tconcatGarbageCollectionStates,\n\ttrimLeadingAndTrailingSlashes,\n\tunpackChildNodesGCDetails,\n} from \"./gcHelpers\";\nexport { runGarbageCollection } from \"./gcReferenceGraphAlgorithm\";\nexport {\n\tIGarbageCollectionNodeData,\n\tIGarbageCollectionSnapshotData,\n\tIGarbageCollectionState,\n\tIGarbageCollectionSummaryDetailsLegacy,\n} from \"./gcSummaryDefinitions\";\nexport {\n\tgcStateBlobKey,\n\tGCSummaryStateTracker,\n\tIGCSummaryTrackingData,\n} from \"./gcSummaryStateTracker\";\nexport { GCTelemetryTracker, sendGCUnexpectedUsageEvent } from \"./gcTelemetry\";\nexport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker\";\n"]}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { ISummaryRuntimeOptions, ISummaryBaseConfiguration, ISummaryConfigurationHeuristics, ISummaryConfigurationDisableSummarizer, ISummaryConfigurationDisableHeuristics, IContainerRuntimeOptions, isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, AllowTombstoneRequestHeaderKey, AllowInactiveRequestHeaderKey, TombstoneResponseHeaderKey, InactiveResponseHeaderKey, ISummaryConfiguration, DefaultSummaryConfiguration, ICompressionRuntimeOptions, CompressionAlgorithms, } from "./containerRuntime";
|
|
6
|
-
export { ContainerMessageType, ContainerRuntimeMessage, IContainerRuntimeMessageCompatDetails, CompatModeBehavior, RecentlyAddedContainerRuntimeMessageDetails, } from "./messageTypes";
|
|
7
|
-
export { IBlobManagerLoadInfo } from "./blobManager";
|
|
8
|
-
export { FluidDataStoreRegistry } from "./dataStoreRegistry";
|
|
9
|
-
export { GCNodeType, IGCMetadata, GCFeatureMatrix, GCVersion, IGCRuntimeOptions, IMarkPhaseStats, ISweepPhaseStats, IGCStats, } from "./gc";
|
|
10
|
-
export { IAckedSummary, ISummarizer, ISummarizeResults, ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer, SummarizerStopReason, SummaryCollection, EnqueueSummarizeResult, IAckSummaryResult, IBaseSummarizeResult, IBroadcastSummaryResult, ICancellationToken, IConnectableRuntime, IContainerRuntimeMetadata, ICreateContainerMetadata, IEnqueueSummarizeOptions, IGenerateSummaryTreeResult, IGeneratedSummaryStats, INackSummaryResult, IOnDemandSummarizeOptions, IRefreshSummaryAckOptions, ISubmitSummaryOpResult, ISubmitSummaryOptions, ISerializedElection, ISummarizeOptions, ISummarizerEvents, ISummarizerInternalsProvider, ISummarizerRuntime, ISummarizingWarning, IUploadSummaryResult, SubmitSummaryResult, SummarizeResultPart, IClientSummaryWatcher, ISummary, ISummaryCollectionOpEvents, ISummaryAckMessage, ISummaryMetadataMessage, ISummaryNackMessage, ISummaryOpMessage, OpActionEventListener, OpActionEventName, ICancellableSummarizerController, SubmitSummaryFailureData, SummaryStage, IRetriableFailureResult, ISummarizeEventProps, } from "./summary";
|
|
11
|
-
export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle";
|
|
5
|
+
export { ISummaryRuntimeOptions, ISummaryBaseConfiguration, ISummaryConfigurationHeuristics, ISummaryConfigurationDisableSummarizer, ISummaryConfigurationDisableHeuristics, IContainerRuntimeOptions, isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, AllowTombstoneRequestHeaderKey, AllowInactiveRequestHeaderKey, TombstoneResponseHeaderKey, InactiveResponseHeaderKey, ISummaryConfiguration, DefaultSummaryConfiguration, ICompressionRuntimeOptions, CompressionAlgorithms, } from "./containerRuntime.mjs";
|
|
6
|
+
export { ContainerMessageType, ContainerRuntimeMessage, IContainerRuntimeMessageCompatDetails, CompatModeBehavior, RecentlyAddedContainerRuntimeMessageDetails, } from "./messageTypes.mjs";
|
|
7
|
+
export { IBlobManagerLoadInfo } from "./blobManager.mjs";
|
|
8
|
+
export { FluidDataStoreRegistry } from "./dataStoreRegistry.mjs";
|
|
9
|
+
export { GCNodeType, IGCMetadata, GCFeatureMatrix, GCVersion, IGCRuntimeOptions, IMarkPhaseStats, ISweepPhaseStats, IGCStats, } from "./gc/index.mjs";
|
|
10
|
+
export { IAckedSummary, ISummarizer, ISummarizeResults, ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer, SummarizerStopReason, SummaryCollection, EnqueueSummarizeResult, IAckSummaryResult, IBaseSummarizeResult, IBroadcastSummaryResult, ICancellationToken, IConnectableRuntime, IContainerRuntimeMetadata, ICreateContainerMetadata, IEnqueueSummarizeOptions, IGenerateSummaryTreeResult, IGeneratedSummaryStats, INackSummaryResult, IOnDemandSummarizeOptions, IRefreshSummaryAckOptions, ISubmitSummaryOpResult, ISubmitSummaryOptions, ISerializedElection, ISummarizeOptions, ISummarizerEvents, ISummarizerInternalsProvider, ISummarizerRuntime, ISummarizingWarning, IUploadSummaryResult, SubmitSummaryResult, SummarizeResultPart, IClientSummaryWatcher, ISummary, ISummaryCollectionOpEvents, ISummaryAckMessage, ISummaryMetadataMessage, ISummaryNackMessage, ISummaryOpMessage, OpActionEventListener, OpActionEventName, ICancellableSummarizerController, SubmitSummaryFailureData, SummaryStage, IRetriableFailureResult, ISummarizeEventProps, } from "./summary/index.mjs";
|
|
11
|
+
export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle/index.mjs";
|
|
12
12
|
export {
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated Import from `@fluidframework/id-compressor` instead.
|
|
@@ -22,4 +22,4 @@ generateStableId,
|
|
|
22
22
|
* @deprecated Import from `@fluidframework/id-compressor` instead.
|
|
23
23
|
*/
|
|
24
24
|
isStableId, } from "@fluidframework/id-compressor";
|
|
25
|
-
//# sourceMappingURL=index.d.
|
|
25
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,8BAA8B,EAC9B,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,GACrB;OACM,EACN,oBAAoB,EACpB,uBAAuB,EACvB,qCAAqC,EACrC,kBAAkB,EAClB,2CAA2C,GAC3C;OACM,EAAE,oBAAoB,EAAE;OACxB,EAAE,sBAAsB,EAAE;OAC1B,EACN,UAAU,EACV,WAAW,EACX,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACR;OACM,EACN,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC1B,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACR,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gCAAgC,EAChC,wBAAwB,EACxB,YAAY,EACZ,uBAAuB,EACvB,oBAAoB,GACpB;OACM,EAAE,UAAU,EAAE,oBAAoB,EAAE;OAIpC;AACN;;GAEG;AACH,gBAAgB;AAChB;;GAEG;AACH,gBAAgB;AAChB;;GAEG;AACH,UAAU,GACV,MAAM,+BAA+B"}
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, AllowTombstoneRequestHeaderKey, AllowInactiveRequestHeaderKey, TombstoneResponseHeaderKey, InactiveResponseHeaderKey, DefaultSummaryConfiguration, CompressionAlgorithms, } from "./containerRuntime";
|
|
6
|
-
export { ContainerMessageType, } from "./messageTypes";
|
|
7
|
-
export { FluidDataStoreRegistry } from "./dataStoreRegistry";
|
|
8
|
-
export { GCNodeType, } from "./gc";
|
|
9
|
-
export { neverCancelledSummaryToken, Summarizer, SummaryCollection, } from "./summary";
|
|
10
|
-
export { unpackRuntimeMessage } from "./opLifecycle";
|
|
11
|
-
// Re-exports for backwards compatibility.
|
|
12
|
-
// Will be removed in the future.
|
|
5
|
+
export { isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, AllowTombstoneRequestHeaderKey, AllowInactiveRequestHeaderKey, TombstoneResponseHeaderKey, InactiveResponseHeaderKey, DefaultSummaryConfiguration, CompressionAlgorithms, } from "./containerRuntime.mjs";
|
|
6
|
+
export { ContainerMessageType, } from "./messageTypes.mjs";
|
|
7
|
+
export { FluidDataStoreRegistry } from "./dataStoreRegistry.mjs";
|
|
8
|
+
export { GCNodeType, } from "./gc/index.mjs";
|
|
9
|
+
export { neverCancelledSummaryToken, Summarizer, SummaryCollection, } from "./summary/index.mjs";
|
|
10
|
+
export { unpackRuntimeMessage } from "./opLifecycle/index.mjs";
|
|
13
11
|
export {
|
|
14
12
|
/**
|
|
15
13
|
* @deprecated Import from `@fluidframework/id-compressor` instead.
|
|
@@ -23,4 +21,4 @@ generateStableId,
|
|
|
23
21
|
* @deprecated Import from `@fluidframework/id-compressor` instead.
|
|
24
22
|
*/
|
|
25
23
|
isStableId, } from "@fluidframework/id-compressor";
|
|
26
|
-
//# sourceMappingURL=index.
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAON,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,8BAA8B,EAC9B,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EAEzB,2BAA2B,EAE3B,qBAAqB,GACrB;OACM,EACN,oBAAoB,GAKpB;OAEM,EAAE,sBAAsB,EAAE;OAC1B,EACN,UAAU,GAQV;OACM,EAKN,0BAA0B,EAC1B,UAAU,EAEV,iBAAiB,GAwCjB;OACM,EAAc,oBAAoB,EAAE;OAIpC;AACN;;GAEG;AACH,gBAAgB;AAChB;;GAEG;AACH,gBAAgB;AAChB;;GAEG;AACH,UAAU,GACV,MAAM,+BAA+B","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\tisRuntimeMessage,\n\tRuntimeMessage,\n\tagentSchedulerId,\n\tContainerRuntime,\n\tRuntimeHeaders,\n\tAllowTombstoneRequestHeaderKey,\n\tAllowInactiveRequestHeaderKey,\n\tTombstoneResponseHeaderKey,\n\tInactiveResponseHeaderKey,\n\tISummaryConfiguration,\n\tDefaultSummaryConfiguration,\n\tICompressionRuntimeOptions,\n\tCompressionAlgorithms,\n} from \"./containerRuntime\";\nexport {\n\tContainerMessageType,\n\tContainerRuntimeMessage,\n\tIContainerRuntimeMessageCompatDetails,\n\tCompatModeBehavior,\n\tRecentlyAddedContainerRuntimeMessageDetails,\n} from \"./messageTypes\";\nexport { IBlobManagerLoadInfo } from \"./blobManager\";\nexport { FluidDataStoreRegistry } from \"./dataStoreRegistry\";\nexport {\n\tGCNodeType,\n\tIGCMetadata,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tIGCRuntimeOptions,\n\tIMarkPhaseStats,\n\tISweepPhaseStats,\n\tIGCStats,\n} from \"./gc\";\nexport {\n\tIAckedSummary,\n\tISummarizer,\n\tISummarizeResults,\n\tISummaryCancellationToken,\n\tneverCancelledSummaryToken,\n\tSummarizer,\n\tSummarizerStopReason,\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\tISummarizerEvents,\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\tIRetriableFailureResult,\n\tISummarizeEventProps,\n} from \"./summary\";\nexport { IChunkedOp, unpackRuntimeMessage } from \"./opLifecycle\";\n\n// Re-exports for backwards compatibility.\n// Will be removed in the future.\nexport {\n\t/**\n\t * @deprecated Import from `@fluidframework/id-compressor` instead.\n\t */\n\tassertIsStableId,\n\t/**\n\t * @deprecated Import from `@fluidframework/id-compressor` instead.\n\t */\n\tgenerateStableId,\n\t/**\n\t * @deprecated Import from `@fluidframework/id-compressor` instead.\n\t */\n\tisStableId,\n} from \"@fluidframework/id-compressor\";\n"]}
|