@fluidframework/container-runtime 2.10.0-307060 → 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 (58) 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/blobManager/blobManager.d.ts +1 -6
  5. package/dist/blobManager/blobManager.d.ts.map +1 -1
  6. package/dist/blobManager/blobManager.js +10 -29
  7. package/dist/blobManager/blobManager.js.map +1 -1
  8. package/dist/containerRuntime.d.ts +1 -1
  9. package/dist/containerRuntime.d.ts.map +1 -1
  10. package/dist/containerRuntime.js +12 -6
  11. package/dist/containerRuntime.js.map +1 -1
  12. package/dist/opLifecycle/duplicateBatchDetector.d.ts +10 -0
  13. package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  14. package/dist/opLifecycle/duplicateBatchDetector.js +21 -1
  15. package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
  16. package/dist/packageVersion.d.ts +1 -1
  17. package/dist/packageVersion.d.ts.map +1 -1
  18. package/dist/packageVersion.js +1 -1
  19. package/dist/packageVersion.js.map +1 -1
  20. package/dist/summary/index.d.ts +1 -1
  21. package/dist/summary/index.d.ts.map +1 -1
  22. package/dist/summary/index.js +2 -1
  23. package/dist/summary/index.js.map +1 -1
  24. package/dist/summary/summaryFormat.d.ts +1 -0
  25. package/dist/summary/summaryFormat.d.ts.map +1 -1
  26. package/dist/summary/summaryFormat.js +2 -1
  27. package/dist/summary/summaryFormat.js.map +1 -1
  28. package/lib/blobManager/blobManager.d.ts +1 -6
  29. package/lib/blobManager/blobManager.d.ts.map +1 -1
  30. package/lib/blobManager/blobManager.js +11 -30
  31. package/lib/blobManager/blobManager.js.map +1 -1
  32. package/lib/containerRuntime.d.ts +1 -1
  33. package/lib/containerRuntime.d.ts.map +1 -1
  34. package/lib/containerRuntime.js +13 -7
  35. package/lib/containerRuntime.js.map +1 -1
  36. package/lib/opLifecycle/duplicateBatchDetector.d.ts +10 -0
  37. package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  38. package/lib/opLifecycle/duplicateBatchDetector.js +21 -1
  39. package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
  40. package/lib/packageVersion.d.ts +1 -1
  41. package/lib/packageVersion.d.ts.map +1 -1
  42. package/lib/packageVersion.js +1 -1
  43. package/lib/packageVersion.js.map +1 -1
  44. package/lib/summary/index.d.ts +1 -1
  45. package/lib/summary/index.d.ts.map +1 -1
  46. package/lib/summary/index.js +1 -1
  47. package/lib/summary/index.js.map +1 -1
  48. package/lib/summary/summaryFormat.d.ts +1 -0
  49. package/lib/summary/summaryFormat.d.ts.map +1 -1
  50. package/lib/summary/summaryFormat.js +1 -0
  51. package/lib/summary/summaryFormat.js.map +1 -1
  52. package/package.json +19 -19
  53. package/src/blobManager/blobManager.ts +24 -39
  54. package/src/containerRuntime.ts +29 -11
  55. package/src/opLifecycle/duplicateBatchDetector.ts +33 -0
  56. package/src/packageVersion.ts +1 -1
  57. package/src/summary/index.ts +1 -0
  58. 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"}
@@ -11,11 +11,18 @@ const batchManager_js_1 = require("./batchManager.js");
11
11
  * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.
12
12
  */
13
13
  class DuplicateBatchDetector {
14
- constructor() {
14
+ /** Initialize from snapshot data if provided - otherwise initialize empty */
15
+ constructor(batchIdsFromSnapshot) {
15
16
  /** All batchIds we've seen recently enough (based on MSN) that we need to watch for duplicates */
16
17
  this.batchIdsAll = new Set();
17
18
  /** We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances */
18
19
  this.batchIdsBySeqNum = new Map();
20
+ if (batchIdsFromSnapshot) {
21
+ this.batchIdsBySeqNum = new Map(batchIdsFromSnapshot);
22
+ for (const batchId of this.batchIdsBySeqNum.values()) {
23
+ this.batchIdsAll.add(batchId);
24
+ }
25
+ }
19
26
  }
20
27
  /**
21
28
  * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.
@@ -63,6 +70,19 @@ class DuplicateBatchDetector {
63
70
  }
64
71
  });
65
72
  }
73
+ /**
74
+ * Returns a snapshot of the state of the detector which can be included in a summary
75
+ * and used to "rehydrate" this class when loading from a snapshot.
76
+ *
77
+ * @returns - A serializable object representing the state of the detector, or undefined if there is nothing to save.
78
+ */
79
+ getRecentBatchInfoForSummary(telemetryContext) {
80
+ if (this.batchIdsBySeqNum.size === 0) {
81
+ return undefined;
82
+ }
83
+ telemetryContext?.set("fluid_DuplicateBatchDetector_", "recentBatchCount", this.batchIdsBySeqNum.size);
84
+ return [...this.batchIdsBySeqNum.entries()];
85
+ }
66
86
  }
67
87
  exports.DuplicateBatchDetector = DuplicateBatchDetector;
68
88
  //# sourceMappingURL=duplicateBatchDetector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"duplicateBatchDetector.js","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,uDAAwD;AAGxD;;GAEG;AACH,MAAa,sBAAsB;IAAnC;QACC,kGAAkG;QACjF,gBAAW,GAAG,IAAI,GAAG,EAAU,CAAC;QAEjD,oGAAoG;QACnF,qBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IA2D/D,CAAC;IAzDA;;;;;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,IAAA,qCAAmB,EAAC,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,gBAAgB,CAAC,OAAO,EAAE,EAAE,CAAC;gBACnF,IAAI,YAAY,KAAK,OAAO,EAAE,CAAC;oBAC9B,OAAO;wBACN,SAAS,EAAE,IAAI;wBACf,mBAAmB;qBACnB,CAAC;gBACH,CAAC;YACF,CAAC;YACD,IAAA,iBAAM,EAAC,KAAK,EAAE,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACjF,CAAC;QAED,kFAAkF;QAClF,IAAA,iBAAM,EACL,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,cAAc,CAAC,EAC1C,KAAK,CAAC,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;AAhED,wDAgEC","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,kEAA6D;AAG7D,uDAAwD;AAGxD;;GAEG;AACH,MAAa,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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E,CAAC;YACtC,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,gBAAgB,EAAE,GAAG,CACpB,+BAA+B,EAC/B,kBAAkB,EAClB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAC1B,CAAC;QAEF,OAAO,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;CACD;AAhGD,wDAgGC","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-307060";
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"}
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/container-runtime";
11
- exports.pkgVersion = "2.10.0-307060";
11
+ exports.pkgVersion = "2.10.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,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-307060\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,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,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,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EACN,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,aAAa,EACb,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GACjB,MAAM,wBAAwB,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,4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,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"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SummaryManagerState = exports.SummaryManager = exports.RetriableSummaryError = exports.getFailMessage = exports.DocumentsSchemaController = exports.currentDocumentVersionSchema = exports.idCompressorBlobName = exports.wrapSummaryInChannelsTree = exports.rootHasIsolatedChannels = exports.nonDataStorePaths = exports.metadataBlobName = exports.hasIsolatedChannels = exports.getFluidDataStoreAttributes = exports.getAttributesFormatVersion = exports.extractSummaryMetadataMessage = exports.electedSummarizerBlobName = exports.dataStoreAttributesBlobName = exports.chunksBlobName = exports.aliasBlobName = exports.SummaryCollection = exports.createRootSummarizerNodeWithGC = exports.createRootSummarizerNode = exports.SummarizeHeuristicRunner = exports.SummarizeHeuristicData = exports.summarizerClientType = exports.SummarizerClientElection = exports.Summarizer = exports.RunWhileConnectedCoordinator = exports.neverCancelledSummaryToken = exports.RunningSummarizer = exports.defaultMaxAttemptsForSubmitFailures = exports.OrderedClientElection = exports.OrderedClientCollection = void 0;
7
+ exports.SummaryManagerState = exports.SummaryManager = exports.RetriableSummaryError = exports.getFailMessage = exports.DocumentsSchemaController = exports.currentDocumentVersionSchema = exports.idCompressorBlobName = exports.wrapSummaryInChannelsTree = exports.rootHasIsolatedChannels = exports.nonDataStorePaths = exports.metadataBlobName = exports.hasIsolatedChannels = exports.getFluidDataStoreAttributes = exports.getAttributesFormatVersion = exports.extractSummaryMetadataMessage = exports.electedSummarizerBlobName = exports.dataStoreAttributesBlobName = exports.recentBatchInfoBlobName = exports.chunksBlobName = exports.aliasBlobName = exports.SummaryCollection = exports.createRootSummarizerNodeWithGC = exports.createRootSummarizerNode = exports.SummarizeHeuristicRunner = exports.SummarizeHeuristicData = exports.summarizerClientType = exports.SummarizerClientElection = exports.Summarizer = exports.RunWhileConnectedCoordinator = exports.neverCancelledSummaryToken = exports.RunningSummarizer = exports.defaultMaxAttemptsForSubmitFailures = exports.OrderedClientElection = exports.OrderedClientCollection = void 0;
8
8
  var orderedClientElection_js_1 = require("./orderedClientElection.js");
9
9
  Object.defineProperty(exports, "OrderedClientCollection", { enumerable: true, get: function () { return orderedClientElection_js_1.OrderedClientCollection; } });
10
10
  Object.defineProperty(exports, "OrderedClientElection", { enumerable: true, get: function () { return orderedClientElection_js_1.OrderedClientElection; } });
@@ -30,6 +30,7 @@ Object.defineProperty(exports, "SummaryCollection", { enumerable: true, get: fun
30
30
  var summaryFormat_js_1 = require("./summaryFormat.js");
31
31
  Object.defineProperty(exports, "aliasBlobName", { enumerable: true, get: function () { return summaryFormat_js_1.aliasBlobName; } });
32
32
  Object.defineProperty(exports, "chunksBlobName", { enumerable: true, get: function () { return summaryFormat_js_1.chunksBlobName; } });
33
+ Object.defineProperty(exports, "recentBatchInfoBlobName", { enumerable: true, get: function () { return summaryFormat_js_1.recentBatchInfoBlobName; } });
33
34
  Object.defineProperty(exports, "dataStoreAttributesBlobName", { enumerable: true, get: function () { return summaryFormat_js_1.dataStoreAttributesBlobName; } });
34
35
  Object.defineProperty(exports, "electedSummarizerBlobName", { enumerable: true, get: function () { return summaryFormat_js_1.electedSummarizerBlobName; } });
35
36
  Object.defineProperty(exports, "extractSummaryMetadataMessage", { enumerable: true, get: function () { return summaryFormat_js_1.extractSummaryMetadataMessage; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/summary/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAOoC;AAFnC,mIAAA,uBAAuB,OAAA;AACvB,iIAAA,qBAAqB,OAAA;AAEtB,+DAGgC;AAF/B,2IAAA,mCAAmC,OAAA;AACnC,yHAAA,iBAAiB,OAAA;AAElB,qFAI2C;AAF1C,6IAAA,0BAA0B,OAAA;AAC1B,+IAAA,4BAA4B,OAAA;AAE7B,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,6EAKuC;AAFtC,uIAAA,wBAAwB,OAAA;AACxB,mIAAA,oBAAoB,OAAA;AAErB,qEAA6F;AAApF,iIAAA,sBAAsB,OAAA;AAAE,mIAAA,wBAAwB,OAAA;AACzD,sDAMmC;AALlC,oHAAA,wBAAwB,OAAA;AACxB,0HAAA,8BAA8B,OAAA;AAuC/B,+DAWgC;AAP/B,yHAAA,iBAAiB,OAAA;AAQlB,uDAuB4B;AAtB3B,iHAAA,aAAa,OAAA;AACb,kHAAA,cAAc,OAAA;AACd,+HAAA,2BAA2B,OAAA;AAC3B,6HAAA,yBAAyB,OAAA;AACzB,iIAAA,6BAA6B,OAAA;AAC7B,8HAAA,0BAA0B,OAAA;AAC1B,+HAAA,2BAA2B,OAAA;AAC3B,uHAAA,mBAAmB,OAAA;AAInB,oHAAA,gBAAgB,OAAA;AAChB,qHAAA,iBAAiB,OAAA;AAEjB,2HAAA,uBAAuB,OAAA;AAEvB,6HAAA,yBAAyB,OAAA;AACzB,wHAAA,oBAAoB,OAAA;AAMrB,yDAS6B;AAL5B,iIAAA,4BAA4B,OAAA;AAE5B,8HAAA,yBAAyB,OAAA;AAI1B,6DAA+F;AAAtF,qHAAA,cAAc,OAAA;AAAE,4HAAA,qBAAqB,OAAA;AAC9C,yDAM6B;AAF5B,mHAAA,cAAc,OAAA;AACd,wHAAA,mBAAmB,OAAA","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,uEAOoC;AAFnC,mIAAA,uBAAuB,OAAA;AACvB,iIAAA,qBAAqB,OAAA;AAEtB,+DAGgC;AAF/B,2IAAA,mCAAmC,OAAA;AACnC,yHAAA,iBAAiB,OAAA;AAElB,qFAI2C;AAF1C,6IAAA,0BAA0B,OAAA;AAC1B,+IAAA,4BAA4B,OAAA;AAE7B,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,6EAKuC;AAFtC,uIAAA,wBAAwB,OAAA;AACxB,mIAAA,oBAAoB,OAAA;AAErB,qEAA6F;AAApF,iIAAA,sBAAsB,OAAA;AAAE,mIAAA,wBAAwB,OAAA;AACzD,sDAMmC;AALlC,oHAAA,wBAAwB,OAAA;AACxB,0HAAA,8BAA8B,OAAA;AAuC/B,+DAWgC;AAP/B,yHAAA,iBAAiB,OAAA;AAQlB,uDAwB4B;AAvB3B,iHAAA,aAAa,OAAA;AACb,kHAAA,cAAc,OAAA;AACd,2HAAA,uBAAuB,OAAA;AACvB,+HAAA,2BAA2B,OAAA;AAC3B,6HAAA,yBAAyB,OAAA;AACzB,iIAAA,6BAA6B,OAAA;AAC7B,8HAAA,0BAA0B,OAAA;AAC1B,+HAAA,2BAA2B,OAAA;AAC3B,uHAAA,mBAAmB,OAAA;AAInB,oHAAA,gBAAgB,OAAA;AAChB,qHAAA,iBAAiB,OAAA;AAEjB,2HAAA,uBAAuB,OAAA;AAEvB,6HAAA,yBAAyB,OAAA;AACzB,wHAAA,oBAAoB,OAAA;AAMrB,yDAS6B;AAL5B,iIAAA,4BAA4B,OAAA;AAE5B,8HAAA,yBAAyB,OAAA;AAI1B,6DAA+F;AAAtF,qHAAA,cAAc,OAAA;AAAE,4HAAA,qBAAqB,OAAA;AAC9C,yDAM6B;AAF5B,mHAAA,cAAc,OAAA;AACd,wHAAA,mBAAmB,OAAA","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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,CAChD,OAAO,EAAE,uBAAuB,EAChC,QAAQ,EAAE,aAAa,GACrB,OAAO,CAAC,4BAA4B,CAAC,CAYvC"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.getFluidDataStoreAttributes = exports.wrapSummaryInChannelsTree = exports.dataStoreAttributesBlobName = exports.nonDataStorePaths = exports.protocolTreeName = exports.rootHasIsolatedChannels = exports.blobHeadersBlobName = exports.idCompressorBlobName = exports.electedSummarizerBlobName = exports.chunksBlobName = exports.metadataBlobName = exports.aliasBlobName = exports.getMetadataFormatVersion = exports.extractSummaryMetadataMessage = exports.hasIsolatedChannels = exports.getAttributesFormatVersion = void 0;
7
+ exports.getFluidDataStoreAttributes = exports.wrapSummaryInChannelsTree = exports.dataStoreAttributesBlobName = exports.nonDataStorePaths = exports.protocolTreeName = exports.rootHasIsolatedChannels = exports.blobHeadersBlobName = exports.idCompressorBlobName = exports.electedSummarizerBlobName = exports.recentBatchInfoBlobName = exports.chunksBlobName = exports.metadataBlobName = exports.aliasBlobName = exports.getMetadataFormatVersion = exports.extractSummaryMetadataMessage = exports.hasIsolatedChannels = exports.getAttributesFormatVersion = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const driver_definitions_1 = require("@fluidframework/driver-definitions");
10
10
  const internal_2 = require("@fluidframework/driver-utils/internal");
@@ -69,6 +69,7 @@ exports.getMetadataFormatVersion = getMetadataFormatVersion;
69
69
  exports.aliasBlobName = ".aliases";
70
70
  exports.metadataBlobName = ".metadata";
71
71
  exports.chunksBlobName = ".chunks";
72
+ exports.recentBatchInfoBlobName = ".recentBatchInfo";
72
73
  exports.electedSummarizerBlobName = ".electedSummarizer";
73
74
  exports.idCompressorBlobName = ".idCompressor";
74
75
  exports.blobHeadersBlobName = internal_2.blobHeadersBlobName;
@@ -1 +1 @@
1
- {"version":3,"file":"summaryFormat.js","sourceRoot":"","sources":["../../src/summary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["/*!\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,kEAA6D;AAC7D,2EAAiE;AAMjE,oEAG+C;AAC/C,2EAIsD;AAEtD,sDAAwD;AAgFxD,SAAgB,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;AAnBD,gEAmBC;AAED,SAAgB,mBAAmB,CAAC,UAAwC;IAC3E,OAAO,CAAC,CAAC,UAAU,CAAC,oBAAoB,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC;AACjF,CAAC;AAFD,kDAEC;AAiDD;;;GAGG;AACI,MAAM,6BAA6B,GAAG,CAC5C,OAAmC,EACG,EAAE,CACxC,OAAO,KAAK,SAAS;IACpB,CAAC,CAAC,SAAS;IACX,CAAC,CAAC;QACA,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC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,CAAC,OAAO,EAAE;KACrD,CAAC;IACF,eAAe,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;AACvC,CAAC;AAND,8DAMC;AAEM,KAAK,UAAU,2BAA2B,CAChD,OAAgC,EAChC,QAAuB;IAEvB,MAAM,UAAU,GAAG,MAAM,IAAA,uBAAY,EACpC,OAAO,EACP,QAAQ,CAAC,KAAK,CAAC,mCAA2B,CAAC,CAC3C,CAAC;IACF,qFAAqF;IACrF,mGAAmG;IACnG,uFAAuF;IACvF,0FAA0F;IAC1F,MAAM,aAAa,GAAG,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAC7D,IAAA,iBAAM,EAAC,aAAa,GAAG,CAAC,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC;AACnB,CAAC;AAfD,kEAeC","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"]}
@@ -73,7 +73,7 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
73
73
  private readonly closeContainer;
74
74
  private readonly localBlobIdGenerator;
75
75
  private readonly pendingStashedBlobs;
76
- private stashedBlobsUploadP;
76
+ readonly stashedBlobsUploadP: Promise<(void | ICreateBlobResponse)[]>;
77
77
  constructor(props: {
78
78
  readonly routeContext: IFluidHandleContext;
79
79
  snapshot: IBlobManagerLoadInfo;
@@ -96,15 +96,10 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
96
96
  readonly closeContainer: (error?: ICriticalContainerError) => void;
97
97
  readonly localBlobIdGenerator?: (() => string) | undefined;
98
98
  });
99
- waitForStashedBlobs(): Promise<(void | ICreateBlobResponse)[]>;
100
99
  get allBlobsAttached(): boolean;
101
100
  get hasPendingBlobs(): boolean;
102
101
  private createAbortError;
103
102
  hasPendingStashedUploads(): boolean;
104
- /**
105
- * Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
106
- */
107
- trackPendingStashedUploads(): Promise<void>;
108
103
  getBlob(blobId: string): Promise<ArrayBufferLike>;
109
104
  private getBlobHandle;
110
105
  private createBlobDetached;
@@ -1 +1 @@
1
- {"version":3,"file":"blobManager.d.ts","sourceRoot":"","sources":["../../src/blobManager/blobManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EAGjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAe,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EACN,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACN,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,uBAAuB,EACvB,mBAAmB,EACnB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,yBAAyB,EAC9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACN,eAAe,EAIf,MAAM,wCAAwC,CAAC;AAahD,OAAO,EAIN,KAAK,oBAAoB,EACzB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;GAMG;AACH,qBAAa,UAAW,SAAQ,eAAe,CAAC,eAAe,CAAC;aAU9C,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;IAC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AAsB;IAS9B,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;IAyDvB;;;;OAIG;IACI,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAiBtD,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO;IAoD3E,SAAS,CAAC,gBAAgB,CAAC,EAAE,iBAAiB,GAAG,qBAAqB;IAI7E;;;;;OAKG;IACI,SAAS,CAAC,MAAM,GAAE,OAAe,GAAG,sBAAsB;IAejE;;;;;OAKG;IACI,qBAAqB,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE;IAKxF;;;;;;;;;;OAUG;IACH,OAAO,CAAC,4BAA4B;IA8CpC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAqBrB,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAiBlD;;;;;;;;;OASG;IACU,wBAAwB,CACpC,uBAAuB,CAAC,EAAE,WAAW,GACnC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAiFrC;AAkBD;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,MAAM,gCACL,CAAC;AAEnC,eAAO,MAAM,gBAAgB,cACjB,MAAM,EAAE,wCAE2C,CAAC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { TypedEventEmitter, bufferToString, stringToBuffer, } from "@fluid-internal/client-utils";
6
6
  import { AttachState } from "@fluidframework/container-definitions";
7
- import { assert, Deferred } from "@fluidframework/core-utils/internal";
7
+ import { assert, Deferred, LazyPromise } from "@fluidframework/core-utils/internal";
8
8
  import { canRetryOnError, runWithRetry } from "@fluidframework/driver-utils/internal";
9
9
  import { FluidHandleBase, createResponseError, generateHandleContextPath, responseToException, } from "@fluidframework/runtime-utils/internal";
10
10
  import { GenericError, LoggingError, PerformanceEvent, createChildMonitoringContext, wrapError, } from "@fluidframework/telemetry-utils/internal";
@@ -61,9 +61,7 @@ export class BlobManager extends TypedEventEmitter {
61
61
  */
62
62
  this.opsInFlight = new Map();
63
63
  this.stopAttaching = false;
64
- // TODO: consider to replace with a lazy promise
65
64
  this.pendingStashedBlobs = new Map();
66
- this.stashedBlobsUploadP = undefined;
67
65
  const { routeContext, snapshot, getStorage, sendBlobAttachOp, blobRequested, isBlobDeleted, runtime, stashedBlobs, closeContainer, localBlobIdGenerator, } = props;
68
66
  this.routeContext = routeContext;
69
67
  this.getStorage = getStorage;
@@ -107,9 +105,7 @@ export class BlobManager extends TypedEventEmitter {
107
105
  uploadP: this.pendingStashedBlobs.get(localId),
108
106
  });
109
107
  });
110
- this.waitForStashedBlobs()
111
- .catch(() => { })
112
- .finally(() => {
108
+ this.stashedBlobsUploadP = new LazyPromise(async () => PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "BlobUploadProcessStashedChanges", count: this.pendingStashedBlobs.size }, async () => Promise.all(this.pendingStashedBlobs.values()), { start: true, end: true })).finally(() => {
113
109
  this.pendingStashedBlobs.clear();
114
110
  });
115
111
  this.sendBlobAttachOp = (localId, blobId) => {
@@ -137,15 +133,6 @@ export class BlobManager extends TypedEventEmitter {
137
133
  return sendBlobAttachOp(localId, blobId);
138
134
  };
139
135
  }
140
- async waitForStashedBlobs() {
141
- if (!this.stashedBlobsUploadP) {
142
- this.stashedBlobsUploadP = Promise.all(this.pendingStashedBlobs.values()).finally(() => {
143
- this.stashedBlobsUploadP = undefined;
144
- return;
145
- });
146
- }
147
- return this.stashedBlobsUploadP;
148
- }
149
136
  get allBlobsAttached() {
150
137
  for (const [, entry] of this.pendingBlobs) {
151
138
  if (entry.attached === false) {
@@ -167,21 +154,6 @@ export class BlobManager extends TypedEventEmitter {
167
154
  hasPendingStashedUploads() {
168
155
  return Array.from(this.pendingBlobs.values()).some((e) => e.stashedUpload === true);
169
156
  }
170
- /**
171
- * Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
172
- */
173
- async trackPendingStashedUploads() {
174
- const pendingUploads = Array.from(this.pendingBlobs.values())
175
- .filter((e) => e.stashedUpload === true)
176
- .map(async (e) => e.uploadP);
177
- if (pendingUploads.length === 0) {
178
- return;
179
- }
180
- await PerformanceEvent.timedExecAsync(this.mc.logger, {
181
- eventName: "BlobUploadProcessStashedChanges",
182
- count: pendingUploads.length,
183
- }, async () => Promise.all(pendingUploads), { start: true, end: true });
184
- }
185
157
  async getBlob(blobId) {
186
158
  // Verify that the blob is not deleted, i.e., it has not been garbage collected. If it is, this will throw
187
159
  // an error, failing the call.
@@ -317,6 +289,15 @@ export class BlobManager extends TypedEventEmitter {
317
289
  }
318
290
  onUploadResolve(localId, response) {
319
291
  const entry = this.pendingBlobs.get(localId);
292
+ if (entry === undefined && this.pendingStashedBlobs.has(localId)) {
293
+ // The blob was already processed and deleted. This can happen if the blob was reuploaded by
294
+ // the stashing process and the original upload was processed before the stashed upload.
295
+ this.mc.logger.sendTelemetryEvent({
296
+ eventName: "StashedBlobAlreadyProcessed",
297
+ localId,
298
+ });
299
+ return;
300
+ }
320
301
  assert(entry !== undefined, 0x6c8 /* pending blob entry not found for uploaded blob */);
321
302
  if ((entry.abortSignal?.aborted === true && !entry.opsent) || this.stopAttaching) {
322
303
  this.mc.logger.sendTelemetryEvent({