@fluidframework/runtime-utils 2.0.0-dev.1.4.6.106135 → 2.0.0-dev.2.2.0.111723

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.
Files changed (46) hide show
  1. package/.eslintrc.js +1 -1
  2. package/dist/dataStoreHelpers.d.ts +5 -0
  3. package/dist/dataStoreHelpers.d.ts.map +1 -1
  4. package/dist/dataStoreHelpers.js +8 -1
  5. package/dist/dataStoreHelpers.js.map +1 -1
  6. package/dist/index.d.ts +9 -9
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +39 -19
  9. package/dist/index.js.map +1 -1
  10. package/dist/packageVersion.d.ts +1 -1
  11. package/dist/packageVersion.js +1 -1
  12. package/dist/packageVersion.js.map +1 -1
  13. package/dist/summarizerNode/summarizerNode.d.ts +1 -2
  14. package/dist/summarizerNode/summarizerNode.d.ts.map +1 -1
  15. package/dist/summarizerNode/summarizerNode.js +2 -19
  16. package/dist/summarizerNode/summarizerNode.js.map +1 -1
  17. package/dist/summarizerNode/summarizerNodeWithGc.d.ts +2 -8
  18. package/dist/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  19. package/dist/summarizerNode/summarizerNodeWithGc.js +1 -24
  20. package/dist/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  21. package/lib/dataStoreHelpers.d.ts +5 -0
  22. package/lib/dataStoreHelpers.d.ts.map +1 -1
  23. package/lib/dataStoreHelpers.js +7 -1
  24. package/lib/dataStoreHelpers.js.map +1 -1
  25. package/lib/index.d.ts +9 -9
  26. package/lib/index.d.ts.map +1 -1
  27. package/lib/index.js +9 -9
  28. package/lib/index.js.map +1 -1
  29. package/lib/packageVersion.d.ts +1 -1
  30. package/lib/packageVersion.js +1 -1
  31. package/lib/packageVersion.js.map +1 -1
  32. package/lib/summarizerNode/summarizerNode.d.ts +1 -2
  33. package/lib/summarizerNode/summarizerNode.d.ts.map +1 -1
  34. package/lib/summarizerNode/summarizerNode.js +2 -19
  35. package/lib/summarizerNode/summarizerNode.js.map +1 -1
  36. package/lib/summarizerNode/summarizerNodeWithGc.d.ts +2 -8
  37. package/lib/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  38. package/lib/summarizerNode/summarizerNodeWithGc.js +1 -24
  39. package/lib/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  40. package/package.json +26 -21
  41. package/prettier.config.cjs +8 -0
  42. package/src/dataStoreHelpers.ts +11 -1
  43. package/src/index.ts +39 -9
  44. package/src/packageVersion.ts +1 -1
  45. package/src/summarizerNode/summarizerNode.ts +2 -24
  46. package/src/summarizerNode/summarizerNodeWithGc.ts +1 -32
@@ -166,15 +166,10 @@ export class SummarizerNode implements IRootSummarizerNode {
166
166
  // If there is no latestSummary, clearSummary and return before reaching this code.
167
167
  assert(!!localPathsToUse, 0x1a5 /* "Tracked summary local paths not set" */);
168
168
 
169
- // DataStore can be realized out-of-order during the summary execution (ex. the mixinSummaryHandler
170
- // in order to provide search capability to the summaries). If that happens,
171
- // a child node will not have the handle paths with ".channels".
172
- // By using the _latestSummary's basePath we have a safe path to compose its pendingSummary.
173
- // PR: https://github.com/microsoft/FluidFramework/pull/11697
174
169
  const summary = new SummaryNode({
175
170
  ...localPathsToUse,
176
171
  referenceSequenceNumber: this.wipReferenceSequenceNumber,
177
- basePath: parentSkipRecursion ? this._latestSummary?.basePath ?? parentPath : parentPath,
172
+ basePath: parentPath,
178
173
  });
179
174
  const fullPathForChildren = summary.fullPathForChildren;
180
175
  for (const child of this.children.values()) {
@@ -357,7 +352,7 @@ export class SummarizerNode implements IRootSummarizerNode {
357
352
  }
358
353
  }
359
354
 
360
- public loadBaseSummaryWithoutDifferential(snapshot: ISnapshotTree) {
355
+ public updateBaseSummaryState(snapshot: ISnapshotTree) {
361
356
  // Check base summary to see if it has any additional path parts
362
357
  // separating child SummarizerNodes. Checks for .channels subtrees.
363
358
  const { childrenPathPart } = parseSummaryForSubtrees(snapshot);
@@ -366,23 +361,6 @@ export class SummarizerNode implements IRootSummarizerNode {
366
361
  }
367
362
  }
368
363
 
369
- public async loadBaseSummary(
370
- snapshot: ISnapshotTree,
371
- readAndParseBlob: ReadAndParseBlob,
372
- ): Promise<ISnapshotTree> {
373
- const pathParts: string[] = [];
374
- const { childrenPathPart } = parseSummaryForSubtrees(snapshot);
375
- if (childrenPathPart !== undefined) {
376
- pathParts.push(childrenPathPart);
377
- }
378
-
379
- if (pathParts.length > 0 && this._latestSummary !== undefined) {
380
- this._latestSummary.additionalPath = EscapedPath.createAndConcat(pathParts);
381
- }
382
-
383
- return snapshot;
384
- }
385
-
386
364
  public recordChange(op: ISequencedDocumentMessage): void {
387
365
  this.invalidate(op.sequenceNumber);
388
366
  }
@@ -12,7 +12,6 @@ import {
12
12
  gcBlobKey,
13
13
  IGarbageCollectionData,
14
14
  IGarbageCollectionDetailsBase,
15
- IGarbageCollectionSummaryDetails,
16
15
  ISummarizeInternalResult,
17
16
  ISummarizeResult,
18
17
  ISummarizerNodeConfigWithGC,
@@ -80,9 +79,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
80
79
  // removed (from runGC flag in IContainerRuntimeOptions), this should be changed to be have no routes by default.
81
80
  private usedRoutes: string[] = [""];
82
81
 
83
- // If this node is marked as unreferenced, the time when it marked as such.
84
- private unreferencedTimestampMs: number | undefined;
85
-
86
82
  // True if GC is disabled for this node. If so, do not track GC specific state for a summary.
87
83
  private readonly gcDisabled: boolean;
88
84
 
@@ -124,22 +120,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
124
120
  });
125
121
  }
126
122
 
127
- /**
128
- * @deprecated Renamed to {@link SummarizerNodeWithGC.getBaseGCDetails}.
129
- */
130
- public getGCSummaryDetails(): IGarbageCollectionSummaryDetails {
131
- return this.getBaseGCDetails();
132
- }
133
-
134
- // Returns the GC details to be added to this node's summary and is used to initialize new nodes' GC state.
135
- public getBaseGCDetails(): IGarbageCollectionDetailsBase {
136
- return {
137
- gcData: this.gcData,
138
- usedRoutes: this.usedRoutes,
139
- unrefTimestamp: this.unreferencedTimestampMs,
140
- };
141
- }
142
-
143
123
  /**
144
124
  * Loads state from this node's initial GC summary details. This contains the following data from the last summary
145
125
  * seen by the server for this client:
@@ -163,7 +143,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
163
143
  // Sort the used routes because we compare them with the current used routes to check if they changed between
164
144
  // summaries. Both are sorted so that the order of elements is the same.
165
145
  this.referenceUsedRoutes = baseGCDetails.usedRoutes?.sort();
166
- this.unreferencedTimestampMs = baseGCDetails.unrefTimestamp;
167
146
  }
168
147
 
169
148
  public async summarize(
@@ -379,7 +358,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
379
358
  return this.usedRoutes.includes("") || this.usedRoutes.includes("/");
380
359
  }
381
360
 
382
- public updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number) {
361
+ public updateUsedRoutes(usedRoutes: string[]) {
383
362
  // Sort the given routes before updating. This will ensure that the routes compared in hasUsedStateChanged()
384
363
  // are in the same order.
385
364
  this.usedRoutes = usedRoutes.sort();
@@ -389,16 +368,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
389
368
  if (!this.gcDisabled && this.isTrackingInProgress()) {
390
369
  this.wipSerializedUsedRoutes = JSON.stringify(this.usedRoutes);
391
370
  }
392
-
393
- if (this.isReferenced()) {
394
- this.unreferencedTimestampMs = undefined;
395
- return;
396
- }
397
-
398
- // If this node just became unreferenced, update its unreferencedTimestampMs.
399
- if (this.unreferencedTimestampMs === undefined) {
400
- this.unreferencedTimestampMs = gcTimestamp;
401
- }
402
371
  }
403
372
 
404
373
  /**