@fluidframework/container-runtime 2.1.1 → 2.2.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 +30 -0
- package/README.md +2 -2
- package/api-report/container-runtime.legacy.alpha.api.md +4 -3
- package/container-runtime.test-files.tar +0 -0
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +9 -0
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +0 -14
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +2 -12
- package/dist/channelCollection.js.map +1 -1
- package/dist/containerRuntime.d.ts +34 -6
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +181 -90
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +9 -18
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +40 -78
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +0 -6
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +23 -66
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +11 -34
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +9 -52
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +3 -23
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +2 -6
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +4 -8
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +1 -9
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +3 -25
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/index.d.ts +2 -2
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +2 -7
- package/dist/gc/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +6 -5
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/metadata.d.ts +9 -1
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +6 -1
- package/dist/metadata.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +1 -1
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +8 -0
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +34 -2
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +1 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +20 -0
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +38 -19
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +67 -43
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +33 -22
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +148 -105
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +5 -1
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -4
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +16 -15
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +9 -0
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +0 -14
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +2 -11
- package/lib/channelCollection.js.map +1 -1
- package/lib/containerRuntime.d.ts +34 -6
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +181 -90
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +9 -18
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +27 -65
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +0 -6
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +25 -68
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +12 -35
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +9 -52
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +2 -22
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +2 -6
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +4 -8
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +1 -9
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +3 -24
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/index.d.ts +2 -2
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +2 -2
- package/lib/gc/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/messageTypes.d.ts +6 -5
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/metadata.d.ts +9 -1
- package/lib/metadata.d.ts.map +1 -1
- package/lib/metadata.js +4 -0
- package/lib/metadata.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +1 -1
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +8 -0
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +34 -2
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +1 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +20 -0
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +38 -19
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +67 -43
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +33 -22
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +149 -106
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +5 -1
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -4
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +16 -15
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/package.json +21 -21
- package/src/batchTracker.ts +4 -2
- package/src/blobManager/blobManager.ts +9 -0
- package/src/channelCollection.ts +2 -11
- package/src/containerRuntime.ts +216 -121
- package/src/dataStoreContext.ts +29 -93
- package/src/gc/garbageCollection.ts +26 -79
- package/src/gc/gcConfigs.ts +12 -45
- package/src/gc/gcDefinitions.ts +10 -55
- package/src/gc/gcHelpers.ts +10 -8
- package/src/gc/gcSummaryStateTracker.ts +6 -9
- package/src/gc/gcTelemetry.ts +3 -38
- package/src/gc/index.ts +2 -6
- package/src/index.ts +0 -1
- package/src/messageTypes.ts +12 -11
- package/src/metadata.ts +16 -2
- package/src/opLifecycle/index.ts +1 -0
- package/src/opLifecycle/opGroupingManager.ts +42 -3
- package/src/opLifecycle/outbox.ts +30 -0
- package/src/opLifecycle/remoteMessageProcessor.ts +110 -56
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +209 -168
- package/src/summary/README.md +31 -28
- package/src/summary/summarizerNode/summarizerNode.ts +6 -1
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +20 -43
- package/src/summary/summaryFormats.md +25 -22
|
@@ -106,8 +106,14 @@ export declare abstract class FluidDataStoreContext extends TypedEventEmitter<IF
|
|
|
106
106
|
*/
|
|
107
107
|
private _tombstoned;
|
|
108
108
|
get tombstoned(): boolean;
|
|
109
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* If true, throw an error when a tombstone data store is used.
|
|
111
|
+
* @deprecated NOT SUPPORTED - hardcoded to return false since it's deprecated.
|
|
112
|
+
*/
|
|
110
113
|
readonly gcThrowOnTombstoneUsage: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated NOT SUPPORTED - hardcoded to return false since it's deprecated.
|
|
116
|
+
*/
|
|
111
117
|
readonly gcTombstoneEnforcementAllowed: boolean;
|
|
112
118
|
/** If true, this means that this data store context and its children have been removed from the runtime */
|
|
113
119
|
protected deleted: boolean;
|
|
@@ -152,7 +158,6 @@ export declare abstract class FluidDataStoreContext extends TypedEventEmitter<IF
|
|
|
152
158
|
* controlled via feature flags.
|
|
153
159
|
*/
|
|
154
160
|
private localChangesTelemetryCount;
|
|
155
|
-
private lastUsedRoutes;
|
|
156
161
|
readonly id: string;
|
|
157
162
|
private readonly _containerRuntime;
|
|
158
163
|
private readonly parentContext;
|
|
@@ -210,17 +215,10 @@ export declare abstract class FluidDataStoreContext extends TypedEventEmitter<IF
|
|
|
210
215
|
private getGCDataInternal;
|
|
211
216
|
/**
|
|
212
217
|
* After GC has run, called to notify the data store of routes used in it. These are used for the following:
|
|
213
|
-
*
|
|
214
218
|
* 1. To identify if this data store is being referenced in the document or not.
|
|
215
|
-
*
|
|
216
219
|
* 2. To determine if it needs to re-summarize in case used routes changed since last summary.
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* 4. To notify child contexts of their used routes. This is done immediately if the data store is loaded.
|
|
221
|
-
* Else, it is done when realizing the data store.
|
|
222
|
-
*
|
|
223
|
-
* 5. To update the timestamp when this data store or any children are marked as unreferenced.
|
|
220
|
+
* 3. To notify child contexts of their used routes. This is done immediately if the data store is loaded.
|
|
221
|
+
* Else, it is done by the data stores's summarizer node when child summarizer nodes are created.
|
|
224
222
|
*
|
|
225
223
|
* @param usedRoutes - The routes that are used in this data store.
|
|
226
224
|
*/
|
|
@@ -234,13 +232,6 @@ export declare abstract class FluidDataStoreContext extends TypedEventEmitter<IF
|
|
|
234
232
|
* @param messageTimestampMs - The timestamp of the message that added the reference.
|
|
235
233
|
*/
|
|
236
234
|
addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number): void;
|
|
237
|
-
/**
|
|
238
|
-
* Updates the used routes of the channel and its child contexts. The channel must be loaded before calling this.
|
|
239
|
-
* It is called in these two scenarios:
|
|
240
|
-
* 1. When the used routes of the data store is updated and the data store is loaded.
|
|
241
|
-
* 2. When the data store is realized. This updates the channel's used routes as per last GC run.
|
|
242
|
-
*/
|
|
243
|
-
private updateChannelUsedRoutes;
|
|
244
235
|
/**
|
|
245
236
|
* @deprecated 0.18.Should call request on the runtime directly
|
|
246
237
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EACN,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EAET,KAAK,MAAM,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAErF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACN,uBAAuB,EACvB,KAAK,SAAS,EACd,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAMrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EACN,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,8BAA8B,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 -12,8 +12,7 @@ const internal_2 = require("@fluidframework/driver-utils/internal");
|
|
|
12
12
|
const internal_3 = require("@fluidframework/runtime-definitions/internal");
|
|
13
13
|
const internal_4 = require("@fluidframework/runtime-utils/internal");
|
|
14
14
|
const internal_5 = require("@fluidframework/telemetry-utils/internal");
|
|
15
|
-
const index_js_1 = require("./
|
|
16
|
-
const index_js_2 = require("./summary/index.js");
|
|
15
|
+
const index_js_1 = require("./summary/index.js");
|
|
17
16
|
function createAttributes(pkg, isRootDataStore) {
|
|
18
17
|
const stringifiedPkg = JSON.stringify(pkg);
|
|
19
18
|
return {
|
|
@@ -24,7 +23,7 @@ function createAttributes(pkg, isRootDataStore) {
|
|
|
24
23
|
}
|
|
25
24
|
function createAttributesBlob(pkg, isRootDataStore) {
|
|
26
25
|
const attributes = createAttributes(pkg, isRootDataStore);
|
|
27
|
-
return new internal_2.BlobTreeEntry(
|
|
26
|
+
return new internal_2.BlobTreeEntry(index_js_1.dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
28
27
|
}
|
|
29
28
|
exports.createAttributesBlob = createAttributesBlob;
|
|
30
29
|
/**
|
|
@@ -131,6 +130,15 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
131
130
|
* Tombstoned objects are eventually deleted by GC.
|
|
132
131
|
*/
|
|
133
132
|
this._tombstoned = false;
|
|
133
|
+
/**
|
|
134
|
+
* If true, throw an error when a tombstone data store is used.
|
|
135
|
+
* @deprecated NOT SUPPORTED - hardcoded to return false since it's deprecated.
|
|
136
|
+
*/
|
|
137
|
+
this.gcThrowOnTombstoneUsage = false;
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated NOT SUPPORTED - hardcoded to return false since it's deprecated.
|
|
140
|
+
*/
|
|
141
|
+
this.gcTombstoneEnforcementAllowed = false;
|
|
134
142
|
/** If true, this means that this data store context and its children have been removed from the runtime */
|
|
135
143
|
this.deleted = false;
|
|
136
144
|
this.detachedRuntimeCreation = false;
|
|
@@ -166,8 +174,6 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
166
174
|
},
|
|
167
175
|
});
|
|
168
176
|
this.thresholdOpsCounter = new internal_5.ThresholdCounter(FluidDataStoreContext.pendingOpsCountThreshold, this.mc.logger);
|
|
169
|
-
this.gcThrowOnTombstoneUsage = this.parentContext.gcThrowOnTombstoneUsage;
|
|
170
|
-
this.gcTombstoneEnforcementAllowed = this.parentContext.gcTombstoneEnforcementAllowed;
|
|
171
177
|
// By default, a data store can log maximum 10 local changes telemetry in summarizer.
|
|
172
178
|
this.localChangesTelemetryCount =
|
|
173
179
|
this.mc.config.getNumber("Fluid.Telemetry.LocalChangesTelemetryCount") ?? 10;
|
|
@@ -288,11 +294,8 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
288
294
|
process(message, local, localOpMetadata) {
|
|
289
295
|
const safeTelemetryProps = (0, internal_5.extractSafePropertiesFromMessage)(message);
|
|
290
296
|
// On op process, tombstone error is logged in garbage collector. So, set "checkTombstone" to false when calling
|
|
291
|
-
// "verifyNotClosed" which logs tombstone errors.
|
|
297
|
+
// "verifyNotClosed" which logs tombstone errors.
|
|
292
298
|
this.verifyNotClosed("process", false /* checkTombstone */, safeTelemetryProps);
|
|
293
|
-
if (this.tombstoned && this.gcThrowOnTombstoneUsage) {
|
|
294
|
-
throw internal_5.DataProcessingError.create("Context is tombstoned! Call site [process]", "process", undefined /* sequencedMessage */, safeTelemetryProps);
|
|
295
|
-
}
|
|
296
299
|
this.summarizerNode.recordChange(message);
|
|
297
300
|
if (this.loaded) {
|
|
298
301
|
return this.channel?.process(message, local, localOpMetadata);
|
|
@@ -332,13 +335,13 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
332
335
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
333
336
|
const summarizeResult = await this.channel.summarize(fullTree, trackState, telemetryContext);
|
|
334
337
|
// Wrap dds summaries in .channels subtree.
|
|
335
|
-
(0,
|
|
338
|
+
(0, index_js_1.wrapSummaryInChannelsTree)(summarizeResult);
|
|
336
339
|
const pathPartsForChildren = [internal_3.channelsTreeName];
|
|
337
340
|
// Add data store's attributes to the summary.
|
|
338
341
|
const { pkg } = await this.getInitialSnapshotDetails();
|
|
339
342
|
const isRoot = await this.isRoot();
|
|
340
343
|
const attributes = createAttributes(pkg, isRoot);
|
|
341
|
-
(0, internal_4.addBlobToSummary)(summarizeResult,
|
|
344
|
+
(0, internal_4.addBlobToSummary)(summarizeResult, index_js_1.dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
342
345
|
// If we are not referenced, mark the summary tree as unreferenced. Also, update unreferenced blob
|
|
343
346
|
// size in the summary stats with the blobs size of this data store.
|
|
344
347
|
if (!this.summarizerNode.isReferenced()) {
|
|
@@ -378,34 +381,26 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
378
381
|
}
|
|
379
382
|
/**
|
|
380
383
|
* After GC has run, called to notify the data store of routes used in it. These are used for the following:
|
|
381
|
-
*
|
|
382
384
|
* 1. To identify if this data store is being referenced in the document or not.
|
|
383
|
-
*
|
|
384
385
|
* 2. To determine if it needs to re-summarize in case used routes changed since last summary.
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
* 4. To notify child contexts of their used routes. This is done immediately if the data store is loaded.
|
|
389
|
-
* Else, it is done when realizing the data store.
|
|
390
|
-
*
|
|
391
|
-
* 5. To update the timestamp when this data store or any children are marked as unreferenced.
|
|
386
|
+
* 3. To notify child contexts of their used routes. This is done immediately if the data store is loaded.
|
|
387
|
+
* Else, it is done by the data stores's summarizer node when child summarizer nodes are created.
|
|
392
388
|
*
|
|
393
389
|
* @param usedRoutes - The routes that are used in this data store.
|
|
394
390
|
*/
|
|
395
391
|
updateUsedRoutes(usedRoutes) {
|
|
396
392
|
// Update the used routes in this data store's summarizer node.
|
|
397
393
|
this.summarizerNode.updateUsedRoutes(usedRoutes);
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
*/
|
|
403
|
-
this.lastUsedRoutes = usedRoutes;
|
|
404
|
-
// If we are loaded, call the channel so it can update the used routes of the child contexts.
|
|
405
|
-
// If we are not loaded, we will update this when we are realized.
|
|
406
|
-
if (this.loaded) {
|
|
407
|
-
this.updateChannelUsedRoutes();
|
|
394
|
+
// If the channel doesn't exist yet (data store is not realized), the summarizer node will update it
|
|
395
|
+
// when it creates child nodes.
|
|
396
|
+
if (!this.channel) {
|
|
397
|
+
return;
|
|
408
398
|
}
|
|
399
|
+
// Remove the route to this data store, if it exists.
|
|
400
|
+
const usedChannelRoutes = usedRoutes.filter((id) => {
|
|
401
|
+
return id !== "/" && id !== "";
|
|
402
|
+
});
|
|
403
|
+
this.channel.updateUsedRoutes(usedChannelRoutes);
|
|
409
404
|
}
|
|
410
405
|
/**
|
|
411
406
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
@@ -418,25 +413,6 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
418
413
|
addedGCOutboundRoute(fromPath, toPath, messageTimestampMs) {
|
|
419
414
|
this.parentContext.addedGCOutboundRoute(fromPath, toPath, messageTimestampMs);
|
|
420
415
|
}
|
|
421
|
-
/**
|
|
422
|
-
* Updates the used routes of the channel and its child contexts. The channel must be loaded before calling this.
|
|
423
|
-
* It is called in these two scenarios:
|
|
424
|
-
* 1. When the used routes of the data store is updated and the data store is loaded.
|
|
425
|
-
* 2. When the data store is realized. This updates the channel's used routes as per last GC run.
|
|
426
|
-
*/
|
|
427
|
-
updateChannelUsedRoutes() {
|
|
428
|
-
(0, internal_1.assert)(this.loaded, 0x144 /* "Channel should be loaded when updating used routes" */);
|
|
429
|
-
(0, internal_1.assert)(this.channel !== undefined, 0x145 /* "Channel should be present when data store is loaded" */);
|
|
430
|
-
// If there is no lastUsedRoutes, GC has not run up until this point.
|
|
431
|
-
if (this.lastUsedRoutes === undefined) {
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
// Remove the route to this data store, if it exists.
|
|
435
|
-
const usedChannelRoutes = this.lastUsedRoutes.filter((id) => {
|
|
436
|
-
return id !== "/" && id !== "";
|
|
437
|
-
});
|
|
438
|
-
this.channel.updateUsedRoutes(usedChannelRoutes);
|
|
439
|
-
}
|
|
440
416
|
/**
|
|
441
417
|
* @deprecated 0.18.Should call request on the runtime directly
|
|
442
418
|
*/
|
|
@@ -515,14 +491,6 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
515
491
|
// Freeze the package path to ensure that someone doesn't modify it when it is
|
|
516
492
|
// returned in packagePath().
|
|
517
493
|
Object.freeze(this.pkg);
|
|
518
|
-
/**
|
|
519
|
-
* Update the used routes of the channel. If GC has run before this data store was realized, we will have
|
|
520
|
-
* the used routes saved. So, this will ensure that all the child contexts have up-to-date used routes as
|
|
521
|
-
* per the last time GC was run.
|
|
522
|
-
* Also, this data store may have been realized during summarize. In that case, the child contexts need to
|
|
523
|
-
* have their used routes updated to determine if its needs to summarize again and to add it to the summary.
|
|
524
|
-
*/
|
|
525
|
-
this.updateChannelUsedRoutes();
|
|
526
494
|
}
|
|
527
495
|
async bindRuntime(channel, existing) {
|
|
528
496
|
if (this.channel) {
|
|
@@ -599,15 +567,11 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
599
567
|
if (checkTombstone && this.tombstoned) {
|
|
600
568
|
const messageString = `Context is tombstoned! Call site [${callSite}]`;
|
|
601
569
|
const error = internal_5.DataProcessingError.create(messageString, callSite, undefined /* sequencedMessage */, safeTelemetryProps);
|
|
602
|
-
|
|
570
|
+
this.mc.logger.sendTelemetryEvent({
|
|
603
571
|
eventName: "GC_Tombstone_DataStore_Changed",
|
|
604
|
-
category:
|
|
605
|
-
gcTombstoneEnforcementAllowed: this.gcTombstoneEnforcementAllowed,
|
|
572
|
+
category: "generic",
|
|
606
573
|
callSite,
|
|
607
|
-
},
|
|
608
|
-
if (this.gcThrowOnTombstoneUsage) {
|
|
609
|
-
throw error;
|
|
610
|
-
}
|
|
574
|
+
}, error);
|
|
611
575
|
}
|
|
612
576
|
}
|
|
613
577
|
/**
|
|
@@ -616,7 +580,7 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
616
580
|
* other clients that are up-to-date till seq# 100 may not have them yet.
|
|
617
581
|
*/
|
|
618
582
|
identifyLocalChangeInSummarizer(eventName, type) {
|
|
619
|
-
if (this.clientDetails.type !==
|
|
583
|
+
if (this.clientDetails.type !== index_js_1.summarizerClientType ||
|
|
620
584
|
this.localChangesTelemetryCount <= 0) {
|
|
621
585
|
return;
|
|
622
586
|
}
|
|
@@ -627,7 +591,7 @@ class FluidDataStoreContext extends client_utils_1.TypedEventEmitter {
|
|
|
627
591
|
eventName,
|
|
628
592
|
type,
|
|
629
593
|
isSummaryInProgress: this.summarizerNode.isSummaryInProgress?.(),
|
|
630
|
-
stack: (0, internal_5.generateStack)(),
|
|
594
|
+
stack: (0, internal_5.generateStack)(30),
|
|
631
595
|
});
|
|
632
596
|
this.localChangesTelemetryCount--;
|
|
633
597
|
}
|
|
@@ -671,14 +635,14 @@ class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
671
635
|
}
|
|
672
636
|
let tree = this.baseSnapshot;
|
|
673
637
|
let isRootDataStore = true;
|
|
674
|
-
if (!!tree && tree.blobs[
|
|
638
|
+
if (!!tree && tree.blobs[index_js_1.dataStoreAttributesBlobName] !== undefined) {
|
|
675
639
|
// Need to get through snapshot and use that to populate extraBlobs
|
|
676
640
|
// eslint-disable-next-line import/no-deprecated
|
|
677
|
-
const attributes = await (0, internal_2.readAndParse)(this.storage, tree.blobs[
|
|
641
|
+
const attributes = await (0, internal_2.readAndParse)(this.storage, tree.blobs[index_js_1.dataStoreAttributesBlobName]);
|
|
678
642
|
let pkgFromSnapshot;
|
|
679
643
|
// Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.
|
|
680
644
|
// For snapshotFormatVersion = "0.1" (1) or above, pkg is jsonified, otherwise it is just a string.
|
|
681
|
-
const formatVersion = (0,
|
|
645
|
+
const formatVersion = (0, index_js_1.getAttributesFormatVersion)(attributes);
|
|
682
646
|
if (formatVersion < 1) {
|
|
683
647
|
pkgFromSnapshot =
|
|
684
648
|
attributes.pkg.startsWith('["') && attributes.pkg.endsWith('"]')
|
|
@@ -695,7 +659,7 @@ class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
695
659
|
* roots in the document but they won't break.
|
|
696
660
|
*/
|
|
697
661
|
isRootDataStore = attributes.isRootDataStore ?? true;
|
|
698
|
-
if ((0,
|
|
662
|
+
if ((0, index_js_1.hasIsolatedChannels)(attributes)) {
|
|
699
663
|
tree = tree.trees[internal_3.channelsTreeName];
|
|
700
664
|
(0, internal_1.assert)(tree !== undefined, 0x1fe /* "isolated channels subtree should exist in remote datastore snapshot" */);
|
|
701
665
|
}
|
|
@@ -765,8 +729,8 @@ class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
765
729
|
if (snapshot !== undefined) {
|
|
766
730
|
// Get the dataStore attributes.
|
|
767
731
|
// Note: storage can be undefined in special case while detached.
|
|
768
|
-
attributes = await (0,
|
|
769
|
-
if ((0,
|
|
732
|
+
attributes = await (0, index_js_1.getFluidDataStoreAttributes)(this.storage, snapshot);
|
|
733
|
+
if ((0, index_js_1.hasIsolatedChannels)(attributes)) {
|
|
770
734
|
snapshot = snapshot.trees[internal_3.channelsTreeName];
|
|
771
735
|
(0, internal_1.assert)(snapshot !== undefined, 0x1ff /* "isolated channels subtree should exist in local datastore snapshot" */);
|
|
772
736
|
}
|
|
@@ -840,10 +804,10 @@ class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
840
804
|
(0, internal_1.assert)(this.pkg !== undefined, 0x150 /* "pkg should be available in local data store context" */);
|
|
841
805
|
const attachSummary = this.channel.getAttachSummary(telemetryContext);
|
|
842
806
|
// Wrap dds summaries in .channels subtree.
|
|
843
|
-
(0,
|
|
807
|
+
(0, index_js_1.wrapSummaryInChannelsTree)(attachSummary);
|
|
844
808
|
// Add data store's attributes to the summary.
|
|
845
809
|
const attributes = createAttributes(this.pkg, this.isInMemoryRoot());
|
|
846
|
-
(0, internal_4.addBlobToSummary)(attachSummary,
|
|
810
|
+
(0, internal_4.addBlobToSummary)(attachSummary, index_js_1.dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
847
811
|
// Add loadingGroupId to the summary
|
|
848
812
|
if (this.loadingGroupId !== undefined) {
|
|
849
813
|
attachSummary.summary.groupId = this.loadingGroupId;
|
|
@@ -869,12 +833,10 @@ class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
869
833
|
*/
|
|
870
834
|
delete() {
|
|
871
835
|
// TODO: GC:Validation - potentially prevent this from happening or asserting. Maybe throw here.
|
|
872
|
-
|
|
836
|
+
this.mc.logger.sendErrorEvent({
|
|
873
837
|
eventName: "GC_Deleted_DataStore_Unexpected_Delete",
|
|
874
838
|
message: "Unexpected deletion of a local data store context",
|
|
875
|
-
|
|
876
|
-
gcTombstoneEnforcementAllowed: undefined,
|
|
877
|
-
}, this.pkg);
|
|
839
|
+
});
|
|
878
840
|
super.delete();
|
|
879
841
|
}
|
|
880
842
|
}
|