@fluidframework/container-runtime 2.0.0-internal.3.1.0 → 2.0.0-internal.3.2.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 (351) hide show
  1. package/dist/blobManager.d.ts +6 -0
  2. package/dist/blobManager.d.ts.map +1 -1
  3. package/dist/blobManager.js +31 -6
  4. package/dist/blobManager.js.map +1 -1
  5. package/dist/containerRuntime.d.ts +17 -15
  6. package/dist/containerRuntime.d.ts.map +1 -1
  7. package/dist/containerRuntime.js +158 -121
  8. package/dist/containerRuntime.js.map +1 -1
  9. package/dist/dataStoreContext.d.ts +21 -12
  10. package/dist/dataStoreContext.d.ts.map +1 -1
  11. package/dist/dataStoreContext.js +76 -50
  12. package/dist/dataStoreContext.js.map +1 -1
  13. package/dist/dataStores.d.ts +9 -10
  14. package/dist/dataStores.d.ts.map +1 -1
  15. package/dist/dataStores.js +42 -49
  16. package/dist/dataStores.js.map +1 -1
  17. package/dist/{garbageCollection.d.ts → gc/garbageCollection.d.ts} +5 -200
  18. package/dist/gc/garbageCollection.d.ts.map +1 -0
  19. package/dist/{garbageCollection.js → gc/garbageCollection.js} +77 -353
  20. package/dist/gc/garbageCollection.js.map +1 -0
  21. package/dist/gc/gcDefinitions.d.ts +189 -0
  22. package/dist/gc/gcDefinitions.d.ts.map +1 -0
  23. package/dist/{garbageCollectionConstants.js → gc/gcDefinitions.js} +24 -2
  24. package/dist/gc/gcDefinitions.js.map +1 -0
  25. package/{lib/garbageCollectionHelpers.d.ts → dist/gc/gcHelpers.d.ts} +5 -1
  26. package/dist/gc/gcHelpers.d.ts.map +1 -0
  27. package/dist/{garbageCollectionHelpers.js → gc/gcHelpers.js} +27 -7
  28. package/dist/gc/gcHelpers.js.map +1 -0
  29. package/dist/gc/gcSummaryStateTracker.d.ts +86 -0
  30. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -0
  31. package/dist/gc/gcSummaryStateTracker.js +246 -0
  32. package/dist/gc/gcSummaryStateTracker.js.map +1 -0
  33. package/dist/gc/gcSweepReadyUsageDetection.d.ts.map +1 -0
  34. package/dist/{gcSweepReadyUsageDetection.js → gc/gcSweepReadyUsageDetection.js} +2 -2
  35. package/dist/gc/gcSweepReadyUsageDetection.js.map +1 -0
  36. package/dist/gc/gcUnreferencedStateTracker.d.ts +34 -0
  37. package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -0
  38. package/dist/gc/gcUnreferencedStateTracker.js +94 -0
  39. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -0
  40. package/dist/gc/index.d.ts +11 -0
  41. package/dist/gc/index.d.ts.map +1 -0
  42. package/dist/gc/index.js +40 -0
  43. package/dist/gc/index.js.map +1 -0
  44. package/dist/index.d.ts +2 -5
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +6 -9
  47. package/dist/index.js.map +1 -1
  48. package/dist/opLifecycle/batchManager.d.ts +2 -13
  49. package/dist/opLifecycle/batchManager.d.ts.map +1 -1
  50. package/dist/opLifecycle/batchManager.js +7 -36
  51. package/dist/opLifecycle/batchManager.js.map +1 -1
  52. package/dist/opLifecycle/definitions.d.ts +4 -0
  53. package/dist/opLifecycle/definitions.d.ts.map +1 -1
  54. package/dist/opLifecycle/definitions.js.map +1 -1
  55. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  56. package/dist/opLifecycle/opCompressor.js +1 -0
  57. package/dist/opLifecycle/opCompressor.js.map +1 -1
  58. package/dist/opLifecycle/opSplitter.d.ts +1 -1
  59. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  60. package/dist/opLifecycle/opSplitter.js +20 -12
  61. package/dist/opLifecycle/opSplitter.js.map +1 -1
  62. package/dist/opLifecycle/outbox.d.ts +19 -3
  63. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  64. package/dist/opLifecycle/outbox.js +59 -28
  65. package/dist/opLifecycle/outbox.js.map +1 -1
  66. package/dist/packageVersion.d.ts +1 -1
  67. package/dist/packageVersion.js +1 -1
  68. package/dist/packageVersion.js.map +1 -1
  69. package/dist/pendingStateManager.d.ts +1 -2
  70. package/dist/pendingStateManager.d.ts.map +1 -1
  71. package/dist/pendingStateManager.js +14 -9
  72. package/dist/pendingStateManager.js.map +1 -1
  73. package/dist/summary/index.d.ts +17 -0
  74. package/dist/summary/index.d.ts.map +1 -0
  75. package/dist/summary/index.js +47 -0
  76. package/dist/summary/index.js.map +1 -0
  77. package/dist/summary/orderedClientElection.d.ts.map +1 -0
  78. package/dist/summary/orderedClientElection.js.map +1 -0
  79. package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -0
  80. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -0
  81. package/{lib → dist/summary}/runningSummarizer.d.ts +19 -18
  82. package/dist/summary/runningSummarizer.d.ts.map +1 -0
  83. package/dist/{runningSummarizer.js → summary/runningSummarizer.js} +158 -56
  84. package/dist/summary/runningSummarizer.js.map +1 -0
  85. package/dist/{summarizer.d.ts → summary/summarizer.d.ts} +2 -4
  86. package/dist/summary/summarizer.d.ts.map +1 -0
  87. package/dist/{summarizer.js → summary/summarizer.js} +1 -61
  88. package/dist/summary/summarizer.js.map +1 -0
  89. package/dist/summary/summarizerClientElection.d.ts.map +1 -0
  90. package/dist/summary/summarizerClientElection.js.map +1 -0
  91. package/dist/summary/summarizerHandle.d.ts.map +1 -0
  92. package/dist/summary/summarizerHandle.js.map +1 -0
  93. package/dist/{summarizerHeuristics.d.ts → summary/summarizerHeuristics.d.ts} +1 -1
  94. package/dist/summary/summarizerHeuristics.d.ts.map +1 -0
  95. package/dist/summary/summarizerHeuristics.js.map +1 -0
  96. package/{lib → dist/summary}/summarizerTypes.d.ts +1 -1
  97. package/dist/summary/summarizerTypes.d.ts.map +1 -0
  98. package/dist/summary/summarizerTypes.js.map +1 -0
  99. package/dist/summary/summaryCollection.d.ts.map +1 -0
  100. package/dist/summary/summaryCollection.js.map +1 -0
  101. package/{lib → dist/summary}/summaryFormat.d.ts +1 -43
  102. package/dist/summary/summaryFormat.d.ts.map +1 -0
  103. package/dist/{summaryFormat.js → summary/summaryFormat.js} +1 -10
  104. package/dist/summary/summaryFormat.js.map +1 -0
  105. package/dist/summary/summaryGenerator.d.ts.map +1 -0
  106. package/dist/{summaryGenerator.js → summary/summaryGenerator.js} +1 -2
  107. package/dist/summary/summaryGenerator.js.map +1 -0
  108. package/dist/{summaryManager.d.ts → summary/summaryManager.d.ts} +1 -1
  109. package/dist/summary/summaryManager.d.ts.map +1 -0
  110. package/dist/summary/summaryManager.js.map +1 -0
  111. package/lib/blobManager.d.ts +6 -0
  112. package/lib/blobManager.d.ts.map +1 -1
  113. package/lib/blobManager.js +28 -3
  114. package/lib/blobManager.js.map +1 -1
  115. package/lib/containerRuntime.d.ts +17 -15
  116. package/lib/containerRuntime.d.ts.map +1 -1
  117. package/lib/containerRuntime.js +127 -90
  118. package/lib/containerRuntime.js.map +1 -1
  119. package/lib/dataStoreContext.d.ts +21 -12
  120. package/lib/dataStoreContext.d.ts.map +1 -1
  121. package/lib/dataStoreContext.js +64 -38
  122. package/lib/dataStoreContext.js.map +1 -1
  123. package/lib/dataStores.d.ts +9 -10
  124. package/lib/dataStores.d.ts.map +1 -1
  125. package/lib/dataStores.js +33 -40
  126. package/lib/dataStores.js.map +1 -1
  127. package/lib/{garbageCollection.d.ts → gc/garbageCollection.d.ts} +5 -200
  128. package/lib/gc/garbageCollection.d.ts.map +1 -0
  129. package/lib/{garbageCollection.js → gc/garbageCollection.js} +44 -319
  130. package/lib/gc/garbageCollection.js.map +1 -0
  131. package/lib/gc/gcDefinitions.d.ts +189 -0
  132. package/lib/gc/gcDefinitions.d.ts.map +1 -0
  133. package/lib/{garbageCollectionConstants.js → gc/gcDefinitions.js} +23 -1
  134. package/lib/gc/gcDefinitions.js.map +1 -0
  135. package/{dist/garbageCollectionHelpers.d.ts → lib/gc/gcHelpers.d.ts} +5 -1
  136. package/lib/gc/gcHelpers.d.ts.map +1 -0
  137. package/lib/{garbageCollectionHelpers.js → gc/gcHelpers.js} +20 -2
  138. package/lib/gc/gcHelpers.js.map +1 -0
  139. package/lib/gc/gcSummaryStateTracker.d.ts +86 -0
  140. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -0
  141. package/lib/gc/gcSummaryStateTracker.js +242 -0
  142. package/lib/gc/gcSummaryStateTracker.js.map +1 -0
  143. package/lib/gc/gcSweepReadyUsageDetection.d.ts.map +1 -0
  144. package/lib/{gcSweepReadyUsageDetection.js → gc/gcSweepReadyUsageDetection.js} +1 -1
  145. package/lib/gc/gcSweepReadyUsageDetection.js.map +1 -0
  146. package/lib/gc/gcUnreferencedStateTracker.d.ts +34 -0
  147. package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -0
  148. package/lib/gc/gcUnreferencedStateTracker.js +90 -0
  149. package/lib/gc/gcUnreferencedStateTracker.js.map +1 -0
  150. package/lib/gc/index.d.ts +11 -0
  151. package/lib/gc/index.d.ts.map +1 -0
  152. package/lib/gc/index.js +11 -0
  153. package/lib/gc/index.js.map +1 -0
  154. package/lib/index.d.ts +2 -5
  155. package/lib/index.d.ts.map +1 -1
  156. package/lib/index.js +1 -4
  157. package/lib/index.js.map +1 -1
  158. package/lib/opLifecycle/batchManager.d.ts +2 -13
  159. package/lib/opLifecycle/batchManager.d.ts.map +1 -1
  160. package/lib/opLifecycle/batchManager.js +7 -36
  161. package/lib/opLifecycle/batchManager.js.map +1 -1
  162. package/lib/opLifecycle/definitions.d.ts +4 -0
  163. package/lib/opLifecycle/definitions.d.ts.map +1 -1
  164. package/lib/opLifecycle/definitions.js.map +1 -1
  165. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  166. package/lib/opLifecycle/opCompressor.js +1 -0
  167. package/lib/opLifecycle/opCompressor.js.map +1 -1
  168. package/lib/opLifecycle/opSplitter.d.ts +1 -1
  169. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  170. package/lib/opLifecycle/opSplitter.js +20 -12
  171. package/lib/opLifecycle/opSplitter.js.map +1 -1
  172. package/lib/opLifecycle/outbox.d.ts +19 -3
  173. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  174. package/lib/opLifecycle/outbox.js +60 -29
  175. package/lib/opLifecycle/outbox.js.map +1 -1
  176. package/lib/packageVersion.d.ts +1 -1
  177. package/lib/packageVersion.js +1 -1
  178. package/lib/packageVersion.js.map +1 -1
  179. package/lib/pendingStateManager.d.ts +1 -2
  180. package/lib/pendingStateManager.d.ts.map +1 -1
  181. package/lib/pendingStateManager.js +14 -9
  182. package/lib/pendingStateManager.js.map +1 -1
  183. package/lib/summary/index.d.ts +17 -0
  184. package/lib/summary/index.d.ts.map +1 -0
  185. package/lib/summary/index.js +16 -0
  186. package/lib/summary/index.js.map +1 -0
  187. package/lib/summary/orderedClientElection.d.ts.map +1 -0
  188. package/lib/summary/orderedClientElection.js.map +1 -0
  189. package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -0
  190. package/lib/summary/runWhileConnectedCoordinator.js.map +1 -0
  191. package/{dist → lib/summary}/runningSummarizer.d.ts +19 -18
  192. package/lib/summary/runningSummarizer.d.ts.map +1 -0
  193. package/lib/{runningSummarizer.js → summary/runningSummarizer.js} +159 -57
  194. package/lib/summary/runningSummarizer.js.map +1 -0
  195. package/lib/{summarizer.d.ts → summary/summarizer.d.ts} +2 -4
  196. package/lib/summary/summarizer.d.ts.map +1 -0
  197. package/lib/{summarizer.js → summary/summarizer.js} +3 -63
  198. package/lib/summary/summarizer.js.map +1 -0
  199. package/lib/summary/summarizerClientElection.d.ts.map +1 -0
  200. package/lib/summary/summarizerClientElection.js.map +1 -0
  201. package/lib/summary/summarizerHandle.d.ts.map +1 -0
  202. package/lib/summary/summarizerHandle.js.map +1 -0
  203. package/lib/{summarizerHeuristics.d.ts → summary/summarizerHeuristics.d.ts} +1 -1
  204. package/lib/summary/summarizerHeuristics.d.ts.map +1 -0
  205. package/lib/summary/summarizerHeuristics.js.map +1 -0
  206. package/{dist → lib/summary}/summarizerTypes.d.ts +1 -1
  207. package/lib/summary/summarizerTypes.d.ts.map +1 -0
  208. package/lib/summary/summarizerTypes.js.map +1 -0
  209. package/lib/summary/summaryCollection.d.ts.map +1 -0
  210. package/lib/summary/summaryCollection.js.map +1 -0
  211. package/{dist → lib/summary}/summaryFormat.d.ts +1 -43
  212. package/lib/summary/summaryFormat.d.ts.map +1 -0
  213. package/lib/{summaryFormat.js → summary/summaryFormat.js} +0 -8
  214. package/lib/summary/summaryFormat.js.map +1 -0
  215. package/lib/summary/summaryGenerator.d.ts.map +1 -0
  216. package/lib/{summaryGenerator.js → summary/summaryGenerator.js} +1 -2
  217. package/lib/summary/summaryGenerator.js.map +1 -0
  218. package/lib/{summaryManager.d.ts → summary/summaryManager.d.ts} +1 -1
  219. package/lib/summary/summaryManager.d.ts.map +1 -0
  220. package/lib/summary/summaryManager.js.map +1 -0
  221. package/package.json +125 -122
  222. package/src/blobManager.ts +33 -3
  223. package/src/containerRuntime.ts +178 -106
  224. package/src/dataStoreContext.ts +90 -49
  225. package/src/dataStores.ts +44 -51
  226. package/{garbageCollection.md → src/gc/garbageCollection.md} +2 -2
  227. package/src/{garbageCollection.ts → gc/garbageCollection.ts} +90 -560
  228. package/src/gc/gcDefinitions.ts +244 -0
  229. package/src/{garbageCollectionHelpers.ts → gc/gcHelpers.ts} +26 -1
  230. package/src/gc/gcSummaryStateTracker.ts +339 -0
  231. package/src/{gcSweepReadyUsageDetection.ts → gc/gcSweepReadyUsageDetection.ts} +1 -1
  232. package/src/gc/gcUnreferencedStateTracker.ts +114 -0
  233. package/src/gc/index.ts +40 -0
  234. package/src/index.ts +10 -14
  235. package/src/opLifecycle/batchManager.ts +7 -54
  236. package/src/opLifecycle/definitions.ts +4 -0
  237. package/src/opLifecycle/opCompressor.ts +1 -0
  238. package/src/opLifecycle/opSplitter.ts +33 -14
  239. package/src/opLifecycle/outbox.ts +84 -38
  240. package/src/packageVersion.ts +1 -1
  241. package/src/pendingStateManager.ts +26 -14
  242. package/src/summary/index.ts +99 -0
  243. package/src/{runningSummarizer.ts → summary/runningSummarizer.ts} +279 -139
  244. package/src/{summarizer.ts → summary/summarizer.ts} +5 -76
  245. package/src/{summarizerHeuristics.ts → summary/summarizerHeuristics.ts} +1 -1
  246. package/src/{summarizerTypes.ts → summary/summarizerTypes.ts} +1 -1
  247. package/src/{summaryFormat.ts → summary/summaryFormat.ts} +1 -53
  248. package/src/{summaryGenerator.ts → summary/summaryGenerator.ts} +9 -9
  249. package/src/{summaryManager.ts → summary/summaryManager.ts} +1 -1
  250. package/dist/garbageCollection.d.ts.map +0 -1
  251. package/dist/garbageCollection.js.map +0 -1
  252. package/dist/garbageCollectionConstants.d.ts +0 -26
  253. package/dist/garbageCollectionConstants.d.ts.map +0 -1
  254. package/dist/garbageCollectionConstants.js.map +0 -1
  255. package/dist/garbageCollectionHelpers.d.ts.map +0 -1
  256. package/dist/garbageCollectionHelpers.js.map +0 -1
  257. package/dist/gcSweepReadyUsageDetection.d.ts.map +0 -1
  258. package/dist/gcSweepReadyUsageDetection.js.map +0 -1
  259. package/dist/orderedClientElection.d.ts.map +0 -1
  260. package/dist/orderedClientElection.js.map +0 -1
  261. package/dist/runWhileConnectedCoordinator.d.ts.map +0 -1
  262. package/dist/runWhileConnectedCoordinator.js.map +0 -1
  263. package/dist/runningSummarizer.d.ts.map +0 -1
  264. package/dist/runningSummarizer.js.map +0 -1
  265. package/dist/summarizer.d.ts.map +0 -1
  266. package/dist/summarizer.js.map +0 -1
  267. package/dist/summarizerClientElection.d.ts.map +0 -1
  268. package/dist/summarizerClientElection.js.map +0 -1
  269. package/dist/summarizerHandle.d.ts.map +0 -1
  270. package/dist/summarizerHandle.js.map +0 -1
  271. package/dist/summarizerHeuristics.d.ts.map +0 -1
  272. package/dist/summarizerHeuristics.js.map +0 -1
  273. package/dist/summarizerTypes.d.ts.map +0 -1
  274. package/dist/summarizerTypes.js.map +0 -1
  275. package/dist/summaryCollection.d.ts.map +0 -1
  276. package/dist/summaryCollection.js.map +0 -1
  277. package/dist/summaryFormat.d.ts.map +0 -1
  278. package/dist/summaryFormat.js.map +0 -1
  279. package/dist/summaryGenerator.d.ts.map +0 -1
  280. package/dist/summaryGenerator.js.map +0 -1
  281. package/dist/summaryManager.d.ts.map +0 -1
  282. package/dist/summaryManager.js.map +0 -1
  283. package/lib/garbageCollection.d.ts.map +0 -1
  284. package/lib/garbageCollection.js.map +0 -1
  285. package/lib/garbageCollectionConstants.d.ts +0 -26
  286. package/lib/garbageCollectionConstants.d.ts.map +0 -1
  287. package/lib/garbageCollectionConstants.js.map +0 -1
  288. package/lib/garbageCollectionHelpers.d.ts.map +0 -1
  289. package/lib/garbageCollectionHelpers.js.map +0 -1
  290. package/lib/gcSweepReadyUsageDetection.d.ts.map +0 -1
  291. package/lib/gcSweepReadyUsageDetection.js.map +0 -1
  292. package/lib/orderedClientElection.d.ts.map +0 -1
  293. package/lib/orderedClientElection.js.map +0 -1
  294. package/lib/runWhileConnectedCoordinator.d.ts.map +0 -1
  295. package/lib/runWhileConnectedCoordinator.js.map +0 -1
  296. package/lib/runningSummarizer.d.ts.map +0 -1
  297. package/lib/runningSummarizer.js.map +0 -1
  298. package/lib/summarizer.d.ts.map +0 -1
  299. package/lib/summarizer.js.map +0 -1
  300. package/lib/summarizerClientElection.d.ts.map +0 -1
  301. package/lib/summarizerClientElection.js.map +0 -1
  302. package/lib/summarizerHandle.d.ts.map +0 -1
  303. package/lib/summarizerHandle.js.map +0 -1
  304. package/lib/summarizerHeuristics.d.ts.map +0 -1
  305. package/lib/summarizerHeuristics.js.map +0 -1
  306. package/lib/summarizerTypes.d.ts.map +0 -1
  307. package/lib/summarizerTypes.js.map +0 -1
  308. package/lib/summaryCollection.d.ts.map +0 -1
  309. package/lib/summaryCollection.js.map +0 -1
  310. package/lib/summaryFormat.d.ts.map +0 -1
  311. package/lib/summaryFormat.js.map +0 -1
  312. package/lib/summaryGenerator.d.ts.map +0 -1
  313. package/lib/summaryGenerator.js.map +0 -1
  314. package/lib/summaryManager.d.ts.map +0 -1
  315. package/lib/summaryManager.js.map +0 -1
  316. package/src/garbageCollectionConstants.ts +0 -44
  317. /package/dist/{gcSweepReadyUsageDetection.d.ts → gc/gcSweepReadyUsageDetection.d.ts} +0 -0
  318. /package/dist/{orderedClientElection.d.ts → summary/orderedClientElection.d.ts} +0 -0
  319. /package/dist/{orderedClientElection.js → summary/orderedClientElection.js} +0 -0
  320. /package/dist/{runWhileConnectedCoordinator.d.ts → summary/runWhileConnectedCoordinator.d.ts} +0 -0
  321. /package/dist/{runWhileConnectedCoordinator.js → summary/runWhileConnectedCoordinator.js} +0 -0
  322. /package/dist/{summarizerClientElection.d.ts → summary/summarizerClientElection.d.ts} +0 -0
  323. /package/dist/{summarizerClientElection.js → summary/summarizerClientElection.js} +0 -0
  324. /package/dist/{summarizerHandle.d.ts → summary/summarizerHandle.d.ts} +0 -0
  325. /package/dist/{summarizerHandle.js → summary/summarizerHandle.js} +0 -0
  326. /package/dist/{summarizerHeuristics.js → summary/summarizerHeuristics.js} +0 -0
  327. /package/dist/{summarizerTypes.js → summary/summarizerTypes.js} +0 -0
  328. /package/dist/{summaryCollection.d.ts → summary/summaryCollection.d.ts} +0 -0
  329. /package/dist/{summaryCollection.js → summary/summaryCollection.js} +0 -0
  330. /package/dist/{summaryGenerator.d.ts → summary/summaryGenerator.d.ts} +0 -0
  331. /package/dist/{summaryManager.js → summary/summaryManager.js} +0 -0
  332. /package/lib/{gcSweepReadyUsageDetection.d.ts → gc/gcSweepReadyUsageDetection.d.ts} +0 -0
  333. /package/lib/{orderedClientElection.d.ts → summary/orderedClientElection.d.ts} +0 -0
  334. /package/lib/{orderedClientElection.js → summary/orderedClientElection.js} +0 -0
  335. /package/lib/{runWhileConnectedCoordinator.d.ts → summary/runWhileConnectedCoordinator.d.ts} +0 -0
  336. /package/lib/{runWhileConnectedCoordinator.js → summary/runWhileConnectedCoordinator.js} +0 -0
  337. /package/lib/{summarizerClientElection.d.ts → summary/summarizerClientElection.d.ts} +0 -0
  338. /package/lib/{summarizerClientElection.js → summary/summarizerClientElection.js} +0 -0
  339. /package/lib/{summarizerHandle.d.ts → summary/summarizerHandle.d.ts} +0 -0
  340. /package/lib/{summarizerHandle.js → summary/summarizerHandle.js} +0 -0
  341. /package/lib/{summarizerHeuristics.js → summary/summarizerHeuristics.js} +0 -0
  342. /package/lib/{summarizerTypes.js → summary/summarizerTypes.js} +0 -0
  343. /package/lib/{summaryCollection.d.ts → summary/summaryCollection.d.ts} +0 -0
  344. /package/lib/{summaryCollection.js → summary/summaryCollection.js} +0 -0
  345. /package/lib/{summaryGenerator.d.ts → summary/summaryGenerator.d.ts} +0 -0
  346. /package/lib/{summaryManager.js → summary/summaryManager.js} +0 -0
  347. /package/src/{orderedClientElection.ts → summary/orderedClientElection.ts} +0 -0
  348. /package/src/{runWhileConnectedCoordinator.ts → summary/runWhileConnectedCoordinator.ts} +0 -0
  349. /package/src/{summarizerClientElection.ts → summary/summarizerClientElection.ts} +0 -0
  350. /package/src/{summarizerHandle.ts → summary/summarizerHandle.ts} +0 -0
  351. /package/src/{summaryCollection.ts → summary/summaryCollection.ts} +0 -0
@@ -15,108 +15,21 @@ var __rest = (this && this.__rest) || function (s, e) {
15
15
  return t;
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.GarbageCollector = exports.UnreferencedStateTracker = exports.UnreferencedState = exports.GCNodeType = void 0;
18
+ exports.GarbageCollector = void 0;
19
19
  const common_utils_1 = require("@fluidframework/common-utils");
20
20
  const container_utils_1 = require("@fluidframework/container-utils");
21
21
  const garbage_collector_1 = require("@fluidframework/garbage-collector");
22
- const protocol_definitions_1 = require("@fluidframework/protocol-definitions");
23
22
  const runtime_definitions_1 = require("@fluidframework/runtime-definitions");
24
23
  const runtime_utils_1 = require("@fluidframework/runtime-utils");
25
24
  const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
26
- const containerRuntime_1 = require("./containerRuntime");
27
- const dataStores_1 = require("./dataStores");
28
- const garbageCollectionConstants_1 = require("./garbageCollectionConstants");
29
- const garbageCollectionHelpers_1 = require("./garbageCollectionHelpers");
25
+ const containerRuntime_1 = require("../containerRuntime");
26
+ const dataStores_1 = require("../dataStores");
27
+ const summary_1 = require("../summary");
28
+ const gcDefinitions_1 = require("./gcDefinitions");
29
+ const gcHelpers_1 = require("./gcHelpers");
30
+ const gcSummaryStateTracker_1 = require("./gcSummaryStateTracker");
30
31
  const gcSweepReadyUsageDetection_1 = require("./gcSweepReadyUsageDetection");
31
- const summaryFormat_1 = require("./summaryFormat");
32
- /** The types of GC nodes in the GC reference graph. */
33
- exports.GCNodeType = {
34
- // Nodes that are for data stores.
35
- DataStore: "DataStore",
36
- // Nodes that are within a data store. For example, DDS nodes.
37
- SubDataStore: "SubDataStore",
38
- // Nodes that are for attachment blobs, i.e., blobs uploaded via BlobManager.
39
- Blob: "Blob",
40
- // Nodes that are neither of the above. For example, root node.
41
- Other: "Other",
42
- };
43
- /** The state of node that is unreferenced. */
44
- exports.UnreferencedState = {
45
- /** The node is active, i.e., it can become referenced again. */
46
- Active: "Active",
47
- /** The node is inactive, i.e., it should not become referenced. */
48
- Inactive: "Inactive",
49
- /** The node is ready to be deleted by the sweep phase. */
50
- SweepReady: "SweepReady",
51
- };
52
- /**
53
- * Helper class that tracks the state of an unreferenced node such as the time it was unreferenced and if it can
54
- * be deleted by the sweep phase.
55
- */
56
- class UnreferencedStateTracker {
57
- constructor(unreferencedTimestampMs,
58
- /** The time after which node transitions to Inactive state. */
59
- inactiveTimeoutMs,
60
- /** The current reference timestamp used to track how long this node has been unreferenced for. */
61
- currentReferenceTimestampMs,
62
- /** The time after which node transitions to SweepReady state; undefined if session expiry is disabled. */
63
- sweepTimeoutMs) {
64
- this.unreferencedTimestampMs = unreferencedTimestampMs;
65
- this.inactiveTimeoutMs = inactiveTimeoutMs;
66
- this.sweepTimeoutMs = sweepTimeoutMs;
67
- this._state = exports.UnreferencedState.Active;
68
- if (this.sweepTimeoutMs !== undefined) {
69
- (0, common_utils_1.assert)(this.inactiveTimeoutMs <= this.sweepTimeoutMs, 0x3b0 /* inactive timeout must not be greater than the sweep timeout */);
70
- }
71
- this.sweepTimer = new TimerWithNoDefaultTimeout(() => {
72
- this._state = exports.UnreferencedState.SweepReady;
73
- (0, common_utils_1.assert)(!this.inactiveTimer.hasTimer, 0x3b1 /* inactiveTimer still running after sweepTimer fired! */);
74
- });
75
- this.inactiveTimer = new TimerWithNoDefaultTimeout(() => {
76
- this._state = exports.UnreferencedState.Inactive;
77
- // After the node becomes inactive, start the sweep timer after which the node will be ready for sweep.
78
- if (this.sweepTimeoutMs !== undefined) {
79
- this.sweepTimer.restart(this.sweepTimeoutMs - this.inactiveTimeoutMs);
80
- }
81
- });
82
- this.updateTracking(currentReferenceTimestampMs);
83
- }
84
- get state() {
85
- return this._state;
86
- }
87
- /* Updates the unreferenced state based on the provided timestamp. */
88
- updateTracking(currentReferenceTimestampMs) {
89
- const unreferencedDurationMs = currentReferenceTimestampMs - this.unreferencedTimestampMs;
90
- // If the node has been unreferenced for sweep timeout amount of time, update the state to SweepReady.
91
- if (this.sweepTimeoutMs !== undefined && unreferencedDurationMs >= this.sweepTimeoutMs) {
92
- this._state = exports.UnreferencedState.SweepReady;
93
- this.clearTimers();
94
- return;
95
- }
96
- // If the node has been unreferenced for inactive timeoutMs amount of time, update the state to inactive.
97
- // Also, start a timer for the sweep timeout.
98
- if (unreferencedDurationMs >= this.inactiveTimeoutMs) {
99
- this._state = exports.UnreferencedState.Inactive;
100
- this.inactiveTimer.clear();
101
- if (this.sweepTimeoutMs !== undefined) {
102
- this.sweepTimer.restart(this.sweepTimeoutMs - unreferencedDurationMs);
103
- }
104
- return;
105
- }
106
- // The node is still active. Ensure the inactive timer is running with the proper remaining duration.
107
- this.inactiveTimer.restart(this.inactiveTimeoutMs - unreferencedDurationMs);
108
- }
109
- clearTimers() {
110
- this.inactiveTimer.clear();
111
- this.sweepTimer.clear();
112
- }
113
- /** Stop tracking this node. Reset the unreferenced timers and state, if any. */
114
- stopTracking() {
115
- this.clearTimers();
116
- this._state = exports.UnreferencedState.Active;
117
- }
118
- }
119
- exports.UnreferencedStateTracker = UnreferencedStateTracker;
32
+ const gcUnreferencedStateTracker_1 = require("./gcUnreferencedStateTracker");
120
33
  /**
121
34
  * The garbage collector for the container runtime. It consolidates the garbage collection functionality and maintains
122
35
  * its state across summaries.
@@ -171,13 +84,8 @@ class GarbageCollector {
171
84
  this.mc = (0, telemetry_utils_1.loggerToMonitoringContext)(telemetry_utils_1.ChildLogger.create(createParams.baseLogger, "GarbageCollector", {
172
85
  all: { completedGCRuns: () => this.completedRuns },
173
86
  }));
174
- // If version upgrade is not enabled, fall back to the stable GC version.
175
- this.currentGCVersion =
176
- this.mc.config.getBoolean(garbageCollectionConstants_1.gcVersionUpgradeToV2Key) === true
177
- ? garbageCollectionConstants_1.currentGCVersion
178
- : garbageCollectionConstants_1.stableGCVersion;
179
87
  this.sweepReadyUsageHandler = new gcSweepReadyUsageDetection_1.SweepReadyUsageDetectionHandler(createParams.getContainerDiagnosticId(), this.mc, this.runtime.closeFn);
180
- let prevSummaryGCVersion;
88
+ let gcVersionInBaseSnapshot;
181
89
  /**
182
90
  * Sweep timeout is the time after which unreferenced content can be swept.
183
91
  * Sweep timeout = session expiry timeout + snapshot cache expiry timeout + one day buffer.
@@ -187,8 +95,8 @@ class GarbageCollector {
187
95
  * We use server timestamps throughout so the skew should be minimal but make it 1 day to be safe.
188
96
  */
189
97
  function computeSweepTimeout(sessionExpiryTimeoutMs) {
190
- const maxSnapshotCacheExpiryMs = 5 * garbageCollectionConstants_1.oneDayMs;
191
- const bufferMs = garbageCollectionConstants_1.oneDayMs;
98
+ const maxSnapshotCacheExpiryMs = 5 * gcDefinitions_1.oneDayMs;
99
+ const bufferMs = gcDefinitions_1.oneDayMs;
192
100
  return (sessionExpiryTimeoutMs &&
193
101
  sessionExpiryTimeoutMs + maxSnapshotCacheExpiryMs + bufferMs);
194
102
  }
@@ -200,10 +108,10 @@ class GarbageCollector {
200
108
  * For existing containers, we get this information from the metadata blob of its summary.
201
109
  */
202
110
  if (createParams.existing) {
203
- prevSummaryGCVersion = (0, summaryFormat_1.getGCVersion)(metadata);
111
+ gcVersionInBaseSnapshot = (0, gcHelpers_1.getGCVersion)(metadata);
204
112
  // Existing documents which did not have metadata blob or had GC disabled have version as 0. For all
205
113
  // other existing documents, GC is enabled.
206
- this.gcEnabled = prevSummaryGCVersion > 0;
114
+ this.gcEnabled = gcVersionInBaseSnapshot > 0;
207
115
  this.sweepEnabled = (_a = metadata === null || metadata === void 0 ? void 0 : metadata.sweepEnabled) !== null && _a !== void 0 ? _a : false;
208
116
  this.sessionExpiryTimeoutMs = metadata === null || metadata === void 0 ? void 0 : metadata.sessionExpiryTimeoutMs;
209
117
  this.sweepTimeoutMs =
@@ -224,15 +132,15 @@ class GarbageCollector {
224
132
  // The sweep phase has to be explicitly enabled by setting the sweepAllowed flag in GC options to true.
225
133
  this.sweepEnabled = this.gcOptions.sweepAllowed === true;
226
134
  // Set the Session Expiry only if the flag is enabled and GC is enabled.
227
- if (this.mc.config.getBoolean(garbageCollectionConstants_1.runSessionExpiryKey) && this.gcEnabled) {
135
+ if (this.mc.config.getBoolean(gcDefinitions_1.runSessionExpiryKey) && this.gcEnabled) {
228
136
  this.sessionExpiryTimeoutMs =
229
- (_c = this.gcOptions.sessionExpiryTimeoutMs) !== null && _c !== void 0 ? _c : garbageCollectionConstants_1.defaultSessionExpiryDurationMs;
137
+ (_c = this.gcOptions.sessionExpiryTimeoutMs) !== null && _c !== void 0 ? _c : gcDefinitions_1.defaultSessionExpiryDurationMs;
230
138
  }
231
139
  this.sweepTimeoutMs =
232
140
  testOverrideSweepTimeoutMs !== null && testOverrideSweepTimeoutMs !== void 0 ? testOverrideSweepTimeoutMs : computeSweepTimeout(this.sessionExpiryTimeoutMs);
233
- if (this.gcOptions[garbageCollectionConstants_1.gcTombstoneGenerationOptionName] !== undefined) {
141
+ if (this.gcOptions[gcDefinitions_1.gcTombstoneGenerationOptionName] !== undefined) {
234
142
  this.persistedGcFeatureMatrix = {
235
- tombstoneGeneration: this.gcOptions[garbageCollectionConstants_1.gcTombstoneGenerationOptionName],
143
+ tombstoneGeneration: this.gcOptions[gcDefinitions_1.gcTombstoneGenerationOptionName],
236
144
  };
237
145
  }
238
146
  }
@@ -246,9 +154,6 @@ class GarbageCollector {
246
154
  });
247
155
  this.sessionExpiryTimer.start();
248
156
  }
249
- // For existing document, the latest summary is the one that we loaded from. So, use its GC version as the
250
- // latest tracked GC version. For new documents, we will be writing the first summary with the current version.
251
- this.latestSummaryGCVersion = prevSummaryGCVersion !== null && prevSummaryGCVersion !== void 0 ? prevSummaryGCVersion : this.currentGCVersion;
252
157
  /**
253
158
  * Whether GC should run or not. The following conditions have to be met to run sweep:
254
159
  *
@@ -259,7 +164,7 @@ class GarbageCollector {
259
164
  * These conditions can be overridden via runGCKey feature flag.
260
165
  */
261
166
  this.shouldRunGC =
262
- (_d = this.mc.config.getBoolean(garbageCollectionConstants_1.runGCKey)) !== null && _d !== void 0 ? _d :
167
+ (_d = this.mc.config.getBoolean(gcDefinitions_1.runGCKey)) !== null && _d !== void 0 ? _d :
263
168
  // GC must be enabled for the document.
264
169
  (this.gcEnabled &&
265
170
  // GC must not be disabled via GC options.
@@ -277,24 +182,23 @@ class GarbageCollector {
277
182
  this.shouldRunSweep =
278
183
  this.shouldRunGC &&
279
184
  this.sweepTimeoutMs !== undefined &&
280
- ((_e = this.mc.config.getBoolean(garbageCollectionConstants_1.runSweepKey)) !== null && _e !== void 0 ? _e : this.sweepEnabled);
281
- this.trackGCState = this.mc.config.getBoolean(garbageCollectionConstants_1.trackGCStateKey) === true;
185
+ ((_e = this.mc.config.getBoolean(gcDefinitions_1.runSweepKey)) !== null && _e !== void 0 ? _e : this.sweepEnabled);
186
+ this.trackGCState = this.mc.config.getBoolean(gcDefinitions_1.trackGCStateKey) === true;
282
187
  // Override inactive timeout if test config or gc options to override it is set.
283
188
  this.inactiveTimeoutMs =
284
- (_g = (_f = this.mc.config.getNumber("Fluid.GarbageCollection.TestOverride.InactiveTimeoutMs")) !== null && _f !== void 0 ? _f : this.gcOptions.inactiveTimeoutMs) !== null && _g !== void 0 ? _g : garbageCollectionConstants_1.defaultInactiveTimeoutMs;
189
+ (_g = (_f = this.mc.config.getNumber("Fluid.GarbageCollection.TestOverride.InactiveTimeoutMs")) !== null && _f !== void 0 ? _f : this.gcOptions.inactiveTimeoutMs) !== null && _g !== void 0 ? _g : gcDefinitions_1.defaultInactiveTimeoutMs;
285
190
  // Inactive timeout must be greater than sweep timeout since a node goes from active -> inactive -> sweep ready.
286
191
  if (this.sweepTimeoutMs !== undefined && this.inactiveTimeoutMs > this.sweepTimeoutMs) {
287
192
  throw new container_utils_1.UsageError("inactive timeout should not be greater than the sweep timeout");
288
193
  }
289
194
  // Whether we are running in test mode. In this mode, unreferenced nodes are immediately deleted.
290
195
  this.testMode =
291
- (_h = this.mc.config.getBoolean(garbageCollectionConstants_1.gcTestModeKey)) !== null && _h !== void 0 ? _h : this.gcOptions.runGCInTestMode === true;
196
+ (_h = this.mc.config.getBoolean(gcDefinitions_1.gcTestModeKey)) !== null && _h !== void 0 ? _h : this.gcOptions.runGCInTestMode === true;
292
197
  // Whether we are running in tombstone mode. This is enabled by default if sweep won't run. It can be disabled
293
198
  // via feature flags.
294
199
  this.tombstoneMode =
295
- !this.shouldRunSweep && this.mc.config.getBoolean(garbageCollectionConstants_1.disableTombstoneKey) !== true;
296
- // If GC ran in the container that generated the base snapshot, it will have a GC tree.
297
- this.wasGCRunInLatestSummary = (baseSnapshot === null || baseSnapshot === void 0 ? void 0 : baseSnapshot.trees[runtime_definitions_1.gcTreeKey]) !== undefined;
200
+ !this.shouldRunSweep && this.mc.config.getBoolean(gcDefinitions_1.disableTombstoneKey) !== true;
201
+ this.summaryStateTracker = new gcSummaryStateTracker_1.GCSummaryStateTracker(this.shouldRunGC, this.trackGCState, this.tombstoneMode, this.mc, (baseSnapshot === null || baseSnapshot === void 0 ? void 0 : baseSnapshot.trees[runtime_definitions_1.gcTreeKey]) !== undefined /* wasGCRunInBaseSnapshot */, gcVersionInBaseSnapshot);
298
202
  // Get the GC data from the base snapshot. Use LazyPromise because we only want to do this once since it
299
203
  // it involves fetching blobs from storage which is expensive.
300
204
  this.baseSnapshotDataP = new common_utils_1.LazyPromise(async () => {
@@ -329,7 +233,7 @@ class GarbageCollector {
329
233
  const dsRootId = `/${dsId}`;
330
234
  // Since we used to write GC data at data store level, we won't have an entry for the root ("/").
331
235
  // Construct that entry by adding root data store ids to its outbound routes.
332
- const initialSnapshotDetails = await readAndParseBlob(dsSnapshotTree.blobs[summaryFormat_1.dataStoreAttributesBlobName]);
236
+ const initialSnapshotDetails = await readAndParseBlob(dsSnapshotTree.blobs[summary_1.dataStoreAttributesBlobName]);
333
237
  if (initialSnapshotDetails.isRootDataStore) {
334
238
  gcState.gcNodes["/"].outboundRoutes.push(dsRootId);
335
239
  }
@@ -421,46 +325,13 @@ class GarbageCollector {
421
325
  static create(createParams) {
422
326
  return new GarbageCollector(createParams);
423
327
  }
424
- /**
425
- * Tells whether the GC state needs to be reset in the next summary. We need to do this if:
426
- *
427
- * 1. GC was enabled and is now disabled. The GC state needs to be removed and everything becomes referenced.
428
- *
429
- * 2. GC was disabled and is now enabled. The GC state needs to be regenerated and added to summary.
430
- *
431
- * 3. GC is enabled and the latest summary state is refreshed from a snapshot that had GC disabled and vice-versa.
432
- *
433
- * 4. The GC version in the latest summary is different from the current GC version. This can happen if:
434
- *
435
- * 4.1. The summary this client loaded with has data from a different GC version.
436
- *
437
- * 4.2. This client's latest summary was updated from a snapshot that has a different GC version.
438
- */
439
- get summaryStateNeedsReset() {
440
- return (this.gcStateNeedsReset ||
441
- (this.shouldRunGC && this.latestSummaryGCVersion !== this.currentGCVersion));
442
- }
443
- /**
444
- * Tells whether the GC state needs to be reset. This can happen under 3 conditions:
445
- *
446
- * 1. The base snapshot contains GC state but GC is disabled. This will happen the first time GC is disabled after
447
- * it was enabled before. GC state needs to be removed from summary and all nodes should be marked referenced.
448
- *
449
- * 2. The base snapshot does not have GC state but GC is enabled. This will happen the very first time GC runs on
450
- * a document and the first time GC is enabled after is was disabled before.
451
- *
452
- * 3. GC is enabled and the latest summary state is refreshed from a snapshot that had GC disabled and vice-versa.
453
- *
454
- * Note that the state will be reset only once for the first summary generated after this returns true. After that,
455
- * this will return false.
456
- */
457
- get gcStateNeedsReset() {
458
- return this.wasGCRunInLatestSummary !== this.shouldRunGC;
459
- }
460
328
  /** Returns a list of all the configurations for garbage collection. */
461
329
  get configs() {
462
330
  return Object.assign({ gcEnabled: this.gcEnabled, sweepEnabled: this.sweepEnabled, runGC: this.shouldRunGC, runSweep: this.shouldRunSweep, testMode: this.testMode, tombstoneMode: this.tombstoneMode, sessionExpiry: this.sessionExpiryTimeoutMs, sweepTimeout: this.sweepTimeoutMs, inactiveTimeout: this.inactiveTimeoutMs, trackGCState: this.trackGCState }, this.gcOptions);
463
331
  }
332
+ get summaryStateNeedsReset() {
333
+ return this.summaryStateTracker.doesSummaryStateNeedReset();
334
+ }
464
335
  /**
465
336
  * Called during container initialization. Initialize from the tombstone state in the base snapshot. This is done
466
337
  * during initialization so that deleted or tombstoned objects are marked as such before they are loaded or used.
@@ -542,10 +413,11 @@ class GarbageCollector {
542
413
  this.tombstones = (snapshotData === null || snapshotData === void 0 ? void 0 : snapshotData.tombstones) ? Array.from(snapshotData.tombstones) : [];
543
414
  this.runtime.updateTombstonedRoutes(this.tombstones);
544
415
  }
416
+ // Update the summary state tracker's state from this snapshot.
417
+ this.summaryStateTracker.updateStateFromSnapshotData(snapshotData);
545
418
  // If there is no snapshot data, it means this snapshot was generated with GC disabled. Unset all GC state.
546
419
  if (snapshotData === undefined) {
547
420
  this.gcDataFromLastRun = undefined;
548
- this.latestSummaryData = undefined;
549
421
  return;
550
422
  }
551
423
  // Update unreferenced state tracking as per the GC state in the snapshot data and update gcDataFromLastRun
@@ -553,19 +425,11 @@ class GarbageCollector {
553
425
  const gcNodes = {};
554
426
  for (const [nodeId, nodeData] of Object.entries(snapshotData.gcState.gcNodes)) {
555
427
  if (nodeData.unreferencedTimestampMs !== undefined) {
556
- this.unreferencedNodesState.set(nodeId, new UnreferencedStateTracker(nodeData.unreferencedTimestampMs, this.inactiveTimeoutMs, currentReferenceTimestampMs, this.sweepTimeoutMs));
428
+ this.unreferencedNodesState.set(nodeId, new gcUnreferencedStateTracker_1.UnreferencedStateTracker(nodeData.unreferencedTimestampMs, this.inactiveTimeoutMs, currentReferenceTimestampMs, this.sweepTimeoutMs));
557
429
  }
558
430
  gcNodes[nodeId] = Array.from(nodeData.outboundRoutes);
559
431
  }
560
432
  this.gcDataFromLastRun = { gcNodes };
561
- // If tracking state across summaries, update latest summary data from the snapshot's GC data.
562
- if (this.trackGCState) {
563
- this.latestSummaryData = {
564
- serializedGCState: JSON.stringify(generateSortedGCState(snapshotData.gcState)),
565
- serializedTombstones: JSON.stringify(snapshotData.tombstones),
566
- serializedDeletedNodes: JSON.stringify(snapshotData.deletedNodes),
567
- };
568
- }
569
433
  }
570
434
  /**
571
435
  * Called when the connection state of the runtime changes, i.e., it connects or disconnects. GC subscribes to this
@@ -595,9 +459,10 @@ class GarbageCollector {
595
459
  * Runs garbage collection and updates the reference / used state of the nodes in the container.
596
460
  * @returns stats of the GC run or undefined if GC did not run.
597
461
  */
598
- async collectGarbage(options) {
462
+ async collectGarbage(options, telemetryContext) {
599
463
  var _a;
600
- const fullGC = (_a = options.fullGC) !== null && _a !== void 0 ? _a : (this.gcOptions.runFullGC === true || this.summaryStateNeedsReset);
464
+ const fullGC = (_a = options.fullGC) !== null && _a !== void 0 ? _a : (this.gcOptions.runFullGC === true ||
465
+ this.summaryStateTracker.doesSummaryStateNeedReset());
601
466
  const logger = options.logger
602
467
  ? telemetry_utils_1.ChildLogger.create(options.logger, undefined, {
603
468
  all: { completedGCRuns: () => this.completedRuns },
@@ -620,6 +485,11 @@ class GarbageCollector {
620
485
  });
621
486
  return undefined;
622
487
  }
488
+ // Add the options that are used to run GC to the telemetry context.
489
+ telemetryContext === null || telemetryContext === void 0 ? void 0 : telemetryContext.setMultiple("fluid_GC", "Options", {
490
+ fullGC,
491
+ runSweep: options.runSweep,
492
+ });
623
493
  return telemetry_utils_1.PerformanceEvent.timedExecAsync(logger, { eventName: "GarbageCollection" }, async (event) => {
624
494
  await this.runPreGCSteps();
625
495
  // Get the runtime's GC data and run GC on the reference graph in it.
@@ -687,97 +557,7 @@ class GarbageCollector {
687
557
  unreferencedTimestampMs: (_a = this.unreferencedNodesState.get(nodeId)) === null || _a === void 0 ? void 0 : _a.unreferencedTimestampMs,
688
558
  };
689
559
  }
690
- const serializedGCState = JSON.stringify(generateSortedGCState(gcState));
691
- // Serialize and write deleted nodes, if any. This is done irrespective of whether sweep is enabled or not so
692
- // to identify deleted nodes' usage.
693
- const serializedDeletedNodes = this.deletedNodes.size > 0
694
- ? JSON.stringify(Array.from(this.deletedNodes).sort())
695
- : undefined;
696
- // If running in tombstone mode, serialize and write tombstones, if any.
697
- const serializedTombstones = this.tombstoneMode
698
- ? this.tombstones.length > 0
699
- ? JSON.stringify(this.tombstones.sort())
700
- : undefined
701
- : undefined;
702
- /**
703
- * Incremental summary of GC data - If none of GC state, deleted nodes or tombstones changed since last summary,
704
- * write summary handle instead of summary tree for GC.
705
- * Otherwise, write the GC summary tree. In the tree, for each of these that changed, write a summary blob and
706
- * for each of these that did not change, write a summary handle.
707
- */
708
- if (this.trackGCState) {
709
- this.pendingSummaryData = {
710
- serializedGCState,
711
- serializedTombstones,
712
- serializedDeletedNodes,
713
- };
714
- if (trackState && !fullTree && this.latestSummaryData !== undefined) {
715
- // If nothing changed since last summary, send a summary handle for the entire GC data.
716
- if (this.latestSummaryData.serializedGCState === serializedGCState &&
717
- this.latestSummaryData.serializedTombstones === serializedTombstones) {
718
- const stats = (0, runtime_utils_1.mergeStats)();
719
- stats.handleNodeCount++;
720
- return {
721
- summary: {
722
- type: protocol_definitions_1.SummaryType.Handle,
723
- handle: `/${runtime_definitions_1.gcTreeKey}`,
724
- handleType: protocol_definitions_1.SummaryType.Tree,
725
- },
726
- stats,
727
- };
728
- }
729
- // If some state changed, build a GC summary tree.
730
- return this.buildGCSummaryTree(serializedGCState, serializedTombstones, serializedDeletedNodes, true /* trackState */);
731
- }
732
- }
733
- // If not tracking GC state, build a GC summary tree without any summary handles.
734
- return this.buildGCSummaryTree(serializedGCState, serializedTombstones, serializedDeletedNodes, false /* trackState */);
735
- }
736
- /**
737
- * Builds the GC summary tree which contains GC state, deleted nodes and tombstones.
738
- * If trackState is false, all of GC state, deleted nodes and tombstones are written as summary blobs.
739
- * If trackState is true, only states that changed are written. Rest are written as handles.
740
- * @param serializedGCState - The GC state serialized as string.
741
- * @param serializedTombstones - The tombstone state serialized as string.
742
- * @param serializedDeletedNodes - Deleted nodes serialized as string.
743
- * @param trackState - Whether we are tracking GC state across summaries.
744
- * @returns the GC summary tree.
745
- */
746
- buildGCSummaryTree(serializedGCState, serializedTombstones, serializedDeletedNodes, trackState) {
747
- var _a, _b, _c;
748
- const gcStateBlobKey = `${runtime_definitions_1.gcBlobPrefix}_root`;
749
- const builder = new runtime_utils_1.SummaryTreeBuilder();
750
- // If the GC state hasn't changed, write a summary handle, else write a summary blob for it.
751
- if (((_a = this.latestSummaryData) === null || _a === void 0 ? void 0 : _a.serializedGCState) === serializedGCState && trackState) {
752
- builder.addHandle(gcStateBlobKey, protocol_definitions_1.SummaryType.Blob, `/${runtime_definitions_1.gcTreeKey}/${gcStateBlobKey}`);
753
- }
754
- else {
755
- builder.addBlob(gcStateBlobKey, serializedGCState);
756
- }
757
- // If tombstones exist, write a summary handle if it hasn't changed. If it has changed, write a
758
- // summary blob.
759
- if (serializedTombstones !== undefined) {
760
- if (((_b = this.latestSummaryData) === null || _b === void 0 ? void 0 : _b.serializedTombstones) === serializedTombstones &&
761
- trackState) {
762
- builder.addHandle(runtime_definitions_1.gcTombstoneBlobKey, protocol_definitions_1.SummaryType.Blob, `/${runtime_definitions_1.gcTreeKey}/${runtime_definitions_1.gcTombstoneBlobKey}`);
763
- }
764
- else {
765
- builder.addBlob(runtime_definitions_1.gcTombstoneBlobKey, serializedTombstones);
766
- }
767
- }
768
- // If there are no deleted nodes, return the summary tree.
769
- if (serializedDeletedNodes === undefined) {
770
- return builder.getSummaryTree();
771
- }
772
- // If the deleted nodes hasn't changed, write a summary handle, else write a summary blob for it.
773
- if (((_c = this.latestSummaryData) === null || _c === void 0 ? void 0 : _c.serializedDeletedNodes) === serializedDeletedNodes &&
774
- trackState) {
775
- builder.addHandle(runtime_definitions_1.gcDeletedBlobKey, protocol_definitions_1.SummaryType.Blob, `/${runtime_definitions_1.gcTreeKey}/${runtime_definitions_1.gcDeletedBlobKey}`);
776
- }
777
- else {
778
- builder.addBlob(runtime_definitions_1.gcDeletedBlobKey, serializedDeletedNodes);
779
- }
780
- return builder.getSummaryTree();
560
+ return this.summaryStateTracker.summarize(fullTree, trackState, gcState, this.deletedNodes, this.tombstones);
781
561
  }
782
562
  getMetadata() {
783
563
  return {
@@ -785,7 +565,7 @@ class GarbageCollector {
785
565
  * If GC is enabled, the GC data is written using the current GC version and that is the gcFeature that goes
786
566
  * into the metadata blob. If GC is disabled, the gcFeature is 0.
787
567
  */
788
- gcFeature: this.gcEnabled ? this.currentGCVersion : 0,
568
+ gcFeature: this.gcEnabled ? this.summaryStateTracker.currentGCVersion : 0,
789
569
  gcFeatureMatrix: this.persistedGcFeatureMatrix,
790
570
  sessionExpiryTimeoutMs: this.sessionExpiryTimeoutMs,
791
571
  sweepEnabled: this.sweepEnabled,
@@ -804,52 +584,22 @@ class GarbageCollector {
804
584
  * is downloaded and should be used to update the state.
805
585
  */
806
586
  async refreshLatestSummary(proposalHandle, result, readAndParseBlob) {
807
- // If the latest summary was updated and the summary was tracked, this client is the one that generated this
808
- // summary. So, update wasGCRunInLatestSummary.
809
- // Note that this has to be updated if GC did not run too. Otherwise, `gcStateNeedsReset` will always return
810
- // true in scenarios where GC is disabled but enabled in the snapshot we loaded from.
811
- if (result.latestSummaryUpdated && result.wasSummaryTracked) {
812
- this.wasGCRunInLatestSummary = this.shouldRunGC;
813
- }
814
- if (!result.latestSummaryUpdated || !this.shouldRunGC) {
815
- return;
816
- }
817
- // If the summary was tracked by this client, it was the one that generated the summary in the first place.
818
- // Update latest state from pending.
819
- if (result.wasSummaryTracked) {
820
- this.latestSummaryGCVersion = this.currentGCVersion;
821
- if (this.trackGCState) {
822
- this.latestSummaryData = this.pendingSummaryData;
823
- this.pendingSummaryData = undefined;
587
+ const latestSnapshotData = await this.summaryStateTracker.refreshLatestSummary(proposalHandle, result, readAndParseBlob);
588
+ // If the latest summary was updated but it was not tracked by this client, our state needs to be updated from
589
+ // this snapshot data.
590
+ if (this.shouldRunGC && result.latestSummaryUpdated && !result.wasSummaryTracked) {
591
+ // The current reference timestamp should be available if we are refreshing state from a snapshot. There has
592
+ // to be at least one op (summary op / ack, if nothing else) if a snapshot was taken.
593
+ const currentReferenceTimestampMs = this.runtime.getCurrentReferenceTimestampMs();
594
+ if (currentReferenceTimestampMs === undefined) {
595
+ throw container_utils_1.DataProcessingError.create("No reference timestamp when updating GC state from snapshot", "refreshLatestSummary", undefined, {
596
+ proposalHandle,
597
+ summaryRefSeq: result.summaryRefSeq,
598
+ details: JSON.stringify(this.configs),
599
+ });
824
600
  }
825
- return;
826
- }
827
- // If the summary was not tracked by this client, the state should be updated from the downloaded snapshot.
828
- const snapshotTree = result.snapshotTree;
829
- const metadataBlobId = snapshotTree.blobs[summaryFormat_1.metadataBlobName];
830
- if (metadataBlobId) {
831
- const metadata = await readAndParseBlob(metadataBlobId);
832
- this.latestSummaryGCVersion = (0, summaryFormat_1.getGCVersion)(metadata);
833
- }
834
- // The current reference timestamp should be available if we are refreshing state from a snapshot. There has
835
- // to be at least one op (summary op / ack, if nothing else) if a snapshot was taken.
836
- const currentReferenceTimestampMs = this.runtime.getCurrentReferenceTimestampMs();
837
- if (currentReferenceTimestampMs === undefined) {
838
- throw container_utils_1.DataProcessingError.create("No reference timestamp when updating GC state from snapshot", "refreshLatestSummary", undefined, {
839
- proposalHandle,
840
- summaryRefSeq: result.summaryRefSeq,
841
- details: JSON.stringify(this.configs),
842
- });
843
- }
844
- const gcSnapshotTree = snapshotTree.trees[runtime_definitions_1.gcTreeKey];
845
- // If GC ran in the container that generated this snapshot, it will have a GC tree.
846
- this.wasGCRunInLatestSummary = gcSnapshotTree !== undefined;
847
- let latestGCData;
848
- if (gcSnapshotTree !== undefined) {
849
- latestGCData = await (0, garbage_collector_1.getGCDataFromSnapshot)(gcSnapshotTree, readAndParseBlob);
601
+ this.updateStateFromSnapshotData(latestSnapshotData, currentReferenceTimestampMs);
850
602
  }
851
- this.updateStateFromSnapshotData(latestGCData, currentReferenceTimestampMs);
852
- this.pendingSummaryData = undefined;
853
603
  }
854
604
  /**
855
605
  * Called when a node with the given id is updated. If the node is inactive, log an error.
@@ -864,7 +614,7 @@ class GarbageCollector {
864
614
  return;
865
615
  }
866
616
  const nodeStateTracker = this.unreferencedNodesState.get(nodePath);
867
- if (nodeStateTracker && nodeStateTracker.state !== exports.UnreferencedState.Active) {
617
+ if (nodeStateTracker && nodeStateTracker.state !== gcDefinitions_1.UnreferencedState.Active) {
868
618
  this.inactiveNodeUsed(reason, nodePath, nodeStateTracker, undefined /* fromNodeId */, packagePath, timestampMs, requestHeaders);
869
619
  }
870
620
  }
@@ -884,19 +634,19 @@ class GarbageCollector {
884
634
  outboundRoutes.push(toNodePath);
885
635
  this.newReferencesSinceLastRun.set(fromNodePath, outboundRoutes);
886
636
  const nodeStateTracker = this.unreferencedNodesState.get(toNodePath);
887
- if (nodeStateTracker && nodeStateTracker.state !== exports.UnreferencedState.Active) {
637
+ if (nodeStateTracker && nodeStateTracker.state !== gcDefinitions_1.UnreferencedState.Active) {
888
638
  this.inactiveNodeUsed("Revived", toNodePath, nodeStateTracker, fromNodePath);
889
639
  }
890
640
  if (this.tombstones.includes(toNodePath)) {
891
641
  const nodeType = this.runtime.getNodeType(toNodePath);
892
642
  let eventName = "GC_Tombstone_SubDatastore_Revived";
893
- if (nodeType === exports.GCNodeType.DataStore) {
643
+ if (nodeType === gcDefinitions_1.GCNodeType.DataStore) {
894
644
  eventName = "GC_Tombstone_Datastore_Revived";
895
645
  }
896
- else if (nodeType === exports.GCNodeType.Blob) {
646
+ else if (nodeType === gcDefinitions_1.GCNodeType.Blob) {
897
647
  eventName = "GC_Tombstone_Blob_Revived";
898
648
  }
899
- (0, garbageCollectionHelpers_1.sendGCUnexpectedUsageEvent)(this.mc, {
649
+ (0, gcHelpers_1.sendGCUnexpectedUsageEvent)(this.mc, {
900
650
  eventName,
901
651
  category: "generic",
902
652
  url: (0, garbage_collector_1.trimLeadingSlashes)(toNodePath),
@@ -954,11 +704,11 @@ class GarbageCollector {
954
704
  for (const nodeId of gcResult.deletedNodeIds) {
955
705
  const nodeStateTracker = this.unreferencedNodesState.get(nodeId);
956
706
  if (nodeStateTracker === undefined) {
957
- this.unreferencedNodesState.set(nodeId, new UnreferencedStateTracker(currentReferenceTimestampMs, this.inactiveTimeoutMs, currentReferenceTimestampMs, this.sweepTimeoutMs));
707
+ this.unreferencedNodesState.set(nodeId, new gcUnreferencedStateTracker_1.UnreferencedStateTracker(currentReferenceTimestampMs, this.inactiveTimeoutMs, currentReferenceTimestampMs, this.sweepTimeoutMs));
958
708
  }
959
709
  else {
960
710
  nodeStateTracker.updateTracking(currentReferenceTimestampMs);
961
- if (nodeStateTracker.state === exports.UnreferencedState.SweepReady) {
711
+ if (nodeStateTracker.state === gcDefinitions_1.UnreferencedState.SweepReady) {
962
712
  sweepReadyNodes.push(nodeId);
963
713
  }
964
714
  }
@@ -972,7 +722,7 @@ class GarbageCollector {
972
722
  runSweepPhase(sweepReadyNodes, gcData) {
973
723
  // TODO: GC:Validation - validate that removed routes are not double deleted
974
724
  // TODO: GC:Validation - validate that the child routes of removed routes are deleted as well
975
- const sweptRoutes = this.runtime.deleteUnusedNodes(sweepReadyNodes);
725
+ const sweptRoutes = this.runtime.deleteSweepReadyNodes(sweepReadyNodes);
976
726
  const updatedGCData = this.deleteSweptRoutes(sweptRoutes, gcData);
977
727
  for (const nodeId of sweptRoutes) {
978
728
  const nodeStateTracker = this.unreferencedNodesState.get(nodeId);
@@ -1113,7 +863,7 @@ class GarbageCollector {
1113
863
  */
1114
864
  currentOutboundRoutes.forEach((route) => {
1115
865
  const nodeType = this.runtime.getNodeType(route);
1116
- if ((nodeType === exports.GCNodeType.DataStore || nodeType === exports.GCNodeType.Blob) &&
866
+ if ((nodeType === gcDefinitions_1.GCNodeType.DataStore || nodeType === gcDefinitions_1.GCNodeType.Blob) &&
1117
867
  !nodeId.startsWith(route) &&
1118
868
  !previousRoutes.includes(route) &&
1119
869
  !explicitRoutes.includes(route)) {
@@ -1156,7 +906,7 @@ class GarbageCollector {
1156
906
  if (!referenced) {
1157
907
  gcStats.unrefNodeCount++;
1158
908
  }
1159
- if (this.runtime.getNodeType(nodeId) === exports.GCNodeType.DataStore) {
909
+ if (this.runtime.getNodeType(nodeId) === gcDefinitions_1.GCNodeType.DataStore) {
1160
910
  gcStats.dataStoreCount++;
1161
911
  if (stateUpdated) {
1162
912
  gcStats.updatedDataStoreCount++;
@@ -1165,7 +915,7 @@ class GarbageCollector {
1165
915
  gcStats.unrefDataStoreCount++;
1166
916
  }
1167
917
  }
1168
- if (this.runtime.getNodeType(nodeId) === exports.GCNodeType.Blob) {
918
+ if (this.runtime.getNodeType(nodeId) === gcDefinitions_1.GCNodeType.Blob) {
1169
919
  gcStats.attachmentBlobCount++;
1170
920
  if (stateUpdated) {
1171
921
  gcStats.updatedAttachmentBlobCount++;
@@ -1188,16 +938,16 @@ class GarbageCollector {
1188
938
  * this will give us a view into how much deleted content a container has.
1189
939
  */
1190
940
  logSweepEvents(logger, currentReferenceTimestampMs) {
1191
- if (this.mc.config.getBoolean(garbageCollectionConstants_1.disableSweepLogKey) === true ||
941
+ if (this.mc.config.getBoolean(gcDefinitions_1.disableSweepLogKey) === true ||
1192
942
  this.sweepTimeoutMs === undefined) {
1193
943
  return;
1194
944
  }
1195
945
  this.unreferencedNodesState.forEach((nodeStateTracker, nodeId) => {
1196
- if (nodeStateTracker.state !== exports.UnreferencedState.SweepReady) {
946
+ if (nodeStateTracker.state !== gcDefinitions_1.UnreferencedState.SweepReady) {
1197
947
  return;
1198
948
  }
1199
949
  const nodeType = this.runtime.getNodeType(nodeId);
1200
- if (nodeType !== exports.GCNodeType.DataStore && nodeType !== exports.GCNodeType.Blob) {
950
+ if (nodeType !== gcDefinitions_1.GCNodeType.DataStore && nodeType !== gcDefinitions_1.GCNodeType.Blob) {
1201
951
  return;
1202
952
  }
1203
953
  // Log deleted event for each node only once to reduce noise in telemetry.
@@ -1225,13 +975,13 @@ class GarbageCollector {
1225
975
  // logging as nothing interesting would have happened worth logging.
1226
976
  // If the node is active, skip logging.
1227
977
  if (currentReferenceTimestampMs === undefined ||
1228
- nodeStateTracker.state === exports.UnreferencedState.Active) {
978
+ nodeStateTracker.state === gcDefinitions_1.UnreferencedState.Active) {
1229
979
  return;
1230
980
  }
1231
981
  // We only care about data stores and attachment blobs for this telemetry since GC only marks these objects
1232
982
  // as unreferenced. Also, if an inactive DDS is used, the corresponding data store store will also be used.
1233
983
  const nodeType = this.runtime.getNodeType(nodeId);
1234
- if (nodeType !== exports.GCNodeType.DataStore && nodeType !== exports.GCNodeType.Blob) {
984
+ if (nodeType !== gcDefinitions_1.GCNodeType.DataStore && nodeType !== gcDefinitions_1.GCNodeType.Blob) {
1235
985
  return;
1236
986
  }
1237
987
  const state = nodeStateTracker.state;
@@ -1240,9 +990,9 @@ class GarbageCollector {
1240
990
  return;
1241
991
  }
1242
992
  this.loggedUnreferencedEvents.add(uniqueEventId);
1243
- const propsToLog = Object.assign(Object.assign({ id: nodeId, type: nodeType, unrefTime: nodeStateTracker.unreferencedTimestampMs, age: currentReferenceTimestampMs - nodeStateTracker.unreferencedTimestampMs, timeout: nodeStateTracker.state === exports.UnreferencedState.Inactive
993
+ const propsToLog = Object.assign(Object.assign({ id: nodeId, type: nodeType, unrefTime: nodeStateTracker.unreferencedTimestampMs, age: currentReferenceTimestampMs - nodeStateTracker.unreferencedTimestampMs, timeout: nodeStateTracker.state === gcDefinitions_1.UnreferencedState.Inactive
1244
994
  ? this.inactiveTimeoutMs
1245
- : this.sweepTimeoutMs, completedGCRuns: this.completedRuns, lastSummaryTime: this.getLastSummaryTimestampMs() }, this.createContainerMetadata), { externalRequest: requestHeaders === null || requestHeaders === void 0 ? void 0 : requestHeaders[containerRuntime_1.RuntimeHeaders.externalRequest], viaHandle: requestHeaders === null || requestHeaders === void 0 ? void 0 : requestHeaders[containerRuntime_1.RuntimeHeaders.viaHandle], fromId: fromNodeId });
995
+ : this.sweepTimeoutMs, completedGCRuns: this.completedRuns, lastSummaryTime: this.getLastSummaryTimestampMs() }, this.createContainerMetadata), { viaHandle: requestHeaders === null || requestHeaders === void 0 ? void 0 : requestHeaders[containerRuntime_1.RuntimeHeaders.viaHandle], fromId: fromNodeId });
1246
996
  // For summarizer client, queue the event so it is logged the next time GC runs if the event is still valid.
1247
997
  // For non-summarizer client, log the event now since GC won't run on it. This may result in false positives
1248
998
  // but it's a good signal nonetheless and we can consume it with a grain of salt.
@@ -1260,7 +1010,7 @@ class GarbageCollector {
1260
1010
  const event = Object.assign(Object.assign({}, propsToLog), { eventName: `${state}Object_${usageType}`, pkg: (0, runtime_utils_1.packagePathToTelemetryProperty)(packagePath), stack: (0, telemetry_utils_1.generateStack)() });
1261
1011
  // Do not log the inactive object x events as error events as they are not the best signal for
1262
1012
  // detecting something wrong with GC either from the partner or from the runtime itself.
1263
- if (state === exports.UnreferencedState.Inactive) {
1013
+ if (state === gcDefinitions_1.UnreferencedState.Inactive) {
1264
1014
  this.mc.logger.sendTelemetryEvent(event);
1265
1015
  }
1266
1016
  else {
@@ -1270,7 +1020,7 @@ class GarbageCollector {
1270
1020
  // If SweepReady Usage Detection is enabled, the handler may close the interactive container.
1271
1021
  // Once Sweep is fully implemented, this will be removed since the objects will be gone
1272
1022
  // and errors will arise elsewhere in the runtime
1273
- if (state === exports.UnreferencedState.SweepReady) {
1023
+ if (state === gcDefinitions_1.UnreferencedState.SweepReady) {
1274
1024
  this.sweepReadyUsageHandler.usageDetectedInInteractiveClient(Object.assign(Object.assign({}, propsToLog), { usageType }));
1275
1025
  }
1276
1026
  }
@@ -1291,7 +1041,7 @@ class GarbageCollector {
1291
1041
  */
1292
1042
  const nodeStateTracker = this.unreferencedNodesState.get(eventProps.id);
1293
1043
  const active = nodeStateTracker === undefined ||
1294
- nodeStateTracker.state === exports.UnreferencedState.Active;
1044
+ nodeStateTracker.state === gcDefinitions_1.UnreferencedState.Active;
1295
1045
  if ((usageType === "Revived") === active) {
1296
1046
  const pkg = await this.getNodePackagePath(eventProps.id);
1297
1047
  const fromPkg = eventProps.fromId
@@ -1302,7 +1052,7 @@ class GarbageCollector {
1302
1052
  : undefined, fromPkg: fromPkg
1303
1053
  ? { value: fromPkg.join("/"), tag: telemetry_utils_1.TelemetryDataTag.CodeArtifact }
1304
1054
  : undefined });
1305
- if (state === exports.UnreferencedState.Inactive) {
1055
+ if (state === gcDefinitions_1.UnreferencedState.Inactive) {
1306
1056
  logger.sendTelemetryEvent(event);
1307
1057
  }
1308
1058
  else {
@@ -1314,30 +1064,4 @@ class GarbageCollector {
1314
1064
  }
1315
1065
  }
1316
1066
  exports.GarbageCollector = GarbageCollector;
1317
- function generateSortedGCState(gcState) {
1318
- const sortableArray = Object.entries(gcState.gcNodes);
1319
- sortableArray.sort(([a], [b]) => a.localeCompare(b));
1320
- const sortedGCState = { gcNodes: {} };
1321
- for (const [nodeId, nodeData] of sortableArray) {
1322
- nodeData.outboundRoutes.sort();
1323
- sortedGCState.gcNodes[nodeId] = nodeData;
1324
- }
1325
- return sortedGCState;
1326
- }
1327
- /** A wrapper around common-utils Timer that requires the timeout when calling start/restart */
1328
- class TimerWithNoDefaultTimeout extends common_utils_1.Timer {
1329
- constructor(callback) {
1330
- // The default timeout/handlers will never be used since start/restart pass overrides below
1331
- super(0, () => {
1332
- throw new Error("DefaultHandler should not be used");
1333
- });
1334
- this.callback = callback;
1335
- }
1336
- start(timeoutMs) {
1337
- super.start(timeoutMs, this.callback);
1338
- }
1339
- restart(timeoutMs) {
1340
- super.restart(timeoutMs, this.callback);
1341
- }
1342
- }
1343
1067
  //# sourceMappingURL=garbageCollection.js.map