@fluidframework/container-runtime 2.0.0-dev-rc.5.0.0.268409 → 2.0.0-dev-rc.5.0.0.270987
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-report/container-runtime.alpha.api.md +3 -8
- package/api-report/container-runtime.beta.api.md +2 -2
- package/api-report/container-runtime.public.api.md +2 -2
- package/biome.jsonc +4 -0
- package/container-runtime.test-files.tar +0 -0
- package/dist/batchTracker.js +5 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +1 -18
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +39 -48
- package/dist/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +8 -9
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +71 -51
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +1 -2
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +32 -14
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.js +4 -0
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +7 -18
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +145 -43
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.js +9 -1
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +23 -37
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +159 -133
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.js +29 -28
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.js +1 -0
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +4 -4
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js +33 -28
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +1 -2
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +13 -9
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/error.js +2 -1
- package/dist/error.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +37 -17
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +0 -4
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +1 -3
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +19 -14
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.js +12 -5
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.js +12 -1
- package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/dist/gc/index.d.ts +1 -1
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +1 -2
- package/dist/gc/index.js.map +1 -1
- package/dist/messageTypes.d.ts +1 -1
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/batchManager.js +5 -3
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/opCompressor.js +1 -0
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +6 -4
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +3 -1
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +1 -1
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +6 -0
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.js +15 -10
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +3 -0
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.d.ts +1 -1
- package/dist/opProperties.d.ts.map +1 -1
- package/dist/opProperties.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +34 -18
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts +1 -2
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +15 -4
- package/dist/scheduleManager.js.map +1 -1
- package/dist/storageServiceWithAttachBlobs.js +1 -0
- package/dist/storageServiceWithAttachBlobs.js.map +1 -1
- package/dist/summary/documentSchema.js +17 -1
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/orderedClientElection.js +19 -11
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +4 -2
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +1 -1
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +56 -38
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.js +17 -8
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.js +18 -7
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.js +30 -25
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +1 -2
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +12 -3
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +2 -0
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +20 -6
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +2 -2
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +1 -2
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +23 -11
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +1 -2
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.js +12 -5
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.js +58 -48
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/throttler.js +4 -1
- package/dist/throttler.js.map +1 -1
- package/lib/batchTracker.js +5 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +1 -18
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +39 -48
- package/lib/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +8 -9
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +72 -53
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +1 -2
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +33 -15
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.js +4 -0
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +7 -18
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +145 -43
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.js +9 -1
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +23 -37
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +162 -136
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.js +29 -28
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.js +1 -0
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +4 -4
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js +33 -28
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +1 -2
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +13 -9
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/error.js +2 -1
- package/lib/error.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +37 -17
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +0 -4
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +0 -2
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +19 -14
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.js +12 -5
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.js +12 -1
- package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
- package/lib/gc/index.d.ts +1 -1
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -1
- package/lib/gc/index.js.map +1 -1
- package/lib/messageTypes.d.ts +1 -1
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/batchManager.js +5 -3
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/opCompressor.js +1 -0
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +6 -4
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +3 -1
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +1 -1
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +6 -0
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.js +15 -10
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +4 -1
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.d.ts +1 -1
- package/lib/opProperties.d.ts.map +1 -1
- package/lib/opProperties.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +34 -18
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts +1 -2
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +15 -4
- package/lib/scheduleManager.js.map +1 -1
- package/lib/storageServiceWithAttachBlobs.js +1 -0
- package/lib/storageServiceWithAttachBlobs.js.map +1 -1
- package/lib/summary/documentSchema.js +17 -1
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/orderedClientElection.js +19 -11
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +4 -2
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +1 -1
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +57 -39
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.js +17 -8
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.js +18 -7
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.js +30 -25
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +1 -2
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +12 -3
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +2 -0
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +20 -6
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +2 -2
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +1 -2
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +23 -11
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +1 -2
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.js +12 -5
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.js +58 -48
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/throttler.js +4 -1
- package/lib/throttler.js.map +1 -1
- package/package.json +23 -20
- package/src/batchTracker.ts +1 -1
- package/src/blobManager.ts +1 -39
- package/src/channelCollection.ts +63 -76
- package/src/connectionTelemetry.ts +5 -2
- package/src/containerRuntime.ts +9 -32
- package/src/dataStoreContext.ts +38 -79
- package/src/deltaManagerProxies.ts +3 -5
- package/src/deltaScheduler.ts +4 -2
- package/src/gc/garbageCollection.ts +0 -2
- package/src/gc/gcDefinitions.ts +0 -4
- package/src/gc/index.ts +0 -1
- package/src/messageTypes.ts +1 -1
- package/src/opLifecycle/opDecompressor.ts +1 -1
- package/src/opLifecycle/opGroupingManager.ts +1 -1
- package/src/opLifecycle/opSplitter.ts +1 -1
- package/src/opLifecycle/remoteMessageProcessor.ts +4 -2
- package/src/opProperties.ts +4 -2
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +16 -5
- package/src/scheduleManager.ts +4 -2
- package/src/summary/runningSummarizer.ts +5 -2
- package/src/summary/summarizerNode/summarizerNode.ts +5 -2
- package/src/summary/summarizerTypes.ts +5 -2
- package/src/summary/summaryCollection.ts +1 -1
- package/src/summary/summaryFormat.ts +2 -1
- package/tsconfig.json +2 -0
package/src/dataStoreContext.ts
CHANGED
|
@@ -16,17 +16,14 @@ import {
|
|
|
16
16
|
} from "@fluidframework/core-interfaces";
|
|
17
17
|
import { type IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
18
18
|
import { assert, LazyPromise, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
19
|
-
import {
|
|
20
|
-
IClientDetails,
|
|
21
|
-
IQuorumClients,
|
|
22
|
-
ISequencedDocumentMessage,
|
|
23
|
-
} from "@fluidframework/driver-definitions";
|
|
19
|
+
import { IClientDetails, IQuorumClients } from "@fluidframework/driver-definitions";
|
|
24
20
|
import {
|
|
25
21
|
IDocumentStorageService,
|
|
26
22
|
type ISnapshot,
|
|
27
23
|
IDocumentMessage,
|
|
28
24
|
ISnapshotTree,
|
|
29
25
|
ITreeEntry,
|
|
26
|
+
ISequencedDocumentMessage,
|
|
30
27
|
} from "@fluidframework/driver-definitions/internal";
|
|
31
28
|
import {
|
|
32
29
|
BlobTreeEntry,
|
|
@@ -55,13 +52,11 @@ import {
|
|
|
55
52
|
ISummarizerNodeWithGC,
|
|
56
53
|
SummarizeInternalFn,
|
|
57
54
|
channelsTreeName,
|
|
58
|
-
gcDataBlobKey,
|
|
59
55
|
IInboundSignalMessage,
|
|
60
56
|
} from "@fluidframework/runtime-definitions/internal";
|
|
61
57
|
import {
|
|
62
58
|
addBlobToSummary,
|
|
63
59
|
isSnapshotFetchRequiredForLoadingGroupId,
|
|
64
|
-
toFluidHandleInternal,
|
|
65
60
|
} from "@fluidframework/runtime-utils/internal";
|
|
66
61
|
import {
|
|
67
62
|
DataCorruptionError,
|
|
@@ -75,7 +70,7 @@ import {
|
|
|
75
70
|
tagCodeArtifacts,
|
|
76
71
|
} from "@fluidframework/telemetry-utils/internal";
|
|
77
72
|
|
|
78
|
-
import {
|
|
73
|
+
import { sendGCUnexpectedUsageEvent } from "./gc/index.js";
|
|
79
74
|
import {
|
|
80
75
|
// eslint-disable-next-line import/no-deprecated
|
|
81
76
|
ReadFluidDataStoreAttributes,
|
|
@@ -119,13 +114,9 @@ export interface ISnapshotDetails {
|
|
|
119
114
|
* @internal
|
|
120
115
|
*/
|
|
121
116
|
export interface IFluidDataStoreContextInternal extends IFluidDataStoreContext {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
): {
|
|
126
|
-
attachSummary: ISummaryTreeWithStats;
|
|
127
|
-
type: string;
|
|
128
|
-
};
|
|
117
|
+
getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
118
|
+
|
|
119
|
+
getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
|
|
129
120
|
|
|
130
121
|
getInitialSnapshotDetails(): Promise<ISnapshotDetails>;
|
|
131
122
|
|
|
@@ -723,33 +714,6 @@ export abstract class FluidDataStoreContext
|
|
|
723
714
|
}
|
|
724
715
|
|
|
725
716
|
/**
|
|
726
|
-
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
727
|
-
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
728
|
-
*
|
|
729
|
-
* Similar capability is exposed with from/to string paths instead of handles via @see addedGCOutboundRoute
|
|
730
|
-
*
|
|
731
|
-
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
732
|
-
* all references added in the system.
|
|
733
|
-
* @param srcHandle - The handle of the node that added the reference.
|
|
734
|
-
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
735
|
-
*/
|
|
736
|
-
public addedGCOutboundReference(
|
|
737
|
-
srcHandle: IFluidHandleInternal,
|
|
738
|
-
outboundHandle: IFluidHandleInternal,
|
|
739
|
-
): void {
|
|
740
|
-
// By default, skip this call since the ContainerRuntime will detect the outbound route directly.
|
|
741
|
-
if (this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) === true) {
|
|
742
|
-
// Note: The ContainerRuntime code will check this same setting to avoid double counting.
|
|
743
|
-
this.parentContext.addedGCOutboundReference?.(
|
|
744
|
-
toFluidHandleInternal(srcHandle),
|
|
745
|
-
toFluidHandleInternal(outboundHandle),
|
|
746
|
-
);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* (Same as @see addedGCOutboundReference, but with string paths instead of handles)
|
|
752
|
-
*
|
|
753
717
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
754
718
|
* all references added in the system.
|
|
755
719
|
*
|
|
@@ -757,10 +721,7 @@ export abstract class FluidDataStoreContext
|
|
|
757
721
|
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
758
722
|
*/
|
|
759
723
|
public addedGCOutboundRoute(fromPath: string, toPath: string) {
|
|
760
|
-
this.parentContext.
|
|
761
|
-
{ absolutePath: fromPath },
|
|
762
|
-
{ absolutePath: toPath },
|
|
763
|
-
);
|
|
724
|
+
this.parentContext.addedGCOutboundRoute(fromPath, toPath);
|
|
764
725
|
}
|
|
765
726
|
|
|
766
727
|
/**
|
|
@@ -927,18 +888,16 @@ export abstract class FluidDataStoreContext
|
|
|
927
888
|
}
|
|
928
889
|
|
|
929
890
|
/**
|
|
930
|
-
* Get the
|
|
891
|
+
* Get the summary required when attaching this context's DataStore.
|
|
931
892
|
* Used for both Container Attach and DataStore Attach.
|
|
932
|
-
*
|
|
933
|
-
* @returns the summary, type, and GC Data for this context's DataStore.
|
|
934
893
|
*/
|
|
935
|
-
public abstract
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
894
|
+
public abstract getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Get the GC Data for the initial state being attached so remote clients can learn of this DataStore's
|
|
898
|
+
* outbound routes.
|
|
899
|
+
*/
|
|
900
|
+
public abstract getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
|
|
942
901
|
|
|
943
902
|
public abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;
|
|
944
903
|
|
|
@@ -1198,12 +1157,16 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
1198
1157
|
}
|
|
1199
1158
|
|
|
1200
1159
|
/**
|
|
1201
|
-
* @see FluidDataStoreContext.
|
|
1160
|
+
* @see FluidDataStoreContext.getAttachSummary
|
|
1202
1161
|
*/
|
|
1203
|
-
public
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1162
|
+
public getAttachSummary(): ISummaryTreeWithStats {
|
|
1163
|
+
throw new Error("Cannot attach remote store");
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* @see FluidDataStoreContext.getAttachGCData
|
|
1168
|
+
*/
|
|
1169
|
+
public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
|
|
1207
1170
|
throw new Error("Cannot attach remote store");
|
|
1208
1171
|
}
|
|
1209
1172
|
}
|
|
@@ -1279,15 +1242,9 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1279
1242
|
}
|
|
1280
1243
|
|
|
1281
1244
|
/**
|
|
1282
|
-
* @see FluidDataStoreContext.
|
|
1245
|
+
* @see FluidDataStoreContext.getAttachSummary
|
|
1283
1246
|
*/
|
|
1284
|
-
public
|
|
1285
|
-
includeGCData: boolean,
|
|
1286
|
-
telemetryContext?: ITelemetryContext,
|
|
1287
|
-
): {
|
|
1288
|
-
attachSummary: ISummaryTreeWithStats;
|
|
1289
|
-
type: string;
|
|
1290
|
-
} {
|
|
1247
|
+
public getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {
|
|
1291
1248
|
assert(
|
|
1292
1249
|
this.channel !== undefined,
|
|
1293
1250
|
0x14f /* "There should be a channel when generating attach message" */,
|
|
@@ -1305,22 +1262,24 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
1305
1262
|
// Add data store's attributes to the summary.
|
|
1306
1263
|
const attributes = createAttributes(this.pkg, this.isInMemoryRoot());
|
|
1307
1264
|
addBlobToSummary(attachSummary, dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
1308
|
-
if (includeGCData) {
|
|
1309
|
-
const gcData = this.channel.getAttachGCData?.(telemetryContext);
|
|
1310
|
-
if (gcData !== undefined) {
|
|
1311
|
-
addBlobToSummary(attachSummary, gcDataBlobKey, JSON.stringify(gcData));
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
1265
|
|
|
1315
1266
|
// Add loadingGroupId to the summary
|
|
1316
1267
|
if (this.loadingGroupId !== undefined) {
|
|
1317
1268
|
attachSummary.summary.groupId = this.loadingGroupId;
|
|
1318
1269
|
}
|
|
1319
1270
|
|
|
1320
|
-
return
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1271
|
+
return attachSummary;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* @see FluidDataStoreContext.getAttachGCData
|
|
1276
|
+
*/
|
|
1277
|
+
public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
|
|
1278
|
+
assert(
|
|
1279
|
+
this.channel !== undefined,
|
|
1280
|
+
"There should be a channel when generating attach GC data",
|
|
1281
|
+
);
|
|
1282
|
+
return this.channel.getAttachGCData(telemetryContext);
|
|
1324
1283
|
}
|
|
1325
1284
|
|
|
1326
1285
|
private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {
|
|
@@ -13,15 +13,13 @@ import type {
|
|
|
13
13
|
ReadOnlyInfo,
|
|
14
14
|
} from "@fluidframework/container-definitions/internal";
|
|
15
15
|
import type { IErrorBase } from "@fluidframework/core-interfaces";
|
|
16
|
-
import {
|
|
17
|
-
IClientDetails,
|
|
18
|
-
ISequencedDocumentMessage,
|
|
19
|
-
ISignalMessage,
|
|
20
|
-
} from "@fluidframework/driver-definitions";
|
|
16
|
+
import { IClientDetails } from "@fluidframework/driver-definitions";
|
|
21
17
|
import type { IAnyDriverError } from "@fluidframework/driver-definitions/internal";
|
|
22
18
|
import {
|
|
23
19
|
IClientConfiguration,
|
|
24
20
|
IDocumentMessage,
|
|
21
|
+
ISequencedDocumentMessage,
|
|
22
|
+
ISignalMessage,
|
|
25
23
|
} from "@fluidframework/driver-definitions/internal";
|
|
26
24
|
|
|
27
25
|
import type { PendingStateManager } from "./pendingStateManager.js";
|
package/src/deltaScheduler.ts
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import { performance } from "@fluid-internal/client-utils";
|
|
7
7
|
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import {
|
|
9
|
+
IDocumentMessage,
|
|
10
|
+
ISequencedDocumentMessage,
|
|
11
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
10
12
|
import { ITelemetryLoggerExt, formatTick } from "@fluidframework/telemetry-utils/internal";
|
|
11
13
|
|
|
12
14
|
/**
|
|
@@ -517,8 +517,6 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
517
517
|
/** Pre-GC steps */
|
|
518
518
|
// Ensure that state has been initialized from the base snapshot data.
|
|
519
519
|
await this.initializeGCStateFromBaseSnapshotP;
|
|
520
|
-
// Let the runtime update its pending state before GC runs.
|
|
521
|
-
await this.runtime.updateStateBeforeGC();
|
|
522
520
|
|
|
523
521
|
/** GC step */
|
|
524
522
|
const gcStats = await this.runGC(fullGC, currentReferenceTimestampMs, logger);
|
package/src/gc/gcDefinitions.ts
CHANGED
|
@@ -77,8 +77,6 @@ export const throwOnTombstoneUsageKey = "Fluid.GarbageCollection.ThrowOnTombston
|
|
|
77
77
|
export const gcVersionUpgradeToV4Key = "Fluid.GarbageCollection.GCVersionUpgradeToV4";
|
|
78
78
|
/** Config key to disable GC sweep for datastores. They'll merely be Tombstoned. */
|
|
79
79
|
export const disableDatastoreSweepKey = "Fluid.GarbageCollection.DisableDataStoreSweep";
|
|
80
|
-
/** Config key to revert new paradigm of detecting outbound routes in ContainerRuntime layer (use true) */
|
|
81
|
-
export const detectOutboundRoutesViaDDSKey = "Fluid.GarbageCollection.DetectOutboundRoutesViaDDS";
|
|
82
80
|
/** Config key to disable auto-recovery mechanism that protects Tombstones that are loaded from being swept (use true) */
|
|
83
81
|
export const disableAutoRecoveryKey = "Fluid.GarbageCollection.DisableAutoRecovery";
|
|
84
82
|
|
|
@@ -300,8 +298,6 @@ export type GarbageCollectionMessage = ISweepMessage | ITombstoneLoadedMessage;
|
|
|
300
298
|
* Defines the APIs for the runtime object to be passed to the garbage collector.
|
|
301
299
|
*/
|
|
302
300
|
export interface IGarbageCollectionRuntime {
|
|
303
|
-
/** Before GC runs, called to notify the runtime to update any pending GC state. */
|
|
304
|
-
updateStateBeforeGC(): Promise<void>;
|
|
305
301
|
/** Returns the garbage collection data of the runtime. */
|
|
306
302
|
getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
|
|
307
303
|
/** After GC has run, called to notify the runtime of routes that are used in it. */
|
package/src/gc/index.ts
CHANGED
package/src/messageTypes.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
6
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
import type { IdCreationRange } from "@fluidframework/id-compressor/internal";
|
|
8
8
|
import {
|
|
9
9
|
IAttachMessage,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { IsoBuffer, Uint8ArrayToString } from "@fluid-internal/client-utils";
|
|
7
7
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
9
|
-
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
9
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
10
10
|
import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
|
|
11
11
|
import { decompress } from "lz4js";
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
|
-
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
8
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
9
9
|
import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
|
|
10
10
|
|
|
11
11
|
import { IBatch, type BatchMessage } from "./definitions.js";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { IBatchMessage } from "@fluidframework/container-definitions/internal";
|
|
7
7
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
9
|
-
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
9
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
10
10
|
import {
|
|
11
11
|
DataCorruptionError,
|
|
12
12
|
createChildLogger,
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
MessageType,
|
|
8
|
+
ISequencedDocumentMessage,
|
|
9
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
8
10
|
|
|
9
11
|
import {
|
|
10
12
|
ContainerMessageType,
|
package/src/opProperties.ts
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
ISequencedDocumentSystemMessage,
|
|
8
|
+
ISequencedDocumentMessage,
|
|
9
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
8
10
|
|
|
9
11
|
export const opSize = (op: ISequencedDocumentMessage): number => {
|
|
10
12
|
// Some messages may already have string contents,
|
package/src/packageVersion.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
7
7
|
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert, Lazy } from "@fluidframework/core-utils/internal";
|
|
9
|
-
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
9
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
10
10
|
import {
|
|
11
11
|
ITelemetryLoggerExt,
|
|
12
12
|
DataProcessingError,
|
|
@@ -75,6 +75,13 @@ function buildPendingMessageContent(
|
|
|
75
75
|
return JSON.stringify({ type, contents, compatDetails });
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
function withoutLocalOpMetadata(message: IPendingMessage): IPendingMessage {
|
|
79
|
+
return {
|
|
80
|
+
...message,
|
|
81
|
+
localOpMetadata: undefined,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
78
85
|
/**
|
|
79
86
|
* PendingStateManager is responsible for maintaining the messages that have not been sent or have not yet been
|
|
80
87
|
* acknowledged by the server. It also maintains the batch information for both automatically and manually flushed
|
|
@@ -138,6 +145,9 @@ export class PendingStateManager implements IDisposable {
|
|
|
138
145
|
this.initialMessages.isEmpty(),
|
|
139
146
|
0x2e9 /* "Must call getLocalState() after applying initial states" */,
|
|
140
147
|
);
|
|
148
|
+
// Using snapshot sequence number to filter ops older than our latest snapshot.
|
|
149
|
+
// Such ops should not be declared in pending/stashed state. Snapshot seq num will not
|
|
150
|
+
// be available when the container is not attached. Therefore, no filtering is needed.
|
|
141
151
|
const newSavedOps = [...this.savedOps].filter((message) => {
|
|
142
152
|
assert(
|
|
143
153
|
message.sequenceNumber !== undefined,
|
|
@@ -154,9 +164,10 @@ export class PendingStateManager implements IDisposable {
|
|
|
154
164
|
}
|
|
155
165
|
});
|
|
156
166
|
return {
|
|
157
|
-
pendingStates: [
|
|
158
|
-
|
|
159
|
-
|
|
167
|
+
pendingStates: [
|
|
168
|
+
...newSavedOps,
|
|
169
|
+
...this.pendingMessages.toArray().map(withoutLocalOpMetadata),
|
|
170
|
+
],
|
|
160
171
|
};
|
|
161
172
|
}
|
|
162
173
|
|
|
@@ -251,7 +262,7 @@ export class PendingStateManager implements IDisposable {
|
|
|
251
262
|
0x169 /* "No pending message found for this remote message" */,
|
|
252
263
|
);
|
|
253
264
|
pendingMessage.sequenceNumber = message.sequenceNumber;
|
|
254
|
-
this.savedOps.push(pendingMessage);
|
|
265
|
+
this.savedOps.push(withoutLocalOpMetadata(pendingMessage));
|
|
255
266
|
|
|
256
267
|
this.pendingMessages.shift();
|
|
257
268
|
|
package/src/scheduleManager.ts
CHANGED
|
@@ -7,8 +7,10 @@ import type { EventEmitter } from "@fluid-internal/client-utils";
|
|
|
7
7
|
import { performance } from "@fluid-internal/client-utils";
|
|
8
8
|
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
9
9
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
10
|
-
import {
|
|
11
|
-
|
|
10
|
+
import {
|
|
11
|
+
IDocumentMessage,
|
|
12
|
+
ISequencedDocumentMessage,
|
|
13
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
12
14
|
import { isRuntimeMessage } from "@fluidframework/driver-utils/internal";
|
|
13
15
|
import {
|
|
14
16
|
ITelemetryLoggerExt,
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
7
7
|
import { IDisposable, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert, Deferred, PromiseTimer, delay } from "@fluidframework/core-utils/internal";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import {
|
|
10
|
+
DriverErrorTypes,
|
|
11
|
+
MessageType,
|
|
12
|
+
ISequencedDocumentMessage,
|
|
13
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
11
14
|
import {
|
|
12
15
|
MonitoringContext,
|
|
13
16
|
UsageError,
|
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { SummaryType } from "@fluidframework/driver-definitions";
|
|
9
|
+
import {
|
|
10
|
+
ISnapshotTree,
|
|
11
|
+
ISequencedDocumentMessage,
|
|
12
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
10
13
|
import {
|
|
11
14
|
IExperimentalIncrementalSummaryContext,
|
|
12
15
|
ITelemetryContext,
|
|
@@ -10,8 +10,11 @@ import {
|
|
|
10
10
|
ITelemetryBaseProperties,
|
|
11
11
|
ITelemetryBaseLogger,
|
|
12
12
|
} from "@fluidframework/core-interfaces";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { ISummaryTree } from "@fluidframework/driver-definitions";
|
|
14
|
+
import {
|
|
15
|
+
IDocumentMessage,
|
|
16
|
+
ISequencedDocumentMessage,
|
|
17
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
15
18
|
import { ISummaryStats } from "@fluidframework/runtime-definitions/internal";
|
|
16
19
|
import {
|
|
17
20
|
ITelemetryLoggerExt,
|
|
@@ -7,13 +7,13 @@ import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
|
7
7
|
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
8
8
|
import { IDisposable, IEvent } from "@fluidframework/core-interfaces";
|
|
9
9
|
import { assert, Deferred } from "@fluidframework/core-utils/internal";
|
|
10
|
-
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
11
10
|
import {
|
|
12
11
|
IDocumentMessage,
|
|
13
12
|
ISummaryAck,
|
|
14
13
|
ISummaryContent,
|
|
15
14
|
ISummaryNack,
|
|
16
15
|
MessageType,
|
|
16
|
+
ISequencedDocumentMessage,
|
|
17
17
|
} from "@fluidframework/driver-definitions/internal";
|
|
18
18
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
19
19
|
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import {
|
|
7
|
+
import { SummaryType } from "@fluidframework/driver-definitions";
|
|
8
8
|
import {
|
|
9
9
|
IDocumentStorageService,
|
|
10
10
|
ISnapshotTree,
|
|
11
|
+
ISequencedDocumentMessage,
|
|
11
12
|
} from "@fluidframework/driver-definitions/internal";
|
|
12
13
|
import {
|
|
13
14
|
blobHeadersBlobName as blobNameForBlobHeaders,
|