@fluidframework/container-runtime 2.0.0-internal.3.4.0 → 2.0.0-internal.4.0.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 (137) hide show
  1. package/dist/containerRuntime.d.ts +1 -5
  2. package/dist/containerRuntime.d.ts.map +1 -1
  3. package/dist/containerRuntime.js +12 -16
  4. package/dist/containerRuntime.js.map +1 -1
  5. package/dist/gc/garbageCollection.d.ts +2 -1
  6. package/dist/gc/garbageCollection.d.ts.map +1 -1
  7. package/dist/gc/garbageCollection.js.map +1 -1
  8. package/dist/gc/gcDefinitions.d.ts +2 -3
  9. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  10. package/dist/gc/gcDefinitions.js.map +1 -1
  11. package/dist/gc/gcSummaryStateTracker.d.ts +2 -1
  12. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  13. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  14. package/dist/gc/index.d.ts +1 -2
  15. package/dist/gc/index.d.ts.map +1 -1
  16. package/dist/gc/index.js.map +1 -1
  17. package/dist/index.d.ts +1 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/packageVersion.d.ts +1 -1
  22. package/dist/packageVersion.js +1 -1
  23. package/dist/packageVersion.js.map +1 -1
  24. package/dist/pendingStateManager.d.ts +2 -8
  25. package/dist/pendingStateManager.d.ts.map +1 -1
  26. package/dist/pendingStateManager.js +6 -12
  27. package/dist/pendingStateManager.js.map +1 -1
  28. package/dist/summary/index.d.ts +2 -2
  29. package/dist/summary/index.d.ts.map +1 -1
  30. package/dist/summary/index.js +4 -5
  31. package/dist/summary/index.js.map +1 -1
  32. package/dist/summary/summarizer.d.ts +2 -5
  33. package/dist/summary/summarizer.d.ts.map +1 -1
  34. package/dist/summary/summarizer.js +8 -13
  35. package/dist/summary/summarizer.js.map +1 -1
  36. package/dist/summary/summarizerNode/index.d.ts +8 -0
  37. package/dist/summary/summarizerNode/index.d.ts.map +1 -0
  38. package/dist/summary/summarizerNode/index.js +12 -0
  39. package/dist/summary/summarizerNode/index.js.map +1 -0
  40. package/dist/summary/summarizerNode/summarizerNode.d.ts +149 -0
  41. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
  42. package/dist/summary/summarizerNode/summarizerNode.js +520 -0
  43. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -0
  44. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +125 -0
  45. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
  46. package/dist/summary/summarizerNode/summarizerNodeUtils.js +132 -0
  47. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
  48. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +22 -0
  49. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
  50. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +420 -0
  51. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
  52. package/dist/summary/summarizerTypes.d.ts +5 -17
  53. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  54. package/dist/summary/summarizerTypes.js +0 -5
  55. package/dist/summary/summarizerTypes.js.map +1 -1
  56. package/lib/containerRuntime.d.ts +1 -5
  57. package/lib/containerRuntime.d.ts.map +1 -1
  58. package/lib/containerRuntime.js +13 -17
  59. package/lib/containerRuntime.js.map +1 -1
  60. package/lib/gc/garbageCollection.d.ts +2 -1
  61. package/lib/gc/garbageCollection.d.ts.map +1 -1
  62. package/lib/gc/garbageCollection.js +1 -1
  63. package/lib/gc/garbageCollection.js.map +1 -1
  64. package/lib/gc/gcDefinitions.d.ts +2 -3
  65. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  66. package/lib/gc/gcDefinitions.js.map +1 -1
  67. package/lib/gc/gcSummaryStateTracker.d.ts +2 -1
  68. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  69. package/lib/gc/gcSummaryStateTracker.js +1 -1
  70. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  71. package/lib/gc/index.d.ts +1 -2
  72. package/lib/gc/index.d.ts.map +1 -1
  73. package/lib/gc/index.js.map +1 -1
  74. package/lib/index.d.ts +1 -2
  75. package/lib/index.d.ts.map +1 -1
  76. package/lib/index.js +1 -1
  77. package/lib/index.js.map +1 -1
  78. package/lib/packageVersion.d.ts +1 -1
  79. package/lib/packageVersion.js +1 -1
  80. package/lib/packageVersion.js.map +1 -1
  81. package/lib/pendingStateManager.d.ts +2 -8
  82. package/lib/pendingStateManager.d.ts.map +1 -1
  83. package/lib/pendingStateManager.js +6 -12
  84. package/lib/pendingStateManager.js.map +1 -1
  85. package/lib/summary/index.d.ts +2 -2
  86. package/lib/summary/index.d.ts.map +1 -1
  87. package/lib/summary/index.js +1 -2
  88. package/lib/summary/index.js.map +1 -1
  89. package/lib/summary/summarizer.d.ts +2 -5
  90. package/lib/summary/summarizer.d.ts.map +1 -1
  91. package/lib/summary/summarizer.js +8 -13
  92. package/lib/summary/summarizer.js.map +1 -1
  93. package/lib/summary/summarizerNode/index.d.ts +8 -0
  94. package/lib/summary/summarizerNode/index.d.ts.map +1 -0
  95. package/lib/summary/summarizerNode/index.js +7 -0
  96. package/lib/summary/summarizerNode/index.js.map +1 -0
  97. package/lib/summary/summarizerNode/summarizerNode.d.ts +149 -0
  98. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -0
  99. package/lib/summary/summarizerNode/summarizerNode.js +515 -0
  100. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -0
  101. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +125 -0
  102. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -0
  103. package/lib/summary/summarizerNode/summarizerNodeUtils.js +125 -0
  104. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
  105. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +22 -0
  106. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -0
  107. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +416 -0
  108. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
  109. package/lib/summary/summarizerTypes.d.ts +5 -17
  110. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  111. package/lib/summary/summarizerTypes.js +1 -4
  112. package/lib/summary/summarizerTypes.js.map +1 -1
  113. package/package.json +52 -15
  114. package/src/containerRuntime.ts +19 -19
  115. package/src/gc/garbageCollection.ts +2 -6
  116. package/src/gc/gcDefinitions.ts +6 -4
  117. package/src/gc/gcSummaryStateTracker.ts +2 -7
  118. package/src/gc/index.ts +1 -1
  119. package/src/index.ts +0 -7
  120. package/src/packageVersion.ts +1 -1
  121. package/src/pendingStateManager.ts +8 -20
  122. package/src/summary/index.ts +8 -2
  123. package/src/summary/summarizer.ts +7 -21
  124. package/src/summary/summarizerNode/index.ts +12 -0
  125. package/src/summary/summarizerNode/summarizerNode.ts +744 -0
  126. package/src/summary/summarizerNode/summarizerNodeUtils.ts +214 -0
  127. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +631 -0
  128. package/src/summary/summarizerTypes.ts +6 -22
  129. package/dist/summary/summarizerHandle.d.ts +0 -12
  130. package/dist/summary/summarizerHandle.d.ts.map +0 -1
  131. package/dist/summary/summarizerHandle.js +0 -22
  132. package/dist/summary/summarizerHandle.js.map +0 -1
  133. package/lib/summary/summarizerHandle.d.ts +0 -12
  134. package/lib/summary/summarizerHandle.d.ts.map +0 -1
  135. package/lib/summary/summarizerHandle.js +0 -18
  136. package/lib/summary/summarizerHandle.js.map +0 -1
  137. package/src/summary/summarizerHandle.ts +0 -23
@@ -0,0 +1,420 @@
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.createRootSummarizerNodeWithGC = void 0;
8
+ const common_utils_1 = require("@fluidframework/common-utils");
9
+ const garbage_collector_1 = require("@fluidframework/garbage-collector");
10
+ const runtime_definitions_1 = require("@fluidframework/runtime-definitions");
11
+ const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
12
+ const summarizerNode_1 = require("./summarizerNode");
13
+ const summarizerNodeUtils_1 = require("./summarizerNodeUtils");
14
+ // Extend SummaryNode to add used routes tracking to it.
15
+ class SummaryNodeWithGC extends summarizerNodeUtils_1.SummaryNode {
16
+ constructor(serializedUsedRoutes, summary) {
17
+ super(summary);
18
+ this.serializedUsedRoutes = serializedUsedRoutes;
19
+ }
20
+ }
21
+ /**
22
+ * Extends the functionality of SummarizerNode to manage this node's garbage collection data:
23
+ *
24
+ * - Adds a new API `getGCData` to return GC data of this node.
25
+ *
26
+ * - Caches the result of `getGCData` to be used if nothing changes between summaries.
27
+ *
28
+ * - Manages the used routes of this node. These are used to identify if this node is referenced in the document
29
+ * and to determine if the node's used state changed since last summary.
30
+ *
31
+ * - Adds trackState param to summarize. If trackState is false, it bypasses the SummarizerNode and calls
32
+ * directly into summarizeInternal method.
33
+ */
34
+ class SummarizerNodeWithGC extends summarizerNode_1.SummarizerNode {
35
+ /**
36
+ * Do not call constructor directly.
37
+ * Use createRootSummarizerNodeWithGC to create root node, or createChild to create child nodes.
38
+ */
39
+ constructor(logger, summarizeFn, config, changeSequenceNumber,
40
+ /** Undefined means created without summary */
41
+ latestSummary, initialSummary, wipSummaryLogger, getGCDataFn, getBaseGCDetailsFn,
42
+ /** A unique id of this node to be logged when sending telemetry. */
43
+ telemetryId) {
44
+ super(logger, async (fullTree, _trackState, telemetryContext) => summarizeFn(fullTree, true /* trackState */, telemetryContext), config, changeSequenceNumber, latestSummary, initialSummary, wipSummaryLogger, telemetryId);
45
+ this.summarizeFn = summarizeFn;
46
+ this.getGCDataFn = getGCDataFn;
47
+ // Keeps track of whether we have loaded the base details to ensure that we only do it once.
48
+ this.baseGCDetailsLoaded = false;
49
+ // Set used routes to have self route by default. This makes the node referenced by default. This is done to ensure
50
+ // that this node is not marked as collected when running GC has been disabled. Once, the option to disable GC is
51
+ // removed (from runGC flag in IContainerRuntimeOptions), this should be changed to be have no routes by default.
52
+ this.usedRoutes = [""];
53
+ this.gcDisabled = config.gcDisabled === true;
54
+ this.baseGCDetailsP = new common_utils_1.LazyPromise(async () => {
55
+ var _a;
56
+ return (_a = (await (getBaseGCDetailsFn === null || getBaseGCDetailsFn === void 0 ? void 0 : getBaseGCDetailsFn()))) !== null && _a !== void 0 ? _a : { usedRoutes: [] };
57
+ });
58
+ this.childNodesBaseGCDetailsP = new common_utils_1.LazyPromise(async () => {
59
+ await this.loadBaseGCDetails();
60
+ return (0, garbage_collector_1.unpackChildNodesGCDetails)({ gcData: this.gcData, usedRoutes: this.usedRoutes });
61
+ });
62
+ }
63
+ /**
64
+ * Loads state from this node's initial GC summary details. This contains the following data from the last summary
65
+ * seen by the server for this client:
66
+ * - usedRoutes: This is used to figure out if the used state of this node changed since last summary.
67
+ * - gcData: The garbage collection data of this node that is required for running GC.
68
+ */
69
+ async loadBaseGCDetails() {
70
+ if (this.baseGCDetailsLoaded) {
71
+ return;
72
+ }
73
+ const baseGCDetails = await this.baseGCDetailsP;
74
+ // Possible race - If there were parallel calls to loadBaseGCDetails, we want to make sure that we update
75
+ // the state from the base details only once.
76
+ if (this.baseGCDetailsLoaded) {
77
+ return;
78
+ }
79
+ this.baseGCDetailsLoaded = true;
80
+ // Update GC data, used routes and reference used routes. The used routes are sorted because they are compared
81
+ // across GC runs to check if they changed. Sorting ensures that the elements are in the same order.
82
+ // If the GC details has GC data, initialize our GC data from it.
83
+ if (baseGCDetails.gcData !== undefined) {
84
+ this.gcData = (0, garbage_collector_1.cloneGCData)(baseGCDetails.gcData);
85
+ }
86
+ if (baseGCDetails.usedRoutes !== undefined) {
87
+ this.usedRoutes = Array.from(baseGCDetails.usedRoutes).sort();
88
+ this.referenceUsedRoutes = Array.from(baseGCDetails.usedRoutes).sort();
89
+ }
90
+ }
91
+ async summarize(fullTree, trackState = true, telemetryContext) {
92
+ // If GC is not disabled and a summary is in progress, GC should have run and updated the used routes for this
93
+ // summary by calling updateUsedRoutes which sets wipSerializedUsedRoutes.
94
+ if (!this.gcDisabled && this.isSummaryInProgress()) {
95
+ (0, common_utils_1.assert)(this.wipSerializedUsedRoutes !== undefined, 0x1b1 /* "wip used routes should be set if tracking a summary" */);
96
+ }
97
+ // If trackState is true, get summary from base summarizer node which tracks summary state.
98
+ // If trackState is false, get summary from summarizeInternal.
99
+ return trackState
100
+ ? super.summarize(fullTree, true /* trackState */, telemetryContext)
101
+ : this.summarizeFn(fullTree, trackState, telemetryContext);
102
+ }
103
+ /**
104
+ * Returns the GC data of this node. If nothing has changed since last summary, it tries to reuse the data from
105
+ * the previous summary. Else, it gets new GC data from the underlying Fluid object.
106
+ * @param fullGC - true to bypass optimizations and force full generation of GC data.
107
+ */
108
+ async getGCData(fullGC = false) {
109
+ (0, common_utils_1.assert)(!this.gcDisabled, 0x1b2 /* "Getting GC data should not be called when GC is disabled!" */);
110
+ (0, common_utils_1.assert)(this.getGCDataFn !== undefined, 0x1b3 /* "GC data cannot be retrieved without getGCDataFn" */);
111
+ // Load GC details from the initial summary, if not already loaded. If this is the first time this function is
112
+ // called and the node's data has not changed since last summary, the GC data in initial details is returned.
113
+ await this.loadBaseGCDetails();
114
+ // If there is no new data since last summary and we have GC data from the previous run, return it. The previous
115
+ // GC data may not be available if loaded from a snapshot with either GC disabled or before GC was added.
116
+ // Note - canReuseHandle is checked to be consistent with summarize - generate GC data for nodes for which
117
+ // summary must be generated.
118
+ if (this.canReuseHandle && !fullGC && !this.hasDataChanged() && this.gcData !== undefined) {
119
+ return (0, garbage_collector_1.cloneGCData)(this.gcData);
120
+ }
121
+ const gcData = await this.getGCDataFn(fullGC);
122
+ this.gcData = (0, garbage_collector_1.cloneGCData)(gcData);
123
+ return gcData;
124
+ }
125
+ /**
126
+ * Called during the start of a summary. Updates the work-in-progress used routes.
127
+ */
128
+ startSummary(referenceSequenceNumber, summaryLogger) {
129
+ // If GC is disabled, skip setting wip used routes since we should not track GC state.
130
+ if (!this.gcDisabled) {
131
+ (0, common_utils_1.assert)(this.wipSerializedUsedRoutes === undefined, 0x1b4 /* "We should not already be tracking used routes when to track a new summary" */);
132
+ }
133
+ super.startSummary(referenceSequenceNumber, summaryLogger);
134
+ }
135
+ /**
136
+ * Called after summary has been uploaded to the server. Add the work-in-progress state to the pending
137
+ * summary queue. We track this until we get an ack from the server for this summary.
138
+ */
139
+ completeSummaryCore(proposalHandle, parentPath, parentSkipRecursion) {
140
+ let wipSerializedUsedRoutes;
141
+ // If GC is disabled, don't set wip used routes.
142
+ if (!this.gcDisabled) {
143
+ wipSerializedUsedRoutes = this.wipSerializedUsedRoutes;
144
+ /**
145
+ * The absence of wip used routes indicates that GC was not run on this node. This can happen if:
146
+ * 1. A child node was created after GC was already run on the parent. For example, a data store
147
+ * is realized (loaded) after GC was run on it creating summarizer nodes for its DDSes. In this
148
+ * case, the used routes of the parent should be passed on the child nodes and it should be fine.
149
+ * 2. A new node was created but GC was never run on it. This can mean that the GC data generated
150
+ * during summarize is complete . We should not continue, log and throw an error. This will help us
151
+ * identify these cases and take appropriate action.
152
+ */
153
+ if (wipSerializedUsedRoutes === undefined) {
154
+ this.throwUnexpectedError({
155
+ eventName: "NodeDidNotRunGC",
156
+ proposalHandle,
157
+ });
158
+ }
159
+ }
160
+ super.completeSummaryCore(proposalHandle, parentPath, parentSkipRecursion);
161
+ // If GC is disabled, skip setting pending summary with GC state.
162
+ if (!this.gcDisabled) {
163
+ const summaryNode = this.pendingSummaries.get(proposalHandle);
164
+ if (summaryNode !== undefined) {
165
+ const summaryNodeWithGC = new SummaryNodeWithGC(
166
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
167
+ wipSerializedUsedRoutes, summaryNode);
168
+ this.pendingSummaries.set(proposalHandle, summaryNodeWithGC);
169
+ }
170
+ }
171
+ }
172
+ /**
173
+ * Clears the work-in-progress state.
174
+ */
175
+ clearSummary() {
176
+ this.wipSerializedUsedRoutes = undefined;
177
+ super.clearSummary();
178
+ }
179
+ /**
180
+ * Called when we get an ack from the server for a summary we sent. Update the reference state of this node
181
+ * from the state in the pending summary queue.
182
+ */
183
+ refreshLatestSummaryFromPending(proposalHandle, referenceSequenceNumber) {
184
+ // If GC is disabled, skip setting referenced used routes since we are not tracking GC state.
185
+ if (!this.gcDisabled) {
186
+ const summaryNode = this.pendingSummaries.get(proposalHandle);
187
+ if (summaryNode !== undefined) {
188
+ // If a pending summary exists, it must have used routes since GC is enabled.
189
+ const summaryNodeWithGC = summaryNode;
190
+ if (summaryNodeWithGC.serializedUsedRoutes === undefined) {
191
+ const error = new telemetry_utils_1.LoggingError("MissingGCStateInPendingSummary", {
192
+ proposalHandle,
193
+ referenceSequenceNumber,
194
+ id: {
195
+ tag: telemetry_utils_1.TelemetryDataTag.CodeArtifact,
196
+ value: this.telemetryNodeId,
197
+ },
198
+ });
199
+ this.logger.sendErrorEvent({
200
+ eventName: error.message,
201
+ }, error);
202
+ throw error;
203
+ }
204
+ this.referenceUsedRoutes = JSON.parse(summaryNodeWithGC.serializedUsedRoutes);
205
+ }
206
+ }
207
+ return super.refreshLatestSummaryFromPending(proposalHandle, referenceSequenceNumber);
208
+ }
209
+ /**
210
+ * Called when we need to upload the reference state from the given summary.
211
+ */
212
+ async refreshLatestSummaryFromSnapshot(referenceSequenceNumber, snapshotTree, basePath, localPath, correlatedSummaryLogger, readAndParseBlob) {
213
+ await this.refreshGCStateFromSnapshot(referenceSequenceNumber, snapshotTree, readAndParseBlob);
214
+ return super.refreshLatestSummaryFromSnapshot(referenceSequenceNumber, snapshotTree, basePath, localPath, correlatedSummaryLogger, readAndParseBlob);
215
+ }
216
+ /**
217
+ * Updates GC state from the given snapshot if GC is enabled and the snapshot is newer than the one this node
218
+ * is tracking.
219
+ */
220
+ async refreshGCStateFromSnapshot(referenceSequenceNumber, snapshotTree, readAndParseBlob) {
221
+ // If GC is disabled or we have seen a newer summary, skip updating GC state.
222
+ if (this.gcDisabled || this.referenceSequenceNumber >= referenceSequenceNumber) {
223
+ return;
224
+ }
225
+ // Load the base GC details before proceeding because if that happens later it can overwrite the GC details
226
+ // written by the following code.
227
+ await this.loadBaseGCDetails();
228
+ // Possible re-entrancy. We may already have processed this while loading base GC details.
229
+ if (this.referenceSequenceNumber >= referenceSequenceNumber) {
230
+ return;
231
+ }
232
+ /**
233
+ * GC data is written at root of the snapshot tree under "gc" sub-tree. This data needs to be propagated to
234
+ * all the nodes in the container.
235
+ * The root summarizer node reads the GC data from the "gc" sub-tree, runs GC on it to get used routes in
236
+ * the container and updates its GC data and referenced used routes. It then gets the GC data and used
237
+ * routes of all its children and adds it to their snapshot tree.
238
+ * All the other nodes gets the GC data and used routes from their snapshot tree and updates their state.
239
+ * They get the GC data and used routes of their children and add it to their snapshot tree and so on.
240
+ *
241
+ * Note that if the snapshot does not have GC tree, GC data will be set to undefined and used routes will be
242
+ * set to self-route (meaning referenced) for all nodes. This is important because the GC data needs to be
243
+ * regenerated in the next summary.
244
+ */
245
+ let gcDetails;
246
+ const gcSnapshotTree = snapshotTree.trees[runtime_definitions_1.gcTreeKey];
247
+ if (gcSnapshotTree !== undefined) {
248
+ // If there is a GC tree in the snapshot, this is the root summarizer node. Read GC data from the tree
249
+ // process it as explained above.
250
+ const gcSnapshotData = await (0, garbage_collector_1.getGCDataFromSnapshot)(gcSnapshotTree, readAndParseBlob);
251
+ const gcNodes = {};
252
+ for (const [nodeId, nodeData] of Object.entries(gcSnapshotData.gcState.gcNodes)) {
253
+ gcNodes[nodeId] = Array.from(nodeData.outboundRoutes);
254
+ }
255
+ // Run GC on the nodes in the snapshot to get the used routes for each node in the container.
256
+ const usedRoutes = (0, garbage_collector_1.runGarbageCollection)(gcNodes, ["/"]).referencedNodeIds;
257
+ gcDetails = { gcData: { gcNodes }, usedRoutes };
258
+ }
259
+ else {
260
+ // If there is a GC blob in the snapshot, it's a non-root summarizer nodes - The root summarizer node
261
+ // writes GC blob in the snapshot of child nodes. Get GC data and used routes from the blob.
262
+ const gcDetailsBlob = snapshotTree.blobs[runtime_definitions_1.gcTreeKey];
263
+ if (gcDetailsBlob !== undefined) {
264
+ gcDetails = JSON.parse(gcDetailsBlob);
265
+ }
266
+ }
267
+ // Update this node to the same GC state it was when the ack corresponding to this summary was processed.
268
+ this.gcData = (gcDetails === null || gcDetails === void 0 ? void 0 : gcDetails.gcData) !== undefined ? (0, garbage_collector_1.cloneGCData)(gcDetails.gcData) : undefined;
269
+ this.referenceUsedRoutes =
270
+ (gcDetails === null || gcDetails === void 0 ? void 0 : gcDetails.usedRoutes) !== undefined ? Array.from(gcDetails.usedRoutes) : undefined;
271
+ // If there are no used routes in the GC details, set it to have self route which will make the node
272
+ // referenced. This scenario can only happen if the snapshot is from a client where GC was not run or
273
+ // disabled. In both the cases, the node should be referenced.
274
+ this.usedRoutes =
275
+ (gcDetails === null || gcDetails === void 0 ? void 0 : gcDetails.usedRoutes) !== undefined ? Array.from(gcDetails.usedRoutes) : [""];
276
+ if (gcDetails === undefined) {
277
+ return;
278
+ }
279
+ // Generate the GC data and used routes of children GC nodes and add it to their snapshot tree.
280
+ const gcDetailsMap = (0, garbage_collector_1.unpackChildNodesGCDetails)(gcDetails);
281
+ const { childrenTree } = (0, summarizerNodeUtils_1.parseSummaryForSubtrees)(snapshotTree);
282
+ gcDetailsMap.forEach((childGCDetails, childId) => {
283
+ if (childrenTree.trees[childId] !== undefined) {
284
+ childrenTree.trees[childId].blobs[runtime_definitions_1.gcTreeKey] = JSON.stringify(childGCDetails);
285
+ }
286
+ });
287
+ }
288
+ /**
289
+ * Override the createChild method to return an instance of SummarizerNodeWithGC.
290
+ */
291
+ createChild(
292
+ /** Summarize function */
293
+ summarizeInternalFn,
294
+ /** Initial id or path part of this node */
295
+ id,
296
+ /**
297
+ * Information needed to create the node.
298
+ * If it is from a base summary, it will assert that a summary has been seen.
299
+ * Attach information if it is created from an attach op.
300
+ */
301
+ createParam, config = {}, getGCDataFn, getBaseGCDetailsFn) {
302
+ var _a;
303
+ (0, common_utils_1.assert)(!this.children.has(id), 0x1b6 /* "Create SummarizerNode child already exists" */);
304
+ /**
305
+ * Update the child node's base GC details from this node's current GC details instead of updating from the base
306
+ * GC details of this node. This will handle scenarios where the GC details was updated during refresh from
307
+ * snapshot and the child node wasn't created then. If a child is created after that, its GC details should be
308
+ * the one from the downloaded snapshot and not the base GC details.
309
+ */
310
+ const getChildBaseGCDetailsFn = async () => {
311
+ var _a;
312
+ const childNodesBaseGCDetails = await this.childNodesBaseGCDetailsP;
313
+ return (_a = childNodesBaseGCDetails.get(id)) !== null && _a !== void 0 ? _a : {};
314
+ };
315
+ const createDetails = this.getCreateDetailsForChild(id, createParam);
316
+ const child = new SummarizerNodeWithGC(this.logger, summarizeInternalFn, Object.assign(Object.assign({}, config), {
317
+ // Propagate our gcDisabled state to the child if its not explicity specified in child's config.
318
+ gcDisabled: (_a = config.gcDisabled) !== null && _a !== void 0 ? _a : this.gcDisabled }), createDetails.changeSequenceNumber, createDetails.latestSummary, createDetails.initialSummary, this.wipSummaryLogger, getGCDataFn, getChildBaseGCDetailsFn, createDetails.telemetryNodeId);
319
+ // There may be additional state that has to be updated in this child. For example, if a summary is being
320
+ // tracked, the child's summary tracking state needs to be updated too.
321
+ this.maybeUpdateChildState(child, id);
322
+ this.children.set(id, child);
323
+ return child;
324
+ }
325
+ /**
326
+ * Updates the state of the child if required. For example, if a summary is currently being tracked, the child's
327
+ * summary tracking state needs to be updated too.
328
+ * Also, in case a child node gets realized in between Summary Op and Summary Ack, let's initialize the child's
329
+ * pending summary as well. Finally, if the pendingSummaries entries have serializedRoutes, replicate them to the
330
+ * pendingSummaries from the child nodes.
331
+ * @param child - The child node whose state is to be updated.
332
+ * @param id - Initial id or path part of this node
333
+ */
334
+ maybeUpdateChildState(child, id) {
335
+ var _a;
336
+ super.maybeUpdateChildState(child, id);
337
+ // In case we have pending summaries on the parent, let's initialize it on the child.
338
+ if (child.latestSummary !== undefined) {
339
+ for (const [key, value] of this.pendingSummaries.entries()) {
340
+ const summaryNodeWithGC = value;
341
+ if (summaryNodeWithGC.serializedUsedRoutes !== undefined) {
342
+ const childNodeUsedRoutes = (0, garbage_collector_1.unpackChildNodesUsedRoutes)(JSON.parse(summaryNodeWithGC.serializedUsedRoutes));
343
+ const newSerializedRoutes = (_a = childNodeUsedRoutes.get(id)) !== null && _a !== void 0 ? _a : [""];
344
+ const newLatestSummaryNode = new SummaryNodeWithGC(JSON.stringify(newSerializedRoutes), {
345
+ referenceSequenceNumber: value.referenceSequenceNumber,
346
+ basePath: value.basePath,
347
+ localPath: value.localPath,
348
+ });
349
+ child.addPendingSummary(key, newLatestSummaryNode);
350
+ }
351
+ }
352
+ }
353
+ }
354
+ /**
355
+ * Deletes the child node with the given id.
356
+ */
357
+ deleteChild(id) {
358
+ this.children.delete(id);
359
+ }
360
+ /**
361
+ * Override the getChild method to return an instance of SummarizerNodeWithGC.
362
+ */
363
+ getChild(id) {
364
+ return this.children.get(id);
365
+ }
366
+ isReferenced() {
367
+ return this.usedRoutes.includes("") || this.usedRoutes.includes("/");
368
+ }
369
+ updateUsedRoutes(usedRoutes) {
370
+ // Sort the given routes before updating. This will ensure that the routes compared in hasUsedStateChanged()
371
+ // are in the same order.
372
+ this.usedRoutes = usedRoutes.sort();
373
+ // If GC is not disabled and a summary is in progress, update the work-in-progress used routes so that it can
374
+ // be tracked for this summary.
375
+ if (!this.gcDisabled && this.isSummaryInProgress()) {
376
+ this.wipSerializedUsedRoutes = JSON.stringify(this.usedRoutes);
377
+ }
378
+ }
379
+ /**
380
+ * Override the hasChanged method. If this node data or its used state changed, the node is considered changed.
381
+ */
382
+ hasChanged() {
383
+ return this.hasDataChanged() || this.hasUsedStateChanged();
384
+ }
385
+ /**
386
+ * This tells whether the data in this node has changed or not.
387
+ */
388
+ hasDataChanged() {
389
+ return super.hasChanged();
390
+ }
391
+ /**
392
+ * This tells whether the used state of this node has changed since last successful summary. If the used routes
393
+ * of this node changed, its used state is considered changed. Basically, if this node or any of its child nodes
394
+ * was previously used and became unused (or vice versa), its used state has changed.
395
+ */
396
+ hasUsedStateChanged() {
397
+ // If GC is disabled, we are not tracking used state, return false.
398
+ if (this.gcDisabled) {
399
+ return false;
400
+ }
401
+ return (this.referenceUsedRoutes === undefined ||
402
+ JSON.stringify(this.usedRoutes) !== JSON.stringify(this.referenceUsedRoutes));
403
+ }
404
+ }
405
+ /**
406
+ * Creates a root summarizer node with GC functionality built-in.
407
+ * @param logger - Logger to use within SummarizerNode
408
+ * @param summarizeInternalFn - Function to generate summary
409
+ * @param changeSequenceNumber - Sequence number of latest change to new node/subtree
410
+ * @param referenceSequenceNumber - Reference sequence number of last acked summary,
411
+ * or undefined if not loaded from summary
412
+ * @param config - Configure behavior of summarizer node
413
+ * @param getGCDataFn - Function to get the GC data of this node
414
+ * @param baseGCDetailsP - Function to get the initial GC details of this node
415
+ */
416
+ const createRootSummarizerNodeWithGC = (logger, summarizeInternalFn, changeSequenceNumber, referenceSequenceNumber, config = {}, getGCDataFn, getBaseGCDetailsFn) => new SummarizerNodeWithGC(logger, summarizeInternalFn, config, changeSequenceNumber, referenceSequenceNumber === undefined
417
+ ? undefined
418
+ : summarizerNodeUtils_1.SummaryNode.createForRoot(referenceSequenceNumber), undefined /* initialSummary */, undefined /* wipSummaryLogger */, getGCDataFn, getBaseGCDetailsFn, "" /* telemetryId */);
419
+ exports.createRootSummarizerNodeWithGC = createRootSummarizerNodeWithGC;
420
+ //# sourceMappingURL=summarizerNodeWithGc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summarizerNodeWithGc.js","sourceRoot":"","sources":["../../../src/summary/summarizerNode/summarizerNodeWithGc.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAAmE;AACnE,yEAM2C;AAE3C,6EAW6C;AAC7C,qEAAiF;AAEjF,qDAAkD;AAClD,+DAO+B;AAM/B,wDAAwD;AAC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IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC5D,CAAC;IAED;;OAEG;IACK,cAAc;QACrB,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACK,mBAAmB;QAC1B,mEAAmE;QACnE,IAAI,IAAI,CAAC,UAAU,EAAE;YACpB,OAAO,KAAK,CAAC;SACb;QAED,OAAO,CACN,IAAI,CAAC,mBAAmB,KAAK,SAAS;YACtC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAC5E,CAAC;IACH,CAAC;CACD;AAED;;;;;;;;;;GAUG;AACI,MAAM,8BAA8B,GAAG,CAC7C,MAAwB,EACxB,mBAAwC,EACxC,oBAA4B,EAC5B,uBAA2C,EAC3C,SAAsC,EAAE,EACxC,WAAmE,EACnE,kBAAiE,EACrC,EAAE,CAC9B,IAAI,oBAAoB,CACvB,MAAM,EACN,mBAAmB,EACnB,MAAM,EACN,oBAAoB,EACpB,uBAAuB,KAAK,SAAS;IACpC,CAAC,CAAC,SAAS;IACX,CAAC,CAAC,iCAAW,CAAC,aAAa,CAAC,uBAAuB,CAAC,EACrD,SAAS,CAAC,oBAAoB,EAC9B,SAAS,CAAC,sBAAsB,EAChC,WAAW,EACX,kBAAkB,EAClB,EAAE,CAAC,iBAAiB,CACpB,CAAC;AAtBU,QAAA,8BAA8B,kCAsBxC","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, LazyPromise } from \"@fluidframework/common-utils\";\nimport {\n\tcloneGCData,\n\tgetGCDataFromSnapshot,\n\trunGarbageCollection,\n\tunpackChildNodesGCDetails,\n\tunpackChildNodesUsedRoutes,\n} from \"@fluidframework/garbage-collector\";\nimport { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tCreateChildSummarizerNodeParam,\n\tgcTreeKey,\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n\tISummarizeInternalResult,\n\tISummarizeResult,\n\tISummarizerNodeConfigWithGC,\n\tISummarizerNodeWithGC,\n\tSummarizeInternalFn,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport { LoggingError, TelemetryDataTag } from \"@fluidframework/telemetry-utils\";\nimport { ReadAndParseBlob } from \"@fluidframework/runtime-utils\";\nimport { SummarizerNode } from \"./summarizerNode\";\nimport {\n\tEscapedPath,\n\tICreateChildDetails,\n\tIInitialSummary,\n\tISummarizerNodeRootContract,\n\tparseSummaryForSubtrees,\n\tSummaryNode,\n} from \"./summarizerNodeUtils\";\n\nexport interface IRootSummarizerNodeWithGC\n\textends ISummarizerNodeWithGC,\n\t\tISummarizerNodeRootContract {}\n\n// Extend SummaryNode to add used routes tracking to it.\nclass SummaryNodeWithGC extends SummaryNode {\n\tconstructor(\n\t\tpublic readonly serializedUsedRoutes: string,\n\t\tsummary: {\n\t\t\treadonly referenceSequenceNumber: number;\n\t\t\treadonly basePath: EscapedPath | undefined;\n\t\t\treadonly localPath: EscapedPath;\n\t\t\tadditionalPath?: EscapedPath;\n\t\t},\n\t) {\n\t\tsuper(summary);\n\t}\n}\n\n/**\n * Extends the functionality of SummarizerNode to manage this node's garbage collection data:\n *\n * - Adds a new API `getGCData` to return GC data of this node.\n *\n * - Caches the result of `getGCData` to be used if nothing changes between summaries.\n *\n * - Manages the used routes of this node. These are used to identify if this node is referenced in the document\n * and to determine if the node's used state changed since last summary.\n *\n * - Adds trackState param to summarize. If trackState is false, it bypasses the SummarizerNode and calls\n * directly into summarizeInternal method.\n */\nclass SummarizerNodeWithGC extends SummarizerNode implements IRootSummarizerNodeWithGC {\n\t// Tracks the work-in-progress used routes during summary.\n\tprivate wipSerializedUsedRoutes: string | undefined;\n\n\t// This is the last known used routes of this node as seen by the server as part of a summary.\n\tprivate referenceUsedRoutes: string[] | undefined;\n\n\t// The base GC details of this node used to initialize the GC state.\n\tprivate readonly baseGCDetailsP: LazyPromise<IGarbageCollectionDetailsBase>;\n\n\t// Keeps track of whether we have loaded the base details to ensure that we only do it once.\n\tprivate baseGCDetailsLoaded: boolean = false;\n\n\t// The base GC details for the child nodes. This is passed to child nodes when creating them.\n\tprivate readonly childNodesBaseGCDetailsP: LazyPromise<\n\t\tMap<string, IGarbageCollectionDetailsBase>\n\t>;\n\n\tprivate gcData: IGarbageCollectionData | undefined;\n\n\t// Set used routes to have self route by default. This makes the node referenced by default. This is done to ensure\n\t// that this node is not marked as collected when running GC has been disabled. Once, the option to disable GC is\n\t// removed (from runGC flag in IContainerRuntimeOptions), this should be changed to be have no routes by default.\n\tprivate usedRoutes: string[] = [\"\"];\n\n\t// True if GC is disabled for this node. If so, do not track GC specific state for a summary.\n\tprivate readonly gcDisabled: boolean;\n\n\t/**\n\t * Do not call constructor directly.\n\t * Use createRootSummarizerNodeWithGC to create root node, or createChild to create child nodes.\n\t */\n\tpublic constructor(\n\t\tlogger: ITelemetryLogger,\n\t\tprivate readonly summarizeFn: (\n\t\t\tfullTree: boolean,\n\t\t\ttrackState: boolean,\n\t\t\ttelemetryContext?: ITelemetryContext,\n\t\t) => Promise<ISummarizeInternalResult>,\n\t\tconfig: ISummarizerNodeConfigWithGC,\n\t\tchangeSequenceNumber: number,\n\t\t/** Undefined means created without summary */\n\t\tlatestSummary?: SummaryNode,\n\t\tinitialSummary?: IInitialSummary,\n\t\twipSummaryLogger?: ITelemetryLogger,\n\t\tprivate readonly getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t\t/** A unique id of this node to be logged when sending telemetry. */\n\t\ttelemetryId?: string,\n\t) {\n\t\tsuper(\n\t\t\tlogger,\n\t\t\tasync (fullTree: boolean, _trackState: boolean, telemetryContext?: ITelemetryContext) =>\n\t\t\t\tsummarizeFn(fullTree, true /* trackState */, telemetryContext),\n\t\t\tconfig,\n\t\t\tchangeSequenceNumber,\n\t\t\tlatestSummary,\n\t\t\tinitialSummary,\n\t\t\twipSummaryLogger,\n\t\t\ttelemetryId,\n\t\t);\n\n\t\tthis.gcDisabled = config.gcDisabled === true;\n\n\t\tthis.baseGCDetailsP = new LazyPromise(async () => {\n\t\t\treturn (await getBaseGCDetailsFn?.()) ?? { usedRoutes: [] };\n\t\t});\n\n\t\tthis.childNodesBaseGCDetailsP = new LazyPromise(async () => {\n\t\t\tawait this.loadBaseGCDetails();\n\t\t\treturn unpackChildNodesGCDetails({ gcData: this.gcData, usedRoutes: this.usedRoutes });\n\t\t});\n\t}\n\n\t/**\n\t * Loads state from this node's initial GC summary details. This contains the following data from the last summary\n\t * seen by the server for this client:\n\t * - usedRoutes: This is used to figure out if the used state of this node changed since last summary.\n\t * - gcData: The garbage collection data of this node that is required for running GC.\n\t */\n\tprivate async loadBaseGCDetails() {\n\t\tif (this.baseGCDetailsLoaded) {\n\t\t\treturn;\n\t\t}\n\t\tconst baseGCDetails = await this.baseGCDetailsP;\n\n\t\t// Possible race - If there were parallel calls to loadBaseGCDetails, we want to make sure that we update\n\t\t// the state from the base details only once.\n\t\tif (this.baseGCDetailsLoaded) {\n\t\t\treturn;\n\t\t}\n\t\tthis.baseGCDetailsLoaded = true;\n\n\t\t// Update GC data, used routes and reference used routes. The used routes are sorted because they are compared\n\t\t// across GC runs to check if they changed. Sorting ensures that the elements are in the same order.\n\t\t// If the GC details has GC data, initialize our GC data from it.\n\t\tif (baseGCDetails.gcData !== undefined) {\n\t\t\tthis.gcData = cloneGCData(baseGCDetails.gcData);\n\t\t}\n\t\tif (baseGCDetails.usedRoutes !== undefined) {\n\t\t\tthis.usedRoutes = Array.from(baseGCDetails.usedRoutes).sort();\n\t\t\tthis.referenceUsedRoutes = Array.from(baseGCDetails.usedRoutes).sort();\n\t\t}\n\t}\n\n\tpublic async summarize(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean = true,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult> {\n\t\t// If GC is not disabled and a summary is in progress, GC should have run and updated the used routes for this\n\t\t// summary by calling updateUsedRoutes which sets wipSerializedUsedRoutes.\n\t\tif (!this.gcDisabled && this.isSummaryInProgress()) {\n\t\t\tassert(\n\t\t\t\tthis.wipSerializedUsedRoutes !== undefined,\n\t\t\t\t0x1b1 /* \"wip used routes should be set if tracking a summary\" */,\n\t\t\t);\n\t\t}\n\n\t\t// If trackState is true, get summary from base summarizer node which tracks summary state.\n\t\t// If trackState is false, get summary from summarizeInternal.\n\t\treturn trackState\n\t\t\t? super.summarize(fullTree, true /* trackState */, telemetryContext)\n\t\t\t: this.summarizeFn(fullTree, trackState, telemetryContext);\n\t}\n\n\t/**\n\t * Returns the GC data of this node. If nothing has changed since last summary, it tries to reuse the data from\n\t * the previous summary. Else, it gets new GC data from the underlying Fluid object.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tpublic async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n\t\tassert(\n\t\t\t!this.gcDisabled,\n\t\t\t0x1b2 /* \"Getting GC data should not be called when GC is disabled!\" */,\n\t\t);\n\t\tassert(\n\t\t\tthis.getGCDataFn !== undefined,\n\t\t\t0x1b3 /* \"GC data cannot be retrieved without getGCDataFn\" */,\n\t\t);\n\n\t\t// Load GC details from the initial summary, if not already loaded. If this is the first time this function is\n\t\t// called and the node's data has not changed since last summary, the GC data in initial details is returned.\n\t\tawait this.loadBaseGCDetails();\n\n\t\t// If there is no new data since last summary and we have GC data from the previous run, return it. The previous\n\t\t// GC data may not be available if loaded from a snapshot with either GC disabled or before GC was added.\n\t\t// Note - canReuseHandle is checked to be consistent with summarize - generate GC data for nodes for which\n\t\t// summary must be generated.\n\t\tif (this.canReuseHandle && !fullGC && !this.hasDataChanged() && this.gcData !== undefined) {\n\t\t\treturn cloneGCData(this.gcData);\n\t\t}\n\n\t\tconst gcData = await this.getGCDataFn(fullGC);\n\t\tthis.gcData = cloneGCData(gcData);\n\t\treturn gcData;\n\t}\n\n\t/**\n\t * Called during the start of a summary. Updates the work-in-progress used routes.\n\t */\n\tpublic startSummary(referenceSequenceNumber: number, summaryLogger: ITelemetryLogger) {\n\t\t// If GC is disabled, skip setting wip used routes since we should not track GC state.\n\t\tif (!this.gcDisabled) {\n\t\t\tassert(\n\t\t\t\tthis.wipSerializedUsedRoutes === undefined,\n\t\t\t\t0x1b4 /* \"We should not already be tracking used routes when to track a new summary\" */,\n\t\t\t);\n\t\t}\n\t\tsuper.startSummary(referenceSequenceNumber, summaryLogger);\n\t}\n\n\t/**\n\t * Called after summary has been uploaded to the server. Add the work-in-progress state to the pending\n\t * summary queue. We track this until we get an ack from the server for this summary.\n\t */\n\tprotected completeSummaryCore(\n\t\tproposalHandle: string,\n\t\tparentPath: EscapedPath | undefined,\n\t\tparentSkipRecursion: boolean,\n\t) {\n\t\tlet wipSerializedUsedRoutes: string | undefined;\n\t\t// If GC is disabled, don't set wip used routes.\n\t\tif (!this.gcDisabled) {\n\t\t\twipSerializedUsedRoutes = this.wipSerializedUsedRoutes;\n\t\t\t/**\n\t\t\t * The absence of wip used routes indicates that GC was not run on this node. This can happen if:\n\t\t\t * 1. A child node was created after GC was already run on the parent. For example, a data store\n\t\t\t * is realized (loaded) after GC was run on it creating summarizer nodes for its DDSes. In this\n\t\t\t * case, the used routes of the parent should be passed on the child nodes and it should be fine.\n\t\t\t * 2. A new node was created but GC was never run on it. This can mean that the GC data generated\n\t\t\t * during summarize is complete . We should not continue, log and throw an error. This will help us\n\t\t\t * identify these cases and take appropriate action.\n\t\t\t */\n\t\t\tif (wipSerializedUsedRoutes === undefined) {\n\t\t\t\tthis.throwUnexpectedError({\n\t\t\t\t\teventName: \"NodeDidNotRunGC\",\n\t\t\t\t\tproposalHandle,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tsuper.completeSummaryCore(proposalHandle, parentPath, parentSkipRecursion);\n\n\t\t// If GC is disabled, skip setting pending summary with GC state.\n\t\tif (!this.gcDisabled) {\n\t\t\tconst summaryNode = this.pendingSummaries.get(proposalHandle);\n\t\t\tif (summaryNode !== undefined) {\n\t\t\t\tconst summaryNodeWithGC = new SummaryNodeWithGC(\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\twipSerializedUsedRoutes!,\n\t\t\t\t\tsummaryNode,\n\t\t\t\t);\n\t\t\t\tthis.pendingSummaries.set(proposalHandle, summaryNodeWithGC);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Clears the work-in-progress state.\n\t */\n\tpublic clearSummary() {\n\t\tthis.wipSerializedUsedRoutes = undefined;\n\t\tsuper.clearSummary();\n\t}\n\n\t/**\n\t * Called when we get an ack from the server for a summary we sent. Update the reference state of this node\n\t * from the state in the pending summary queue.\n\t */\n\tprotected refreshLatestSummaryFromPending(\n\t\tproposalHandle: string,\n\t\treferenceSequenceNumber: number,\n\t): void {\n\t\t// If GC is disabled, skip setting referenced used routes since we are not tracking GC state.\n\t\tif (!this.gcDisabled) {\n\t\t\tconst summaryNode = this.pendingSummaries.get(proposalHandle);\n\t\t\tif (summaryNode !== undefined) {\n\t\t\t\t// If a pending summary exists, it must have used routes since GC is enabled.\n\t\t\t\tconst summaryNodeWithGC = summaryNode as SummaryNodeWithGC;\n\t\t\t\tif (summaryNodeWithGC.serializedUsedRoutes === undefined) {\n\t\t\t\t\tconst error = new LoggingError(\"MissingGCStateInPendingSummary\", {\n\t\t\t\t\t\tproposalHandle,\n\t\t\t\t\t\treferenceSequenceNumber,\n\t\t\t\t\t\tid: {\n\t\t\t\t\t\t\ttag: TelemetryDataTag.CodeArtifact,\n\t\t\t\t\t\t\tvalue: this.telemetryNodeId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t\tthis.logger.sendErrorEvent(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\teventName: error.message,\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror,\n\t\t\t\t\t);\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tthis.referenceUsedRoutes = JSON.parse(summaryNodeWithGC.serializedUsedRoutes);\n\t\t\t}\n\t\t}\n\n\t\treturn super.refreshLatestSummaryFromPending(proposalHandle, referenceSequenceNumber);\n\t}\n\n\t/**\n\t * Called when we need to upload the reference state from the given summary.\n\t */\n\tprotected async refreshLatestSummaryFromSnapshot(\n\t\treferenceSequenceNumber: number,\n\t\tsnapshotTree: ISnapshotTree,\n\t\tbasePath: EscapedPath | undefined,\n\t\tlocalPath: EscapedPath,\n\t\tcorrelatedSummaryLogger: ITelemetryLogger,\n\t\treadAndParseBlob: ReadAndParseBlob,\n\t): Promise<void> {\n\t\tawait this.refreshGCStateFromSnapshot(\n\t\t\treferenceSequenceNumber,\n\t\t\tsnapshotTree,\n\t\t\treadAndParseBlob,\n\t\t);\n\t\treturn super.refreshLatestSummaryFromSnapshot(\n\t\t\treferenceSequenceNumber,\n\t\t\tsnapshotTree,\n\t\t\tbasePath,\n\t\t\tlocalPath,\n\t\t\tcorrelatedSummaryLogger,\n\t\t\treadAndParseBlob,\n\t\t);\n\t}\n\n\t/**\n\t * Updates GC state from the given snapshot if GC is enabled and the snapshot is newer than the one this node\n\t * is tracking.\n\t */\n\tprivate async refreshGCStateFromSnapshot(\n\t\treferenceSequenceNumber: number,\n\t\tsnapshotTree: ISnapshotTree,\n\t\treadAndParseBlob: ReadAndParseBlob,\n\t): Promise<void> {\n\t\t// If GC is disabled or we have seen a newer summary, skip updating GC state.\n\t\tif (this.gcDisabled || this.referenceSequenceNumber >= referenceSequenceNumber) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Load the base GC details before proceeding because if that happens later it can overwrite the GC details\n\t\t// written by the following code.\n\t\tawait this.loadBaseGCDetails();\n\n\t\t// Possible re-entrancy. We may already have processed this while loading base GC details.\n\t\tif (this.referenceSequenceNumber >= referenceSequenceNumber) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * GC data is written at root of the snapshot tree under \"gc\" sub-tree. This data needs to be propagated to\n\t\t * all the nodes in the container.\n\t\t * The root summarizer node reads the GC data from the \"gc\" sub-tree, runs GC on it to get used routes in\n\t\t * the container and updates its GC data and referenced used routes. It then gets the GC data and used\n\t\t * routes of all its children and adds it to their snapshot tree.\n\t\t * All the other nodes gets the GC data and used routes from their snapshot tree and updates their state.\n\t\t * They get the GC data and used routes of their children and add it to their snapshot tree and so on.\n\t\t *\n\t\t * Note that if the snapshot does not have GC tree, GC data will be set to undefined and used routes will be\n\t\t * set to self-route (meaning referenced) for all nodes. This is important because the GC data needs to be\n\t\t * regenerated in the next summary.\n\t\t */\n\t\tlet gcDetails: IGarbageCollectionDetailsBase | undefined;\n\t\tconst gcSnapshotTree = snapshotTree.trees[gcTreeKey];\n\t\tif (gcSnapshotTree !== undefined) {\n\t\t\t// If there is a GC tree in the snapshot, this is the root summarizer node. Read GC data from the tree\n\t\t\t// process it as explained above.\n\t\t\tconst gcSnapshotData = await getGCDataFromSnapshot(gcSnapshotTree, readAndParseBlob);\n\n\t\t\tconst gcNodes: { [id: string]: string[] } = {};\n\t\t\tfor (const [nodeId, nodeData] of Object.entries(gcSnapshotData.gcState.gcNodes)) {\n\t\t\t\tgcNodes[nodeId] = Array.from(nodeData.outboundRoutes);\n\t\t\t}\n\t\t\t// Run GC on the nodes in the snapshot to get the used routes for each node in the container.\n\t\t\tconst usedRoutes = runGarbageCollection(gcNodes, [\"/\"]).referencedNodeIds;\n\t\t\tgcDetails = { gcData: { gcNodes }, usedRoutes };\n\t\t} else {\n\t\t\t// If there is a GC blob in the snapshot, it's a non-root summarizer nodes - The root summarizer node\n\t\t\t// writes GC blob in the snapshot of child nodes. Get GC data and used routes from the blob.\n\t\t\tconst gcDetailsBlob = snapshotTree.blobs[gcTreeKey];\n\t\t\tif (gcDetailsBlob !== undefined) {\n\t\t\t\tgcDetails = JSON.parse(gcDetailsBlob) as IGarbageCollectionDetailsBase;\n\t\t\t}\n\t\t}\n\n\t\t// Update this node to the same GC state it was when the ack corresponding to this summary was processed.\n\t\tthis.gcData = gcDetails?.gcData !== undefined ? cloneGCData(gcDetails.gcData) : undefined;\n\t\tthis.referenceUsedRoutes =\n\t\t\tgcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : undefined;\n\t\t// If there are no used routes in the GC details, set it to have self route which will make the node\n\t\t// referenced. This scenario can only happen if the snapshot is from a client where GC was not run or\n\t\t// disabled. In both the cases, the node should be referenced.\n\t\tthis.usedRoutes =\n\t\t\tgcDetails?.usedRoutes !== undefined ? Array.from(gcDetails.usedRoutes) : [\"\"];\n\n\t\tif (gcDetails === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Generate the GC data and used routes of children GC nodes and add it to their snapshot tree.\n\t\tconst gcDetailsMap = unpackChildNodesGCDetails(gcDetails);\n\t\tconst { childrenTree } = parseSummaryForSubtrees(snapshotTree);\n\t\tgcDetailsMap.forEach((childGCDetails: IGarbageCollectionDetailsBase, childId: string) => {\n\t\t\tif (childrenTree.trees[childId] !== undefined) {\n\t\t\t\tchildrenTree.trees[childId].blobs[gcTreeKey] = JSON.stringify(childGCDetails);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Override the createChild method to return an instance of SummarizerNodeWithGC.\n\t */\n\tpublic createChild(\n\t\t/** Summarize function */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/** Initial id or path part of this node */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\tconfig: ISummarizerNodeConfigWithGC = {},\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC {\n\t\tassert(!this.children.has(id), 0x1b6 /* \"Create SummarizerNode child already exists\" */);\n\t\t/**\n\t\t * Update the child node's base GC details from this node's current GC details instead of updating from the base\n\t\t * GC details of this node. This will handle scenarios where the GC details was updated during refresh from\n\t\t * snapshot and the child node wasn't created then. If a child is created after that, its GC details should be\n\t\t * the one from the downloaded snapshot and not the base GC details.\n\t\t */\n\t\tconst getChildBaseGCDetailsFn = async () => {\n\t\t\tconst childNodesBaseGCDetails = await this.childNodesBaseGCDetailsP;\n\t\t\treturn childNodesBaseGCDetails.get(id) ?? {};\n\t\t};\n\n\t\tconst createDetails: ICreateChildDetails = this.getCreateDetailsForChild(id, createParam);\n\t\tconst child = new SummarizerNodeWithGC(\n\t\t\tthis.logger,\n\t\t\tsummarizeInternalFn,\n\t\t\t{\n\t\t\t\t...config,\n\t\t\t\t// Propagate our gcDisabled state to the child if its not explicity specified in child's config.\n\t\t\t\tgcDisabled: config.gcDisabled ?? this.gcDisabled,\n\t\t\t},\n\t\t\tcreateDetails.changeSequenceNumber,\n\t\t\tcreateDetails.latestSummary,\n\t\t\tcreateDetails.initialSummary,\n\t\t\tthis.wipSummaryLogger,\n\t\t\tgetGCDataFn,\n\t\t\tgetChildBaseGCDetailsFn,\n\t\t\tcreateDetails.telemetryNodeId,\n\t\t);\n\n\t\t// There may be additional state that has to be updated in this child. For example, if a summary is being\n\t\t// tracked, the child's summary tracking state needs to be updated too.\n\t\tthis.maybeUpdateChildState(child, id);\n\n\t\tthis.children.set(id, child);\n\t\treturn child;\n\t}\n\n\t/**\n\t * Updates the state of the child if required. For example, if a summary is currently being tracked, the child's\n\t * summary tracking state needs to be updated too.\n\t * Also, in case a child node gets realized in between Summary Op and Summary Ack, let's initialize the child's\n\t * pending summary as well. Finally, if the pendingSummaries entries have serializedRoutes, replicate them to the\n\t * pendingSummaries from the child nodes.\n\t * @param child - The child node whose state is to be updated.\n\t * @param id - Initial id or path part of this node\n\t */\n\tprotected maybeUpdateChildState(child: SummarizerNodeWithGC, id: string) {\n\t\tsuper.maybeUpdateChildState(child, id);\n\n\t\t// In case we have pending summaries on the parent, let's initialize it on the child.\n\t\tif (child.latestSummary !== undefined) {\n\t\t\tfor (const [key, value] of this.pendingSummaries.entries()) {\n\t\t\t\tconst summaryNodeWithGC = value as SummaryNodeWithGC;\n\t\t\t\tif (summaryNodeWithGC.serializedUsedRoutes !== undefined) {\n\t\t\t\t\tconst childNodeUsedRoutes = unpackChildNodesUsedRoutes(\n\t\t\t\t\t\tJSON.parse(summaryNodeWithGC.serializedUsedRoutes),\n\t\t\t\t\t);\n\t\t\t\t\tconst newSerializedRoutes = childNodeUsedRoutes.get(id) ?? [\"\"];\n\t\t\t\t\tconst newLatestSummaryNode = new SummaryNodeWithGC(\n\t\t\t\t\t\tJSON.stringify(newSerializedRoutes),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treferenceSequenceNumber: value.referenceSequenceNumber,\n\t\t\t\t\t\t\tbasePath: value.basePath,\n\t\t\t\t\t\t\tlocalPath: value.localPath,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\tchild.addPendingSummary(key, newLatestSummaryNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Deletes the child node with the given id.\n\t */\n\tpublic deleteChild(id: string): void {\n\t\tthis.children.delete(id);\n\t}\n\n\t/**\n\t * Override the getChild method to return an instance of SummarizerNodeWithGC.\n\t */\n\tpublic getChild(id: string): ISummarizerNodeWithGC | undefined {\n\t\treturn this.children.get(id) as SummarizerNodeWithGC;\n\t}\n\n\tpublic isReferenced(): boolean {\n\t\treturn this.usedRoutes.includes(\"\") || this.usedRoutes.includes(\"/\");\n\t}\n\n\tpublic updateUsedRoutes(usedRoutes: string[]) {\n\t\t// Sort the given routes before updating. This will ensure that the routes compared in hasUsedStateChanged()\n\t\t// are in the same order.\n\t\tthis.usedRoutes = usedRoutes.sort();\n\n\t\t// If GC is not disabled and a summary is in progress, update the work-in-progress used routes so that it can\n\t\t// be tracked for this summary.\n\t\tif (!this.gcDisabled && this.isSummaryInProgress()) {\n\t\t\tthis.wipSerializedUsedRoutes = JSON.stringify(this.usedRoutes);\n\t\t}\n\t}\n\n\t/**\n\t * Override the hasChanged method. If this node data or its used state changed, the node is considered changed.\n\t */\n\tprotected hasChanged(): boolean {\n\t\treturn this.hasDataChanged() || this.hasUsedStateChanged();\n\t}\n\n\t/**\n\t * This tells whether the data in this node has changed or not.\n\t */\n\tprivate hasDataChanged(): boolean {\n\t\treturn super.hasChanged();\n\t}\n\n\t/**\n\t * This tells whether the used state of this node has changed since last successful summary. If the used routes\n\t * of this node changed, its used state is considered changed. Basically, if this node or any of its child nodes\n\t * was previously used and became unused (or vice versa), its used state has changed.\n\t */\n\tprivate hasUsedStateChanged(): boolean {\n\t\t// If GC is disabled, we are not tracking used state, return false.\n\t\tif (this.gcDisabled) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (\n\t\t\tthis.referenceUsedRoutes === undefined ||\n\t\t\tJSON.stringify(this.usedRoutes) !== JSON.stringify(this.referenceUsedRoutes)\n\t\t);\n\t}\n}\n\n/**\n * Creates a root summarizer node with GC functionality built-in.\n * @param logger - Logger to use within SummarizerNode\n * @param summarizeInternalFn - Function to generate summary\n * @param changeSequenceNumber - Sequence number of latest change to new node/subtree\n * @param referenceSequenceNumber - Reference sequence number of last acked summary,\n * or undefined if not loaded from summary\n * @param config - Configure behavior of summarizer node\n * @param getGCDataFn - Function to get the GC data of this node\n * @param baseGCDetailsP - Function to get the initial GC details of this node\n */\nexport const createRootSummarizerNodeWithGC = (\n\tlogger: ITelemetryLogger,\n\tsummarizeInternalFn: SummarizeInternalFn,\n\tchangeSequenceNumber: number,\n\treferenceSequenceNumber: number | undefined,\n\tconfig: ISummarizerNodeConfigWithGC = {},\n\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n): IRootSummarizerNodeWithGC =>\n\tnew SummarizerNodeWithGC(\n\t\tlogger,\n\t\tsummarizeInternalFn,\n\t\tconfig,\n\t\tchangeSequenceNumber,\n\t\treferenceSequenceNumber === undefined\n\t\t\t? undefined\n\t\t\t: SummaryNode.createForRoot(referenceSequenceNumber),\n\t\tundefined /* initialSummary */,\n\t\tundefined /* wipSummaryLogger */,\n\t\tgetGCDataFn,\n\t\tgetBaseGCDetailsFn,\n\t\t\"\" /* telemetryId */,\n\t);\n"]}
@@ -4,26 +4,12 @@
4
4
  */
5
5
  import { IEvent, IEventProvider, ITelemetryLogger, ITelemetryProperties } from "@fluidframework/common-definitions";
6
6
  import { ITelemetryLoggerPropertyBag } from "@fluidframework/telemetry-utils";
7
- import { IFluidLoadable } from "@fluidframework/core-interfaces";
8
7
  import { ContainerWarning, IDeltaManager } from "@fluidframework/container-definitions";
9
8
  import { ISequencedDocumentMessage, ISummaryTree, IDocumentMessage } from "@fluidframework/protocol-definitions";
10
9
  import { ISummaryStats } from "@fluidframework/runtime-definitions";
11
10
  import { ISummaryConfigurationHeuristics } from "../containerRuntime";
12
11
  import { ISummaryAckMessage, ISummaryNackMessage, ISummaryOpMessage } from "./summaryCollection";
13
12
  import { SummarizeReason } from "./summaryGenerator";
14
- /**
15
- * @deprecated This will be removed in a later release.
16
- */
17
- export declare const ISummarizer: keyof IProvideSummarizer;
18
- /**
19
- * @deprecated This will be removed in a later release.
20
- */
21
- export interface IProvideSummarizer {
22
- /**
23
- * @deprecated This will be removed in a later release.
24
- */
25
- readonly ISummarizer: ISummarizer;
26
- }
27
13
  /**
28
14
  * Similar to AbortSignal, but using promise instead of events
29
15
  * @param T - cancellation reason type
@@ -64,8 +50,6 @@ export interface IConnectableRuntime {
64
50
  readonly disposed: boolean;
65
51
  readonly connected: boolean;
66
52
  readonly clientId: string | undefined;
67
- /** @deprecated - Moved to `ISummarizerRuntime` as it's no longer needed here */
68
- readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
69
53
  once(event: "connected" | "disconnected" | "dispose", listener: () => void): this;
70
54
  }
71
55
  export interface ISummarizerRuntime extends IConnectableRuntime {
@@ -267,7 +251,11 @@ export interface ISummarizerEvents extends IEvent {
267
251
  */
268
252
  (event: "summarizingError", listener: (error: ISummarizingWarning) => void): any;
269
253
  }
270
- export interface ISummarizer extends IEventProvider<ISummarizerEvents>, IFluidLoadable, Partial<IProvideSummarizer> {
254
+ export interface ISummarizer extends IEventProvider<ISummarizerEvents> {
255
+ /**
256
+ * Allows {@link ISummarizer} to be used with our {@link @fluidframework/core-interfaces#FluidObject} pattern.
257
+ */
258
+ readonly ISummarizer?: ISummarizer;
271
259
  stop(reason: SummarizerStopReason): void;
272
260
  close(): void;
273
261
  run(onBehalfOf: string, disableHeuristics?: boolean): Promise<SummarizerStopReason>;
@@ -1 +1 @@
1
- {"version":3,"file":"summarizerTypes.d.ts","sourceRoot":"","sources":["../../src/summary/summarizerTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EACN,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,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yB;IACzC,6EAA6E;IAC7E,eAAe,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAE3C;;;;OAIG;IACH,gBAAgB,CACf,aAAa,EAAE,+BAA+B,EAC9C,aAAa,EAAE,uBAAuB,GACpC,OAAO,CAAC;CACX;AAED,aAAK,2CAA2C;AAC/C,wEAAwE;AACtE,UAAU;AACZ,yDAAyD;GACvD,sBAAsB;AACxB,0DAA0D;GACxD,sBAAsB,CAAC;AAE1B,aAAK,2CAA2C;AAC/C,oEAAoE;AAClE,yBAAyB;AAC3B,iEAAiE;GAC/D,uBAAuB;AACzB,gHAAgH;GAC9G,qBAAqB;AACvB,gHAAgH;GAC9G,qBAAqB;AACvB;;;GAGG;GACD,0BAA0B;AAC5B,yEAAyE;GACvE,+BAA+B;AACjC,mFAAmF;GACjF,kBAAkB;AACpB,2DAA2D;GACzD,kBAAkB;AACpB,4EAA4E;GAC1E,QAAQ;AACV,0DAA0D;GACxD,gBAAgB;AAClB,gFAAgF;GAC9E,sBAAsB;AACxB,uEAAuE;GACrE,iBAAiB;AACnB,wDAAwD;GACtD,uBAAuB;AACzB,yDAAyD;GACvD,uBAAuB;AACzB,oHAAoH;GAClH,gBAAgB,CAAC;AAEpB,oBAAY,yBAAyB,GAAG,IAAI,CAC3C,oBAAoB,EACpB,2CAA2C,CAC3C,GACA,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,2CAA2C,CAAC,CAAC,CAAC;AAElF,MAAM,WAAW,yBAA0B,SAAQ,2BAA2B;IAC7E,0CAA0C;IAC1C,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,kDAAkD;IAClD,4BAA4B,EAAE,MAAM,MAAM,CAAC;CAC3C"}
@@ -4,9 +4,4 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ISummarizer = void 0;
8
- /**
9
- * @deprecated This will be removed in a later release.
10
- */
11
- exports.ISummarizer = "ISummarizer";
12
7
  //# sourceMappingURL=summarizerTypes.js.map