@fluidframework/runtime-utils 1.4.0-115997 → 2.0.0-dev-rc.1.0.0.224419

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 (187) hide show
  1. package/.eslintrc.js +5 -7
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +191 -0
  4. package/README.md +68 -1
  5. package/api-extractor-lint.json +4 -0
  6. package/api-extractor.json +2 -2
  7. package/api-report/runtime-utils.api.md +201 -0
  8. package/dist/{dataStoreHandleContextUtils.js → dataStoreHandleContextUtils.cjs} +5 -2
  9. package/dist/dataStoreHandleContextUtils.cjs.map +1 -0
  10. package/dist/dataStoreHandleContextUtils.d.ts +1 -0
  11. package/dist/dataStoreHandleContextUtils.d.ts.map +1 -1
  12. package/dist/{dataStoreHelpers.js → dataStoreHelpers.cjs} +44 -25
  13. package/dist/dataStoreHelpers.cjs.map +1 -0
  14. package/dist/dataStoreHelpers.d.ts +23 -4
  15. package/dist/dataStoreHelpers.d.ts.map +1 -1
  16. package/dist/index.cjs +44 -0
  17. package/dist/index.cjs.map +1 -0
  18. package/dist/index.d.ts +9 -9
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/{objectstoragepartition.js → objectstoragepartition.cjs} +4 -3
  21. package/dist/objectstoragepartition.cjs.map +1 -0
  22. package/dist/objectstoragepartition.d.ts +1 -0
  23. package/dist/objectstoragepartition.d.ts.map +1 -1
  24. package/dist/{objectstorageutils.js → objectstorageutils.cjs} +11 -15
  25. package/dist/objectstorageutils.cjs.map +1 -0
  26. package/dist/objectstorageutils.d.ts +6 -0
  27. package/dist/objectstorageutils.d.ts.map +1 -1
  28. package/dist/{requestParser.js → requestParser.cjs} +7 -11
  29. package/dist/requestParser.cjs.map +1 -0
  30. package/dist/requestParser.d.ts +1 -0
  31. package/dist/requestParser.d.ts.map +1 -1
  32. package/dist/runtime-utils-alpha.d.ts +155 -0
  33. package/dist/runtime-utils-beta.d.ts +103 -0
  34. package/dist/runtime-utils-public.d.ts +103 -0
  35. package/dist/runtime-utils-untrimmed.d.ts +306 -0
  36. package/dist/{runtimeFactoryHelper.js → runtimeFactoryHelper.cjs} +11 -12
  37. package/dist/runtimeFactoryHelper.cjs.map +1 -0
  38. package/dist/runtimeFactoryHelper.d.ts +4 -1
  39. package/dist/runtimeFactoryHelper.d.ts.map +1 -1
  40. package/dist/{summaryUtils.js → summaryUtils.cjs} +138 -34
  41. package/dist/summaryUtils.cjs.map +1 -0
  42. package/dist/summaryUtils.d.ts +66 -4
  43. package/dist/summaryUtils.d.ts.map +1 -1
  44. package/dist/tsdoc-metadata.json +11 -0
  45. package/dist/unpackUsedRoutes.cjs +34 -0
  46. package/dist/unpackUsedRoutes.cjs.map +1 -0
  47. package/dist/unpackUsedRoutes.d.ts +12 -0
  48. package/dist/unpackUsedRoutes.d.ts.map +1 -0
  49. package/dist/{utils.js → utils.cjs} +2 -1
  50. package/dist/utils.cjs.map +1 -0
  51. package/dist/utils.d.ts +7 -2
  52. package/dist/utils.d.ts.map +1 -1
  53. package/lib/{dataStoreHandleContextUtils.d.ts → dataStoreHandleContextUtils.d.mts} +1 -0
  54. package/lib/dataStoreHandleContextUtils.d.mts.map +1 -0
  55. package/lib/{dataStoreHandleContextUtils.js → dataStoreHandleContextUtils.mjs} +5 -2
  56. package/lib/dataStoreHandleContextUtils.mjs.map +1 -0
  57. package/lib/{dataStoreHelpers.d.ts → dataStoreHelpers.d.mts} +23 -4
  58. package/lib/dataStoreHelpers.d.mts.map +1 -0
  59. package/lib/{dataStoreHelpers.js → dataStoreHelpers.mjs} +42 -22
  60. package/lib/dataStoreHelpers.mjs.map +1 -0
  61. package/lib/index.d.mts +14 -0
  62. package/lib/index.d.mts.map +1 -0
  63. package/lib/index.mjs +14 -0
  64. package/lib/index.mjs.map +1 -0
  65. package/lib/{objectstoragepartition.d.ts → objectstoragepartition.d.mts} +1 -0
  66. package/lib/objectstoragepartition.d.mts.map +1 -0
  67. package/lib/{objectstoragepartition.js → objectstoragepartition.mjs} +3 -2
  68. package/lib/objectstoragepartition.mjs.map +1 -0
  69. package/lib/{objectstorageutils.d.ts → objectstorageutils.d.mts} +6 -0
  70. package/lib/objectstorageutils.d.mts.map +1 -0
  71. package/lib/{objectstorageutils.js → objectstorageutils.mjs} +11 -15
  72. package/lib/objectstorageutils.mjs.map +1 -0
  73. package/lib/{requestParser.d.ts → requestParser.d.mts} +1 -4
  74. package/lib/requestParser.d.mts.map +1 -0
  75. package/lib/{requestParser.js → requestParser.mjs} +7 -11
  76. package/lib/requestParser.mjs.map +1 -0
  77. package/lib/runtime-utils-alpha.d.mts +155 -0
  78. package/lib/runtime-utils-beta.d.mts +103 -0
  79. package/lib/runtime-utils-public.d.mts +103 -0
  80. package/lib/runtime-utils-untrimmed.d.mts +306 -0
  81. package/lib/{runtimeFactoryHelper.d.ts → runtimeFactoryHelper.d.mts} +4 -1
  82. package/lib/runtimeFactoryHelper.d.mts.map +1 -0
  83. package/lib/runtimeFactoryHelper.mjs +24 -0
  84. package/lib/runtimeFactoryHelper.mjs.map +1 -0
  85. package/lib/{summaryUtils.d.ts → summaryUtils.d.mts} +66 -4
  86. package/lib/summaryUtils.d.mts.map +1 -0
  87. package/lib/{summaryUtils.js → summaryUtils.mjs} +129 -26
  88. package/lib/summaryUtils.mjs.map +1 -0
  89. package/lib/unpackUsedRoutes.d.mts +12 -0
  90. package/lib/unpackUsedRoutes.d.mts.map +1 -0
  91. package/lib/unpackUsedRoutes.mjs +30 -0
  92. package/lib/unpackUsedRoutes.mjs.map +1 -0
  93. package/lib/{utils.d.ts → utils.d.mts} +7 -2
  94. package/lib/utils.d.mts.map +1 -0
  95. package/lib/{utils.js → utils.mjs} +2 -1
  96. package/lib/utils.mjs.map +1 -0
  97. package/package.json +102 -66
  98. package/prettier.config.cjs +8 -0
  99. package/src/dataStoreHandleContextUtils.ts +24 -16
  100. package/src/dataStoreHelpers.ts +106 -83
  101. package/src/index.ts +31 -9
  102. package/src/objectstoragepartition.ts +18 -14
  103. package/src/objectstorageutils.ts +37 -36
  104. package/src/requestParser.ts +81 -86
  105. package/src/runtimeFactoryHelper.ts +27 -26
  106. package/src/summaryUtils.ts +425 -299
  107. package/src/unpackUsedRoutes.ts +31 -0
  108. package/src/utils.ts +12 -7
  109. package/tsc-multi.test.json +4 -0
  110. package/tsconfig.json +10 -12
  111. package/dist/dataStoreHandleContextUtils.js.map +0 -1
  112. package/dist/dataStoreHelpers.js.map +0 -1
  113. package/dist/index.js +0 -26
  114. package/dist/index.js.map +0 -1
  115. package/dist/objectstoragepartition.js.map +0 -1
  116. package/dist/objectstorageutils.js.map +0 -1
  117. package/dist/packageVersion.d.ts +0 -9
  118. package/dist/packageVersion.d.ts.map +0 -1
  119. package/dist/packageVersion.js +0 -12
  120. package/dist/packageVersion.js.map +0 -1
  121. package/dist/requestParser.js.map +0 -1
  122. package/dist/runtimeFactoryHelper.js.map +0 -1
  123. package/dist/summarizerNode/index.d.ts +0 -8
  124. package/dist/summarizerNode/index.d.ts.map +0 -1
  125. package/dist/summarizerNode/index.js +0 -12
  126. package/dist/summarizerNode/index.js.map +0 -1
  127. package/dist/summarizerNode/summarizerNode.d.ts +0 -139
  128. package/dist/summarizerNode/summarizerNode.d.ts.map +0 -1
  129. package/dist/summarizerNode/summarizerNode.js +0 -480
  130. package/dist/summarizerNode/summarizerNode.js.map +0 -1
  131. package/dist/summarizerNode/summarizerNodeUtils.d.ts +0 -161
  132. package/dist/summarizerNode/summarizerNodeUtils.d.ts.map +0 -1
  133. package/dist/summarizerNode/summarizerNodeUtils.js +0 -225
  134. package/dist/summarizerNode/summarizerNodeUtils.js.map +0 -1
  135. package/dist/summarizerNode/summarizerNodeWithGc.d.ts +0 -133
  136. package/dist/summarizerNode/summarizerNodeWithGc.d.ts.map +0 -1
  137. package/dist/summarizerNode/summarizerNodeWithGc.js +0 -294
  138. package/dist/summarizerNode/summarizerNodeWithGc.js.map +0 -1
  139. package/dist/summaryUtils.js.map +0 -1
  140. package/dist/utils.js.map +0 -1
  141. package/lib/dataStoreHandleContextUtils.d.ts.map +0 -1
  142. package/lib/dataStoreHandleContextUtils.js.map +0 -1
  143. package/lib/dataStoreHelpers.d.ts.map +0 -1
  144. package/lib/dataStoreHelpers.js.map +0 -1
  145. package/lib/index.d.ts +0 -14
  146. package/lib/index.d.ts.map +0 -1
  147. package/lib/index.js +0 -14
  148. package/lib/index.js.map +0 -1
  149. package/lib/objectstoragepartition.d.ts.map +0 -1
  150. package/lib/objectstoragepartition.js.map +0 -1
  151. package/lib/objectstorageutils.d.ts.map +0 -1
  152. package/lib/objectstorageutils.js.map +0 -1
  153. package/lib/packageVersion.d.ts +0 -9
  154. package/lib/packageVersion.d.ts.map +0 -1
  155. package/lib/packageVersion.js +0 -9
  156. package/lib/packageVersion.js.map +0 -1
  157. package/lib/requestParser.d.ts.map +0 -1
  158. package/lib/requestParser.js.map +0 -1
  159. package/lib/runtimeFactoryHelper.d.ts.map +0 -1
  160. package/lib/runtimeFactoryHelper.js +0 -25
  161. package/lib/runtimeFactoryHelper.js.map +0 -1
  162. package/lib/summarizerNode/index.d.ts +0 -8
  163. package/lib/summarizerNode/index.d.ts.map +0 -1
  164. package/lib/summarizerNode/index.js +0 -7
  165. package/lib/summarizerNode/index.js.map +0 -1
  166. package/lib/summarizerNode/summarizerNode.d.ts +0 -139
  167. package/lib/summarizerNode/summarizerNode.d.ts.map +0 -1
  168. package/lib/summarizerNode/summarizerNode.js +0 -475
  169. package/lib/summarizerNode/summarizerNode.js.map +0 -1
  170. package/lib/summarizerNode/summarizerNodeUtils.d.ts +0 -161
  171. package/lib/summarizerNode/summarizerNodeUtils.d.ts.map +0 -1
  172. package/lib/summarizerNode/summarizerNodeUtils.js +0 -216
  173. package/lib/summarizerNode/summarizerNodeUtils.js.map +0 -1
  174. package/lib/summarizerNode/summarizerNodeWithGc.d.ts +0 -133
  175. package/lib/summarizerNode/summarizerNodeWithGc.d.ts.map +0 -1
  176. package/lib/summarizerNode/summarizerNodeWithGc.js +0 -289
  177. package/lib/summarizerNode/summarizerNodeWithGc.js.map +0 -1
  178. package/lib/summaryUtils.d.ts.map +0 -1
  179. package/lib/summaryUtils.js.map +0 -1
  180. package/lib/utils.d.ts.map +0 -1
  181. package/lib/utils.js.map +0 -1
  182. package/src/packageVersion.ts +0 -9
  183. package/src/summarizerNode/index.ts +0 -8
  184. package/src/summarizerNode/summarizerNode.ts +0 -662
  185. package/src/summarizerNode/summarizerNodeUtils.ts +0 -339
  186. package/src/summarizerNode/summarizerNodeWithGc.ts +0 -459
  187. package/tsconfig.esnext.json +0 -7
@@ -1,161 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import { ITelemetryLogger } from "@fluidframework/common-definitions";
6
- import { ISnapshotTree, ISequencedDocumentMessage, ISummaryTree, SummaryObject } from "@fluidframework/protocol-definitions";
7
- import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
8
- import { ReadAndParseBlob } from "../utils";
9
- /**
10
- * Return value of refreshSummaryAck function. There can be three different scenarios based on the passed params:
11
- * 1. The latest summary was not udpated.
12
- * 2. The latest summary was updated and the summary corresponding to the params was tracked by this client.
13
- * 3. The latest summary was updated but the summary corresponding to the params was not tracked. In this case, the
14
- * latest summary is updated based on the downloaded snapshot which is also returned.
15
- */
16
- export declare type RefreshSummaryResult = {
17
- latestSummaryUpdated: false;
18
- } | {
19
- latestSummaryUpdated: true;
20
- wasSummaryTracked: true;
21
- } | {
22
- latestSummaryUpdated: true;
23
- wasSummaryTracked: false;
24
- snapshot: ISnapshotTree;
25
- };
26
- export interface ISummarizerNodeRootContract {
27
- startSummary(referenceSequenceNumber: number, summaryLogger: ITelemetryLogger): void;
28
- completeSummary(proposalHandle: string): void;
29
- clearSummary(): void;
30
- refreshLatestSummary(proposalHandle: string | undefined, summaryRefSeq: number, getSnapshot: () => Promise<ISnapshotTree>, readAndParseBlob: ReadAndParseBlob, correlatedSummaryLogger: ITelemetryLogger): Promise<RefreshSummaryResult>;
31
- }
32
- /** Path for nodes in a tree with escaped special characters */
33
- export declare class EscapedPath {
34
- readonly path: string;
35
- private constructor();
36
- static create(path: string): EscapedPath;
37
- static createAndConcat(pathParts: string[]): EscapedPath;
38
- toString(): string;
39
- concat(path: EscapedPath): EscapedPath;
40
- }
41
- /** Information about a summary relevant to a specific node in the tree */
42
- export declare class SummaryNode {
43
- private readonly summary;
44
- /** Creates an instance that is valid for the root with specific basePath and localPath */
45
- static createForRoot(referenceSequenceNumber: number): SummaryNode;
46
- /** Summary reference sequence number, i.e. last sequence number seen when it was created */
47
- get referenceSequenceNumber(): number;
48
- /** Full path to parent node, or undefined if this is the root */
49
- get basePath(): EscapedPath | undefined;
50
- /** Relative path to this node from its parent node */
51
- get localPath(): EscapedPath;
52
- /** Relative path from this node to its node innermost base summary */
53
- get additionalPath(): EscapedPath | undefined;
54
- set additionalPath(additionalPath: EscapedPath | undefined);
55
- constructor(summary: {
56
- readonly referenceSequenceNumber: number;
57
- readonly basePath: EscapedPath | undefined;
58
- readonly localPath: EscapedPath;
59
- additionalPath?: EscapedPath;
60
- });
61
- /** Gets the full path to this node, to be used when sending a handle */
62
- get fullPath(): EscapedPath;
63
- /**
64
- * Gets the full path to this node's innermost base summary.
65
- * The children nodes can use this as their basePath to determine their path.
66
- */
67
- get fullPathForChildren(): EscapedPath;
68
- /**
69
- * Creates a new node within the same summary for a child of this node.
70
- * @param id - id of the child node
71
- */
72
- createForChild(id: string): SummaryNode;
73
- }
74
- /** Result from decoding summary which may have been a differential summary. */
75
- interface IDecodedSummary {
76
- /** The innermost base summary which is not itself a differential summary */
77
- readonly baseSummary: ISnapshotTree;
78
- /** The entire path name to the innermost base summary */
79
- readonly pathParts: string[];
80
- /** Function to fetch all outstanding ops since the innermost base summary */
81
- getOutstandingOps(readAndParseBlob: ReadAndParseBlob): Promise<ISequencedDocumentMessage[]>;
82
- }
83
- /**
84
- * Checks if the snapshot is created by referencing a previous successful
85
- * summary plus outstanding ops. If so, it will recursively "decode" it until
86
- * it gets to the last successful summary (the base summary) and returns that
87
- * as well as a function for fetching the outstanding ops. Also returns the
88
- * full path to the previous base summary for child summarizer nodes to use as
89
- * their base path when necessary.
90
- * @param snapshot - snapshot tree to decode
91
- */
92
- export declare function decodeSummary(snapshot: ISnapshotTree, logger: Pick<ITelemetryLogger, "sendTelemetryEvent">): IDecodedSummary;
93
- /**
94
- * Summary tree which is a handle of the previous successfully acked summary
95
- * and a blob of the outstanding ops since that summary.
96
- */
97
- interface IEncodedSummary extends ISummaryTreeWithStats {
98
- readonly additionalPath: EscapedPath;
99
- }
100
- /**
101
- * Parameter to help encode summary with conditional behavior.
102
- * When fromSummary is true, it will contain the SummaryNode of
103
- * its previous summary, which it can use to point to with a handle.
104
- * When fromSummary is false, it will use an actual summary tree
105
- * as its base summary in case the first summary is a differential summary.
106
- */
107
- export declare type EncodeSummaryParam = {
108
- fromSummary: true;
109
- summaryNode: SummaryNode;
110
- } | {
111
- fromSummary: false;
112
- initialSummary: ISummaryTreeWithStats;
113
- };
114
- /**
115
- * Creates a summary tree which is a handle of the previous successfully acked summary
116
- * and a blob of the outstanding ops since that summary. If there is no acked summary yet,
117
- * it will create with the tree found in the initial attach op and the blob of outstanding ops.
118
- * @param summaryParam - information about last acked summary and paths to encode if from summary,
119
- * otherwise the initial summary from the attach op.
120
- * @param outstandingOps - outstanding ops since last acked summary
121
- */
122
- export declare function encodeSummary(summaryParam: EncodeSummaryParam, outstandingOps: ISequencedDocumentMessage[]): IEncodedSummary;
123
- /**
124
- * Information about the initial summary tree found from an attach op.
125
- */
126
- export interface IInitialSummary {
127
- sequenceNumber: number;
128
- id: string;
129
- summary: ISummaryTreeWithStats | undefined;
130
- }
131
- /**
132
- * Represents the details needed to create a child summarizer node.
133
- */
134
- export interface ICreateChildDetails {
135
- /** Summary from attach op if known */
136
- initialSummary: IInitialSummary | undefined;
137
- /** Latest summary from server node data */
138
- latestSummary: SummaryNode | undefined;
139
- /** Sequence number of latest known change to the node */
140
- changeSequenceNumber: number;
141
- }
142
- export interface ISubtreeInfo<T extends ISnapshotTree | SummaryObject> {
143
- /** Tree to use to find children subtrees */
144
- childrenTree: T;
145
- /** Additional path part where children are isolated */
146
- childrenPathPart: string | undefined;
147
- }
148
- /**
149
- * Checks if the summary contains .channels subtree where the children subtrees
150
- * would be located if exists.
151
- * @param baseSummary - summary to check
152
- */
153
- export declare function parseSummaryForSubtrees(baseSummary: ISnapshotTree): ISubtreeInfo<ISnapshotTree>;
154
- /**
155
- * Checks if the summary contains .channels subtree where the children subtrees
156
- * would be located if exists.
157
- * @param baseSummary - summary to check
158
- */
159
- export declare function parseSummaryTreeForSubtrees(summary: ISummaryTree): ISubtreeInfo<SummaryObject>;
160
- export {};
161
- //# sourceMappingURL=summarizerNodeUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"summarizerNodeUtils.d.ts","sourceRoot":"","sources":["../../src/summarizerNode/summarizerNodeUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EACH,aAAa,EACb,yBAAyB,EAEzB,YAAY,EACZ,aAAa,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAoB,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM5C;;;;;;GAMG;AACH,oBAAY,oBAAoB,GAAG;IAC/B,oBAAoB,EAAE,KAAK,CAAC;CAC/B,GAAG;IACA,oBAAoB,EAAE,IAAI,CAAC;IAC3B,iBAAiB,EAAE,IAAI,CAAC;CAC3B,GAAG;IACA,oBAAoB,EAAE,IAAI,CAAC;IAC3B,iBAAiB,EAAE,KAAK,CAAC;IACzB,QAAQ,EAAE,aAAa,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,2BAA2B;IACxC,YAAY,CAAC,uBAAuB,EAA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AE,eAAe,GAAG,SAAS,CAAC;IAC5C,2CAA2C;IAC3C,aAAa,EAAE,WAAW,GAAG,SAAS,CAAC;IACvC,yDAAyD;IACzD,oBAAoB,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IACjE,4CAA4C;IAC5C,YAAY,EAAE,CAAC,CAAC;IAChB,uDAAuD;IACvD,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC,CAa/F;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,CAAC,aAAa,CAAC,CAa9F"}
@@ -1,225 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.parseSummaryTreeForSubtrees = exports.parseSummaryForSubtrees = exports.encodeSummary = exports.decodeSummary = exports.SummaryNode = exports.EscapedPath = void 0;
8
- const common_utils_1 = require("@fluidframework/common-utils");
9
- const protocol_definitions_1 = require("@fluidframework/protocol-definitions");
10
- const runtime_definitions_1 = require("@fluidframework/runtime-definitions");
11
- const summaryUtils_1 = require("../summaryUtils");
12
- const baseSummaryTreeKey = "_baseSummary";
13
- const outstandingOpsBlobKey = "_outstandingOps";
14
- const maxDecodeDepth = 100;
15
- /** Path for nodes in a tree with escaped special characters */
16
- class EscapedPath {
17
- constructor(path) {
18
- this.path = path;
19
- }
20
- static create(path) {
21
- return new EscapedPath(encodeURIComponent(path));
22
- }
23
- static createAndConcat(pathParts) {
24
- var _a;
25
- let ret = EscapedPath.create((_a = pathParts[0]) !== null && _a !== void 0 ? _a : "");
26
- for (let i = 1; i < pathParts.length; i++) {
27
- ret = ret.concat(EscapedPath.create(pathParts[i]));
28
- }
29
- return ret;
30
- }
31
- toString() {
32
- return this.path;
33
- }
34
- concat(path) {
35
- return new EscapedPath(`${this.path}/${path.path}`);
36
- }
37
- }
38
- exports.EscapedPath = EscapedPath;
39
- /** Information about a summary relevant to a specific node in the tree */
40
- class SummaryNode {
41
- constructor(summary) {
42
- this.summary = summary;
43
- }
44
- /** Creates an instance that is valid for the root with specific basePath and localPath */
45
- static createForRoot(referenceSequenceNumber) {
46
- return new SummaryNode({
47
- referenceSequenceNumber,
48
- basePath: undefined,
49
- localPath: EscapedPath.create(""), // root hard-coded to ""
50
- });
51
- }
52
- /** Summary reference sequence number, i.e. last sequence number seen when it was created */
53
- get referenceSequenceNumber() {
54
- return this.summary.referenceSequenceNumber;
55
- }
56
- /** Full path to parent node, or undefined if this is the root */
57
- get basePath() {
58
- return this.summary.basePath;
59
- }
60
- /** Relative path to this node from its parent node */
61
- get localPath() {
62
- return this.summary.localPath;
63
- }
64
- /** Relative path from this node to its node innermost base summary */
65
- get additionalPath() {
66
- return this.summary.additionalPath;
67
- }
68
- set additionalPath(additionalPath) {
69
- this.summary.additionalPath = additionalPath;
70
- }
71
- /** Gets the full path to this node, to be used when sending a handle */
72
- get fullPath() {
73
- var _a, _b;
74
- return (_b = (_a = this.basePath) === null || _a === void 0 ? void 0 : _a.concat(this.localPath)) !== null && _b !== void 0 ? _b : this.localPath;
75
- }
76
- /**
77
- * Gets the full path to this node's innermost base summary.
78
- * The children nodes can use this as their basePath to determine their path.
79
- */
80
- get fullPathForChildren() {
81
- return this.additionalPath !== undefined
82
- ? this.fullPath.concat(this.additionalPath)
83
- : this.fullPath;
84
- }
85
- /**
86
- * Creates a new node within the same summary for a child of this node.
87
- * @param id - id of the child node
88
- */
89
- createForChild(id) {
90
- return new SummaryNode({
91
- referenceSequenceNumber: this.referenceSequenceNumber,
92
- basePath: this.fullPathForChildren,
93
- localPath: EscapedPath.create(id),
94
- });
95
- }
96
- }
97
- exports.SummaryNode = SummaryNode;
98
- /**
99
- * Checks if the snapshot is created by referencing a previous successful
100
- * summary plus outstanding ops. If so, it will recursively "decode" it until
101
- * it gets to the last successful summary (the base summary) and returns that
102
- * as well as a function for fetching the outstanding ops. Also returns the
103
- * full path to the previous base summary for child summarizer nodes to use as
104
- * their base path when necessary.
105
- * @param snapshot - snapshot tree to decode
106
- */
107
- function decodeSummary(snapshot, logger) {
108
- let baseSummary = snapshot;
109
- const pathParts = [];
110
- const opsBlobs = [];
111
- for (let i = 0;; i++) {
112
- if (i > maxDecodeDepth) {
113
- logger.sendTelemetryEvent({
114
- eventName: "DecodeSummaryMaxDepth",
115
- maxDecodeDepth,
116
- });
117
- }
118
- const outstandingOpsBlob = baseSummary.blobs[outstandingOpsBlobKey];
119
- const newBaseSummary = baseSummary.trees[baseSummaryTreeKey];
120
- if (outstandingOpsBlob === undefined && newBaseSummary === undefined) {
121
- return {
122
- baseSummary,
123
- pathParts,
124
- async getOutstandingOps(readAndParseBlob) {
125
- let outstandingOps = [];
126
- for (const opsBlob of opsBlobs) {
127
- const newOutstandingOps = await readAndParseBlob(opsBlob);
128
- if (outstandingOps.length > 0 && newOutstandingOps.length > 0) {
129
- const latestSeq = outstandingOps[outstandingOps.length - 1].sequenceNumber;
130
- const newEarliestSeq = newOutstandingOps[0].sequenceNumber;
131
- if (newEarliestSeq <= latestSeq) {
132
- logger.sendTelemetryEvent({
133
- eventName: "DuplicateOutstandingOps",
134
- // eslint-disable-next-line max-len
135
- message: `newEarliestSeq <= latestSeq in decodeSummary: ${newEarliestSeq} <= ${latestSeq}`,
136
- });
137
- while (newOutstandingOps.length > 0
138
- && newOutstandingOps[0].sequenceNumber <= latestSeq) {
139
- newOutstandingOps.shift();
140
- }
141
- }
142
- }
143
- outstandingOps = outstandingOps.concat(newOutstandingOps);
144
- }
145
- return outstandingOps;
146
- },
147
- };
148
- }
149
- (0, common_utils_1.assert)(!!outstandingOpsBlob, 0x1af /* "Outstanding ops blob missing, but base summary tree exists" */);
150
- (0, common_utils_1.assert)(newBaseSummary !== undefined, 0x1b0 /* "Base summary tree missing, but outstanding ops blob exists" */);
151
- baseSummary = newBaseSummary;
152
- pathParts.push(baseSummaryTreeKey);
153
- opsBlobs.unshift(outstandingOpsBlob);
154
- }
155
- }
156
- exports.decodeSummary = decodeSummary;
157
- /**
158
- * Creates a summary tree which is a handle of the previous successfully acked summary
159
- * and a blob of the outstanding ops since that summary. If there is no acked summary yet,
160
- * it will create with the tree found in the initial attach op and the blob of outstanding ops.
161
- * @param summaryParam - information about last acked summary and paths to encode if from summary,
162
- * otherwise the initial summary from the attach op.
163
- * @param outstandingOps - outstanding ops since last acked summary
164
- */
165
- function encodeSummary(summaryParam, outstandingOps) {
166
- let additionalPath = EscapedPath.create(baseSummaryTreeKey);
167
- const builder = new summaryUtils_1.SummaryTreeBuilder();
168
- builder.addBlob(outstandingOpsBlobKey, JSON.stringify(outstandingOps));
169
- if (summaryParam.fromSummary) {
170
- // Create using handle of latest acked summary
171
- const summaryNode = summaryParam.summaryNode;
172
- if (summaryNode.additionalPath !== undefined) {
173
- additionalPath = additionalPath.concat(summaryNode.additionalPath);
174
- }
175
- builder.addHandle(baseSummaryTreeKey, protocol_definitions_1.SummaryType.Tree, summaryNode.fullPath.path);
176
- }
177
- else {
178
- // Create using initial summary from attach op
179
- builder.addWithStats(baseSummaryTreeKey, summaryParam.initialSummary);
180
- }
181
- const summary = builder.getSummaryTree();
182
- return Object.assign(Object.assign({}, summary), { additionalPath });
183
- }
184
- exports.encodeSummary = encodeSummary;
185
- /**
186
- * Checks if the summary contains .channels subtree where the children subtrees
187
- * would be located if exists.
188
- * @param baseSummary - summary to check
189
- */
190
- function parseSummaryForSubtrees(baseSummary) {
191
- // New versions of snapshots have child nodes isolated in .channels subtree
192
- const channelsSubtree = baseSummary.trees[runtime_definitions_1.channelsTreeName];
193
- if (channelsSubtree !== undefined) {
194
- return {
195
- childrenTree: channelsSubtree,
196
- childrenPathPart: runtime_definitions_1.channelsTreeName,
197
- };
198
- }
199
- return {
200
- childrenTree: baseSummary,
201
- childrenPathPart: undefined,
202
- };
203
- }
204
- exports.parseSummaryForSubtrees = parseSummaryForSubtrees;
205
- /**
206
- * Checks if the summary contains .channels subtree where the children subtrees
207
- * would be located if exists.
208
- * @param baseSummary - summary to check
209
- */
210
- function parseSummaryTreeForSubtrees(summary) {
211
- // New versions of snapshots have child nodes isolated in .channels subtree
212
- const channelsSubtree = summary.tree[runtime_definitions_1.channelsTreeName];
213
- if (channelsSubtree !== undefined) {
214
- return {
215
- childrenTree: channelsSubtree,
216
- childrenPathPart: runtime_definitions_1.channelsTreeName,
217
- };
218
- }
219
- return {
220
- childrenTree: summary,
221
- childrenPathPart: undefined,
222
- };
223
- }
224
- exports.parseSummaryTreeForSubtrees = parseSummaryTreeForSubtrees;
225
- //# sourceMappingURL=summarizerNodeUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"summarizerNodeUtils.js","sourceRoot":"","sources":["../../src/summarizerNode/summarizerNodeUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAAsD;AACtD,+EAM8C;AAC9C,6EAA8F;AAC9F,kDAAqD;AAGrD,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAC1C,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAChD,MAAM,cAAc,GAAG,GAAG,CAAC;AAiC3B,+DAA+D;AAC/D,MAAa,WAAW;IACpB,YAAoC,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IAAI,CAAC;IAC9C,MAAM,CAAC,MAAM,CAAC,IAAY;QAC7B,OAAO,IAAI,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IACM,MAAM,CAAC,eAAe,CAAC,SAAmB;;QAC7C,IAAI,GAAG,GAAG,WAAW,CAAC,MAAM,CAAC,MAAA,SAAS,CAAC,CAAC,CAAC,mCAAI,EAAE,CAAC,CAAC;QACjD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CA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AgB,2BAA2B,CAAC,OAAqB;IAC7D,2EAA2E;IAC3E,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,sCAAgB,CAAC,CAAC;IACvD,IAAI,eAAe,KAAK,SAAS,EAAE;QAC/B,OAAO;YACH,YAAY,EAAE,eAAe;YAC7B,gBAAgB,EAAE,sCAAgB;SACrC,CAAC;KACL;IACD,OAAO;QACH,YAAY,EAAE,OAAO;QACrB,gBAAgB,EAAE,SAAS;KAC9B,CAAC;AACN,CAAC;AAbD,kEAaC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { assert } from \"@fluidframework/common-utils\";\nimport {\n ISnapshotTree,\n ISequencedDocumentMessage,\n SummaryType,\n ISummaryTree,\n SummaryObject,\n} from \"@fluidframework/protocol-definitions\";\nimport { channelsTreeName, ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { SummaryTreeBuilder } from \"../summaryUtils\";\nimport { ReadAndParseBlob } from \"../utils\";\n\nconst baseSummaryTreeKey = \"_baseSummary\";\nconst outstandingOpsBlobKey = \"_outstandingOps\";\nconst maxDecodeDepth = 100;\n\n/**\n * Return value of refreshSummaryAck function. There can be three different scenarios based on the passed params:\n * 1. The latest summary was not udpated.\n * 2. The latest summary was updated and the summary corresponding to the params was tracked by this client.\n * 3. The latest summary was updated but the summary corresponding to the params was not tracked. In this case, the\n * latest summary is updated based on the downloaded snapshot which is also returned.\n */\nexport type RefreshSummaryResult = {\n latestSummaryUpdated: false;\n} | {\n latestSummaryUpdated: true;\n wasSummaryTracked: true;\n} | {\n latestSummaryUpdated: true;\n wasSummaryTracked: false;\n snapshot: ISnapshotTree;\n};\n\nexport interface ISummarizerNodeRootContract {\n startSummary(referenceSequenceNumber: number, summaryLogger: ITelemetryLogger): void;\n completeSummary(proposalHandle: string): void;\n clearSummary(): void;\n refreshLatestSummary(\n proposalHandle: string | undefined,\n summaryRefSeq: number,\n getSnapshot: () => Promise<ISnapshotTree>,\n readAndParseBlob: ReadAndParseBlob,\n correlatedSummaryLogger: ITelemetryLogger,\n ): Promise<RefreshSummaryResult>;\n}\n\n/** Path for nodes in a tree with escaped special characters */\nexport class EscapedPath {\n private constructor(public readonly path: string) { }\n public static create(path: string): EscapedPath {\n return new EscapedPath(encodeURIComponent(path));\n }\n public static createAndConcat(pathParts: string[]): EscapedPath {\n let ret = EscapedPath.create(pathParts[0] ?? \"\");\n for (let i = 1; i < pathParts.length; i++) {\n ret = ret.concat(EscapedPath.create(pathParts[i]));\n }\n return ret;\n }\n public toString(): string {\n return this.path;\n }\n public concat(path: EscapedPath): EscapedPath {\n return new EscapedPath(`${this.path}/${path.path}`);\n }\n}\n\n/** Information about a summary relevant to a specific node in the tree */\nexport class SummaryNode {\n /** Creates an instance that is valid for the root with specific basePath and localPath */\n public static createForRoot(referenceSequenceNumber: number): SummaryNode {\n return new SummaryNode({\n referenceSequenceNumber,\n basePath: undefined,\n localPath: EscapedPath.create(\"\"), // root hard-coded to \"\"\n });\n }\n\n /** Summary reference sequence number, i.e. last sequence number seen when it was created */\n public get referenceSequenceNumber(): number {\n return this.summary.referenceSequenceNumber;\n }\n /** Full path to parent node, or undefined if this is the root */\n public get basePath(): EscapedPath | undefined {\n return this.summary.basePath;\n }\n /** Relative path to this node from its parent node */\n public get localPath(): EscapedPath {\n return this.summary.localPath;\n }\n /** Relative path from this node to its node innermost base summary */\n public get additionalPath(): EscapedPath | undefined {\n return this.summary.additionalPath;\n }\n public set additionalPath(additionalPath: EscapedPath | undefined) {\n this.summary.additionalPath = additionalPath;\n }\n constructor(private readonly summary: {\n readonly referenceSequenceNumber: number;\n readonly basePath: EscapedPath | undefined;\n readonly localPath: EscapedPath;\n additionalPath?: EscapedPath;\n }) { }\n\n /** Gets the full path to this node, to be used when sending a handle */\n public get fullPath(): EscapedPath {\n return this.basePath?.concat(this.localPath) ?? this.localPath;\n }\n\n /**\n * Gets the full path to this node's innermost base summary.\n * The children nodes can use this as their basePath to determine their path.\n */\n public get fullPathForChildren(): EscapedPath {\n return this.additionalPath !== undefined\n ? this.fullPath.concat(this.additionalPath)\n : this.fullPath;\n }\n\n /**\n * Creates a new node within the same summary for a child of this node.\n * @param id - id of the child node\n */\n public createForChild(id: string): SummaryNode {\n return new SummaryNode({\n referenceSequenceNumber: this.referenceSequenceNumber,\n basePath: this.fullPathForChildren,\n localPath: EscapedPath.create(id),\n });\n }\n}\n\n/** Result from decoding summary which may have been a differential summary. */\ninterface IDecodedSummary {\n /** The innermost base summary which is not itself a differential summary */\n readonly baseSummary: ISnapshotTree;\n /** The entire path name to the innermost base summary */\n readonly pathParts: string[];\n /** Function to fetch all outstanding ops since the innermost base summary */\n getOutstandingOps(readAndParseBlob: ReadAndParseBlob): Promise<ISequencedDocumentMessage[]>;\n}\n\n/**\n * Checks if the snapshot is created by referencing a previous successful\n * summary plus outstanding ops. If so, it will recursively \"decode\" it until\n * it gets to the last successful summary (the base summary) and returns that\n * as well as a function for fetching the outstanding ops. Also returns the\n * full path to the previous base summary for child summarizer nodes to use as\n * their base path when necessary.\n * @param snapshot - snapshot tree to decode\n */\nexport function decodeSummary(\n snapshot: ISnapshotTree,\n logger: Pick<ITelemetryLogger, \"sendTelemetryEvent\">,\n): IDecodedSummary {\n let baseSummary = snapshot;\n const pathParts: string[] = [];\n const opsBlobs: string[] = [];\n\n for (let i = 0; ; i++) {\n if (i > maxDecodeDepth) {\n logger.sendTelemetryEvent({\n eventName: \"DecodeSummaryMaxDepth\",\n maxDecodeDepth,\n });\n }\n const outstandingOpsBlob = baseSummary.blobs[outstandingOpsBlobKey];\n const newBaseSummary = baseSummary.trees[baseSummaryTreeKey];\n if (outstandingOpsBlob === undefined && newBaseSummary === undefined) {\n return {\n baseSummary,\n pathParts,\n async getOutstandingOps(readAndParseBlob: ReadAndParseBlob) {\n let outstandingOps: ISequencedDocumentMessage[] = [];\n for (const opsBlob of opsBlobs) {\n const newOutstandingOps = await readAndParseBlob<ISequencedDocumentMessage[]>(opsBlob);\n if (outstandingOps.length > 0 && newOutstandingOps.length > 0) {\n const latestSeq = outstandingOps[outstandingOps.length - 1].sequenceNumber;\n const newEarliestSeq = newOutstandingOps[0].sequenceNumber;\n if (newEarliestSeq <= latestSeq) {\n logger.sendTelemetryEvent({\n eventName: \"DuplicateOutstandingOps\",\n // eslint-disable-next-line max-len\n message: `newEarliestSeq <= latestSeq in decodeSummary: ${newEarliestSeq} <= ${latestSeq}`,\n });\n while (newOutstandingOps.length > 0\n && newOutstandingOps[0].sequenceNumber <= latestSeq) {\n newOutstandingOps.shift();\n }\n }\n }\n outstandingOps = outstandingOps.concat(newOutstandingOps);\n }\n return outstandingOps;\n },\n };\n }\n\n assert(!!outstandingOpsBlob, 0x1af /* \"Outstanding ops blob missing, but base summary tree exists\" */);\n assert(newBaseSummary !== undefined, 0x1b0 /* \"Base summary tree missing, but outstanding ops blob exists\" */);\n baseSummary = newBaseSummary;\n pathParts.push(baseSummaryTreeKey);\n opsBlobs.unshift(outstandingOpsBlob);\n }\n}\n\n/**\n * Summary tree which is a handle of the previous successfully acked summary\n * and a blob of the outstanding ops since that summary.\n */\ninterface IEncodedSummary extends ISummaryTreeWithStats {\n readonly additionalPath: EscapedPath;\n}\n\n/**\n * Parameter to help encode summary with conditional behavior.\n * When fromSummary is true, it will contain the SummaryNode of\n * its previous summary, which it can use to point to with a handle.\n * When fromSummary is false, it will use an actual summary tree\n * as its base summary in case the first summary is a differential summary.\n */\nexport type EncodeSummaryParam = {\n fromSummary: true;\n summaryNode: SummaryNode;\n} | {\n fromSummary: false;\n initialSummary: ISummaryTreeWithStats;\n};\n\n/**\n * Creates a summary tree which is a handle of the previous successfully acked summary\n * and a blob of the outstanding ops since that summary. If there is no acked summary yet,\n * it will create with the tree found in the initial attach op and the blob of outstanding ops.\n * @param summaryParam - information about last acked summary and paths to encode if from summary,\n * otherwise the initial summary from the attach op.\n * @param outstandingOps - outstanding ops since last acked summary\n */\nexport function encodeSummary(\n summaryParam: EncodeSummaryParam,\n outstandingOps: ISequencedDocumentMessage[],\n): IEncodedSummary {\n let additionalPath = EscapedPath.create(baseSummaryTreeKey);\n\n const builder = new SummaryTreeBuilder();\n builder.addBlob(outstandingOpsBlobKey, JSON.stringify(outstandingOps));\n\n if (summaryParam.fromSummary) {\n // Create using handle of latest acked summary\n const summaryNode = summaryParam.summaryNode;\n if (summaryNode.additionalPath !== undefined) {\n additionalPath = additionalPath.concat(summaryNode.additionalPath);\n }\n builder.addHandle(baseSummaryTreeKey, SummaryType.Tree, summaryNode.fullPath.path);\n } else {\n // Create using initial summary from attach op\n builder.addWithStats(baseSummaryTreeKey, summaryParam.initialSummary);\n }\n\n const summary = builder.getSummaryTree();\n return {\n ...summary,\n additionalPath,\n };\n}\n\n/**\n * Information about the initial summary tree found from an attach op.\n */\nexport interface IInitialSummary {\n sequenceNumber: number;\n id: string;\n summary: ISummaryTreeWithStats | undefined;\n}\n\n/**\n * Represents the details needed to create a child summarizer node.\n */\nexport interface ICreateChildDetails {\n /** Summary from attach op if known */\n initialSummary: IInitialSummary | undefined;\n /** Latest summary from server node data */\n latestSummary: SummaryNode | undefined;\n /** Sequence number of latest known change to the node */\n changeSequenceNumber: number;\n}\n\nexport interface ISubtreeInfo<T extends ISnapshotTree | SummaryObject> {\n /** Tree to use to find children subtrees */\n childrenTree: T;\n /** Additional path part where children are isolated */\n childrenPathPart: string | undefined;\n}\n\n/**\n * Checks if the summary contains .channels subtree where the children subtrees\n * would be located if exists.\n * @param baseSummary - summary to check\n */\nexport function parseSummaryForSubtrees(baseSummary: ISnapshotTree): ISubtreeInfo<ISnapshotTree> {\n // New versions of snapshots have child nodes isolated in .channels subtree\n const channelsSubtree = baseSummary.trees[channelsTreeName];\n if (channelsSubtree !== undefined) {\n return {\n childrenTree: channelsSubtree,\n childrenPathPart: channelsTreeName,\n };\n }\n return {\n childrenTree: baseSummary,\n childrenPathPart: undefined,\n };\n}\n\n/**\n * Checks if the summary contains .channels subtree where the children subtrees\n * would be located if exists.\n * @param baseSummary - summary to check\n */\nexport function parseSummaryTreeForSubtrees(summary: ISummaryTree): ISubtreeInfo<SummaryObject> {\n // New versions of snapshots have child nodes isolated in .channels subtree\n const channelsSubtree = summary.tree[channelsTreeName];\n if (channelsSubtree !== undefined) {\n return {\n childrenTree: channelsSubtree,\n childrenPathPart: channelsTreeName,\n };\n }\n return {\n childrenTree: summary,\n childrenPathPart: undefined,\n };\n}\n"]}
@@ -1,133 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import { ITelemetryLogger } from "@fluidframework/common-definitions";
6
- import { ISnapshotTree } from "@fluidframework/protocol-definitions";
7
- import { CreateChildSummarizerNodeParam, IGarbageCollectionData, IGarbageCollectionDetailsBase, IGarbageCollectionSummaryDetails, ISummarizeInternalResult, ISummarizeResult, ISummarizerNodeConfigWithGC, ISummarizerNodeWithGC, SummarizeInternalFn, ITelemetryContext } from "@fluidframework/runtime-definitions";
8
- import { ReadAndParseBlob } from "../utils";
9
- import { SummarizerNode } from "./summarizerNode";
10
- import { EscapedPath, IInitialSummary, ISummarizerNodeRootContract, SummaryNode } from "./summarizerNodeUtils";
11
- export interface IRootSummarizerNodeWithGC extends ISummarizerNodeWithGC, ISummarizerNodeRootContract {
12
- }
13
- /**
14
- * Extends the functionality of SummarizerNode to manage this node's garbage collection data:
15
- * - Adds a new API `getGCData` to return GC data of this node.
16
- * - Caches the result of `getGCData` to be used if nothing changes between summaries.
17
- * - Manages the used routes of this node. These are used to identify if this node is referenced in the document
18
- * and to determine if the node's used state changed since last summary.
19
- * - Adds trackState param to summarize. If trackState is false, it bypasses the SummarizerNode and calls
20
- * directly into summarizeInternal method.
21
- */
22
- export declare class SummarizerNodeWithGC extends SummarizerNode implements IRootSummarizerNodeWithGC {
23
- private readonly summarizeFn;
24
- private readonly getGCDataFn?;
25
- private wipSerializedUsedRoutes;
26
- private referenceUsedRoutes;
27
- private readonly baseGCDetailsP;
28
- private baseGCDetailsLoaded;
29
- private gcData;
30
- private usedRoutes;
31
- private unreferencedTimestampMs;
32
- private readonly gcDisabled;
33
- /**
34
- * Do not call constructor directly.
35
- * Use createRootSummarizerNodeWithGC to create root node, or createChild to create child nodes.
36
- */
37
- constructor(logger: ITelemetryLogger, summarizeFn: (fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext) => Promise<ISummarizeInternalResult>, config: ISummarizerNodeConfigWithGC, changeSequenceNumber: number,
38
- /** Undefined means created without summary */
39
- latestSummary?: SummaryNode, initialSummary?: IInitialSummary, wipSummaryLogger?: ITelemetryLogger, getGCDataFn?: ((fullGC?: boolean | undefined) => Promise<IGarbageCollectionData>) | undefined, getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>);
40
- /**
41
- * @deprecated - Renamed to getBaseGCDetails.
42
- */
43
- getGCSummaryDetails(): IGarbageCollectionSummaryDetails;
44
- getBaseGCDetails(): IGarbageCollectionDetailsBase;
45
- /**
46
- * Loads state from this node's initial GC summary details. This contains the following data from the last summary
47
- * seen by the server for this client:
48
- * - usedRoutes: This is used to figure out if the used state of this node changed since last summary.
49
- * - gcData: The garbage collection data of this node that is required for running GC.
50
- */
51
- private loadBaseGCDetails;
52
- summarize(fullTree: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummarizeResult>;
53
- /**
54
- * Returns the GC data of this node. If nothing has changed since last summary, it tries to reuse the data from
55
- * the previous summary. Else, it gets new GC data from the underlying Fluid object.
56
- * @param fullGC - true to bypass optimizations and force full generation of GC data.
57
- */
58
- getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
59
- /**
60
- * Called during the start of a summary. Updates the work-in-progress used routes.
61
- */
62
- startSummary(referenceSequenceNumber: number, summaryLogger: ITelemetryLogger): void;
63
- /**
64
- * Called after summary has been uploaded to the server. Add the work-in-progress state to the pending
65
- * summary queue. We track this until we get an ack from the server for this summary.
66
- */
67
- protected completeSummaryCore(proposalHandle: string, parentPath: EscapedPath | undefined, parentSkipRecursion: boolean): void;
68
- /**
69
- * Clears the work-in-progress state.
70
- */
71
- clearSummary(): void;
72
- /**
73
- * Called when we get an ack from the server for a summary we sent. Update the reference state of this node
74
- * from the state in the pending summary queue.
75
- */
76
- protected refreshLatestSummaryFromPending(proposalHandle: string, referenceSequenceNumber: number): void;
77
- /**
78
- * Called when we need to upload the reference state from the given summary. Read the GC blob and get the state
79
- * to upload from it.
80
- */
81
- protected refreshLatestSummaryFromSnapshot(referenceSequenceNumber: number, snapshotTree: ISnapshotTree, basePath: EscapedPath | undefined, localPath: EscapedPath, correlatedSummaryLogger: ITelemetryLogger, readAndParseBlob: ReadAndParseBlob): Promise<void>;
82
- /**
83
- * Override the createChild method to return an instance of SummarizerNodeWithGC.
84
- */
85
- createChild(
86
- /** Summarize function */
87
- summarizeInternalFn: SummarizeInternalFn,
88
- /** Initial id or path part of this node */
89
- id: string,
90
- /**
91
- * Information needed to create the node.
92
- * If it is from a base summary, it will assert that a summary has been seen.
93
- * Attach information if it is created from an attach op.
94
- */
95
- createParam: CreateChildSummarizerNodeParam, config?: ISummarizerNodeConfigWithGC, getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>, getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>): ISummarizerNodeWithGC;
96
- /**
97
- * Deletes the child node with the given id.
98
- */
99
- deleteChild(id: string): void;
100
- /**
101
- * Override the getChild method to return an instance of SummarizerNodeWithGC.
102
- */
103
- getChild(id: string): ISummarizerNodeWithGC | undefined;
104
- isReferenced(): boolean;
105
- updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;
106
- /**
107
- * Override the hasChanged method. If this node data or its used state changed, the node is considered changed.
108
- */
109
- protected hasChanged(): boolean;
110
- /**
111
- * This tells whether the data in this node has changed or not.
112
- */
113
- private hasDataChanged;
114
- /**
115
- * This tells whether the used state of this node has changed since last successful summary. If the used routes
116
- * of this node changed, its used state is considered changed. Basically, if this node or any of its child nodes
117
- * was previously used and became unused (or vice versa), its used state has changed.
118
- */
119
- private hasUsedStateChanged;
120
- }
121
- /**
122
- * Creates a root summarizer node with GC functionality built-in.
123
- * @param logger - Logger to use within SummarizerNode
124
- * @param summarizeInternalFn - Function to generate summary
125
- * @param changeSequenceNumber - Sequence number of latest change to new node/subtree
126
- * @param referenceSequenceNumber - Reference sequence number of last acked summary,
127
- * or undefined if not loaded from summary
128
- * @param config - Configure behavior of summarizer node
129
- * @param getGCDataFn - Function to get the GC data of this node
130
- * @param baseGCDetailsP - Function to get the initial GC details of this node
131
- */
132
- export declare const createRootSummarizerNodeWithGC: (logger: ITelemetryLogger, summarizeInternalFn: SummarizeInternalFn, changeSequenceNumber: number, referenceSequenceNumber: number | undefined, config?: ISummarizerNodeConfigWithGC, getGCDataFn?: ((fullGC?: boolean | undefined) => Promise<IGarbageCollectionData>) | undefined, getBaseGCDetailsFn?: (() => Promise<IGarbageCollectionDetailsBase>) | undefined) => IRootSummarizerNodeWithGC;
133
- //# sourceMappingURL=summarizerNodeWithGc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"summarizerNodeWithGc.d.ts","sourceRoot":"","sources":["../../src/summarizerNode/summarizerNodeWithGc.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EACH,8BAA8B,EAE9B,sBAAsB,EACtB,6BAA6B,EAC7B,gCAAgC,EAChC,wBAAwB,EACxB,gBAAgB,EAChB,2BAA2B,EAC3B,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACH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