@fluidframework/container-runtime 2.0.0-internal.6.2.0 → 2.0.0-internal.6.3.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 (310) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/batchTracker.d.ts.map +1 -1
  3. package/dist/batchTracker.js +4 -3
  4. package/dist/batchTracker.js.map +1 -1
  5. package/dist/blobManager.d.ts +1 -2
  6. package/dist/blobManager.d.ts.map +1 -1
  7. package/dist/blobManager.js +81 -69
  8. package/dist/blobManager.js.map +1 -1
  9. package/dist/connectionTelemetry.d.ts.map +1 -1
  10. package/dist/connectionTelemetry.js +13 -12
  11. package/dist/connectionTelemetry.js.map +1 -1
  12. package/dist/containerRuntime.d.ts +18 -3
  13. package/dist/containerRuntime.d.ts.map +1 -1
  14. package/dist/containerRuntime.js +185 -145
  15. package/dist/containerRuntime.js.map +1 -1
  16. package/dist/dataStore.js +3 -3
  17. package/dist/dataStore.js.map +1 -1
  18. package/dist/dataStoreContext.d.ts +2 -1
  19. package/dist/dataStoreContext.d.ts.map +1 -1
  20. package/dist/dataStoreContext.js +36 -36
  21. package/dist/dataStoreContext.js.map +1 -1
  22. package/dist/dataStoreContexts.d.ts.map +1 -1
  23. package/dist/dataStoreContexts.js +7 -8
  24. package/dist/dataStoreContexts.js.map +1 -1
  25. package/dist/dataStores.d.ts.map +1 -1
  26. package/dist/dataStores.js +19 -20
  27. package/dist/dataStores.js.map +1 -1
  28. package/dist/deltaManagerProxyBase.d.ts +1 -1
  29. package/dist/deltaManagerProxyBase.js +2 -2
  30. package/dist/deltaManagerProxyBase.js.map +1 -1
  31. package/dist/deltaScheduler.js +6 -6
  32. package/dist/deltaScheduler.js.map +1 -1
  33. package/dist/gc/garbageCollection.d.ts +3 -5
  34. package/dist/gc/garbageCollection.d.ts.map +1 -1
  35. package/dist/gc/garbageCollection.js +4 -21
  36. package/dist/gc/garbageCollection.js.map +1 -1
  37. package/dist/gc/gcDefinitions.d.ts +2 -2
  38. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  39. package/dist/gc/gcDefinitions.js.map +1 -1
  40. package/dist/gc/gcHelpers.js +7 -7
  41. package/dist/gc/gcHelpers.js.map +1 -1
  42. package/dist/gc/gcSummaryStateTracker.d.ts +4 -7
  43. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  44. package/dist/gc/gcSummaryStateTracker.js +15 -52
  45. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  46. package/dist/gc/gcUnreferencedStateTracker.js +4 -4
  47. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
  48. package/dist/gc/index.d.ts +1 -1
  49. package/dist/gc/index.d.ts.map +1 -1
  50. package/dist/gc/index.js +1 -2
  51. package/dist/gc/index.js.map +1 -1
  52. package/dist/id-compressor/appendOnlySortedMap.js +2 -2
  53. package/dist/id-compressor/appendOnlySortedMap.js.map +1 -1
  54. package/dist/id-compressor/finalSpace.js +2 -2
  55. package/dist/id-compressor/finalSpace.js.map +1 -1
  56. package/dist/id-compressor/idCompressor.d.ts.map +1 -1
  57. package/dist/id-compressor/idCompressor.js +16 -15
  58. package/dist/id-compressor/idCompressor.js.map +1 -1
  59. package/dist/id-compressor/sessions.js +5 -5
  60. package/dist/id-compressor/sessions.js.map +1 -1
  61. package/dist/id-compressor/utilities.js +2 -2
  62. package/dist/id-compressor/utilities.js.map +1 -1
  63. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  64. package/dist/opLifecycle/opCompressor.js +4 -3
  65. package/dist/opLifecycle/opCompressor.js.map +1 -1
  66. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  67. package/dist/opLifecycle/opDecompressor.js +11 -10
  68. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  69. package/dist/opLifecycle/opGroupingManager.js +3 -3
  70. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  71. package/dist/opLifecycle/opSplitter.js +12 -12
  72. package/dist/opLifecycle/opSplitter.js.map +1 -1
  73. package/dist/opLifecycle/outbox.js +6 -6
  74. package/dist/opLifecycle/outbox.js.map +1 -1
  75. package/dist/packageVersion.d.ts +1 -1
  76. package/dist/packageVersion.js +1 -1
  77. package/dist/packageVersion.js.map +1 -1
  78. package/dist/pendingStateManager.d.ts.map +1 -1
  79. package/dist/pendingStateManager.js +12 -13
  80. package/dist/pendingStateManager.js.map +1 -1
  81. package/dist/scheduleManager.d.ts.map +1 -1
  82. package/dist/scheduleManager.js +19 -18
  83. package/dist/scheduleManager.js.map +1 -1
  84. package/dist/summary/index.d.ts +1 -1
  85. package/dist/summary/index.d.ts.map +1 -1
  86. package/dist/summary/index.js.map +1 -1
  87. package/dist/summary/orderedClientElection.d.ts +1 -1
  88. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  89. package/dist/summary/orderedClientElection.js +6 -5
  90. package/dist/summary/orderedClientElection.js.map +1 -1
  91. package/dist/summary/runWhileConnectedCoordinator.js +3 -3
  92. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
  93. package/dist/summary/runningSummarizer.d.ts +1 -1
  94. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  95. package/dist/summary/runningSummarizer.js +13 -12
  96. package/dist/summary/runningSummarizer.js.map +1 -1
  97. package/dist/summary/summarizer.d.ts +1 -1
  98. package/dist/summary/summarizer.d.ts.map +1 -1
  99. package/dist/summary/summarizer.js +4 -3
  100. package/dist/summary/summarizer.js.map +1 -1
  101. package/dist/summary/summarizerClientElection.d.ts +1 -1
  102. package/dist/summary/summarizerClientElection.js +2 -2
  103. package/dist/summary/summarizerClientElection.js.map +1 -1
  104. package/dist/summary/summarizerHeuristics.js +2 -2
  105. package/dist/summary/summarizerHeuristics.js.map +1 -1
  106. package/dist/summary/summarizerNode/index.d.ts +1 -1
  107. package/dist/summary/summarizerNode/index.d.ts.map +1 -1
  108. package/dist/summary/summarizerNode/index.js.map +1 -1
  109. package/dist/summary/summarizerNode/summarizerNode.d.ts +5 -14
  110. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  111. package/dist/summary/summarizerNode/summarizerNode.js +32 -109
  112. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  113. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
  114. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  115. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  116. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +0 -11
  117. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  118. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +5 -88
  119. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  120. package/dist/summary/summaryCollection.d.ts +1 -1
  121. package/dist/summary/summaryCollection.d.ts.map +1 -1
  122. package/dist/summary/summaryCollection.js +9 -8
  123. package/dist/summary/summaryCollection.js.map +1 -1
  124. package/dist/summary/summaryFormat.js +2 -2
  125. package/dist/summary/summaryFormat.js.map +1 -1
  126. package/dist/summary/summaryGenerator.d.ts +1 -1
  127. package/dist/summary/summaryGenerator.d.ts.map +1 -1
  128. package/dist/summary/summaryGenerator.js +10 -10
  129. package/dist/summary/summaryGenerator.js.map +1 -1
  130. package/dist/summary/summaryManager.d.ts +1 -1
  131. package/dist/summary/summaryManager.d.ts.map +1 -1
  132. package/dist/summary/summaryManager.js +9 -8
  133. package/dist/summary/summaryManager.js.map +1 -1
  134. package/lib/batchTracker.d.ts.map +1 -1
  135. package/lib/batchTracker.js +2 -1
  136. package/lib/batchTracker.js.map +1 -1
  137. package/lib/blobManager.d.ts +1 -2
  138. package/lib/blobManager.d.ts.map +1 -1
  139. package/lib/blobManager.js +52 -40
  140. package/lib/blobManager.js.map +1 -1
  141. package/lib/connectionTelemetry.d.ts.map +1 -1
  142. package/lib/connectionTelemetry.js +2 -1
  143. package/lib/connectionTelemetry.js.map +1 -1
  144. package/lib/containerRuntime.d.ts +18 -3
  145. package/lib/containerRuntime.d.ts.map +1 -1
  146. package/lib/containerRuntime.js +147 -107
  147. package/lib/containerRuntime.js.map +1 -1
  148. package/lib/dataStore.js +1 -1
  149. package/lib/dataStore.js.map +1 -1
  150. package/lib/dataStoreContext.d.ts +2 -1
  151. package/lib/dataStoreContext.d.ts.map +1 -1
  152. package/lib/dataStoreContext.js +2 -2
  153. package/lib/dataStoreContext.js.map +1 -1
  154. package/lib/dataStoreContexts.d.ts.map +1 -1
  155. package/lib/dataStoreContexts.js +1 -2
  156. package/lib/dataStoreContexts.js.map +1 -1
  157. package/lib/dataStores.d.ts.map +1 -1
  158. package/lib/dataStores.js +1 -2
  159. package/lib/dataStores.js.map +1 -1
  160. package/lib/deltaManagerProxyBase.d.ts +1 -1
  161. package/lib/deltaManagerProxyBase.js +1 -1
  162. package/lib/deltaManagerProxyBase.js.map +1 -1
  163. package/lib/deltaScheduler.js +1 -1
  164. package/lib/deltaScheduler.js.map +1 -1
  165. package/lib/gc/garbageCollection.d.ts +3 -5
  166. package/lib/gc/garbageCollection.d.ts.map +1 -1
  167. package/lib/gc/garbageCollection.js +5 -22
  168. package/lib/gc/garbageCollection.js.map +1 -1
  169. package/lib/gc/gcDefinitions.d.ts +2 -2
  170. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  171. package/lib/gc/gcDefinitions.js.map +1 -1
  172. package/lib/gc/gcHelpers.js +1 -1
  173. package/lib/gc/gcHelpers.js.map +1 -1
  174. package/lib/gc/gcSummaryStateTracker.d.ts +4 -7
  175. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  176. package/lib/gc/gcSummaryStateTracker.js +16 -53
  177. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  178. package/lib/gc/gcUnreferencedStateTracker.js +1 -1
  179. package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
  180. package/lib/gc/index.d.ts +1 -1
  181. package/lib/gc/index.d.ts.map +1 -1
  182. package/lib/gc/index.js +1 -1
  183. package/lib/gc/index.js.map +1 -1
  184. package/lib/id-compressor/appendOnlySortedMap.js +1 -1
  185. package/lib/id-compressor/appendOnlySortedMap.js.map +1 -1
  186. package/lib/id-compressor/finalSpace.js +1 -1
  187. package/lib/id-compressor/finalSpace.js.map +1 -1
  188. package/lib/id-compressor/idCompressor.d.ts.map +1 -1
  189. package/lib/id-compressor/idCompressor.js +2 -1
  190. package/lib/id-compressor/idCompressor.js.map +1 -1
  191. package/lib/id-compressor/sessions.js +1 -1
  192. package/lib/id-compressor/sessions.js.map +1 -1
  193. package/lib/id-compressor/utilities.js +1 -1
  194. package/lib/id-compressor/utilities.js.map +1 -1
  195. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  196. package/lib/opLifecycle/opCompressor.js +2 -1
  197. package/lib/opLifecycle/opCompressor.js.map +1 -1
  198. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  199. package/lib/opLifecycle/opDecompressor.js +2 -1
  200. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  201. package/lib/opLifecycle/opGroupingManager.js +1 -1
  202. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  203. package/lib/opLifecycle/opSplitter.js +1 -1
  204. package/lib/opLifecycle/opSplitter.js.map +1 -1
  205. package/lib/opLifecycle/outbox.js +1 -1
  206. package/lib/opLifecycle/outbox.js.map +1 -1
  207. package/lib/packageVersion.d.ts +1 -1
  208. package/lib/packageVersion.js +1 -1
  209. package/lib/packageVersion.js.map +1 -1
  210. package/lib/pendingStateManager.d.ts.map +1 -1
  211. package/lib/pendingStateManager.js +1 -2
  212. package/lib/pendingStateManager.js.map +1 -1
  213. package/lib/scheduleManager.d.ts.map +1 -1
  214. package/lib/scheduleManager.js +2 -1
  215. package/lib/scheduleManager.js.map +1 -1
  216. package/lib/summary/index.d.ts +1 -1
  217. package/lib/summary/index.d.ts.map +1 -1
  218. package/lib/summary/index.js.map +1 -1
  219. package/lib/summary/orderedClientElection.d.ts +1 -1
  220. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  221. package/lib/summary/orderedClientElection.js +2 -1
  222. package/lib/summary/orderedClientElection.js.map +1 -1
  223. package/lib/summary/runWhileConnectedCoordinator.js +1 -1
  224. package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
  225. package/lib/summary/runningSummarizer.d.ts +1 -1
  226. package/lib/summary/runningSummarizer.d.ts.map +1 -1
  227. package/lib/summary/runningSummarizer.js +5 -4
  228. package/lib/summary/runningSummarizer.js.map +1 -1
  229. package/lib/summary/summarizer.d.ts +1 -1
  230. package/lib/summary/summarizer.d.ts.map +1 -1
  231. package/lib/summary/summarizer.js +2 -1
  232. package/lib/summary/summarizer.js.map +1 -1
  233. package/lib/summary/summarizerClientElection.d.ts +1 -1
  234. package/lib/summary/summarizerClientElection.js +1 -1
  235. package/lib/summary/summarizerClientElection.js.map +1 -1
  236. package/lib/summary/summarizerHeuristics.js +1 -1
  237. package/lib/summary/summarizerHeuristics.js.map +1 -1
  238. package/lib/summary/summarizerNode/index.d.ts +1 -1
  239. package/lib/summary/summarizerNode/index.d.ts.map +1 -1
  240. package/lib/summary/summarizerNode/index.js.map +1 -1
  241. package/lib/summary/summarizerNode/summarizerNode.d.ts +5 -14
  242. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  243. package/lib/summary/summarizerNode/summarizerNode.js +16 -93
  244. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  245. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +6 -30
  246. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  247. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  248. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +0 -11
  249. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  250. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +3 -86
  251. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  252. package/lib/summary/summaryCollection.d.ts +1 -1
  253. package/lib/summary/summaryCollection.d.ts.map +1 -1
  254. package/lib/summary/summaryCollection.js +2 -1
  255. package/lib/summary/summaryCollection.js.map +1 -1
  256. package/lib/summary/summaryFormat.js +1 -1
  257. package/lib/summary/summaryFormat.js.map +1 -1
  258. package/lib/summary/summaryGenerator.d.ts +1 -1
  259. package/lib/summary/summaryGenerator.d.ts.map +1 -1
  260. package/lib/summary/summaryGenerator.js +3 -3
  261. package/lib/summary/summaryGenerator.js.map +1 -1
  262. package/lib/summary/summaryManager.d.ts +1 -1
  263. package/lib/summary/summaryManager.d.ts.map +1 -1
  264. package/lib/summary/summaryManager.js +4 -3
  265. package/lib/summary/summaryManager.js.map +1 -1
  266. package/package.json +22 -24
  267. package/src/batchTracker.ts +2 -1
  268. package/src/blobManager.ts +57 -48
  269. package/src/connectionTelemetry.ts +2 -1
  270. package/src/containerRuntime.ts +207 -166
  271. package/src/dataStore.ts +1 -1
  272. package/src/dataStoreContext.ts +2 -2
  273. package/src/dataStoreContexts.ts +1 -2
  274. package/src/dataStores.ts +1 -2
  275. package/src/deltaManagerProxyBase.ts +1 -1
  276. package/src/deltaScheduler.ts +1 -1
  277. package/src/gc/garbageCollection.ts +6 -41
  278. package/src/gc/gcDefinitions.ts +2 -6
  279. package/src/gc/gcHelpers.ts +1 -1
  280. package/src/gc/gcSummaryStateTracker.ts +19 -65
  281. package/src/gc/gcUnreferencedStateTracker.ts +1 -1
  282. package/src/gc/index.ts +0 -1
  283. package/src/id-compressor/appendOnlySortedMap.ts +1 -1
  284. package/src/id-compressor/finalSpace.ts +1 -1
  285. package/src/id-compressor/idCompressor.ts +2 -1
  286. package/src/id-compressor/sessions.ts +1 -1
  287. package/src/id-compressor/utilities.ts +1 -1
  288. package/src/opLifecycle/opCompressor.ts +2 -1
  289. package/src/opLifecycle/opDecompressor.ts +2 -1
  290. package/src/opLifecycle/opGroupingManager.ts +1 -1
  291. package/src/opLifecycle/opSplitter.ts +1 -1
  292. package/src/opLifecycle/outbox.ts +1 -1
  293. package/src/packageVersion.ts +1 -1
  294. package/src/pendingStateManager.ts +1 -2
  295. package/src/scheduleManager.ts +2 -1
  296. package/src/summary/index.ts +1 -2
  297. package/src/summary/orderedClientElection.ts +2 -1
  298. package/src/summary/runWhileConnectedCoordinator.ts +1 -1
  299. package/src/summary/runningSummarizer.ts +5 -10
  300. package/src/summary/summarizer.ts +2 -1
  301. package/src/summary/summarizerClientElection.ts +1 -1
  302. package/src/summary/summarizerHeuristics.ts +1 -1
  303. package/src/summary/summarizerNode/index.ts +1 -2
  304. package/src/summary/summarizerNode/summarizerNode.ts +23 -145
  305. package/src/summary/summarizerNode/summarizerNodeUtils.ts +7 -38
  306. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +3 -123
  307. package/src/summary/summaryCollection.ts +2 -1
  308. package/src/summary/summaryFormat.ts +1 -1
  309. package/src/summary/summaryGenerator.ts +3 -3
  310. package/src/summary/summaryManager.ts +4 -3
@@ -12,12 +12,11 @@ import {
12
12
  ISummarizeResult,
13
13
  ISummaryTreeWithStats,
14
14
  } from "@fluidframework/runtime-definitions";
15
- import { mergeStats, ReadAndParseBlob, SummaryTreeBuilder } from "@fluidframework/runtime-utils";
16
- import { IContainerRuntimeMetadata, metadataBlobName, RefreshSummaryResult } from "../summary";
17
- import { GCVersion, IGCStats } from "./gcDefinitions";
18
- import { getGCDataFromSnapshot, generateSortedGCState, getGCVersion } from "./gcHelpers";
15
+ import { mergeStats, SummaryTreeBuilder } from "@fluidframework/runtime-utils";
16
+ import { IRefreshSummaryResult } from "../summary";
17
+ import { GCVersion, IGarbageCollectorConfigs, IGCStats } from "./gcDefinitions";
18
+ import { generateSortedGCState } from "./gcHelpers";
19
19
  import { IGarbageCollectionSnapshotData, IGarbageCollectionState } from "./gcSummaryDefinitions";
20
- import { IGarbageCollectorConfigs } from ".";
21
20
 
22
21
  export const gcStateBlobKey = `${gcBlobPrefix}_root`;
23
22
 
@@ -264,72 +263,27 @@ export class GCSummaryStateTracker {
264
263
  }
265
264
 
266
265
  /**
267
- * Called to refresh the latest summary state. This happens when either a pending summary is acked or a snapshot
268
- * is downloaded and should be used to update the state.
266
+ * Called to refresh the latest summary state. This happens when either a pending summary is acked.
269
267
  */
270
- public async refreshLatestSummary(
271
- proposalHandle: string | undefined,
272
- result: RefreshSummaryResult,
273
- readAndParseBlob: ReadAndParseBlob,
274
- ): Promise<IGarbageCollectionSnapshotData | undefined> {
275
- // If the latest summary was updated and the summary was tracked, this client is the one that generated this
276
- // summary. So, update wasGCRunInLatestSummary.
277
- // Note that this has to be updated if GC did not run too. Otherwise, `gcStateNeedsReset` will always return
278
- // true in scenarios where GC is disabled but enabled in the snapshot we loaded from.
279
- if (result.latestSummaryUpdated && result.wasSummaryTracked) {
280
- this.wasGCRunInLatestSummary = this.configs.shouldRunGC;
281
- }
282
-
283
- if (!result.latestSummaryUpdated || !this.configs.shouldRunGC) {
284
- return undefined;
285
- }
286
-
287
- // If the summary was tracked by this client, it was the one that generated the summary in the first place.
288
- // Update latest state from pending.
289
- if (result.wasSummaryTracked) {
290
- this.latestSummaryGCVersion = this.configs.gcVersionInEffect;
291
- this.latestSummaryData = this.pendingSummaryData;
292
- this.pendingSummaryData = undefined;
293
- this.updatedDSCountSinceLastSummary = 0;
294
- return undefined;
295
- }
296
-
297
- // If the summary was not tracked by this client, the state should be updated from the downloaded snapshot.
298
- const snapshotTree = result.snapshotTree;
299
- const metadataBlobId = snapshotTree.blobs[metadataBlobName];
300
- const metadata = metadataBlobId
301
- ? await readAndParseBlob<IContainerRuntimeMetadata>(metadataBlobId)
302
- : undefined;
303
- this.latestSummaryGCVersion = getGCVersion(metadata);
304
-
305
- const gcSnapshotTree = snapshotTree.trees[gcTreeKey];
306
- // If GC ran in the container that generated this snapshot, it will have a GC tree.
307
- this.wasGCRunInLatestSummary = gcSnapshotTree !== undefined;
308
-
309
- if (gcSnapshotTree === undefined) {
310
- return undefined;
268
+ public async refreshLatestSummary(result: IRefreshSummaryResult): Promise<void> {
269
+ if (!result.isSummaryTracked) {
270
+ return;
311
271
  }
312
272
 
313
- let snapshotData = await getGCDataFromSnapshot(gcSnapshotTree, readAndParseBlob);
273
+ // If the summary is tracked, this client is the one that generated it. So, update wasGCRunInLatestSummary.
274
+ // Note that this has to be updated if GC did not run too. Otherwise, `gcStateNeedsReset` will always return
275
+ // true in scenarios where GC is currently disabled but enabled in the snapshot we loaded from.
276
+ this.wasGCRunInLatestSummary = this.configs.shouldRunGC;
314
277
 
315
- // If the GC version in the snapshot does not match the GC version currently in effect, the GC data
316
- // in the snapshot cannot be interpreted correctly. Set everything to undefined except for deletedNodes
317
- // because irrespective of GC versions, these nodes have been deleted and cannot be brought back. The
318
- // deletedNodes info is needed to identify when these nodes are used.
319
- if (getGCVersion(metadata) !== this.configs.gcVersionInEffect) {
320
- snapshotData = {
321
- gcState: undefined,
322
- tombstones: undefined,
323
- deletedNodes: snapshotData.deletedNodes,
324
- };
278
+ if (!this.configs.shouldRunGC) {
279
+ return;
325
280
  }
326
281
 
327
- this.latestSummaryData = {
328
- serializedGCState: JSON.stringify(snapshotData.gcState),
329
- serializedTombstones: JSON.stringify(snapshotData.tombstones),
330
- serializedDeletedNodes: JSON.stringify(snapshotData.deletedNodes),
331
- };
332
- return snapshotData;
282
+ this.latestSummaryGCVersion = this.configs.gcVersionInEffect;
283
+ this.latestSummaryData = this.pendingSummaryData;
284
+ this.pendingSummaryData = undefined;
285
+ this.updatedDSCountSinceLastSummary = 0;
286
+ return;
333
287
  }
334
288
 
335
289
  /**
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { assert, Timer } from "@fluidframework/common-utils";
6
+ import { assert, Timer } from "@fluidframework/core-utils";
7
7
  import { UnreferencedState } from "./gcDefinitions";
8
8
 
9
9
  /** A wrapper around common-utils Timer that requires the timeout when calling start/restart */
package/src/gc/index.ts CHANGED
@@ -38,7 +38,6 @@ export {
38
38
  export {
39
39
  cloneGCData,
40
40
  concatGarbageCollectionStates,
41
- getGCDataFromSnapshot,
42
41
  shouldAllowGcTombstoneEnforcement,
43
42
  shouldAllowGcSweep,
44
43
  trimLeadingAndTrailingSlashes,
@@ -5,7 +5,7 @@
5
5
 
6
6
  /* eslint-disable tsdoc/syntax */
7
7
  /* eslint-disable no-bitwise */
8
- import { assert } from "@fluidframework/common-utils";
8
+ import { assert } from "@fluidframework/core-utils";
9
9
 
10
10
  /**
11
11
  * A map in which entries are always added in key-sorted order.
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { assert } from "@fluidframework/common-utils";
6
+ import { assert } from "@fluidframework/core-utils";
7
7
  import { IdCluster, clustersEqual, lastAllocatedFinal, lastFinalizedFinal } from "./sessions";
8
8
  import { FinalCompressedId } from "./identifiers";
9
9
 
@@ -3,7 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { assert, bufferToString, stringToBuffer } from "@fluidframework/common-utils";
6
+ import { assert } from "@fluidframework/core-utils";
7
+ import { bufferToString, stringToBuffer } from "@fluid-internal/client-utils";
7
8
  import {
8
9
  IdCreationRange,
9
10
  IIdCompressor,
@@ -5,7 +5,7 @@
5
5
 
6
6
  import BTree from "sorted-btree";
7
7
  import { SessionId, StableId } from "@fluidframework/runtime-definitions";
8
- import { assert } from "@fluidframework/common-utils";
8
+ import { assert } from "@fluidframework/core-utils";
9
9
  import {
10
10
  compareBigints,
11
11
  localIdFromGenCount,
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  /* eslint-disable no-bitwise */
7
- import { assert } from "@fluidframework/common-utils";
7
+ import { assert } from "@fluidframework/core-utils";
8
8
  import { SessionId, StableId } from "@fluidframework/runtime-definitions";
9
9
  import { v4 } from "uuid";
10
10
  import { LocalCompressedId, NumericUuid } from "./identifiers";
@@ -4,7 +4,8 @@
4
4
  */
5
5
 
6
6
  import { createChildLogger, UsageError } from "@fluidframework/telemetry-utils";
7
- import { assert, IsoBuffer } from "@fluidframework/common-utils";
7
+ import { assert } from "@fluidframework/core-utils";
8
+ import { IsoBuffer } from "@fluid-internal/client-utils";
8
9
  import { compress } from "lz4js";
9
10
  import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
10
11
  import { CompressionAlgorithms } from "../containerRuntime";
@@ -5,7 +5,8 @@
5
5
 
6
6
  import { decompress } from "lz4js";
7
7
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
8
- import { assert, IsoBuffer, Uint8ArrayToString } from "@fluidframework/common-utils";
8
+ import { assert } from "@fluidframework/core-utils";
9
+ import { IsoBuffer, Uint8ArrayToString } from "@fluid-internal/client-utils";
9
10
  import { createChildLogger } from "@fluidframework/telemetry-utils";
10
11
  import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
11
12
  import { CompressionAlgorithms } from "../containerRuntime";
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { assert } from "@fluidframework/common-utils";
6
+ import { assert } from "@fluidframework/core-utils";
7
7
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
8
8
  import { ContainerMessageType } from "..";
9
9
  import { IBatch } from "./definitions";
@@ -8,7 +8,7 @@ import {
8
8
  DataCorruptionError,
9
9
  extractSafePropertiesFromMessage,
10
10
  } from "@fluidframework/telemetry-utils";
11
- import { assert } from "@fluidframework/common-utils";
11
+ import { assert } from "@fluidframework/core-utils";
12
12
  import { IBatchMessage } from "@fluidframework/container-definitions";
13
13
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
14
14
  import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
@@ -9,7 +9,7 @@ import {
9
9
  MonitoringContext,
10
10
  UsageError,
11
11
  } from "@fluidframework/telemetry-utils";
12
- import { assert } from "@fluidframework/common-utils";
12
+ import { assert } from "@fluidframework/core-utils";
13
13
  import { IBatchMessage, ICriticalContainerError } from "@fluidframework/container-definitions";
14
14
  import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
15
15
  import { ICompressionRuntimeOptions } from "../containerRuntime";
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.0.0-internal.6.2.0";
9
+ export const pkgVersion = "2.0.0-internal.6.3.0";
@@ -6,9 +6,8 @@
6
6
  import Deque from "double-ended-queue";
7
7
 
8
8
  import { IDisposable } from "@fluidframework/core-interfaces";
9
- import { assert } from "@fluidframework/common-utils";
9
+ import { assert, Lazy } from "@fluidframework/core-utils";
10
10
  import { ICriticalContainerError } from "@fluidframework/container-definitions";
11
- import { Lazy } from "@fluidframework/core-utils";
12
11
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
13
12
  import { DataProcessingError, ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
14
13
 
@@ -12,7 +12,8 @@ import {
12
12
  extractSafePropertiesFromMessage,
13
13
  ITelemetryLoggerExt,
14
14
  } from "@fluidframework/telemetry-utils";
15
- import { assert, performance } from "@fluidframework/common-utils";
15
+ import { assert } from "@fluidframework/core-utils";
16
+ import { performance } from "@fluid-internal/client-utils";
16
17
  import { isRuntimeMessage } from "@fluidframework/driver-utils";
17
18
  import { DeltaScheduler } from "./deltaScheduler";
18
19
  import { pkgVersion } from "./packageVersion";
@@ -28,10 +28,9 @@ export { SummarizeHeuristicData, SummarizeHeuristicRunner } from "./summarizerHe
28
28
  export {
29
29
  createRootSummarizerNode,
30
30
  createRootSummarizerNodeWithGC,
31
- IFetchSnapshotResult,
31
+ IRefreshSummaryResult,
32
32
  IRootSummarizerNode,
33
33
  IRootSummarizerNodeWithGC,
34
- RefreshSummaryResult,
35
34
  } from "./summarizerNode";
36
35
  export {
37
36
  IConnectableRuntime,
@@ -9,7 +9,8 @@ import {
9
9
  createChildLogger,
10
10
  UsageError,
11
11
  } from "@fluidframework/telemetry-utils";
12
- import { assert, TypedEventEmitter } from "@fluidframework/common-utils";
12
+ import { assert } from "@fluidframework/core-utils";
13
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
13
14
  import { IDeltaManager } from "@fluidframework/container-definitions";
14
15
  import { IClient, IQuorumClients, ISequencedClient } from "@fluidframework/protocol-definitions";
15
16
  import { summarizerClientType } from "./summarizerClientElection";
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { assert, Deferred } from "@fluidframework/common-utils";
6
+ import { assert, Deferred } from "@fluidframework/core-utils";
7
7
  import {
8
8
  SummarizerStopReason,
9
9
  IConnectableRuntime,
@@ -11,14 +11,9 @@ import {
11
11
  createChildLogger,
12
12
  UsageError,
13
13
  } from "@fluidframework/telemetry-utils";
14
- import {
15
- assert,
16
- delay,
17
- Deferred,
18
- PromiseTimer,
19
- TypedEventEmitter,
20
- } from "@fluidframework/common-utils";
21
- import { DriverErrorType } from "@fluidframework/driver-definitions";
14
+ import { assert, delay, Deferred, PromiseTimer } from "@fluidframework/core-utils";
15
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
16
+ import { DriverErrorTypes } from "@fluidframework/driver-definitions";
22
17
  import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
23
18
  import { ISummaryConfiguration } from "../containerRuntime";
24
19
  import { opSize } from "../opProperties";
@@ -316,7 +311,7 @@ export class RunningSummarizer extends TypedEventEmitter<ISummarizerEvents> impl
316
311
  // by calling `refreshLatestSummaryAckFromServer` and we will be fine.
317
312
  const isIgnoredError =
318
313
  isFluidError(error) &&
319
- error.errorType === DriverErrorType.fileNotFoundOrAccessDeniedError;
314
+ error.errorType === DriverErrorTypes.fileNotFoundOrAccessDeniedError;
320
315
 
321
316
  summaryLogger.sendTelemetryEvent(
322
317
  {
@@ -606,7 +601,7 @@ export class RunningSummarizer extends TypedEventEmitter<ISummarizerEvents> impl
606
601
  this.beforeSummaryAction();
607
602
  },
608
603
  async () => {
609
- return this.mc.config.getBoolean("Fluid.Summarizer.TryDynamicRetries")
604
+ return this.mc.config.getBoolean("Fluid.Summarizer.UseDynamicRetries")
610
605
  ? this.trySummarizeWithRetries(reason)
611
606
  : this.trySummarizeWithStaticAttempts(reason);
612
607
  },
@@ -3,7 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { Deferred, TypedEventEmitter } from "@fluidframework/common-utils";
6
+ import { Deferred } from "@fluidframework/core-utils";
7
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
7
8
  import {
8
9
  ITelemetryLoggerExt,
9
10
  createChildLogger,
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { IEvent, IEventProvider } from "@fluidframework/core-interfaces";
7
7
  import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
8
- import { TypedEventEmitter } from "@fluidframework/common-utils";
8
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
9
9
  import { IClientDetails, MessageType } from "@fluidframework/protocol-definitions";
10
10
  import {
11
11
  IOrderedClientElection,
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
7
- import { Timer } from "@fluidframework/common-utils";
7
+ import { Timer } from "@fluidframework/core-utils";
8
8
  import { ISummaryConfigurationHeuristics } from "../containerRuntime";
9
9
  import {
10
10
  ISummarizeHeuristicData,
@@ -4,9 +4,8 @@
4
4
  */
5
5
 
6
6
  export {
7
- IFetchSnapshotResult,
7
+ IRefreshSummaryResult,
8
8
  ISummarizerNodeRootContract,
9
- RefreshSummaryResult,
10
9
  ValidateSummaryResult,
11
10
  } from "./summarizerNodeUtils";
12
11
  export { IRootSummarizerNode, createRootSummarizerNode } from "./summarizerNode";
@@ -29,22 +29,16 @@ import {
29
29
  TelemetryDataTag,
30
30
  tagCodeArtifacts,
31
31
  } from "@fluidframework/telemetry-utils";
32
- import { assert, unreachableCase } from "@fluidframework/common-utils";
33
- import {
34
- convertToSummaryTree,
35
- calculateStats,
36
- mergeStats,
37
- ReadAndParseBlob,
38
- } from "@fluidframework/runtime-utils";
32
+ import { assert, unreachableCase } from "@fluidframework/core-utils";
33
+ import { convertToSummaryTree, calculateStats, mergeStats } from "@fluidframework/runtime-utils";
39
34
  import {
40
35
  EscapedPath,
41
36
  ICreateChildDetails,
42
- IFetchSnapshotResult,
43
37
  IInitialSummary,
38
+ IRefreshSummaryResult,
44
39
  ISummarizerNodeRootContract,
45
40
  parseSummaryForSubtrees,
46
41
  parseSummaryTreeForSubtrees,
47
- RefreshSummaryResult,
48
42
  SummaryNode,
49
43
  ValidateSummaryResult,
50
44
  } from "./summarizerNodeUtils";
@@ -371,31 +365,21 @@ export class SummarizerNode implements IRootSummarizerNode {
371
365
 
372
366
  /**
373
367
  * Refreshes the latest summary tracked by this node. If we have a pending summary for the given proposal handle,
374
- * it becomes the latest summary. If the current summary is already ahead (e.g., loaded from a service summary),
375
- * we skip the update. Otherwise, we fetch the latest snapshot and update latest summary based off of that.
376
- *
377
- * @returns A RefreshSummaryResult type which returns information based on the following three scenarios:
378
- *
379
- * 1. The latest summary was not updated.
368
+ * it becomes the latest summary. If the current summary is already ahead, we skip the update.
369
+ * If the current summary is behind, then we do not refresh.
380
370
  *
381
- * 2. The latest summary was updated and the summary corresponding to the params was being tracked.
382
- *
383
- * 3. The latest summary was updated but the summary corresponding to the params was not tracked. In this
384
- * case, the latest summary is updated based on the downloaded snapshot which is also returned.
371
+ * @returns true if the summary is tracked by this node, false otherwise.
385
372
  */
386
373
  public async refreshLatestSummary(
387
- proposalHandle: string | undefined,
374
+ proposalHandle: string,
388
375
  summaryRefSeq: number,
389
- fetchLatestSnapshot: () => Promise<IFetchSnapshotResult>,
390
- readAndParseBlob: ReadAndParseBlob,
391
- correlatedSummaryLogger: ITelemetryLoggerExt,
392
- ): Promise<RefreshSummaryResult> {
376
+ ): Promise<IRefreshSummaryResult> {
393
377
  const eventProps: {
394
378
  proposalHandle: string | undefined;
395
379
  summaryRefSeq: number;
396
380
  referenceSequenceNumber: number;
397
- latestSummaryUpdated?: boolean;
398
- wasSummaryTracked?: boolean;
381
+ isSummaryTracked?: boolean;
382
+ pendingSummaryFound?: boolean;
399
383
  } = {
400
384
  proposalHandle,
401
385
  summaryRefSeq,
@@ -416,75 +400,22 @@ export class SummarizerNode implements IRootSummarizerNode {
416
400
  });
417
401
  }
418
402
 
419
- if (proposalHandle !== undefined) {
420
- const maybeSummaryNode = this.pendingSummaries.get(proposalHandle);
403
+ let isSummaryTracked = false;
404
+ let isSummaryNewer = false;
421
405
 
422
- if (maybeSummaryNode !== undefined) {
423
- this.refreshLatestSummaryFromPending(
424
- proposalHandle,
425
- maybeSummaryNode.referenceSequenceNumber,
426
- );
427
- eventProps.wasSummaryTracked = true;
428
- eventProps.latestSummaryUpdated = true;
429
- event.end(eventProps);
430
- return {
431
- latestSummaryUpdated: true,
432
- wasSummaryTracked: true,
433
- summaryRefSeq,
434
- };
435
- }
436
-
437
- const props = {
438
- summaryRefSeq,
439
- pendingSize: this.pendingSummaries.size ?? undefined,
440
- };
441
- this.logger.sendTelemetryEvent({
442
- eventName: "PendingSummaryNotFound",
443
- proposalHandle,
444
- referenceSequenceNumber: this.referenceSequenceNumber,
445
- details: JSON.stringify(props),
446
- });
406
+ if (summaryRefSeq > this.referenceSequenceNumber) {
407
+ isSummaryNewer = true;
447
408
  }
448
-
449
- // If the summary for which refresh is called is older than the latest tracked summary, ignore it.
450
- if (this.referenceSequenceNumber >= summaryRefSeq) {
451
- eventProps.latestSummaryUpdated = false;
452
- event.end(eventProps);
453
- return { latestSummaryUpdated: false };
454
- }
455
-
456
- // Fetch the latest snapshot and refresh state from it. Note that we need to use the reference sequence number
457
- // of the fetched snapshot and not the "summaryRefSeq" that was passed in.
458
- const { snapshotTree, snapshotRefSeq: fetchedSnapshotRefSeq } =
459
- await fetchLatestSnapshot();
460
-
461
- // Possible re-entrancy. We may have updated latest summary state while fetching the snapshot. If the fetched
462
- // snapshot is older than the latest tracked summary, ignore it.
463
- if (this.referenceSequenceNumber >= fetchedSnapshotRefSeq) {
464
- eventProps.latestSummaryUpdated = false;
465
- event.end(eventProps);
466
- return { latestSummaryUpdated: false };
409
+ const maybeSummaryNode = this.pendingSummaries.get(proposalHandle);
410
+ if (maybeSummaryNode !== undefined) {
411
+ this.refreshLatestSummaryFromPending(
412
+ proposalHandle,
413
+ maybeSummaryNode.referenceSequenceNumber,
414
+ );
415
+ isSummaryTracked = true;
467
416
  }
468
-
469
- await this.refreshLatestSummaryFromSnapshot(
470
- fetchedSnapshotRefSeq,
471
- snapshotTree,
472
- undefined,
473
- EscapedPath.create(""),
474
- correlatedSummaryLogger,
475
- readAndParseBlob,
476
- );
477
-
478
- eventProps.latestSummaryUpdated = true;
479
- eventProps.wasSummaryTracked = false;
480
- eventProps.summaryRefSeq = fetchedSnapshotRefSeq;
481
- event.end(eventProps);
482
- return {
483
- latestSummaryUpdated: true,
484
- wasSummaryTracked: false,
485
- snapshotTree,
486
- summaryRefSeq: fetchedSnapshotRefSeq,
487
- };
417
+ event.end({ ...eventProps, isSummaryNewer, pendingSummaryFound: isSummaryTracked });
418
+ return { isSummaryTracked, isSummaryNewer };
488
419
  },
489
420
  { start: true, end: true, cancel: "error" },
490
421
  );
@@ -526,59 +457,6 @@ export class SummarizerNode implements IRootSummarizerNode {
526
457
  }
527
458
  }
528
459
 
529
- protected async refreshLatestSummaryFromSnapshot(
530
- referenceSequenceNumber: number,
531
- snapshotTree: ISnapshotTree,
532
- basePath: EscapedPath | undefined,
533
- localPath: EscapedPath,
534
- correlatedSummaryLogger: ITelemetryLoggerExt,
535
- readAndParseBlob: ReadAndParseBlob,
536
- ): Promise<void> {
537
- // Possible re-entrancy. If we have already seen a summary later than this one, ignore it.
538
- if (this.referenceSequenceNumber >= referenceSequenceNumber) {
539
- return;
540
- }
541
-
542
- this.refreshLatestSummaryCore(referenceSequenceNumber);
543
-
544
- this._latestSummary = new SummaryNode({
545
- referenceSequenceNumber,
546
- basePath,
547
- localPath,
548
- });
549
-
550
- const pathParts: string[] = [];
551
- const { childrenTree, childrenPathPart } = parseSummaryForSubtrees(snapshotTree);
552
- if (childrenPathPart !== undefined) {
553
- pathParts.push(childrenPathPart);
554
- }
555
-
556
- if (pathParts.length > 0) {
557
- this._latestSummary.additionalPath = EscapedPath.createAndConcat(pathParts);
558
- }
559
-
560
- // Propagate update to all child nodes
561
- const pathForChildren = this._latestSummary.fullPathForChildren;
562
- await Promise.all(
563
- Array.from(this.children)
564
- .filter(([id]) => {
565
- // Assuming subtrees missing from snapshot are newer than the snapshot,
566
- // but might be nice to assert this using earliest seq for node.
567
- return childrenTree.trees[id] !== undefined;
568
- })
569
- .map(async ([id, child]) => {
570
- return child.refreshLatestSummaryFromSnapshot(
571
- referenceSequenceNumber,
572
- childrenTree.trees[id],
573
- pathForChildren,
574
- EscapedPath.create(id),
575
- correlatedSummaryLogger,
576
- readAndParseBlob,
577
- );
578
- }),
579
- );
580
- }
581
-
582
460
  private refreshLatestSummaryCore(referenceSequenceNumber: number): void {
583
461
  for (const [key, value] of this.pendingSummaries) {
584
462
  if (value.referenceSequenceNumber < referenceSequenceNumber) {
@@ -6,40 +6,12 @@
6
6
  import { ITelemetryLoggerExt, TelemetryDataTag } from "@fluidframework/telemetry-utils";
7
7
  import { ISnapshotTree, ISummaryTree, SummaryObject } from "@fluidframework/protocol-definitions";
8
8
  import { channelsTreeName, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
9
- import { ReadAndParseBlob } from "@fluidframework/runtime-utils";
10
9
 
11
- /**
12
- * Return type of refreshSummaryAck function. There can be three different scenarios based on the passed params:
13
- *
14
- * 1. The latest summary was not updated.
15
- *
16
- * 2. The latest summary was updated and the summary corresponding to the params was tracked by this client.
17
- *
18
- * 3. The latest summary was updated but the summary corresponding to the params was not tracked. In this case, the
19
- * latest snapshot is fetched and the latest summary state is updated based on it.
20
- */
21
- export type RefreshSummaryResult =
22
- | {
23
- latestSummaryUpdated: false;
24
- }
25
- | {
26
- latestSummaryUpdated: true;
27
- wasSummaryTracked: true;
28
- summaryRefSeq: number;
29
- }
30
- | {
31
- latestSummaryUpdated: true;
32
- wasSummaryTracked: false;
33
- snapshotTree: ISnapshotTree;
34
- summaryRefSeq: number;
35
- };
36
-
37
- /**
38
- * Result of snapshot fetch during refreshing latest summary state.
39
- */
40
- export interface IFetchSnapshotResult {
41
- snapshotTree: ISnapshotTree;
42
- snapshotRefSeq: number;
10
+ export interface IRefreshSummaryResult {
11
+ /** Tells whether this summary is tracked by this client. */
12
+ isSummaryTracked: boolean;
13
+ /** Tells whether this summary is newer than the latest one tracked by this client. */
14
+ isSummaryNewer: boolean;
43
15
  }
44
16
 
45
17
  /**
@@ -70,12 +42,9 @@ export interface ISummarizerNodeRootContract {
70
42
  completeSummary(proposalHandle: string, validate: boolean): void;
71
43
  clearSummary(): void;
72
44
  refreshLatestSummary(
73
- proposalHandle: string | undefined,
45
+ proposalHandle: string,
74
46
  summaryRefSeq: number,
75
- fetchLatestSnapshot: () => Promise<IFetchSnapshotResult>,
76
- readAndParseBlob: ReadAndParseBlob,
77
- correlatedSummaryLogger: ITelemetryLoggerExt,
78
- ): Promise<RefreshSummaryResult>;
47
+ ): Promise<IRefreshSummaryResult>;
79
48
  }
80
49
 
81
50
  /** Path for nodes in a tree with escaped special characters */