@fluidframework/container-runtime 2.0.0-dev-rc.1.0.0.224419 → 2.0.0-dev-rc.1.0.0.228517

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 (364) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +1 -7
  3. package/api-extractor-esm.json +4 -0
  4. package/api-report/container-runtime.api.md +3 -2
  5. package/dist/{batchTracker.cjs → batchTracker.js} +1 -1
  6. package/dist/batchTracker.js.map +1 -0
  7. package/dist/blobManager.d.ts +8 -3
  8. package/dist/blobManager.d.ts.map +1 -1
  9. package/dist/{blobManager.cjs → blobManager.js} +17 -6
  10. package/dist/blobManager.js.map +1 -0
  11. package/dist/{connectionTelemetry.cjs → connectionTelemetry.js} +1 -1
  12. package/dist/connectionTelemetry.js.map +1 -0
  13. package/dist/container-runtime-alpha.d.ts +17 -2
  14. package/dist/container-runtime-untrimmed.d.ts +17 -2
  15. package/dist/{containerHandleContext.cjs → containerHandleContext.js} +1 -1
  16. package/dist/containerHandleContext.js.map +1 -0
  17. package/dist/containerRuntime.d.ts +4 -0
  18. package/dist/containerRuntime.d.ts.map +1 -1
  19. package/dist/{containerRuntime.cjs → containerRuntime.js} +27 -18
  20. package/dist/containerRuntime.js.map +1 -0
  21. package/dist/{dataStore.cjs → dataStore.js} +1 -1
  22. package/dist/dataStore.js.map +1 -0
  23. package/dist/dataStoreContext.d.ts +5 -2
  24. package/dist/dataStoreContext.d.ts.map +1 -1
  25. package/dist/{dataStoreContext.cjs → dataStoreContext.js} +13 -6
  26. package/dist/dataStoreContext.js.map +1 -0
  27. package/dist/{dataStoreContexts.cjs → dataStoreContexts.js} +1 -1
  28. package/dist/dataStoreContexts.js.map +1 -0
  29. package/dist/{dataStoreRegistry.cjs → dataStoreRegistry.js} +1 -1
  30. package/dist/dataStoreRegistry.js.map +1 -0
  31. package/dist/dataStores.d.ts +10 -3
  32. package/dist/dataStores.d.ts.map +1 -1
  33. package/dist/{dataStores.cjs → dataStores.js} +59 -16
  34. package/dist/dataStores.js.map +1 -0
  35. package/dist/{deltaManagerProxyBase.cjs → deltaManagerProxyBase.js} +1 -1
  36. package/dist/deltaManagerProxyBase.js.map +1 -0
  37. package/dist/{deltaManagerSummarizerProxy.cjs → deltaManagerSummarizerProxy.js} +3 -3
  38. package/dist/deltaManagerSummarizerProxy.js.map +1 -0
  39. package/dist/{deltaScheduler.cjs → deltaScheduler.js} +1 -1
  40. package/dist/deltaScheduler.js.map +1 -0
  41. package/dist/{error.cjs → error.js} +1 -1
  42. package/dist/error.js.map +1 -0
  43. package/dist/gc/garbageCollection.d.ts.map +1 -1
  44. package/dist/gc/{garbageCollection.cjs → garbageCollection.js} +48 -18
  45. package/dist/gc/garbageCollection.js.map +1 -0
  46. package/dist/gc/gcConfigs.d.ts.map +1 -1
  47. package/dist/gc/{gcConfigs.cjs → gcConfigs.js} +29 -22
  48. package/dist/gc/gcConfigs.js.map +1 -0
  49. package/dist/gc/gcDefinitions.d.ts +29 -6
  50. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  51. package/dist/gc/{gcDefinitions.cjs → gcDefinitions.js} +6 -4
  52. package/dist/gc/gcDefinitions.js.map +1 -0
  53. package/dist/gc/{gcHelpers.cjs → gcHelpers.js} +1 -1
  54. package/dist/gc/gcHelpers.js.map +1 -0
  55. package/dist/gc/{gcReferenceGraphAlgorithm.cjs → gcReferenceGraphAlgorithm.js} +1 -1
  56. package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -0
  57. package/dist/gc/{gcSummaryDefinitions.cjs → gcSummaryDefinitions.js} +1 -1
  58. package/dist/gc/gcSummaryDefinitions.js.map +1 -0
  59. package/dist/gc/{gcSummaryStateTracker.cjs → gcSummaryStateTracker.js} +2 -2
  60. package/dist/gc/gcSummaryStateTracker.js.map +1 -0
  61. package/dist/gc/gcTelemetry.d.ts +13 -6
  62. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  63. package/dist/gc/{gcTelemetry.cjs → gcTelemetry.js} +20 -11
  64. package/dist/gc/gcTelemetry.js.map +1 -0
  65. package/dist/gc/{gcUnreferencedStateTracker.cjs → gcUnreferencedStateTracker.js} +2 -2
  66. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -0
  67. package/dist/gc/index.d.ts +1 -1
  68. package/dist/gc/index.d.ts.map +1 -1
  69. package/dist/gc/{index.cjs → index.js} +10 -9
  70. package/dist/gc/index.js.map +1 -0
  71. package/dist/{index.cjs → index.js} +7 -7
  72. package/dist/index.js.map +1 -0
  73. package/dist/{messageTypes.cjs → messageTypes.js} +1 -1
  74. package/dist/messageTypes.js.map +1 -0
  75. package/dist/{metadata.cjs → metadata.js} +1 -1
  76. package/dist/metadata.js.map +1 -0
  77. package/dist/opLifecycle/{batchManager.cjs → batchManager.js} +1 -1
  78. package/dist/opLifecycle/batchManager.js.map +1 -0
  79. package/dist/opLifecycle/definitions.d.ts +1 -1
  80. package/dist/opLifecycle/definitions.d.ts.map +1 -1
  81. package/dist/opLifecycle/{definitions.cjs → definitions.js} +1 -1
  82. package/dist/opLifecycle/definitions.js.map +1 -0
  83. package/dist/opLifecycle/{index.cjs → index.js} +8 -8
  84. package/dist/opLifecycle/index.js.map +1 -0
  85. package/dist/opLifecycle/{opCompressor.cjs → opCompressor.js} +3 -3
  86. package/dist/opLifecycle/opCompressor.js.map +1 -0
  87. package/dist/opLifecycle/{opDecompressor.cjs → opDecompressor.js} +2 -2
  88. package/dist/opLifecycle/opDecompressor.js.map +1 -0
  89. package/dist/opLifecycle/{opGroupingManager.cjs → opGroupingManager.js} +1 -1
  90. package/dist/opLifecycle/opGroupingManager.js.map +1 -0
  91. package/dist/opLifecycle/{opSplitter.cjs → opSplitter.js} +3 -3
  92. package/dist/opLifecycle/opSplitter.js.map +1 -0
  93. package/dist/opLifecycle/outbox.d.ts +4 -4
  94. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  95. package/dist/opLifecycle/{outbox.cjs → outbox.js} +6 -3
  96. package/dist/opLifecycle/{outbox.cjs.map → outbox.js.map} +1 -1
  97. package/dist/opLifecycle/{remoteMessageProcessor.cjs → remoteMessageProcessor.js} +2 -2
  98. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -0
  99. package/dist/{opProperties.cjs → opProperties.js} +1 -1
  100. package/dist/opProperties.js.map +1 -0
  101. package/dist/packageVersion.d.ts +1 -1
  102. package/dist/{packageVersion.cjs → packageVersion.js} +2 -2
  103. package/dist/packageVersion.js.map +1 -0
  104. package/dist/{pendingStateManager.cjs → pendingStateManager.js} +2 -2
  105. package/dist/pendingStateManager.js.map +1 -0
  106. package/dist/{scheduleManager.cjs → scheduleManager.js} +3 -3
  107. package/dist/scheduleManager.js.map +1 -0
  108. package/dist/{storageServiceWithAttachBlobs.cjs → storageServiceWithAttachBlobs.js} +1 -1
  109. package/dist/storageServiceWithAttachBlobs.js.map +1 -0
  110. package/dist/summary/{index.cjs → index.js} +12 -12
  111. package/dist/summary/index.js.map +1 -0
  112. package/dist/summary/{orderedClientElection.cjs → orderedClientElection.js} +2 -2
  113. package/dist/summary/orderedClientElection.js.map +1 -0
  114. package/dist/summary/{runWhileConnectedCoordinator.cjs → runWhileConnectedCoordinator.js} +1 -1
  115. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -0
  116. package/dist/summary/runningSummarizer.d.ts +5 -0
  117. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  118. package/dist/summary/{runningSummarizer.cjs → runningSummarizer.js} +50 -21
  119. package/dist/summary/runningSummarizer.js.map +1 -0
  120. package/dist/summary/{summarizer.cjs → summarizer.js} +4 -4
  121. package/dist/summary/summarizer.js.map +1 -0
  122. package/dist/summary/{summarizerClientElection.cjs → summarizerClientElection.js} +1 -1
  123. package/dist/summary/summarizerClientElection.js.map +1 -0
  124. package/dist/summary/{summarizerHeuristics.cjs → summarizerHeuristics.js} +1 -1
  125. package/dist/summary/summarizerHeuristics.js.map +1 -0
  126. package/dist/summary/summarizerNode/{index.cjs → index.js} +3 -3
  127. package/dist/summary/summarizerNode/index.js.map +1 -0
  128. package/dist/summary/summarizerNode/{summarizerNode.cjs → summarizerNode.js} +2 -2
  129. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -0
  130. package/dist/summary/summarizerNode/{summarizerNodeUtils.cjs → summarizerNodeUtils.js} +1 -1
  131. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -0
  132. package/dist/summary/summarizerNode/{summarizerNodeWithGc.cjs → summarizerNodeWithGc.js} +4 -4
  133. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -0
  134. package/dist/summary/summarizerTypes.d.ts +2 -0
  135. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  136. package/dist/summary/{summarizerTypes.cjs → summarizerTypes.js} +1 -1
  137. package/dist/summary/summarizerTypes.js.map +1 -0
  138. package/dist/summary/{summaryCollection.cjs → summaryCollection.js} +1 -1
  139. package/dist/summary/summaryCollection.js.map +1 -0
  140. package/dist/summary/{summaryFormat.cjs → summaryFormat.js} +1 -1
  141. package/dist/summary/summaryFormat.js.map +1 -0
  142. package/dist/summary/{summaryGenerator.cjs → summaryGenerator.js} +1 -1
  143. package/dist/summary/summaryGenerator.js.map +1 -0
  144. package/dist/summary/{summaryManager.cjs → summaryManager.js} +2 -2
  145. package/dist/summary/summaryManager.js.map +1 -0
  146. package/dist/{throttler.cjs → throttler.js} +1 -1
  147. package/dist/throttler.js.map +1 -0
  148. package/lib/batchTracker.d.mts +1 -1
  149. package/lib/batchTracker.d.mts.map +1 -1
  150. package/lib/blobManager.d.mts +9 -4
  151. package/lib/blobManager.d.mts.map +1 -1
  152. package/lib/blobManager.mjs +15 -4
  153. package/lib/blobManager.mjs.map +1 -1
  154. package/lib/connectionTelemetry.d.mts +1 -1
  155. package/lib/connectionTelemetry.d.mts.map +1 -1
  156. package/lib/container-runtime-alpha.d.mts +17 -2
  157. package/lib/container-runtime-untrimmed.d.mts +17 -2
  158. package/lib/containerHandleContext.d.mts +1 -1
  159. package/lib/containerHandleContext.d.mts.map +1 -1
  160. package/lib/containerRuntime.d.mts +5 -1
  161. package/lib/containerRuntime.d.mts.map +1 -1
  162. package/lib/containerRuntime.mjs +10 -1
  163. package/lib/containerRuntime.mjs.map +1 -1
  164. package/lib/dataStore.d.mts +1 -1
  165. package/lib/dataStore.d.mts.map +1 -1
  166. package/lib/dataStoreContext.d.mts +6 -3
  167. package/lib/dataStoreContext.d.mts.map +1 -1
  168. package/lib/dataStoreContext.mjs +11 -4
  169. package/lib/dataStoreContext.mjs.map +1 -1
  170. package/lib/dataStoreContexts.d.mts +1 -1
  171. package/lib/dataStoreContexts.d.mts.map +1 -1
  172. package/lib/dataStoreRegistry.d.mts +1 -1
  173. package/lib/dataStoreRegistry.d.mts.map +1 -1
  174. package/lib/dataStores.d.mts +11 -4
  175. package/lib/dataStores.d.mts.map +1 -1
  176. package/lib/dataStores.mjs +51 -9
  177. package/lib/dataStores.mjs.map +1 -1
  178. package/lib/deltaManagerProxyBase.d.mts +1 -1
  179. package/lib/deltaManagerProxyBase.d.mts.map +1 -1
  180. package/lib/deltaManagerSummarizerProxy.d.mts +1 -1
  181. package/lib/deltaManagerSummarizerProxy.d.mts.map +1 -1
  182. package/lib/deltaScheduler.d.mts +1 -1
  183. package/lib/deltaScheduler.d.mts.map +1 -1
  184. package/lib/error.d.mts +1 -1
  185. package/lib/error.d.mts.map +1 -1
  186. package/lib/gc/garbageCollection.d.mts +1 -1
  187. package/lib/gc/garbageCollection.d.mts.map +1 -1
  188. package/lib/gc/garbageCollection.mjs +38 -8
  189. package/lib/gc/garbageCollection.mjs.map +1 -1
  190. package/lib/gc/gcConfigs.d.mts +1 -1
  191. package/lib/gc/gcConfigs.d.mts.map +1 -1
  192. package/lib/gc/gcConfigs.mjs +26 -19
  193. package/lib/gc/gcConfigs.mjs.map +1 -1
  194. package/lib/gc/gcDefinitions.d.mts +30 -7
  195. package/lib/gc/gcDefinitions.d.mts.map +1 -1
  196. package/lib/gc/gcDefinitions.mjs +4 -2
  197. package/lib/gc/gcDefinitions.mjs.map +1 -1
  198. package/lib/gc/gcHelpers.d.mts +1 -1
  199. package/lib/gc/gcHelpers.d.mts.map +1 -1
  200. package/lib/gc/gcReferenceGraphAlgorithm.d.mts +1 -1
  201. package/lib/gc/gcReferenceGraphAlgorithm.d.mts.map +1 -1
  202. package/lib/gc/gcSummaryDefinitions.d.mts +1 -1
  203. package/lib/gc/gcSummaryDefinitions.d.mts.map +1 -1
  204. package/lib/gc/gcSummaryStateTracker.d.mts +1 -1
  205. package/lib/gc/gcSummaryStateTracker.d.mts.map +1 -1
  206. package/lib/gc/gcTelemetry.d.mts +14 -7
  207. package/lib/gc/gcTelemetry.d.mts.map +1 -1
  208. package/lib/gc/gcTelemetry.mjs +18 -9
  209. package/lib/gc/gcTelemetry.mjs.map +1 -1
  210. package/lib/gc/gcUnreferencedStateTracker.d.mts +1 -1
  211. package/lib/gc/gcUnreferencedStateTracker.d.mts.map +1 -1
  212. package/lib/gc/index.d.mts +2 -2
  213. package/lib/gc/index.d.mts.map +1 -1
  214. package/lib/gc/index.mjs +1 -1
  215. package/lib/gc/index.mjs.map +1 -1
  216. package/lib/index.d.mts +1 -1
  217. package/lib/index.d.mts.map +1 -1
  218. package/lib/messageTypes.d.mts +1 -1
  219. package/lib/messageTypes.d.mts.map +1 -1
  220. package/lib/metadata.d.mts +1 -1
  221. package/lib/metadata.d.mts.map +1 -1
  222. package/lib/opLifecycle/batchManager.d.mts +1 -1
  223. package/lib/opLifecycle/batchManager.d.mts.map +1 -1
  224. package/lib/opLifecycle/definitions.d.mts +2 -2
  225. package/lib/opLifecycle/definitions.d.mts.map +1 -1
  226. package/lib/opLifecycle/definitions.mjs.map +1 -1
  227. package/lib/opLifecycle/index.d.mts +1 -1
  228. package/lib/opLifecycle/index.d.mts.map +1 -1
  229. package/lib/opLifecycle/opCompressor.d.mts +1 -1
  230. package/lib/opLifecycle/opCompressor.d.mts.map +1 -1
  231. package/lib/opLifecycle/opDecompressor.d.mts +1 -1
  232. package/lib/opLifecycle/opDecompressor.d.mts.map +1 -1
  233. package/lib/opLifecycle/opGroupingManager.d.mts +1 -1
  234. package/lib/opLifecycle/opGroupingManager.d.mts.map +1 -1
  235. package/lib/opLifecycle/opSplitter.d.mts +1 -1
  236. package/lib/opLifecycle/opSplitter.d.mts.map +1 -1
  237. package/lib/opLifecycle/outbox.d.mts +5 -5
  238. package/lib/opLifecycle/outbox.d.mts.map +1 -1
  239. package/lib/opLifecycle/outbox.mjs +4 -1
  240. package/lib/opLifecycle/outbox.mjs.map +1 -1
  241. package/lib/opLifecycle/remoteMessageProcessor.d.mts +1 -1
  242. package/lib/opLifecycle/remoteMessageProcessor.d.mts.map +1 -1
  243. package/lib/opProperties.d.mts +1 -1
  244. package/lib/opProperties.d.mts.map +1 -1
  245. package/lib/packageVersion.d.mts +2 -2
  246. package/lib/packageVersion.d.mts.map +1 -1
  247. package/lib/packageVersion.mjs +1 -1
  248. package/lib/packageVersion.mjs.map +1 -1
  249. package/lib/pendingStateManager.d.mts +1 -1
  250. package/lib/pendingStateManager.d.mts.map +1 -1
  251. package/lib/scheduleManager.d.mts +1 -1
  252. package/lib/scheduleManager.d.mts.map +1 -1
  253. package/lib/storageServiceWithAttachBlobs.d.mts +1 -1
  254. package/lib/storageServiceWithAttachBlobs.d.mts.map +1 -1
  255. package/lib/summary/index.d.mts +1 -1
  256. package/lib/summary/index.d.mts.map +1 -1
  257. package/lib/summary/orderedClientElection.d.mts +1 -1
  258. package/lib/summary/orderedClientElection.d.mts.map +1 -1
  259. package/lib/summary/runWhileConnectedCoordinator.d.mts +1 -1
  260. package/lib/summary/runWhileConnectedCoordinator.d.mts.map +1 -1
  261. package/lib/summary/runningSummarizer.d.mts +6 -1
  262. package/lib/summary/runningSummarizer.d.mts.map +1 -1
  263. package/lib/summary/runningSummarizer.mjs +46 -17
  264. package/lib/summary/runningSummarizer.mjs.map +1 -1
  265. package/lib/summary/summarizer.d.mts +1 -1
  266. package/lib/summary/summarizer.d.mts.map +1 -1
  267. package/lib/summary/summarizerClientElection.d.mts +1 -1
  268. package/lib/summary/summarizerClientElection.d.mts.map +1 -1
  269. package/lib/summary/summarizerHeuristics.d.mts +1 -1
  270. package/lib/summary/summarizerHeuristics.d.mts.map +1 -1
  271. package/lib/summary/summarizerNode/index.d.mts +1 -1
  272. package/lib/summary/summarizerNode/index.d.mts.map +1 -1
  273. package/lib/summary/summarizerNode/summarizerNode.d.mts +1 -1
  274. package/lib/summary/summarizerNode/summarizerNode.d.mts.map +1 -1
  275. package/lib/summary/summarizerNode/summarizerNodeUtils.d.mts +1 -1
  276. package/lib/summary/summarizerNode/summarizerNodeUtils.d.mts.map +1 -1
  277. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.mts +1 -1
  278. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.mts.map +1 -1
  279. package/lib/summary/summarizerTypes.d.mts +3 -1
  280. package/lib/summary/summarizerTypes.d.mts.map +1 -1
  281. package/lib/summary/summarizerTypes.mjs.map +1 -1
  282. package/lib/summary/summaryCollection.d.mts +1 -1
  283. package/lib/summary/summaryCollection.d.mts.map +1 -1
  284. package/lib/summary/summaryFormat.d.mts +1 -1
  285. package/lib/summary/summaryFormat.d.mts.map +1 -1
  286. package/lib/summary/summaryGenerator.d.mts +1 -1
  287. package/lib/summary/summaryGenerator.d.mts.map +1 -1
  288. package/lib/summary/summaryManager.d.mts +1 -1
  289. package/lib/summary/summaryManager.d.mts.map +1 -1
  290. package/lib/throttler.d.mts +1 -1
  291. package/lib/throttler.d.mts.map +1 -1
  292. package/package.json +74 -43
  293. package/src/blobManager.ts +15 -4
  294. package/src/containerRuntime.ts +11 -0
  295. package/src/dataStoreContext.ts +11 -4
  296. package/src/dataStores.ts +61 -7
  297. package/src/gc/garbageCollection.ts +41 -7
  298. package/src/gc/gcConfigs.ts +28 -20
  299. package/src/gc/gcDefinitions.ts +30 -6
  300. package/src/gc/gcTelemetry.ts +19 -9
  301. package/src/gc/index.ts +3 -0
  302. package/src/opLifecycle/definitions.ts +1 -1
  303. package/src/opLifecycle/outbox.ts +5 -2
  304. package/src/packageVersion.ts +1 -1
  305. package/src/summary/runningSummarizer.ts +58 -25
  306. package/src/summary/summarizerTypes.ts +2 -0
  307. package/dist/batchTracker.cjs.map +0 -1
  308. package/dist/blobManager.cjs.map +0 -1
  309. package/dist/connectionTelemetry.cjs.map +0 -1
  310. package/dist/containerHandleContext.cjs.map +0 -1
  311. package/dist/containerRuntime.cjs.map +0 -1
  312. package/dist/dataStore.cjs.map +0 -1
  313. package/dist/dataStoreContext.cjs.map +0 -1
  314. package/dist/dataStoreContexts.cjs.map +0 -1
  315. package/dist/dataStoreRegistry.cjs.map +0 -1
  316. package/dist/dataStores.cjs.map +0 -1
  317. package/dist/deltaManagerProxyBase.cjs.map +0 -1
  318. package/dist/deltaManagerSummarizerProxy.cjs.map +0 -1
  319. package/dist/deltaScheduler.cjs.map +0 -1
  320. package/dist/error.cjs.map +0 -1
  321. package/dist/gc/garbageCollection.cjs.map +0 -1
  322. package/dist/gc/gcConfigs.cjs.map +0 -1
  323. package/dist/gc/gcDefinitions.cjs.map +0 -1
  324. package/dist/gc/gcHelpers.cjs.map +0 -1
  325. package/dist/gc/gcReferenceGraphAlgorithm.cjs.map +0 -1
  326. package/dist/gc/gcSummaryDefinitions.cjs.map +0 -1
  327. package/dist/gc/gcSummaryStateTracker.cjs.map +0 -1
  328. package/dist/gc/gcTelemetry.cjs.map +0 -1
  329. package/dist/gc/gcUnreferencedStateTracker.cjs.map +0 -1
  330. package/dist/gc/index.cjs.map +0 -1
  331. package/dist/index.cjs.map +0 -1
  332. package/dist/messageTypes.cjs.map +0 -1
  333. package/dist/metadata.cjs.map +0 -1
  334. package/dist/opLifecycle/batchManager.cjs.map +0 -1
  335. package/dist/opLifecycle/definitions.cjs.map +0 -1
  336. package/dist/opLifecycle/index.cjs.map +0 -1
  337. package/dist/opLifecycle/opCompressor.cjs.map +0 -1
  338. package/dist/opLifecycle/opDecompressor.cjs.map +0 -1
  339. package/dist/opLifecycle/opGroupingManager.cjs.map +0 -1
  340. package/dist/opLifecycle/opSplitter.cjs.map +0 -1
  341. package/dist/opLifecycle/remoteMessageProcessor.cjs.map +0 -1
  342. package/dist/opProperties.cjs.map +0 -1
  343. package/dist/packageVersion.cjs.map +0 -1
  344. package/dist/pendingStateManager.cjs.map +0 -1
  345. package/dist/scheduleManager.cjs.map +0 -1
  346. package/dist/storageServiceWithAttachBlobs.cjs.map +0 -1
  347. package/dist/summary/index.cjs.map +0 -1
  348. package/dist/summary/orderedClientElection.cjs.map +0 -1
  349. package/dist/summary/runWhileConnectedCoordinator.cjs.map +0 -1
  350. package/dist/summary/runningSummarizer.cjs.map +0 -1
  351. package/dist/summary/summarizer.cjs.map +0 -1
  352. package/dist/summary/summarizerClientElection.cjs.map +0 -1
  353. package/dist/summary/summarizerHeuristics.cjs.map +0 -1
  354. package/dist/summary/summarizerNode/index.cjs.map +0 -1
  355. package/dist/summary/summarizerNode/summarizerNode.cjs.map +0 -1
  356. package/dist/summary/summarizerNode/summarizerNodeUtils.cjs.map +0 -1
  357. package/dist/summary/summarizerNode/summarizerNodeWithGc.cjs.map +0 -1
  358. package/dist/summary/summarizerTypes.cjs.map +0 -1
  359. package/dist/summary/summaryCollection.cjs.map +0 -1
  360. package/dist/summary/summaryFormat.cjs.map +0 -1
  361. package/dist/summary/summaryGenerator.cjs.map +0 -1
  362. package/dist/summary/summaryManager.cjs.map +0 -1
  363. package/dist/throttler.cjs.map +0 -1
  364. package/tsc-multi.test.json +0 -4
package/src/dataStores.ts CHANGED
@@ -33,6 +33,7 @@ import {
33
33
  create404Response,
34
34
  createResponseError,
35
35
  GCDataBuilder,
36
+ isSerializedHandle,
36
37
  responseToException,
37
38
  SummaryTreeBuilder,
38
39
  unpackChildNodesUsedRoutes,
@@ -61,7 +62,7 @@ import {
61
62
  } from "./dataStoreContext";
62
63
  import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs";
63
64
  import { IDataStoreAliasMessage, isDataStoreAliasMessage } from "./dataStore";
64
- import { GCNodeType, disableDatastoreSweepKey } from "./gc";
65
+ import { GCNodeType, detectOutboundRoutesViaDDSKey, disableDatastoreSweepKey } from "./gc";
65
66
  import { IContainerRuntimeMetadata, nonDataStorePaths, rootHasIsolatedChannels } from "./summary";
66
67
 
67
68
  type PendingAliasResolve = (success: boolean) => void;
@@ -441,6 +442,7 @@ export class DataStores implements IDisposable {
441
442
  message: ISequencedDocumentMessage,
442
443
  local: boolean,
443
444
  localMessageMetadata: unknown,
445
+ addedOutboundReference: (fromNodePath: string, toNodePath: string) => void,
444
446
  ) {
445
447
  const envelope = message.contents as IEnvelope;
446
448
  const transformed = { ...message, contents: envelope.contents };
@@ -462,6 +464,13 @@ export class DataStores implements IDisposable {
462
464
  assert(!!context, 0x162 /* "There should be a store context for the op" */);
463
465
  context.process(transformed, local, localMessageMetadata);
464
466
 
467
+ // By default, we use the new behavior of detecting outbound routes here.
468
+ // If this setting is true, then DataStoreContext would be notifying GC instead.
469
+ if (this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) !== true) {
470
+ // Notify GC of any outbound references that were added by this op.
471
+ detectOutboundReferences(envelope, addedOutboundReference);
472
+ }
473
+
465
474
  // Notify that a GC node for the data store changed. This is used to detect if a deleted data store is
466
475
  // being used.
467
476
  this.gcNodeUpdated(
@@ -830,12 +839,15 @@ export class DataStores implements IDisposable {
830
839
 
831
840
  const dataStoreContext = this.contexts.get(dataStoreId);
832
841
  if (dataStoreContext === undefined) {
833
- this.mc.logger.sendErrorEvent({
842
+ // If the data store hasn't already been deleted, log an error because this should never happen.
843
+ // If the data store has already been deleted, log a telemetry event. This can happen because multiple GC
844
+ // sweep ops can contain the same data store. It would be interesting to track how often this happens.
845
+ const alreadyDeleted = this.isDataStoreDeleted(`/${dataStoreId}`);
846
+ this.mc.logger.sendTelemetryEvent({
834
847
  eventName: "DeletedDataStoreNotFound",
848
+ category: alreadyDeleted ? "generic" : "error",
835
849
  ...tagCodeArtifacts({ id: dataStoreId }),
836
- details: {
837
- alreadyDeleted: this.isDataStoreDeleted(dataStoreId),
838
- },
850
+ details: { alreadyDeleted },
839
851
  });
840
852
  continue;
841
853
  }
@@ -851,8 +863,11 @@ export class DataStores implements IDisposable {
851
863
  }
852
864
 
853
865
  /**
854
- * This is called to update objects whose routes are tombstones. Tombstoned datastore contexts enable testing
855
- * scenarios with accessing deleted content without actually deleting content from summaries.
866
+ * This is called to update objects whose routes are tombstones.
867
+ *
868
+ * A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.
869
+ * Tombstoned objects are eventually deleted by GC.
870
+ *
856
871
  * @param tombstonedRoutes - The routes that are tombstones in all data stores in this Container.
857
872
  */
858
873
  public updateTombstonedRoutes(tombstonedRoutes: readonly string[]) {
@@ -944,3 +959,42 @@ export function getSummaryForDatastores(
944
959
  };
945
960
  }
946
961
  }
962
+
963
+ /**
964
+ * Traverse this op's contents and detect any outbound routes that were added by this op.
965
+ */
966
+ export function detectOutboundReferences(
967
+ envelope: IEnvelope,
968
+ addedOutboundReference: (fromNodePath: string, toNodePath: string) => void,
969
+ ): void {
970
+ // These will be built up as we traverse the envelope contents
971
+ const outboundPaths: string[] = [];
972
+ let ddsAddress: string | undefined;
973
+
974
+ function recursivelyFindHandles(obj: unknown) {
975
+ if (typeof obj === "object" && obj !== null) {
976
+ for (const [key, value] of Object.entries(obj)) {
977
+ // If 'value' is a serialized IFluidHandle, it represents a new outbound route.
978
+ if (isSerializedHandle(value)) {
979
+ outboundPaths.push(value.url);
980
+ }
981
+
982
+ // NOTE: This is taking a hard dependency on the fact that in our DataStore implementation,
983
+ // the address of the DDS is stored in a property called "address". This is not ideal.
984
+ // An alternative would be for the op envelope to include the absolute path (built up as it is submitted)
985
+ if (key === "address" && ddsAddress === undefined) {
986
+ ddsAddress = value;
987
+ }
988
+
989
+ recursivelyFindHandles(value);
990
+ }
991
+ }
992
+ }
993
+
994
+ recursivelyFindHandles(envelope.contents);
995
+
996
+ // GC node paths are all absolute paths, hence the "" prefix.
997
+ // e.g. this will yield "/dataStoreId/ddsId"
998
+ const fromPath = ["", envelope.address, ddsAddress].join("/");
999
+ outboundPaths.forEach((toPath) => addedOutboundReference(fromPath, toPath));
1000
+ }
@@ -20,7 +20,9 @@ import {
20
20
  ITelemetryLoggerExt,
21
21
  MonitoringContext,
22
22
  PerformanceEvent,
23
+ tagCodeArtifacts,
23
24
  } from "@fluidframework/telemetry-utils";
25
+ import { BlobManager } from "../blobManager";
24
26
  import {
25
27
  InactiveResponseHeaderKey,
26
28
  RuntimeHeaderData,
@@ -261,7 +263,7 @@ export class GarbageCollector implements IGarbageCollector {
261
263
  const currentReferenceTimestampMs = this.runtime.getCurrentReferenceTimestampMs();
262
264
  assert(
263
265
  currentReferenceTimestampMs !== undefined,
264
- "Trying to initialize GC state without current timestamp",
266
+ 0x8a4 /* Trying to initialize GC state without current timestamp */,
265
267
  );
266
268
 
267
269
  /**
@@ -288,7 +290,7 @@ export class GarbageCollector implements IGarbageCollector {
288
290
  nodeData.unreferencedTimestampMs,
289
291
  this.configs.inactiveTimeoutMs,
290
292
  currentReferenceTimestampMs,
291
- this.configs.sweepTimeoutMs,
293
+ this.configs.tombstoneTimeoutMs,
292
294
  this.configs.sweepGracePeriodMs,
293
295
  ),
294
296
  );
@@ -408,6 +410,7 @@ export class GarbageCollector implements IGarbageCollector {
408
410
  {
409
411
  eventName: "GCInitializationOrUpdateFailed",
410
412
  gcConfigs: JSON.stringify(this.configs),
413
+ clientId,
411
414
  },
412
415
  error,
413
416
  );
@@ -489,8 +492,11 @@ export class GarbageCollector implements IGarbageCollector {
489
492
  const gcStats = await this.runGC(fullGC, currentReferenceTimestampMs, logger);
490
493
  event.end({
491
494
  ...gcStats,
492
- timestamp: currentReferenceTimestampMs,
493
- sweep: this.configs.shouldRunSweep,
495
+ details: {
496
+ timestamp: currentReferenceTimestampMs,
497
+ sweep: this.configs.shouldRunSweep,
498
+ tombstone: this.configs.throwOnTombstoneLoad,
499
+ },
494
500
  });
495
501
 
496
502
  /** Post-GC steps */
@@ -607,7 +613,7 @@ export class GarbageCollector implements IGarbageCollector {
607
613
  currentReferenceTimestampMs,
608
614
  this.configs.inactiveTimeoutMs,
609
615
  currentReferenceTimestampMs,
610
- this.configs.sweepTimeoutMs,
616
+ this.configs.tombstoneTimeoutMs,
611
617
  this.configs.sweepGracePeriodMs,
612
618
  ),
613
619
  );
@@ -833,7 +839,7 @@ export class GarbageCollector implements IGarbageCollector {
833
839
  gcFeatureMatrix: this.configs.persistedGcFeatureMatrix,
834
840
  sessionExpiryTimeoutMs: this.configs.sessionExpiryTimeoutMs,
835
841
  sweepEnabled: false, // DEPRECATED - to be removed
836
- sweepTimeoutMs: this.configs.sweepTimeoutMs,
842
+ tombstoneTimeoutMs: this.configs.tombstoneTimeoutMs,
837
843
  };
838
844
  }
839
845
 
@@ -1001,6 +1007,18 @@ export class GarbageCollector implements IGarbageCollector {
1001
1007
  return;
1002
1008
  }
1003
1009
 
1010
+ if (!toNodePath.startsWith("/")) {
1011
+ // A long time ago we stored handles with relatives paths. We don't expect to see these cases though
1012
+ // because GC was enabled only after we made the switch to always using absolute paths.
1013
+ this.mc.logger.sendErrorEvent({
1014
+ eventName: "InvalidRelativeOutboundRoute",
1015
+ ...tagCodeArtifacts({ fromId: fromNodePath, id: toNodePath }),
1016
+ });
1017
+ return;
1018
+ }
1019
+
1020
+ assert(fromNodePath.startsWith("/"), 0x8a5 /* fromNodePath must be an absolute path */);
1021
+
1004
1022
  const outboundRoutes = this.newReferencesSinceLastRun.get(fromNodePath) ?? [];
1005
1023
  outboundRoutes.push(toNodePath);
1006
1024
  this.newReferencesSinceLastRun.set(fromNodePath, outboundRoutes);
@@ -1116,9 +1134,25 @@ export class GarbageCollector implements IGarbageCollector {
1116
1134
  deletedAttachmentBlobCount: 0,
1117
1135
  };
1118
1136
 
1137
+ // The runtime can't reliably identify the type of deleted nodes. So, get the type here. This should
1138
+ // be good enough because the only types that participate in GC today are data stores, DDSes and blobs.
1139
+ const getDeletedNodeType = (nodeId: string): GCNodeType => {
1140
+ const pathParts = nodeId.split("/");
1141
+ if (pathParts[1] === BlobManager.basePath) {
1142
+ return GCNodeType.Blob;
1143
+ }
1144
+ if (pathParts.length === 2) {
1145
+ return GCNodeType.DataStore;
1146
+ }
1147
+ if (pathParts.length === 3) {
1148
+ return GCNodeType.SubDataStore;
1149
+ }
1150
+ return GCNodeType.Other;
1151
+ };
1152
+
1119
1153
  for (const nodeId of deletedNodes) {
1120
1154
  sweepPhaseStats.deletedNodeCount++;
1121
- const nodeType = this.runtime.getNodeType(nodeId);
1155
+ const nodeType = getDeletedNodeType(nodeId);
1122
1156
  if (nodeType === GCNodeType.DataStore) {
1123
1157
  sweepPhaseStats.deletedDataStoreCount++;
1124
1158
  } else if (nodeType === GCNodeType.Blob) {
@@ -31,6 +31,7 @@ import {
31
31
  gcDisableThrowOnTombstoneLoadOptionName,
32
32
  defaultSweepGracePeriodMs,
33
33
  gcGenerationOptionName,
34
+ IGCMetadata_Deprecated,
34
35
  } from "./gcDefinitions";
35
36
  import { getGCVersion, shouldAllowGcSweep } from "./gcHelpers";
36
37
 
@@ -54,7 +55,7 @@ export function generateGCConfigs(
54
55
  ): IGarbageCollectorConfigs {
55
56
  let gcEnabled: boolean;
56
57
  let sessionExpiryTimeoutMs: number | undefined;
57
- let sweepTimeoutMs: number | undefined;
58
+ let tombstoneTimeoutMs: number | undefined;
58
59
  let persistedGcFeatureMatrix: GCFeatureMatrix | undefined;
59
60
  let gcVersionInBaseSnapshot: GCVersion | undefined;
60
61
 
@@ -63,21 +64,25 @@ export function generateGCConfigs(
63
64
  * 1. Whether running GC mark phase is allowed or not.
64
65
  * 2. Whether running GC sweep phase is allowed or not.
65
66
  * 3. Whether GC session expiry is enabled or not.
66
- * For existing containers, we get this information from the createParams.metadata blob of its summary.
67
+ * For existing containers, we get this information from the metadata blob of its summary.
67
68
  */
68
69
  if (createParams.existing) {
69
- gcVersionInBaseSnapshot = getGCVersion(createParams.metadata);
70
- // Existing documents which did not have createParams.metadata blob or had GC disabled have version as 0. For all
70
+ const metadata = createParams.metadata;
71
+ gcVersionInBaseSnapshot = getGCVersion(metadata);
72
+ // Existing documents which did not have metadata blob or had GC disabled have version as 0. For all
71
73
  // other existing documents, GC is enabled.
72
74
  gcEnabled = gcVersionInBaseSnapshot > 0;
73
- sessionExpiryTimeoutMs = createParams.metadata?.sessionExpiryTimeoutMs;
74
- sweepTimeoutMs =
75
- createParams.metadata?.sweepTimeoutMs ?? computeSweepTimeout(sessionExpiryTimeoutMs); // Backfill old documents that didn't persist this
76
- persistedGcFeatureMatrix = createParams.metadata?.gcFeatureMatrix;
75
+ sessionExpiryTimeoutMs = metadata?.sessionExpiryTimeoutMs;
76
+ const legacyPersistedSweepTimeoutMs = (metadata as IGCMetadata_Deprecated)?.sweepTimeoutMs;
77
+ tombstoneTimeoutMs =
78
+ metadata?.tombstoneTimeoutMs ??
79
+ legacyPersistedSweepTimeoutMs ?? // Backfill old documents that have sweepTimeoutMs instead of tombstoneTimeoutMs
80
+ computeTombstoneTimeout(sessionExpiryTimeoutMs); // Backfill old documents that didn't persist either value
81
+ persistedGcFeatureMatrix = metadata?.gcFeatureMatrix;
77
82
  } else {
78
83
  // This Test Override only applies for new containers
79
- const testOverrideSweepTimeoutMs = mc.config.getNumber(
80
- "Fluid.GarbageCollection.TestOverride.SweepTimeoutMs",
84
+ const testOverrideTombstoneTimeoutMs = mc.config.getNumber(
85
+ "Fluid.GarbageCollection.TestOverride.TombstoneTimeoutMs",
81
86
  );
82
87
 
83
88
  // For new documents, GC is enabled by default. It can be explicitly disabled by setting the gcAllowed
@@ -89,7 +94,8 @@ export function generateGCConfigs(
89
94
  sessionExpiryTimeoutMs =
90
95
  createParams.gcOptions.sessionExpiryTimeoutMs ?? defaultSessionExpiryDurationMs;
91
96
  }
92
- sweepTimeoutMs = testOverrideSweepTimeoutMs ?? computeSweepTimeout(sessionExpiryTimeoutMs);
97
+ tombstoneTimeoutMs =
98
+ testOverrideTombstoneTimeoutMs ?? computeTombstoneTimeout(sessionExpiryTimeoutMs);
93
99
 
94
100
  const gcGeneration = createParams.gcOptions[gcGenerationOptionName];
95
101
  if (gcGeneration !== undefined) {
@@ -131,7 +137,7 @@ export function generateGCConfigs(
131
137
  * Whether sweep should run or not. This refers to whether Tombstones should fail on load and whether
132
138
  * sweep-ready nodes should be deleted.
133
139
  *
134
- * Assuming overall GC is enabled and sweepTimeout is provided, the following conditions have to be met to run sweep:
140
+ * Assuming overall GC is enabled and Tombstone timeout is present, the following conditions have to be met to run sweep:
135
141
  *
136
142
  * 1. Sweep should be enabled for this container.
137
143
  * 2. Sweep should be enabled for this session.
@@ -139,7 +145,7 @@ export function generateGCConfigs(
139
145
  * These conditions can be overridden via the RunSweep feature flag.
140
146
  */
141
147
  const shouldRunSweep =
142
- !shouldRunGC || sweepTimeoutMs === undefined
148
+ !shouldRunGC || tombstoneTimeoutMs === undefined
143
149
  ? false
144
150
  : mc.config.getBoolean(runSweepKey) ??
145
151
  (sweepAllowed && createParams.gcOptions.enableGCSweep === true);
@@ -150,9 +156,9 @@ export function generateGCConfigs(
150
156
  createParams.gcOptions.inactiveTimeoutMs ??
151
157
  defaultInactiveTimeoutMs;
152
158
 
153
- // Inactive timeout must be greater than sweep timeout since a node goes from active -> inactive -> sweep ready.
154
- if (sweepTimeoutMs !== undefined && inactiveTimeoutMs > sweepTimeoutMs) {
155
- throw new UsageError("inactive timeout should not be greater than the sweep timeout");
159
+ // Inactive timeout must be greater than tombstone timeout since a node goes from active -> inactive -> sweep ready.
160
+ if (tombstoneTimeoutMs !== undefined && inactiveTimeoutMs > tombstoneTimeoutMs) {
161
+ throw new UsageError("inactive timeout should not be greater than the tombstone timeout");
156
162
  }
157
163
 
158
164
  // Whether we are running in test mode. In this mode, unreferenced nodes are immediately deleted.
@@ -190,7 +196,7 @@ export function generateGCConfigs(
190
196
  testMode,
191
197
  tombstoneMode,
192
198
  sessionExpiryTimeoutMs,
193
- sweepTimeoutMs,
199
+ tombstoneTimeoutMs,
194
200
  sweepGracePeriodMs,
195
201
  inactiveTimeoutMs,
196
202
  persistedGcFeatureMatrix,
@@ -203,14 +209,16 @@ export function generateGCConfigs(
203
209
  }
204
210
 
205
211
  /**
206
- * Sweep timeout is the time after which unreferenced content can be swept.
207
- * Sweep timeout = session expiry timeout + snapshot cache expiry timeout + one day buffer.
212
+ * Tombstone timeout is the time after which unreferenced content is guaranteed not to be revived (re-referenced).
213
+ * Tombstone timeout = session expiry timeout + snapshot cache expiry timeout + one day buffer.
208
214
  *
209
215
  * The snapshot cache expiry timeout cannot be known precisely but the upper bound is 5 days.
210
216
  * The buffer is added to account for any clock skew or other edge cases.
211
217
  * We use server timestamps throughout so the skew should be minimal but make it 1 day to be safe.
218
+ *
219
+ * If there is no Session Expiry timeout, GC can never guarantee an object won't be revived, so return undefined.
212
220
  */
213
- function computeSweepTimeout(sessionExpiryTimeoutMs: number | undefined): number | undefined {
221
+ function computeTombstoneTimeout(sessionExpiryTimeoutMs: number | undefined): number | undefined {
214
222
  const bufferMs = oneDayMs;
215
223
  return sessionExpiryTimeoutMs && sessionExpiryTimeoutMs + maxSnapshotCacheExpiryMs + bufferMs;
216
224
  }
@@ -74,13 +74,15 @@ export const gcVersionUpgradeToV4Key = "Fluid.GarbageCollection.GCVersionUpgrade
74
74
  export const disableDatastoreSweepKey = "Fluid.GarbageCollection.DisableDataStoreSweep";
75
75
  /** Config key to disable GC sweep for attachment blobs. */
76
76
  export const disableAttachmentBlobSweepKey = "Fluid.GarbageCollection.DisableAttachmentBlobSweep";
77
+ /** Config key to revert new paradigm of detecting outbound routes in ContainerRuntime layer (use true) */
78
+ export const detectOutboundRoutesViaDDSKey = "Fluid.GarbageCollection.DetectOutboundRoutesViaDDS";
77
79
 
78
80
  // One day in milliseconds.
79
81
  export const oneDayMs = 1 * 24 * 60 * 60 * 1000;
80
82
 
81
83
  /**
82
- * The maximum snapshot cache expiry in the driver. This is used to calculate the sweep timeout.
83
- * Sweep timeout = session expiry timeout + snapshot cache expiry timeout + a buffer.
84
+ * The maximum snapshot cache expiry in the driver. This is used to calculate the tombstone timeout.
85
+ * Tombstone timeout = session expiry timeout + snapshot cache expiry timeout + a buffer.
84
86
  * The snapshot cache expiry timeout cannot be known precisely but the upper bound is 5 days, i.e., any snapshot
85
87
  * in cache will be invalidated before 5 days.
86
88
  */
@@ -114,6 +116,21 @@ export type GCFeatureMatrix =
114
116
  };
115
117
 
116
118
  /**
119
+ * Deprecated properties formerly included in @see IGCMetadata.
120
+ * These may be found in old snapshots, so we need to support them for backwards compatibility.
121
+ */
122
+ export interface IGCMetadata_Deprecated {
123
+ /**
124
+ * How long to wait after an object is unreferenced before deleting it via GC Sweep
125
+ *
126
+ * @deprecated Replaced by @see IGCMetadata.tombstoneTimeoutMs
127
+ */
128
+ readonly sweepTimeoutMs?: number;
129
+ }
130
+
131
+ /**
132
+ * GC-specific metadata to be written into the summary.
133
+ *
117
134
  * @alpha
118
135
  */
119
136
  export interface IGCMetadata {
@@ -148,8 +165,15 @@ export interface IGCMetadata {
148
165
  readonly sweepEnabled?: boolean;
149
166
  /** If this is present, the session for this container will expire after this time and the container will close */
150
167
  readonly sessionExpiryTimeoutMs?: number;
151
- /** How long to wait after an object is unreferenced before deleting it via GC Sweep */
152
- readonly sweepTimeoutMs?: number;
168
+ /**
169
+ * How long to wait after an object is unreferenced before it becomes a Tombstone.
170
+ *
171
+ * After this point, there's a grace period before the object is deleted.
172
+ * @see IGCRuntimeOptions.sweepGracePeriodMs
173
+ *
174
+ * So the full sweep timeout in a session is tombstoneTimeoutMs + sweepGracePeriodMs.
175
+ */
176
+ readonly tombstoneTimeoutMs?: number;
153
177
  }
154
178
 
155
179
  /**
@@ -445,8 +469,8 @@ export interface IGarbageCollectorConfigs {
445
469
  readonly runFullGC: boolean | undefined;
446
470
  /** The time in ms to expire a session for a client for gc. */
447
471
  readonly sessionExpiryTimeoutMs: number | undefined;
448
- /** The time after which an unreferenced node is ready to be swept. */
449
- readonly sweepTimeoutMs: number | undefined;
472
+ /** The time after which an unreferenced node can be Tombstoned - i.e. GC knows it can't be referenced again (revived). */
473
+ readonly tombstoneTimeoutMs: number | undefined;
450
474
  /**
451
475
  * The delay between tombstone and sweep. Not persisted, so concurrent sessions may use different values.
452
476
  * Sweep is implemented in an eventually-consistent way so this is acceptable.
@@ -66,13 +66,20 @@ interface INodeUsageProps extends ICommonProps {
66
66
  }
67
67
 
68
68
  /**
69
- * Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector. There are 4 types of
70
- * telemetry logged:
69
+ * Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.
70
+ *
71
+ * These events are not logged as errors, just generic events, since there can be false positives:
72
+ *
71
73
  * 1. inactiveObject telemetry - When an inactive node is used - A node that has been unreferenced for inactiveTimeoutMs.
72
- * 2. sweepReadyObject telemetry - When a sweep ready node is used - A node that has been unreferenced for sweepTimeoutMs.
73
- * 3. Tombstone telemetry - When a tombstoned node is used - A node that that has been marked as tombstone.
74
- * 4. Sweep / deleted telemetry - When a node is detected as sweep ready in the sweep phase.
75
- * 5. Unknown outbound reference telemetry - When a node is referenced but GC is not explicitly notified of it.
74
+ * 2. tombstoneReadyObject telemetry - When a tombstone-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs.
75
+ * 3. sweepReadyObject telemetry - When a sweep-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs + sweepGracePeriodMs.
76
+ *
77
+ * These events are logged as errors since they are based on the core GC logic:
78
+ *
79
+ * 1. Tombstone telemetry - When a tombstoned node is used - A node that has been marked as tombstone.
80
+ * 2. Unknown outbound reference telemetry - When a node is referenced but GC was not notified of it when the new reference appeared.
81
+ *
82
+ * Note: The telemetry for a Deleted node being used is logged elsewhere in this package.
76
83
  */
77
84
  export class GCTelemetryTracker {
78
85
  // Keeps track of unreferenced events that are logged for a node. This is used to limit the log generation to one
@@ -147,11 +154,11 @@ export class GCTelemetryTracker {
147
154
  case UnreferencedState.Inactive:
148
155
  return this.configs.inactiveTimeoutMs;
149
156
  case UnreferencedState.TombstoneReady:
150
- return this.configs.sweepTimeoutMs;
157
+ return this.configs.tombstoneTimeoutMs;
151
158
  case UnreferencedState.SweepReady:
152
159
  return (
153
- this.configs.sweepTimeoutMs &&
154
- this.configs.sweepTimeoutMs + this.configs.sweepGracePeriodMs
160
+ this.configs.tombstoneTimeoutMs &&
161
+ this.configs.tombstoneTimeoutMs + this.configs.sweepGracePeriodMs
155
162
  );
156
163
  default:
157
164
  return undefined;
@@ -389,6 +396,9 @@ export class GCTelemetryTracker {
389
396
  fromPkg: fromPkg?.join("/"),
390
397
  }),
391
398
  };
399
+
400
+ // These are logged as generic events and not errors because there can be false positives. The Tombstone
401
+ // and Delete errors are separately logged and are reliable.
392
402
  logger.sendTelemetryEvent(event);
393
403
  }
394
404
  }
package/src/gc/index.ts CHANGED
@@ -21,6 +21,7 @@ export {
21
21
  IGarbageCollectorConfigs,
22
22
  IGarbageCollectorCreateParams,
23
23
  IGCMetadata,
24
+ IGCMetadata_Deprecated,
24
25
  IGCResult,
25
26
  IGCRuntimeOptions,
26
27
  IMarkPhaseStats,
@@ -33,9 +34,11 @@ export {
33
34
  stableGCVersion,
34
35
  disableAttachmentBlobSweepKey,
35
36
  disableDatastoreSweepKey,
37
+ detectOutboundRoutesViaDDSKey,
36
38
  UnreferencedState,
37
39
  throwOnTombstoneLoadOverrideKey,
38
40
  GarbageCollectionMessage,
41
+ ISweepMessage,
39
42
  } from "./gcDefinitions";
40
43
  export {
41
44
  cloneGCData,
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { IBatchMessage } from "@fluidframework/container-definitions";
7
7
  import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
8
- import { CompressionAlgorithms } from "..";
8
+ import { CompressionAlgorithms } from "../containerRuntime";
9
9
  import { ContainerMessageType } from "../messageTypes";
10
10
 
11
11
  /**
@@ -20,7 +20,7 @@ import {
20
20
  estimateSocketSize,
21
21
  sequenceNumbersMatch,
22
22
  } from "./batchManager";
23
- import { BatchMessage, IBatch } from "./definitions";
23
+ import { BatchMessage, IBatch, IBatchCheckpoint } from "./definitions";
24
24
  import { OpCompressor } from "./opCompressor";
25
25
  import { OpGroupingManager } from "./opGroupingManager";
26
26
  import { OpSplitter } from "./opSplitter";
@@ -462,8 +462,11 @@ export class Outbox {
462
462
  }
463
463
 
464
464
  public checkpoint() {
465
+ // This variable is declared with a specific type so that we have a standard import of the IBatchCheckpoint type.
466
+ // When the type is inferred, the generated .d.ts uses a dynamic import which doesn't resolve.
467
+ const mainBatch: IBatchCheckpoint = this.mainBatch.checkpoint();
465
468
  return {
466
- mainBatch: this.mainBatch.checkpoint(),
469
+ mainBatch,
467
470
  attachFlowBatch: this.attachFlowBatch.checkpoint(),
468
471
  blobAttachBatch: this.blobAttachBatch.checkpoint(),
469
472
  };
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.0.0-dev-rc.1.0.0.224419";
9
+ export const pkgVersion = "2.0.0-dev-rc.1.0.0.228517";