@fluidframework/container-runtime 2.10.0-307399 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-report/container-runtime.legacy.alpha.api.md +1 -1
  3. package/container-runtime.test-files.tar +0 -0
  4. package/dist/containerRuntime.d.ts +1 -1
  5. package/dist/containerRuntime.d.ts.map +1 -1
  6. package/dist/containerRuntime.js +11 -5
  7. package/dist/containerRuntime.js.map +1 -1
  8. package/dist/opLifecycle/duplicateBatchDetector.d.ts +10 -0
  9. package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  10. package/dist/opLifecycle/duplicateBatchDetector.js +21 -1
  11. package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
  12. package/dist/packageVersion.d.ts +1 -1
  13. package/dist/packageVersion.d.ts.map +1 -1
  14. package/dist/packageVersion.js +1 -1
  15. package/dist/packageVersion.js.map +1 -1
  16. package/dist/summary/index.d.ts +1 -1
  17. package/dist/summary/index.d.ts.map +1 -1
  18. package/dist/summary/index.js +2 -1
  19. package/dist/summary/index.js.map +1 -1
  20. package/dist/summary/summaryFormat.d.ts +1 -0
  21. package/dist/summary/summaryFormat.d.ts.map +1 -1
  22. package/dist/summary/summaryFormat.js +2 -1
  23. package/dist/summary/summaryFormat.js.map +1 -1
  24. package/lib/containerRuntime.d.ts +1 -1
  25. package/lib/containerRuntime.d.ts.map +1 -1
  26. package/lib/containerRuntime.js +12 -6
  27. package/lib/containerRuntime.js.map +1 -1
  28. package/lib/opLifecycle/duplicateBatchDetector.d.ts +10 -0
  29. package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  30. package/lib/opLifecycle/duplicateBatchDetector.js +21 -1
  31. package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
  32. package/lib/packageVersion.d.ts +1 -1
  33. package/lib/packageVersion.d.ts.map +1 -1
  34. package/lib/packageVersion.js +1 -1
  35. package/lib/packageVersion.js.map +1 -1
  36. package/lib/summary/index.d.ts +1 -1
  37. package/lib/summary/index.d.ts.map +1 -1
  38. package/lib/summary/index.js +1 -1
  39. package/lib/summary/index.js.map +1 -1
  40. package/lib/summary/summaryFormat.d.ts +1 -0
  41. package/lib/summary/summaryFormat.d.ts.map +1 -1
  42. package/lib/summary/summaryFormat.js +1 -0
  43. package/lib/summary/summaryFormat.js.map +1 -1
  44. package/package.json +17 -17
  45. package/src/containerRuntime.ts +28 -10
  46. package/src/opLifecycle/duplicateBatchDetector.ts +33 -0
  47. package/src/packageVersion.ts +1 -1
  48. package/src/summary/index.ts +1 -0
  49. package/src/summary/summaryFormat.ts +1 -0
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import type { ITelemetryContext } from "@fluidframework/runtime-definitions/internal";
5
6
  import { type BatchStartInfo } from "./remoteMessageProcessor.js";
6
7
  /**
7
8
  * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.
@@ -11,6 +12,8 @@ export declare class DuplicateBatchDetector {
11
12
  private readonly batchIdsAll;
12
13
  /** We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances */
13
14
  private readonly batchIdsBySeqNum;
15
+ /** Initialize from snapshot data if provided - otherwise initialize empty */
16
+ constructor(batchIdsFromSnapshot: [number, string][] | undefined);
14
17
  /**
15
18
  * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.
16
19
  * If it's a duplicate, also return the sequence number of the other batch for logging.
@@ -28,5 +31,12 @@ export declare class DuplicateBatchDetector {
28
31
  * since the batch start has been processed by all clients, and local batches are deduped and the forked client would close.
29
32
  */
30
33
  private clearOldBatchIds;
34
+ /**
35
+ * Returns a snapshot of the state of the detector which can be included in a summary
36
+ * and used to "rehydrate" this class when loading from a snapshot.
37
+ *
38
+ * @returns - A serializable object representing the state of the detector, or undefined if there is nothing to save.
39
+ */
40
+ getRecentBatchInfoForSummary(telemetryContext?: ITelemetryContext): [number, string][] | undefined;
31
41
  }
32
42
  //# sourceMappingURL=duplicateBatchDetector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"duplicateBatchDetector.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,qBAAa,sBAAsB;IAClC,kGAAkG;IAClG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEjD,oGAAoG;IACpG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D;;;;;OAKG;IACI,mBAAmB,CACzB,UAAU,EAAE,cAAc,GACxB;QAAE,SAAS,EAAE,IAAI,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,SAAS,EAAE,KAAK,CAAA;KAAE;IAqC1E;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CAQxB"}
1
+ {"version":3,"file":"duplicateBatchDetector.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,qBAAa,sBAAsB;IAClC,kGAAkG;IAClG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEjD,oGAAoG;IACpG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D,6EAA6E;gBACjE,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS;IAShE;;;;;OAKG;IACI,mBAAmB,CACzB,UAAU,EAAE,cAAc,GACxB;QAAE,SAAS,EAAE,IAAI,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,SAAS,EAAE,KAAK,CAAA;KAAE;IAqC1E;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IASxB;;;;;OAKG;IACI,4BAA4B,CAClC,gBAAgB,CAAC,EAAE,iBAAiB,GAClC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS;CAajC"}
@@ -8,11 +8,18 @@ import { getEffectiveBatchId } from "./batchManager.js";
8
8
  * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.
9
9
  */
10
10
  export class DuplicateBatchDetector {
11
- constructor() {
11
+ /** Initialize from snapshot data if provided - otherwise initialize empty */
12
+ constructor(batchIdsFromSnapshot) {
12
13
  /** All batchIds we've seen recently enough (based on MSN) that we need to watch for duplicates */
13
14
  this.batchIdsAll = new Set();
14
15
  /** We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances */
15
16
  this.batchIdsBySeqNum = new Map();
17
+ if (batchIdsFromSnapshot) {
18
+ this.batchIdsBySeqNum = new Map(batchIdsFromSnapshot);
19
+ for (const batchId of this.batchIdsBySeqNum.values()) {
20
+ this.batchIdsAll.add(batchId);
21
+ }
22
+ }
16
23
  }
17
24
  /**
18
25
  * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.
@@ -60,5 +67,18 @@ export class DuplicateBatchDetector {
60
67
  }
61
68
  });
62
69
  }
70
+ /**
71
+ * Returns a snapshot of the state of the detector which can be included in a summary
72
+ * and used to "rehydrate" this class when loading from a snapshot.
73
+ *
74
+ * @returns - A serializable object representing the state of the detector, or undefined if there is nothing to save.
75
+ */
76
+ getRecentBatchInfoForSummary(telemetryContext) {
77
+ if (this.batchIdsBySeqNum.size === 0) {
78
+ return undefined;
79
+ }
80
+ telemetryContext?.set("fluid_DuplicateBatchDetector_", "recentBatchCount", this.batchIdsBySeqNum.size);
81
+ return [...this.batchIdsBySeqNum.entries()];
82
+ }
63
83
  }
64
84
  //# sourceMappingURL=duplicateBatchDetector.js.map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AAC,wDAAwD,CAC9D,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE9B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,gBAAgB,CAAC,GAAW;QACnC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE;YACzD,IAAI,cAAc,GAAG,GAAG,EAAE,CAAC;gBAC1B,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBAC7C,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAClC,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","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/internal\";\n\nimport { getEffectiveBatchId } from \"./batchManager.js\";\nimport { type BatchStartInfo } from \"./remoteMessageProcessor.js\";\n\n/**\n * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.\n */\nexport class DuplicateBatchDetector {\n\t/** All batchIds we've seen recently enough (based on MSN) that we need to watch for duplicates */\n\tprivate readonly batchIdsAll = new Set<string>();\n\n\t/** We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances */\n\tprivate readonly batchIdsBySeqNum = new Map<number, string>();\n\n\t/**\n\t * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.\n\t * If it's a duplicate, also return the sequence number of the other batch for logging.\n\t *\n\t * @remarks - We also use the minimumSequenceNumber to clear out old batchIds that are no longer at risk for duplicates.\n\t */\n\tpublic processInboundBatch(\n\t\tbatchStart: BatchStartInfo,\n\t): { duplicate: true; otherSequenceNumber: number } | { duplicate: false } {\n\t\tconst { sequenceNumber, minimumSequenceNumber } = batchStart.keyMessage;\n\n\t\t// Glance at this batch's MSN. Any batchIds we're tracking with a lower sequence number are now safe to forget.\n\t\t// Why? Because any other client holding the same batch locally would have seen the earlier batch and closed before submitting its duplicate.\n\t\tthis.clearOldBatchIds(minimumSequenceNumber);\n\n\t\t// getEffectiveBatchId is only needed in the SUPER rare/surprising case where\n\t\t// the original batch (not resubmitted, so no batchId) arrives in parallel with a resubmitted batch.\n\t\t// In the presence of typical network conditions, this would not be possible\n\t\t// (the original batch should roundtrip WAY before another container could rehydrate, connect, and resubmit)\n\t\tconst batchId = getEffectiveBatchId(batchStart);\n\n\t\t// Check this batch against the tracked batchIds to see if it's a duplicate\n\t\tif (this.batchIdsAll.has(batchId)) {\n\t\t\tfor (const [otherSequenceNumber, otherBatchId] of this.batchIdsBySeqNum.entries()) {\n\t\t\t\tif (otherBatchId === batchId) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tduplicate: true,\n\t\t\t\t\t\totherSequenceNumber,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tassert(false, 0xa34 /* Should have found the batchId in batchIdBySeqNum map */);\n\t\t}\n\n\t\t// Now we know it's not a duplicate, so add it to the tracked batchIds and return.\n\t\tassert(\n\t\t\t!this.batchIdsBySeqNum.has(sequenceNumber),\n\t\t\t0xa35 /* batchIdsAll and batchIdsBySeqNum should be in sync */,\n\t\t);\n\t\tthis.batchIdsBySeqNum.set(sequenceNumber, batchId);\n\t\tthis.batchIdsAll.add(batchId);\n\n\t\treturn { duplicate: false };\n\t}\n\n\t/**\n\t * Batches that started before the MSN are not at risk for a sequenced duplicate to arrive,\n\t * since the batch start has been processed by all clients, and local batches are deduped and the forked client would close.\n\t */\n\tprivate clearOldBatchIds(msn: number) {\n\t\tthis.batchIdsBySeqNum.forEach((batchId, sequenceNumber) => {\n\t\t\tif (sequenceNumber < msn) {\n\t\t\t\tthis.batchIdsBySeqNum.delete(sequenceNumber);\n\t\t\t\tthis.batchIdsAll.delete(batchId);\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"duplicateBatchDetector.js","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;GAEG;AACH,MAAM,OAAO,sBAAsB;IAOlC,6EAA6E;IAC7E,YAAY,oBAAoD;QAPhE,kGAAkG;QACjF,gBAAW,GAAG,IAAI,GAAG,EAAU,CAAC;QAEjD,oGAAoG;QACnF,qBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;QAI7D,IAAI,oBAAoB,EAAE,CAAC;YAC1B,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC;YACtD,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC;gBACtD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC;QACF,CAAC;IACF,CAAC;IAED;;;;;OAKG;IACI,mBAAmB,CACzB,UAA0B;QAE1B,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC;QAExE,+GAA+G;QAC/G,6IAA6I;QAC7I,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;QAE7C,6EAA6E;QAC7E,oGAAoG;QACpG,4EAA4E;QAC5E,4GAA4G;QAC5G,MAAM,OAAO,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;QAEhD,2EAA2E;QAC3E,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,KAAK,MAAM,CAAC,mBAAmB,EAAE,YAAY,CAAC,IAAI,IAAI,CAAC,gBAA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C7C,CAAC;CACD","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/internal\";\nimport type { ITelemetryContext } from \"@fluidframework/runtime-definitions/internal\";\n\nimport { getEffectiveBatchId } from \"./batchManager.js\";\nimport { type BatchStartInfo } from \"./remoteMessageProcessor.js\";\n\n/**\n * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.\n */\nexport class DuplicateBatchDetector {\n\t/** All batchIds we've seen recently enough (based on MSN) that we need to watch for duplicates */\n\tprivate readonly batchIdsAll = new Set<string>();\n\n\t/** We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances */\n\tprivate readonly batchIdsBySeqNum = new Map<number, string>();\n\n\t/** Initialize from snapshot data if provided - otherwise initialize empty */\n\tconstructor(batchIdsFromSnapshot: [number, string][] | undefined) {\n\t\tif (batchIdsFromSnapshot) {\n\t\t\tthis.batchIdsBySeqNum = new Map(batchIdsFromSnapshot);\n\t\t\tfor (const batchId of this.batchIdsBySeqNum.values()) {\n\t\t\t\tthis.batchIdsAll.add(batchId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.\n\t * If it's a duplicate, also return the sequence number of the other batch for logging.\n\t *\n\t * @remarks - We also use the minimumSequenceNumber to clear out old batchIds that are no longer at risk for duplicates.\n\t */\n\tpublic processInboundBatch(\n\t\tbatchStart: BatchStartInfo,\n\t): { duplicate: true; otherSequenceNumber: number } | { duplicate: false } {\n\t\tconst { sequenceNumber, minimumSequenceNumber } = batchStart.keyMessage;\n\n\t\t// Glance at this batch's MSN. Any batchIds we're tracking with a lower sequence number are now safe to forget.\n\t\t// Why? Because any other client holding the same batch locally would have seen the earlier batch and closed before submitting its duplicate.\n\t\tthis.clearOldBatchIds(minimumSequenceNumber);\n\n\t\t// getEffectiveBatchId is only needed in the SUPER rare/surprising case where\n\t\t// the original batch (not resubmitted, so no batchId) arrives in parallel with a resubmitted batch.\n\t\t// In the presence of typical network conditions, this would not be possible\n\t\t// (the original batch should roundtrip WAY before another container could rehydrate, connect, and resubmit)\n\t\tconst batchId = getEffectiveBatchId(batchStart);\n\n\t\t// Check this batch against the tracked batchIds to see if it's a duplicate\n\t\tif (this.batchIdsAll.has(batchId)) {\n\t\t\tfor (const [otherSequenceNumber, otherBatchId] of this.batchIdsBySeqNum.entries()) {\n\t\t\t\tif (otherBatchId === batchId) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tduplicate: true,\n\t\t\t\t\t\totherSequenceNumber,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tassert(false, 0xa34 /* Should have found the batchId in batchIdBySeqNum map */);\n\t\t}\n\n\t\t// Now we know it's not a duplicate, so add it to the tracked batchIds and return.\n\t\tassert(\n\t\t\t!this.batchIdsBySeqNum.has(sequenceNumber),\n\t\t\t0xa35 /* batchIdsAll and batchIdsBySeqNum should be in sync */,\n\t\t);\n\t\tthis.batchIdsBySeqNum.set(sequenceNumber, batchId);\n\t\tthis.batchIdsAll.add(batchId);\n\n\t\treturn { duplicate: false };\n\t}\n\n\t/**\n\t * Batches that started before the MSN are not at risk for a sequenced duplicate to arrive,\n\t * since the batch start has been processed by all clients, and local batches are deduped and the forked client would close.\n\t */\n\tprivate clearOldBatchIds(msn: number) {\n\t\tthis.batchIdsBySeqNum.forEach((batchId, sequenceNumber) => {\n\t\t\tif (sequenceNumber < msn) {\n\t\t\t\tthis.batchIdsBySeqNum.delete(sequenceNumber);\n\t\t\t\tthis.batchIdsAll.delete(batchId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Returns a snapshot of the state of the detector which can be included in a summary\n\t * and used to \"rehydrate\" this class when loading from a snapshot.\n\t *\n\t * @returns - A serializable object representing the state of the detector, or undefined if there is nothing to save.\n\t */\n\tpublic getRecentBatchInfoForSummary(\n\t\ttelemetryContext?: ITelemetryContext,\n\t): [number, string][] | undefined {\n\t\tif (this.batchIdsBySeqNum.size === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\ttelemetryContext?.set(\n\t\t\t\"fluid_DuplicateBatchDetector_\",\n\t\t\t\"recentBatchCount\",\n\t\t\tthis.batchIdsBySeqNum.size,\n\t\t);\n\n\t\treturn [...this.batchIdsBySeqNum.entries()];\n\t}\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-runtime";
8
- export declare const pkgVersion = "2.10.0-307399";
8
+ export declare const pkgVersion = "2.10.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,WAAW,CAAC"}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/container-runtime";
8
- export const pkgVersion = "2.10.0-307399";
8
+ export const pkgVersion = "2.10.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.10.0-307399\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.10.0\";\n"]}
@@ -11,7 +11,7 @@ export { SummarizeHeuristicData, SummarizeHeuristicRunner } from "./summarizerHe
11
11
  export { createRootSummarizerNode, createRootSummarizerNodeWithGC, IRefreshSummaryResult, IRootSummarizerNode, IRootSummarizerNodeWithGC, } from "./summarizerNode/index.js";
12
12
  export { IConnectableRuntime, IGeneratedSummaryStats, IRefreshSummaryAckOptions, ISubmitSummaryOptions, ISummarizeAttempt, ISummarizeHeuristicData, ISummarizer, ISummarizeResults, ISummarizerEvents, ISummarizerInternalsProvider, ISummarizerRuntime, ISummaryCancellationToken, SubmitSummaryResult, SummarizerStopReason, EnqueueSummarizeResult, IAckSummaryResult, IBaseSummarizeResult, IBroadcastSummaryResult, ICancellationToken, IEnqueueSummarizeOptions, IGenerateSummaryTreeResult, INackSummaryResult, IOnDemandSummarizeOptions, ISubmitSummaryOpResult, ISummarizeOptions, ISummarizingWarning, IUploadSummaryResult, SummarizeResultPart, SubmitSummaryFailureData, SummaryStage, IRetriableFailureError, ISummarizeEventProps, } from "./summarizerTypes.js";
13
13
  export { IAckedSummary, ISummaryCollectionOpEvents, ISummaryOpMessage, SummaryCollection, IClientSummaryWatcher, ISummary, ISummaryAckMessage, ISummaryNackMessage, OpActionEventListener, OpActionEventName, } from "./summaryCollection.js";
14
- export { aliasBlobName, chunksBlobName, dataStoreAttributesBlobName, electedSummarizerBlobName, extractSummaryMetadataMessage, getAttributesFormatVersion, getFluidDataStoreAttributes, hasIsolatedChannels, IContainerRuntimeMetadata, ICreateContainerMetadata, ISummaryMetadataMessage, metadataBlobName, nonDataStorePaths, ReadFluidDataStoreAttributes, rootHasIsolatedChannels, WriteFluidDataStoreAttributes, wrapSummaryInChannelsTree, idCompressorBlobName, IFluidDataStoreAttributes0, IFluidDataStoreAttributes1, IFluidDataStoreAttributes2, OmitAttributesVersions, } from "./summaryFormat.js";
14
+ export { aliasBlobName, chunksBlobName, recentBatchInfoBlobName, dataStoreAttributesBlobName, electedSummarizerBlobName, extractSummaryMetadataMessage, getAttributesFormatVersion, getFluidDataStoreAttributes, hasIsolatedChannels, IContainerRuntimeMetadata, ICreateContainerMetadata, ISummaryMetadataMessage, metadataBlobName, nonDataStorePaths, ReadFluidDataStoreAttributes, rootHasIsolatedChannels, WriteFluidDataStoreAttributes, wrapSummaryInChannelsTree, idCompressorBlobName, IFluidDataStoreAttributes0, IFluidDataStoreAttributes1, IFluidDataStoreAttributes2, OmitAttributesVersions, } from "./summaryFormat.js";
15
15
  export { IdCompressorMode, IDocumentSchemaCurrent, IDocumentSchema, currentDocumentVersionSchema, DocumentSchemaValueType, DocumentsSchemaController, IDocumentSchemaChangeMessage, IDocumentSchemaFeatures, } from "./documentSchema.js";
16
16
  export { getFailMessage, RetriableSummaryError, SummarizeReason } from "./summaryGenerator.js";
17
17
  export { IConnectedEvents, IConnectedState, ISummaryManagerConfig, SummaryManager, SummaryManagerState, } from "./summaryManager.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,wBAAwB,EAC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AAwB,CAAC;AAChC,OAAO,EACN,aAAa,EACb,cAAc,EACd,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,uBAAuB,EACvB,6BAA6B,EAC7B,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,mBAAmB,GACnB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,mCAAmC,EACnC,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,gCAAgC,EAChC,0BAA0B,EAC1B,4BAA4B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACN,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBA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AChB,sBAAsB,EACtB,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,mBAAmB,GACnB,MAAM,qBAAqB,CAAC"}
@@ -10,7 +10,7 @@ export { SummarizerClientElection, summarizerClientType, } from "./summarizerCli
10
10
  export { SummarizeHeuristicData, SummarizeHeuristicRunner } from "./summarizerHeuristics.js";
11
11
  export { createRootSummarizerNode, createRootSummarizerNodeWithGC, } from "./summarizerNode/index.js";
12
12
  export { SummaryCollection, } from "./summaryCollection.js";
13
- export { aliasBlobName, chunksBlobName, dataStoreAttributesBlobName, electedSummarizerBlobName, extractSummaryMetadataMessage, getAttributesFormatVersion, getFluidDataStoreAttributes, hasIsolatedChannels, metadataBlobName, nonDataStorePaths, rootHasIsolatedChannels, wrapSummaryInChannelsTree, idCompressorBlobName, } from "./summaryFormat.js";
13
+ export { aliasBlobName, chunksBlobName, recentBatchInfoBlobName, dataStoreAttributesBlobName, electedSummarizerBlobName, extractSummaryMetadataMessage, getAttributesFormatVersion, getFluidDataStoreAttributes, hasIsolatedChannels, metadataBlobName, nonDataStorePaths, rootHasIsolatedChannels, wrapSummaryInChannelsTree, idCompressorBlobName, } from "./summaryFormat.js";
14
14
  export { currentDocumentVersionSchema, DocumentsSchemaController, } from "./documentSchema.js";
15
15
  export { getFailMessage, RetriableSummaryError } from "./summaryGenerator.js";
16
16
  export { SummaryManager, SummaryManagerState, } from "./summaryManager.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKN,uBAAuB,EACvB,qBAAqB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,mCAAmC,EACnC,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEN,0BAA0B,EAC1B,4BAA4B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAGN,wBAAwB,EACxB,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EACN,wBAAwB,EACxB,8BAA8B,GAI9B,MAAM,2BAA2B,CAAC;AAmCnC,OAAO,EAIN,iBAAiB,GAOjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,aAAa,EACb,cAAc,EACd,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EAInB,gBAAgB,EAChB,iBAAiB,EAEjB,uBAAuB,EAEvB,yBAAyB,EACzB,oBAAoB,GAKpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAIN,4BAA4B,EAE5B,yBAAyB,GAGzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAmB,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAIN,cAAc,EACd,mBAAmB,GACnB,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tIOrderedClientCollection,\n\tIOrderedClientElection,\n\tISerializedElection,\n\tITrackedClient,\n\tOrderedClientCollection,\n\tOrderedClientElection,\n} from \"./orderedClientElection.js\";\nexport {\n\tdefaultMaxAttemptsForSubmitFailures,\n\tRunningSummarizer,\n} from \"./runningSummarizer.js\";\nexport {\n\tICancellableSummarizerController,\n\tneverCancelledSummaryToken,\n\tRunWhileConnectedCoordinator,\n} from \"./runWhileConnectedCoordinator.js\";\nexport { Summarizer } from \"./summarizer.js\";\nexport {\n\tISummarizerClientElection,\n\tISummarizerClientElectionEvents,\n\tSummarizerClientElection,\n\tsummarizerClientType,\n} from \"./summarizerClientElection.js\";\nexport { SummarizeHeuristicData, SummarizeHeuristicRunner } from \"./summarizerHeuristics.js\";\nexport {\n\tcreateRootSummarizerNode,\n\tcreateRootSummarizerNodeWithGC,\n\tIRefreshSummaryResult,\n\tIRootSummarizerNode,\n\tIRootSummarizerNodeWithGC,\n} from \"./summarizerNode/index.js\";\nexport {\n\tIConnectableRuntime,\n\tIGeneratedSummaryStats,\n\tIRefreshSummaryAckOptions,\n\tISubmitSummaryOptions,\n\tISummarizeAttempt,\n\tISummarizeHeuristicData,\n\tISummarizer,\n\tISummarizeResults,\n\tISummarizerEvents,\n\tISummarizerInternalsProvider,\n\tISummarizerRuntime,\n\tISummaryCancellationToken,\n\tSubmitSummaryResult,\n\tSummarizerStopReason,\n\tEnqueueSummarizeResult,\n\tIAckSummaryResult,\n\tIBaseSummarizeResult,\n\tIBroadcastSummaryResult,\n\tICancellationToken,\n\tIEnqueueSummarizeOptions,\n\tIGenerateSummaryTreeResult,\n\tINackSummaryResult,\n\tIOnDemandSummarizeOptions,\n\tISubmitSummaryOpResult,\n\tISummarizeOptions,\n\tISummarizingWarning,\n\tIUploadSummaryResult,\n\tSummarizeResultPart,\n\tSubmitSummaryFailureData,\n\tSummaryStage,\n\tIRetriableFailureError,\n\tISummarizeEventProps,\n} from \"./summarizerTypes.js\";\nexport {\n\tIAckedSummary,\n\tISummaryCollectionOpEvents,\n\tISummaryOpMessage,\n\tSummaryCollection,\n\tIClientSummaryWatcher,\n\tISummary,\n\tISummaryAckMessage,\n\tISummaryNackMessage,\n\tOpActionEventListener,\n\tOpActionEventName,\n} from \"./summaryCollection.js\";\nexport {\n\taliasBlobName,\n\tchunksBlobName,\n\tdataStoreAttributesBlobName,\n\telectedSummarizerBlobName,\n\textractSummaryMetadataMessage,\n\tgetAttributesFormatVersion,\n\tgetFluidDataStoreAttributes,\n\thasIsolatedChannels,\n\tIContainerRuntimeMetadata,\n\tICreateContainerMetadata,\n\tISummaryMetadataMessage,\n\tmetadataBlobName,\n\tnonDataStorePaths,\n\tReadFluidDataStoreAttributes,\n\trootHasIsolatedChannels,\n\tWriteFluidDataStoreAttributes,\n\twrapSummaryInChannelsTree,\n\tidCompressorBlobName,\n\tIFluidDataStoreAttributes0,\n\tIFluidDataStoreAttributes1,\n\tIFluidDataStoreAttributes2,\n\tOmitAttributesVersions,\n} from \"./summaryFormat.js\";\nexport {\n\tIdCompressorMode,\n\tIDocumentSchemaCurrent,\n\tIDocumentSchema,\n\tcurrentDocumentVersionSchema,\n\tDocumentSchemaValueType,\n\tDocumentsSchemaController,\n\tIDocumentSchemaChangeMessage,\n\tIDocumentSchemaFeatures,\n} from \"./documentSchema.js\";\nexport { getFailMessage, RetriableSummaryError, SummarizeReason } from \"./summaryGenerator.js\";\nexport {\n\tIConnectedEvents,\n\tIConnectedState,\n\tISummaryManagerConfig,\n\tSummaryManager,\n\tSummaryManagerState,\n} from \"./summaryManager.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/summary/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKN,uBAAuB,EACvB,qBAAqB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,mCAAmC,EACnC,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEN,0BAA0B,EAC1B,4BAA4B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAGN,wBAAwB,EACxB,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EACN,wBAAwB,EACxB,8BAA8B,GAI9B,MAAM,2BAA2B,CAAC;AAmCnC,OAAO,EAIN,iBAAiB,GAOjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EAInB,gBAAgB,EAChB,iBAAiB,EAEjB,uBAAuB,EAEvB,yBAAyB,EACzB,oBAAoB,GAKpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAIN,4BAA4B,EAE5B,yBAAyB,GAGzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAmB,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAIN,cAAc,EACd,mBAAmB,GACnB,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tIOrderedClientCollection,\n\tIOrderedClientElection,\n\tISerializedElection,\n\tITrackedClient,\n\tOrderedClientCollection,\n\tOrderedClientElection,\n} from \"./orderedClientElection.js\";\nexport {\n\tdefaultMaxAttemptsForSubmitFailures,\n\tRunningSummarizer,\n} from \"./runningSummarizer.js\";\nexport {\n\tICancellableSummarizerController,\n\tneverCancelledSummaryToken,\n\tRunWhileConnectedCoordinator,\n} from \"./runWhileConnectedCoordinator.js\";\nexport { Summarizer } from \"./summarizer.js\";\nexport {\n\tISummarizerClientElection,\n\tISummarizerClientElectionEvents,\n\tSummarizerClientElection,\n\tsummarizerClientType,\n} from \"./summarizerClientElection.js\";\nexport { SummarizeHeuristicData, SummarizeHeuristicRunner } from \"./summarizerHeuristics.js\";\nexport {\n\tcreateRootSummarizerNode,\n\tcreateRootSummarizerNodeWithGC,\n\tIRefreshSummaryResult,\n\tIRootSummarizerNode,\n\tIRootSummarizerNodeWithGC,\n} from \"./summarizerNode/index.js\";\nexport {\n\tIConnectableRuntime,\n\tIGeneratedSummaryStats,\n\tIRefreshSummaryAckOptions,\n\tISubmitSummaryOptions,\n\tISummarizeAttempt,\n\tISummarizeHeuristicData,\n\tISummarizer,\n\tISummarizeResults,\n\tISummarizerEvents,\n\tISummarizerInternalsProvider,\n\tISummarizerRuntime,\n\tISummaryCancellationToken,\n\tSubmitSummaryResult,\n\tSummarizerStopReason,\n\tEnqueueSummarizeResult,\n\tIAckSummaryResult,\n\tIBaseSummarizeResult,\n\tIBroadcastSummaryResult,\n\tICancellationToken,\n\tIEnqueueSummarizeOptions,\n\tIGenerateSummaryTreeResult,\n\tINackSummaryResult,\n\tIOnDemandSummarizeOptions,\n\tISubmitSummaryOpResult,\n\tISummarizeOptions,\n\tISummarizingWarning,\n\tIUploadSummaryResult,\n\tSummarizeResultPart,\n\tSubmitSummaryFailureData,\n\tSummaryStage,\n\tIRetriableFailureError,\n\tISummarizeEventProps,\n} from \"./summarizerTypes.js\";\nexport {\n\tIAckedSummary,\n\tISummaryCollectionOpEvents,\n\tISummaryOpMessage,\n\tSummaryCollection,\n\tIClientSummaryWatcher,\n\tISummary,\n\tISummaryAckMessage,\n\tISummaryNackMessage,\n\tOpActionEventListener,\n\tOpActionEventName,\n} from \"./summaryCollection.js\";\nexport {\n\taliasBlobName,\n\tchunksBlobName,\n\trecentBatchInfoBlobName,\n\tdataStoreAttributesBlobName,\n\telectedSummarizerBlobName,\n\textractSummaryMetadataMessage,\n\tgetAttributesFormatVersion,\n\tgetFluidDataStoreAttributes,\n\thasIsolatedChannels,\n\tIContainerRuntimeMetadata,\n\tICreateContainerMetadata,\n\tISummaryMetadataMessage,\n\tmetadataBlobName,\n\tnonDataStorePaths,\n\tReadFluidDataStoreAttributes,\n\trootHasIsolatedChannels,\n\tWriteFluidDataStoreAttributes,\n\twrapSummaryInChannelsTree,\n\tidCompressorBlobName,\n\tIFluidDataStoreAttributes0,\n\tIFluidDataStoreAttributes1,\n\tIFluidDataStoreAttributes2,\n\tOmitAttributesVersions,\n} from \"./summaryFormat.js\";\nexport {\n\tIdCompressorMode,\n\tIDocumentSchemaCurrent,\n\tIDocumentSchema,\n\tcurrentDocumentVersionSchema,\n\tDocumentSchemaValueType,\n\tDocumentsSchemaController,\n\tIDocumentSchemaChangeMessage,\n\tIDocumentSchemaFeatures,\n} from \"./documentSchema.js\";\nexport { getFailMessage, RetriableSummaryError, SummarizeReason } from \"./summaryGenerator.js\";\nexport {\n\tIConnectedEvents,\n\tIConnectedState,\n\tISummaryManagerConfig,\n\tSummaryManager,\n\tSummaryManagerState,\n} from \"./summaryManager.js\";\n"]}
@@ -112,6 +112,7 @@ export declare function getMetadataFormatVersion(metadata?: IContainerRuntimeMet
112
112
  export declare const aliasBlobName = ".aliases";
113
113
  export declare const metadataBlobName = ".metadata";
114
114
  export declare const chunksBlobName = ".chunks";
115
+ export declare const recentBatchInfoBlobName = ".recentBatchInfo";
115
116
  export declare const electedSummarizerBlobName = ".electedSummarizer";
116
117
  export declare const idCompressorBlobName = ".idCompressor";
117
118
  export declare const blobHeadersBlobName = ".metadata.blobHeaders";
@@ -1 +1 @@
1
- {"version":3,"file":"summaryFormat.d.ts","sourceRoot":"","sources":["../../src/summary/summaryFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,uBAAuB,EACvB,aAAa,EACb,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAKrD,OAAO,EACN,qBAAqB,EAGrB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,IAAI,CAC3C,CAAC,EACD,uBAAuB,GAAG,sBAAsB,CAChD,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAC3C,QAAQ,CAAC,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AAC,EAAE,yBAAyB,GAAG,MAAM,CAYrF;AAED,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAC5C,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAC1D,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAC9D,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AACpD,eAAO,MAAM,mBAAmB,0BAAyB,CAAC;AAE1D,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAErF;AAED,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,UAO7B,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,yBAAyB,CAAC,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAMtF;AAED,wBAAsB,2BAA2B,CAChD,OAAO,EAAE,uBAAuB,EAChC,QAAQ,EAAE,aAAa,GACrB,OAAO,CAAC,4BAA4B,CAAC,CAYvC"}
@@ -62,6 +62,7 @@ export function getMetadataFormatVersion(metadata) {
62
62
  export const aliasBlobName = ".aliases";
63
63
  export const metadataBlobName = ".metadata";
64
64
  export const chunksBlobName = ".chunks";
65
+ export const recentBatchInfoBlobName = ".recentBatchInfo";
65
66
  export const electedSummarizerBlobName = ".electedSummarizer";
66
67
  export const idCompressorBlobName = ".idCompressor";
67
68
  export const blobHeadersBlobName = blobNameForBlobHeaders;
@@ -1 +1 @@
1
- {"version":3,"file":"summaryFormat.js","sourceRoot":"","sources":["../../src/summary/summaryFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AA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a,GAAG,CAAC,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC;AACnB,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/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentStorageService,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tblobHeadersBlobName as blobNameForBlobHeaders,\n\treadAndParse,\n} from \"@fluidframework/driver-utils/internal\";\nimport {\n\tISummaryTreeWithStats,\n\tchannelsTreeName,\n\tgcTreeKey,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { blobsTreeName } from \"../blobManager/index.js\";\nimport { IGCMetadata } from \"../gc/index.js\";\n\nimport { IDocumentSchema } from \"./documentSchema.js\";\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport type OmitAttributesVersions<T> = Omit<\n\tT,\n\t\"snapshotFormatVersion\" | \"summaryFormatVersion\"\n>;\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreAttributes0 {\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion?: undefined;\n\tpkg: string;\n\t/**\n\t * This tells whether a data store is root. Root data stores are never collected.\n\t * Non-root data stores may be collected if they are not used. If this is not present, default it to\n\t * true. This will ensure that older data stores are incorrectly collected.\n\t */\n\treadonly isRootDataStore?: boolean;\n}\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreAttributes1\n\textends OmitAttributesVersions<IFluidDataStoreAttributes0> {\n\treadonly snapshotFormatVersion: \"0.1\";\n\treadonly summaryFormatVersion?: undefined;\n}\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreAttributes2\n\textends OmitAttributesVersions<IFluidDataStoreAttributes1> {\n\t/** Switch from snapshotFormatVersion to summaryFormatVersion */\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion: 2;\n\t/**\n\t * True if channels are not isolated in .channels subtrees, otherwise isolated.\n\t * This is required in both datastore attributes as well as the root container,\n\t * because reused summary handles may cause different format versions in each\n\t * datastore subtree within the summary.\n\t */\n\treadonly disableIsolatedChannels?: true;\n}\n/**\n * Added IFluidDataStoreAttributes similar to IChannelAttributes which will tell the attributes of a\n * store like the package, snapshotFormatVersion to take different decisions based on a particular\n * snapshotFormatVersion.\n *\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n *\n * @legacy\n * @alpha\n *\n */\nexport type ReadFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes0\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\nexport type WriteFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\n\nexport function getAttributesFormatVersion(attributes: ReadFluidDataStoreAttributes): number {\n\tif (attributes.summaryFormatVersion) {\n\t\t/**\n\t\t * Version 2+: Introduces .channels trees for isolation of\n\t\t * channel trees from data store objects.\n\t\t */\n\t\treturn attributes.summaryFormatVersion;\n\t} else if (attributes.snapshotFormatVersion === \"0.1\") {\n\t\t/**\n\t\t * Version 1: from this version the pkg within the data store\n\t\t * attributes blob is a JSON array rather than a string.\n\t\t */\n\t\treturn 1;\n\t}\n\t/**\n\t * Version 0: format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn 0;\n}\n\nexport function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): boolean {\n\treturn !!attributes.summaryFormatVersion && !attributes.disableIsolatedChannels;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {\n\treadonly summaryFormatVersion: 1;\n\t/** @deprecated - used by old (prior to 2.0 RC3) runtimes */\n\treadonly message?: ISummaryMetadataMessage;\n\t/** The last message processed at the time of summary. Only primitive property types are added to the summary. */\n\treadonly lastMessage?: ISummaryMetadataMessage;\n\t/** True if channels are not isolated in .channels subtrees, otherwise isolated. */\n\treadonly disableIsolatedChannels?: true;\n\t/** The summary number for a container's summary. Incremented on summaries throughout its lifetime. */\n\treadonly summaryNumber?: number;\n\t/** GUID to identify a document in telemetry */\n\treadonly telemetryDocumentId?: string;\n\n\treadonly documentSchema?: IDocumentSchema;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ICreateContainerMetadata {\n\t/** Runtime version of the container when it was first created */\n\tcreateContainerRuntimeVersion?: string;\n\t/** Timestamp of the container when it was first created */\n\tcreateContainerTimestamp?: number;\n}\n\n/**\n * The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary.\n * @legacy\n * @alpha\n */\nexport type ISummaryMetadataMessage = Pick<\n\tISequencedDocumentMessage,\n\t| \"clientId\"\n\t| \"clientSequenceNumber\"\n\t| \"minimumSequenceNumber\"\n\t| \"referenceSequenceNumber\"\n\t| \"sequenceNumber\"\n\t| \"timestamp\"\n\t| \"type\"\n>;\n\n/**\n * Extracts the properties from an ISequencedDocumentMessage as defined by ISummaryMetadataMessage. This message is\n * added to the metadata blob in summary.\n */\nexport const extractSummaryMetadataMessage = (\n\tmessage?: ISequencedDocumentMessage,\n): ISummaryMetadataMessage | undefined =>\n\tmessage === undefined\n\t\t? undefined\n\t\t: {\n\t\t\t\tclientId: message.clientId,\n\t\t\t\tclientSequenceNumber: message.clientSequenceNumber,\n\t\t\t\tminimumSequenceNumber: message.minimumSequenceNumber,\n\t\t\t\treferenceSequenceNumber: message.referenceSequenceNumber,\n\t\t\t\tsequenceNumber: message.sequenceNumber,\n\t\t\t\ttimestamp: message.timestamp,\n\t\t\t\ttype: message.type,\n\t\t\t};\n\nexport function getMetadataFormatVersion(metadata?: IContainerRuntimeMetadata): number {\n\t/**\n\t * Version 2+: Introduces runtime sequence number for data verification.\n\t *\n\t * Version 1+: Introduces .metadata blob and .channels trees for isolation of\n\t * data store trees from container-level objects.\n\t * Also introduces enableGC option stored in the summary.\n\t *\n\t * Version 0: metadata blob missing; format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn metadata?.summaryFormatVersion ?? 0;\n}\n\nexport const aliasBlobName = \".aliases\";\nexport const metadataBlobName = \".metadata\";\nexport const chunksBlobName = \".chunks\";\nexport const electedSummarizerBlobName = \".electedSummarizer\";\nexport const idCompressorBlobName = \".idCompressor\";\nexport const blobHeadersBlobName = blobNameForBlobHeaders;\n\nexport function rootHasIsolatedChannels(metadata?: IContainerRuntimeMetadata): boolean {\n\treturn !!metadata && !metadata.disableIsolatedChannels;\n}\n\nexport const protocolTreeName = \".protocol\";\n\n/**\n * List of tree IDs at the container level which are reserved.\n * This is for older versions of summaries that do not yet have an\n * isolated data stores namespace. Without the namespace, this must\n * be used to prevent name collisions with data store IDs.\n */\nexport const nonDataStorePaths = [\n\tprotocolTreeName,\n\t\".logTail\",\n\t\".serviceProtocol\",\n\tblobsTreeName,\n\tgcTreeKey,\n\tidCompressorBlobName,\n];\n\nexport const dataStoreAttributesBlobName = \".component\";\n\n/**\n * Modifies summary tree and stats to put tree under .channels tree.\n *\n * @param summarizeResult - Summary tree and stats to modify\n *\n * @example\n *\n * Converts from:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} },\n * }\n * ```\n *\n * to:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: {\n * \".channels\": {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} }\n * },\n * },\n * }\n * ```\n *\n * And adds +1 to treeNodeCount in stats.\n */\nexport function wrapSummaryInChannelsTree(summarizeResult: ISummaryTreeWithStats): void {\n\tsummarizeResult.summary = {\n\t\ttype: SummaryType.Tree,\n\t\ttree: { [channelsTreeName]: summarizeResult.summary },\n\t};\n\tsummarizeResult.stats.treeNodeCount++;\n}\n\nexport async function getFluidDataStoreAttributes(\n\tstorage: IDocumentStorageService,\n\tsnapshot: ISnapshotTree,\n): Promise<ReadFluidDataStoreAttributes> {\n\tconst attributes = await readAndParse<ReadFluidDataStoreAttributes>(\n\t\tstorage,\n\t\tsnapshot.blobs[dataStoreAttributesBlobName],\n\t);\n\t// Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.\n\t// For snapshotFormatVersion = \"0.1\" (1) or above, pkg is jsonified, otherwise it is just a string.\n\t// However the feature of loading a detached container from snapshot, is added when the\n\t// snapshotFormatVersion is at least \"0.1\" (1), so we don't expect it to be anything else.\n\tconst formatVersion = getAttributesFormatVersion(attributes);\n\tassert(formatVersion > 0, 0x1d5 /* Invalid snapshot format version */);\n\treturn attributes;\n}\n"]}
1
+ {"version":3,"file":"summaryFormat.js","sourceRoot":"","sources":["../../src/summary/summaryFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAMjE,OAAO,EACN,mBAAmB,IAAI,sBAAsB,EAC7C,YAAY,GACZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEN,gBAAgB,EAChB,SAAS,GACT,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgFxD,MAAM,UAAU,0BAA0B,CAAC,UAAwC;IAClF,IAAI,UAAU,CAAC,oBAAoB,EAAE,CAAC;QACrC;;;WAGG;QACH,OAAO,UAAU,CAAC,oBAAoB,CAAC;IACxC,CAAC;SAAM,IAAI,UAAU,CAAC,qBAAqB,KAAK,KAAK,EAAE,CAAC;QACvD;;;WAGG;QACH,OAAO,CAAC,CAAC;IACV,CAAC;IACD;;;OAGG;IACH,OAAO,CAAC,CAAC;AACV,CAAC;AAED,MAA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,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,gBAAgB;IAChB,UAAU;IACV,kBAAkB;IAClB,aAAa;IACb,SAAS;IACT,oBAAoB;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,YAAY,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,yBAAyB,CAAC,eAAsC;IAC/E,eAAe,CAAC,OAAO,GAAG;QACzB,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,eAAe,CAAC,OAAO,EAAE;KACrD,CAAC;IACF,eAAe,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAChD,OAAgC,EAChC,QAAuB;IAEvB,MAAM,UAAU,GAAG,MAAM,YAAY,CACpC,OAAO,EACP,QAAQ,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAC3C,CAAC;IACF,qFAAqF;IACrF,mGAAmG;IACnG,uFAAuF;IACvF,0FAA0F;IAC1F,MAAM,aAAa,GAAG,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,aAAa,GAAG,CAAC,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC;AACnB,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/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentStorageService,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tblobHeadersBlobName as blobNameForBlobHeaders,\n\treadAndParse,\n} from \"@fluidframework/driver-utils/internal\";\nimport {\n\tISummaryTreeWithStats,\n\tchannelsTreeName,\n\tgcTreeKey,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { blobsTreeName } from \"../blobManager/index.js\";\nimport { IGCMetadata } from \"../gc/index.js\";\n\nimport { IDocumentSchema } from \"./documentSchema.js\";\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport type OmitAttributesVersions<T> = Omit<\n\tT,\n\t\"snapshotFormatVersion\" | \"summaryFormatVersion\"\n>;\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreAttributes0 {\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion?: undefined;\n\tpkg: string;\n\t/**\n\t * This tells whether a data store is root. Root data stores are never collected.\n\t * Non-root data stores may be collected if they are not used. If this is not present, default it to\n\t * true. This will ensure that older data stores are incorrectly collected.\n\t */\n\treadonly isRootDataStore?: boolean;\n}\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreAttributes1\n\textends OmitAttributesVersions<IFluidDataStoreAttributes0> {\n\treadonly snapshotFormatVersion: \"0.1\";\n\treadonly summaryFormatVersion?: undefined;\n}\n\n/**\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n * @legacy\n * @alpha\n */\nexport interface IFluidDataStoreAttributes2\n\textends OmitAttributesVersions<IFluidDataStoreAttributes1> {\n\t/** Switch from snapshotFormatVersion to summaryFormatVersion */\n\treadonly snapshotFormatVersion?: undefined;\n\treadonly summaryFormatVersion: 2;\n\t/**\n\t * True if channels are not isolated in .channels subtrees, otherwise isolated.\n\t * This is required in both datastore attributes as well as the root container,\n\t * because reused summary handles may cause different format versions in each\n\t * datastore subtree within the summary.\n\t */\n\treadonly disableIsolatedChannels?: true;\n}\n/**\n * Added IFluidDataStoreAttributes similar to IChannelAttributes which will tell the attributes of a\n * store like the package, snapshotFormatVersion to take different decisions based on a particular\n * snapshotFormatVersion.\n *\n * @deprecated - This interface will no longer be exported in the future(AB#8004).\n *\n * @legacy\n * @alpha\n *\n */\nexport type ReadFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes0\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\nexport type WriteFluidDataStoreAttributes =\n\t| IFluidDataStoreAttributes1\n\t| IFluidDataStoreAttributes2;\n\nexport function getAttributesFormatVersion(attributes: ReadFluidDataStoreAttributes): number {\n\tif (attributes.summaryFormatVersion) {\n\t\t/**\n\t\t * Version 2+: Introduces .channels trees for isolation of\n\t\t * channel trees from data store objects.\n\t\t */\n\t\treturn attributes.summaryFormatVersion;\n\t} else if (attributes.snapshotFormatVersion === \"0.1\") {\n\t\t/**\n\t\t * Version 1: from this version the pkg within the data store\n\t\t * attributes blob is a JSON array rather than a string.\n\t\t */\n\t\treturn 1;\n\t}\n\t/**\n\t * Version 0: format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn 0;\n}\n\nexport function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): boolean {\n\treturn !!attributes.summaryFormatVersion && !attributes.disableIsolatedChannels;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {\n\treadonly summaryFormatVersion: 1;\n\t/** @deprecated - used by old (prior to 2.0 RC3) runtimes */\n\treadonly message?: ISummaryMetadataMessage;\n\t/** The last message processed at the time of summary. Only primitive property types are added to the summary. */\n\treadonly lastMessage?: ISummaryMetadataMessage;\n\t/** True if channels are not isolated in .channels subtrees, otherwise isolated. */\n\treadonly disableIsolatedChannels?: true;\n\t/** The summary number for a container's summary. Incremented on summaries throughout its lifetime. */\n\treadonly summaryNumber?: number;\n\t/** GUID to identify a document in telemetry */\n\treadonly telemetryDocumentId?: string;\n\n\treadonly documentSchema?: IDocumentSchema;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ICreateContainerMetadata {\n\t/** Runtime version of the container when it was first created */\n\tcreateContainerRuntimeVersion?: string;\n\t/** Timestamp of the container when it was first created */\n\tcreateContainerTimestamp?: number;\n}\n\n/**\n * The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary.\n * @legacy\n * @alpha\n */\nexport type ISummaryMetadataMessage = Pick<\n\tISequencedDocumentMessage,\n\t| \"clientId\"\n\t| \"clientSequenceNumber\"\n\t| \"minimumSequenceNumber\"\n\t| \"referenceSequenceNumber\"\n\t| \"sequenceNumber\"\n\t| \"timestamp\"\n\t| \"type\"\n>;\n\n/**\n * Extracts the properties from an ISequencedDocumentMessage as defined by ISummaryMetadataMessage. This message is\n * added to the metadata blob in summary.\n */\nexport const extractSummaryMetadataMessage = (\n\tmessage?: ISequencedDocumentMessage,\n): ISummaryMetadataMessage | undefined =>\n\tmessage === undefined\n\t\t? undefined\n\t\t: {\n\t\t\t\tclientId: message.clientId,\n\t\t\t\tclientSequenceNumber: message.clientSequenceNumber,\n\t\t\t\tminimumSequenceNumber: message.minimumSequenceNumber,\n\t\t\t\treferenceSequenceNumber: message.referenceSequenceNumber,\n\t\t\t\tsequenceNumber: message.sequenceNumber,\n\t\t\t\ttimestamp: message.timestamp,\n\t\t\t\ttype: message.type,\n\t\t\t};\n\nexport function getMetadataFormatVersion(metadata?: IContainerRuntimeMetadata): number {\n\t/**\n\t * Version 2+: Introduces runtime sequence number for data verification.\n\t *\n\t * Version 1+: Introduces .metadata blob and .channels trees for isolation of\n\t * data store trees from container-level objects.\n\t * Also introduces enableGC option stored in the summary.\n\t *\n\t * Version 0: metadata blob missing; format version is missing from summary.\n\t * This indicates it is an older version.\n\t */\n\treturn metadata?.summaryFormatVersion ?? 0;\n}\n\nexport const aliasBlobName = \".aliases\";\nexport const metadataBlobName = \".metadata\";\nexport const chunksBlobName = \".chunks\";\nexport const recentBatchInfoBlobName = \".recentBatchInfo\";\nexport const electedSummarizerBlobName = \".electedSummarizer\";\nexport const idCompressorBlobName = \".idCompressor\";\nexport const blobHeadersBlobName = blobNameForBlobHeaders;\n\nexport function rootHasIsolatedChannels(metadata?: IContainerRuntimeMetadata): boolean {\n\treturn !!metadata && !metadata.disableIsolatedChannels;\n}\n\nexport const protocolTreeName = \".protocol\";\n\n/**\n * List of tree IDs at the container level which are reserved.\n * This is for older versions of summaries that do not yet have an\n * isolated data stores namespace. Without the namespace, this must\n * be used to prevent name collisions with data store IDs.\n */\nexport const nonDataStorePaths = [\n\tprotocolTreeName,\n\t\".logTail\",\n\t\".serviceProtocol\",\n\tblobsTreeName,\n\tgcTreeKey,\n\tidCompressorBlobName,\n];\n\nexport const dataStoreAttributesBlobName = \".component\";\n\n/**\n * Modifies summary tree and stats to put tree under .channels tree.\n *\n * @param summarizeResult - Summary tree and stats to modify\n *\n * @example\n *\n * Converts from:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} },\n * }\n * ```\n *\n * to:\n *\n * ```typescript\n * {\n * type: SummaryType.Tree,\n * tree: {\n * \".channels\": {\n * type: SummaryType.Tree,\n * tree: { a: {...}, b: {...}, c: {...} }\n * },\n * },\n * }\n * ```\n *\n * And adds +1 to treeNodeCount in stats.\n */\nexport function wrapSummaryInChannelsTree(summarizeResult: ISummaryTreeWithStats): void {\n\tsummarizeResult.summary = {\n\t\ttype: SummaryType.Tree,\n\t\ttree: { [channelsTreeName]: summarizeResult.summary },\n\t};\n\tsummarizeResult.stats.treeNodeCount++;\n}\n\nexport async function getFluidDataStoreAttributes(\n\tstorage: IDocumentStorageService,\n\tsnapshot: ISnapshotTree,\n): Promise<ReadFluidDataStoreAttributes> {\n\tconst attributes = await readAndParse<ReadFluidDataStoreAttributes>(\n\t\tstorage,\n\t\tsnapshot.blobs[dataStoreAttributesBlobName],\n\t);\n\t// Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.\n\t// For snapshotFormatVersion = \"0.1\" (1) or above, pkg is jsonified, otherwise it is just a string.\n\t// However the feature of loading a detached container from snapshot, is added when the\n\t// snapshotFormatVersion is at least \"0.1\" (1), so we don't expect it to be anything else.\n\tconst formatVersion = getAttributesFormatVersion(attributes);\n\tassert(formatVersion > 0, 0x1d5 /* Invalid snapshot format version */);\n\treturn attributes;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-runtime",
3
- "version": "2.10.0-307399",
3
+ "version": "2.10.0",
4
4
  "description": "Fluid container runtime",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -129,18 +129,18 @@
129
129
  "temp-directory": "nyc/.nyc_output"
130
130
  },
131
131
  "dependencies": {
132
- "@fluid-internal/client-utils": "2.10.0-307399",
133
- "@fluidframework/container-definitions": "2.10.0-307399",
134
- "@fluidframework/container-runtime-definitions": "2.10.0-307399",
135
- "@fluidframework/core-interfaces": "2.10.0-307399",
136
- "@fluidframework/core-utils": "2.10.0-307399",
137
- "@fluidframework/datastore": "2.10.0-307399",
138
- "@fluidframework/driver-definitions": "2.10.0-307399",
139
- "@fluidframework/driver-utils": "2.10.0-307399",
140
- "@fluidframework/id-compressor": "2.10.0-307399",
141
- "@fluidframework/runtime-definitions": "2.10.0-307399",
142
- "@fluidframework/runtime-utils": "2.10.0-307399",
143
- "@fluidframework/telemetry-utils": "2.10.0-307399",
132
+ "@fluid-internal/client-utils": "~2.10.0",
133
+ "@fluidframework/container-definitions": "~2.10.0",
134
+ "@fluidframework/container-runtime-definitions": "~2.10.0",
135
+ "@fluidframework/core-interfaces": "~2.10.0",
136
+ "@fluidframework/core-utils": "~2.10.0",
137
+ "@fluidframework/datastore": "~2.10.0",
138
+ "@fluidframework/driver-definitions": "~2.10.0",
139
+ "@fluidframework/driver-utils": "~2.10.0",
140
+ "@fluidframework/id-compressor": "~2.10.0",
141
+ "@fluidframework/runtime-definitions": "~2.10.0",
142
+ "@fluidframework/runtime-utils": "~2.10.0",
143
+ "@fluidframework/telemetry-utils": "~2.10.0",
144
144
  "@tylerbu/sorted-btree-es6": "^1.8.0",
145
145
  "double-ended-queue": "^2.1.0-0",
146
146
  "lz4js": "^0.2.0",
@@ -149,16 +149,16 @@
149
149
  "devDependencies": {
150
150
  "@arethetypeswrong/cli": "^0.16.4",
151
151
  "@biomejs/biome": "~1.9.3",
152
- "@fluid-internal/mocha-test-setup": "2.10.0-307399",
153
- "@fluid-private/stochastic-test-utils": "2.10.0-307399",
154
- "@fluid-private/test-pairwise-generator": "2.10.0-307399",
152
+ "@fluid-internal/mocha-test-setup": "~2.10.0",
153
+ "@fluid-private/stochastic-test-utils": "~2.10.0",
154
+ "@fluid-private/test-pairwise-generator": "~2.10.0",
155
155
  "@fluid-tools/benchmark": "^0.50.0",
156
156
  "@fluid-tools/build-cli": "^0.51.0",
157
157
  "@fluidframework/build-common": "^2.0.3",
158
158
  "@fluidframework/build-tools": "^0.51.0",
159
159
  "@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@~2.5.0",
160
160
  "@fluidframework/eslint-config-fluid": "^5.4.0",
161
- "@fluidframework/test-runtime-utils": "2.10.0-307399",
161
+ "@fluidframework/test-runtime-utils": "~2.10.0",
162
162
  "@microsoft/api-extractor": "7.47.8",
163
163
  "@types/double-ended-queue": "^2.1.0",
164
164
  "@types/mocha": "^9.1.1",
@@ -234,6 +234,7 @@ import {
234
234
  SummaryManager,
235
235
  aliasBlobName,
236
236
  chunksBlobName,
237
+ recentBatchInfoBlobName,
237
238
  createRootSummarizerNodeWithGC,
238
239
  electedSummarizerBlobName,
239
240
  extractSummaryMetadataMessage,
@@ -930,14 +931,23 @@ export class ContainerRuntime
930
931
  }
931
932
  };
932
933
 
933
- const [chunks, metadata, electedSummarizerData, aliases, serializedIdCompressor] =
934
- await Promise.all([
935
- tryFetchBlob<[string, string[]][]>(chunksBlobName),
936
- tryFetchBlob<IContainerRuntimeMetadata>(metadataBlobName),
937
- tryFetchBlob<ISerializedElection>(electedSummarizerBlobName),
938
- tryFetchBlob<[string, string][]>(aliasBlobName),
939
- tryFetchBlob<SerializedIdCompressorWithNoSession>(idCompressorBlobName),
940
- ]);
934
+ const [
935
+ chunks,
936
+ recentBatchInfo,
937
+ metadata,
938
+ electedSummarizerData,
939
+ aliases,
940
+ serializedIdCompressor,
941
+ ] = await Promise.all([
942
+ tryFetchBlob<[string, string[]][]>(chunksBlobName),
943
+ tryFetchBlob<ReturnType<DuplicateBatchDetector["getRecentBatchInfoForSummary"]>>(
944
+ recentBatchInfoBlobName,
945
+ ),
946
+ tryFetchBlob<IContainerRuntimeMetadata>(metadataBlobName),
947
+ tryFetchBlob<ISerializedElection>(electedSummarizerBlobName),
948
+ tryFetchBlob<[string, string][]>(aliasBlobName),
949
+ tryFetchBlob<SerializedIdCompressorWithNoSession>(idCompressorBlobName),
950
+ ]);
941
951
 
942
952
  // read snapshot blobs needed for BlobManager to load
943
953
  const blobManagerSnapshot = await loadBlobManagerLoadInfo(context);
@@ -1114,6 +1124,7 @@ export class ContainerRuntime
1114
1124
  provideEntryPoint,
1115
1125
  requestHandler,
1116
1126
  undefined, // summaryConfiguration
1127
+ recentBatchInfo,
1117
1128
  );
1118
1129
 
1119
1130
  runtime.blobManager.stashedBlobsUploadP.then(
@@ -1492,6 +1503,7 @@ export class ContainerRuntime
1492
1503
  // the runtime configuration overrides
1493
1504
  ...runtimeOptions.summaryOptions?.summaryConfigOverrides,
1494
1505
  },
1506
+ recentBatchInfo?: [number, string][],
1495
1507
  ) {
1496
1508
  super();
1497
1509
 
@@ -1532,7 +1544,7 @@ export class ContainerRuntime
1532
1544
  compressionAlgorithm: CompressionAlgorithms.lz4,
1533
1545
  };
1534
1546
 
1535
- assert(isIDeltaManagerFull(deltaManager), "Invalid delta manager");
1547
+ assert(isIDeltaManagerFull(deltaManager), 0xa80 /* Invalid delta manager */);
1536
1548
  this.innerDeltaManager = deltaManager;
1537
1549
 
1538
1550
  // Here we could wrap/intercept on these functions to block/modify outgoing messages if needed.
@@ -1707,7 +1719,7 @@ export class ContainerRuntime
1707
1719
  // It maintains a cache of all batchIds/sequenceNumbers within the collab window.
1708
1720
  // Don't waste resources doing so if not needed.
1709
1721
  if (this.offlineEnabled) {
1710
- this.duplicateBatchDetector = new DuplicateBatchDetector();
1722
+ this.duplicateBatchDetector = new DuplicateBatchDetector(recentBatchInfo);
1711
1723
  }
1712
1724
 
1713
1725
  if (context.attachState === AttachState.Attached) {
@@ -2414,6 +2426,12 @@ export class ContainerRuntime
2414
2426
  addBlobToSummary(summaryTree, chunksBlobName, content);
2415
2427
  }
2416
2428
 
2429
+ const recentBatchInfo =
2430
+ this.duplicateBatchDetector?.getRecentBatchInfoForSummary(telemetryContext);
2431
+ if (recentBatchInfo !== undefined) {
2432
+ addBlobToSummary(summaryTree, recentBatchInfoBlobName, JSON.stringify(recentBatchInfo));
2433
+ }
2434
+
2417
2435
  const dataStoreAliases = this.channelCollection.aliases;
2418
2436
  if (dataStoreAliases.size > 0) {
2419
2437
  addBlobToSummary(summaryTree, aliasBlobName, JSON.stringify([...dataStoreAliases]));
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils/internal";
7
+ import type { ITelemetryContext } from "@fluidframework/runtime-definitions/internal";
7
8
 
8
9
  import { getEffectiveBatchId } from "./batchManager.js";
9
10
  import { type BatchStartInfo } from "./remoteMessageProcessor.js";
@@ -18,6 +19,16 @@ export class DuplicateBatchDetector {
18
19
  /** We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances */
19
20
  private readonly batchIdsBySeqNum = new Map<number, string>();
20
21
 
22
+ /** Initialize from snapshot data if provided - otherwise initialize empty */
23
+ constructor(batchIdsFromSnapshot: [number, string][] | undefined) {
24
+ if (batchIdsFromSnapshot) {
25
+ this.batchIdsBySeqNum = new Map(batchIdsFromSnapshot);
26
+ for (const batchId of this.batchIdsBySeqNum.values()) {
27
+ this.batchIdsAll.add(batchId);
28
+ }
29
+ }
30
+ }
31
+
21
32
  /**
22
33
  * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.
23
34
  * If it's a duplicate, also return the sequence number of the other batch for logging.
@@ -75,4 +86,26 @@ export class DuplicateBatchDetector {
75
86
  }
76
87
  });
77
88
  }
89
+
90
+ /**
91
+ * Returns a snapshot of the state of the detector which can be included in a summary
92
+ * and used to "rehydrate" this class when loading from a snapshot.
93
+ *
94
+ * @returns - A serializable object representing the state of the detector, or undefined if there is nothing to save.
95
+ */
96
+ public getRecentBatchInfoForSummary(
97
+ telemetryContext?: ITelemetryContext,
98
+ ): [number, string][] | undefined {
99
+ if (this.batchIdsBySeqNum.size === 0) {
100
+ return undefined;
101
+ }
102
+
103
+ telemetryContext?.set(
104
+ "fluid_DuplicateBatchDetector_",
105
+ "recentBatchCount",
106
+ this.batchIdsBySeqNum.size,
107
+ );
108
+
109
+ return [...this.batchIdsBySeqNum.entries()];
110
+ }
78
111
  }
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.10.0-307399";
9
+ export const pkgVersion = "2.10.0";
@@ -84,6 +84,7 @@ export {
84
84
  export {
85
85
  aliasBlobName,
86
86
  chunksBlobName,
87
+ recentBatchInfoBlobName,
87
88
  dataStoreAttributesBlobName,
88
89
  electedSummarizerBlobName,
89
90
  extractSummaryMetadataMessage,
@@ -208,6 +208,7 @@ export function getMetadataFormatVersion(metadata?: IContainerRuntimeMetadata):
208
208
  export const aliasBlobName = ".aliases";
209
209
  export const metadataBlobName = ".metadata";
210
210
  export const chunksBlobName = ".chunks";
211
+ export const recentBatchInfoBlobName = ".recentBatchInfo";
211
212
  export const electedSummarizerBlobName = ".electedSummarizer";
212
213
  export const idCompressorBlobName = ".idCompressor";
213
214
  export const blobHeadersBlobName = blobNameForBlobHeaders;