@fluidframework/container-runtime 2.0.0-dev-rc.5.0.0.268409 → 2.0.0-dev-rc.5.0.0.270987

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 (306) hide show
  1. package/api-report/container-runtime.alpha.api.md +3 -8
  2. package/api-report/container-runtime.beta.api.md +2 -2
  3. package/api-report/container-runtime.public.api.md +2 -2
  4. package/biome.jsonc +4 -0
  5. package/container-runtime.test-files.tar +0 -0
  6. package/dist/batchTracker.js +5 -1
  7. package/dist/batchTracker.js.map +1 -1
  8. package/dist/blobManager.d.ts +1 -18
  9. package/dist/blobManager.d.ts.map +1 -1
  10. package/dist/blobManager.js +39 -48
  11. package/dist/blobManager.js.map +1 -1
  12. package/dist/channelCollection.d.ts +8 -9
  13. package/dist/channelCollection.d.ts.map +1 -1
  14. package/dist/channelCollection.js +71 -51
  15. package/dist/channelCollection.js.map +1 -1
  16. package/dist/connectionTelemetry.d.ts +1 -2
  17. package/dist/connectionTelemetry.d.ts.map +1 -1
  18. package/dist/connectionTelemetry.js +32 -14
  19. package/dist/connectionTelemetry.js.map +1 -1
  20. package/dist/containerHandleContext.js +4 -0
  21. package/dist/containerHandleContext.js.map +1 -1
  22. package/dist/containerRuntime.d.ts +7 -18
  23. package/dist/containerRuntime.d.ts.map +1 -1
  24. package/dist/containerRuntime.js +145 -43
  25. package/dist/containerRuntime.js.map +1 -1
  26. package/dist/dataStore.js +9 -1
  27. package/dist/dataStore.js.map +1 -1
  28. package/dist/dataStoreContext.d.ts +23 -37
  29. package/dist/dataStoreContext.d.ts.map +1 -1
  30. package/dist/dataStoreContext.js +159 -133
  31. package/dist/dataStoreContext.js.map +1 -1
  32. package/dist/dataStoreContexts.js +29 -28
  33. package/dist/dataStoreContexts.js.map +1 -1
  34. package/dist/dataStoreRegistry.js +1 -0
  35. package/dist/dataStoreRegistry.js.map +1 -1
  36. package/dist/deltaManagerProxies.d.ts +4 -4
  37. package/dist/deltaManagerProxies.d.ts.map +1 -1
  38. package/dist/deltaManagerProxies.js +33 -28
  39. package/dist/deltaManagerProxies.js.map +1 -1
  40. package/dist/deltaScheduler.d.ts +1 -2
  41. package/dist/deltaScheduler.d.ts.map +1 -1
  42. package/dist/deltaScheduler.js +13 -9
  43. package/dist/deltaScheduler.js.map +1 -1
  44. package/dist/error.js +2 -1
  45. package/dist/error.js.map +1 -1
  46. package/dist/gc/garbageCollection.d.ts.map +1 -1
  47. package/dist/gc/garbageCollection.js +37 -17
  48. package/dist/gc/garbageCollection.js.map +1 -1
  49. package/dist/gc/gcDefinitions.d.ts +0 -4
  50. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  51. package/dist/gc/gcDefinitions.js +1 -3
  52. package/dist/gc/gcDefinitions.js.map +1 -1
  53. package/dist/gc/gcSummaryStateTracker.js +19 -14
  54. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  55. package/dist/gc/gcTelemetry.js +12 -5
  56. package/dist/gc/gcTelemetry.js.map +1 -1
  57. package/dist/gc/gcUnreferencedStateTracker.js +12 -1
  58. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
  59. package/dist/gc/index.d.ts +1 -1
  60. package/dist/gc/index.d.ts.map +1 -1
  61. package/dist/gc/index.js +1 -2
  62. package/dist/gc/index.js.map +1 -1
  63. package/dist/messageTypes.d.ts +1 -1
  64. package/dist/messageTypes.d.ts.map +1 -1
  65. package/dist/messageTypes.js.map +1 -1
  66. package/dist/opLifecycle/batchManager.js +5 -3
  67. package/dist/opLifecycle/batchManager.js.map +1 -1
  68. package/dist/opLifecycle/opCompressor.js +1 -0
  69. package/dist/opLifecycle/opCompressor.js.map +1 -1
  70. package/dist/opLifecycle/opDecompressor.d.ts +1 -1
  71. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  72. package/dist/opLifecycle/opDecompressor.js +6 -4
  73. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  74. package/dist/opLifecycle/opGroupingManager.d.ts +1 -1
  75. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  76. package/dist/opLifecycle/opGroupingManager.js +3 -1
  77. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  78. package/dist/opLifecycle/opSplitter.d.ts +1 -1
  79. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  80. package/dist/opLifecycle/opSplitter.js +6 -0
  81. package/dist/opLifecycle/opSplitter.js.map +1 -1
  82. package/dist/opLifecycle/outbox.js +15 -10
  83. package/dist/opLifecycle/outbox.js.map +1 -1
  84. package/dist/opLifecycle/remoteMessageProcessor.d.ts +1 -1
  85. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  86. package/dist/opLifecycle/remoteMessageProcessor.js +3 -0
  87. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  88. package/dist/opProperties.d.ts +1 -1
  89. package/dist/opProperties.d.ts.map +1 -1
  90. package/dist/opProperties.js.map +1 -1
  91. package/dist/packageVersion.d.ts +1 -1
  92. package/dist/packageVersion.js +1 -1
  93. package/dist/packageVersion.js.map +1 -1
  94. package/dist/pendingStateManager.d.ts.map +1 -1
  95. package/dist/pendingStateManager.js +34 -18
  96. package/dist/pendingStateManager.js.map +1 -1
  97. package/dist/scheduleManager.d.ts +1 -2
  98. package/dist/scheduleManager.d.ts.map +1 -1
  99. package/dist/scheduleManager.js +15 -4
  100. package/dist/scheduleManager.js.map +1 -1
  101. package/dist/storageServiceWithAttachBlobs.js +1 -0
  102. package/dist/storageServiceWithAttachBlobs.js.map +1 -1
  103. package/dist/summary/documentSchema.js +17 -1
  104. package/dist/summary/documentSchema.js.map +1 -1
  105. package/dist/summary/orderedClientElection.js +19 -11
  106. package/dist/summary/orderedClientElection.js.map +1 -1
  107. package/dist/summary/runWhileConnectedCoordinator.js +4 -2
  108. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
  109. package/dist/summary/runningSummarizer.d.ts +1 -1
  110. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  111. package/dist/summary/runningSummarizer.js +56 -38
  112. package/dist/summary/runningSummarizer.js.map +1 -1
  113. package/dist/summary/summarizer.js +17 -8
  114. package/dist/summary/summarizer.js.map +1 -1
  115. package/dist/summary/summarizerClientElection.js +18 -7
  116. package/dist/summary/summarizerClientElection.js.map +1 -1
  117. package/dist/summary/summarizerHeuristics.js +30 -25
  118. package/dist/summary/summarizerHeuristics.js.map +1 -1
  119. package/dist/summary/summarizerNode/summarizerNode.d.ts +1 -2
  120. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  121. package/dist/summary/summarizerNode/summarizerNode.js +12 -3
  122. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  123. package/dist/summary/summarizerNode/summarizerNodeUtils.js +2 -0
  124. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  125. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +20 -6
  126. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  127. package/dist/summary/summarizerTypes.d.ts +2 -2
  128. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  129. package/dist/summary/summarizerTypes.js.map +1 -1
  130. package/dist/summary/summaryCollection.d.ts +1 -2
  131. package/dist/summary/summaryCollection.d.ts.map +1 -1
  132. package/dist/summary/summaryCollection.js +23 -11
  133. package/dist/summary/summaryCollection.js.map +1 -1
  134. package/dist/summary/summaryFormat.d.ts +1 -2
  135. package/dist/summary/summaryFormat.d.ts.map +1 -1
  136. package/dist/summary/summaryFormat.js.map +1 -1
  137. package/dist/summary/summaryGenerator.js +12 -5
  138. package/dist/summary/summaryGenerator.js.map +1 -1
  139. package/dist/summary/summaryManager.js +58 -48
  140. package/dist/summary/summaryManager.js.map +1 -1
  141. package/dist/throttler.js +4 -1
  142. package/dist/throttler.js.map +1 -1
  143. package/lib/batchTracker.js +5 -1
  144. package/lib/batchTracker.js.map +1 -1
  145. package/lib/blobManager.d.ts +1 -18
  146. package/lib/blobManager.d.ts.map +1 -1
  147. package/lib/blobManager.js +39 -48
  148. package/lib/blobManager.js.map +1 -1
  149. package/lib/channelCollection.d.ts +8 -9
  150. package/lib/channelCollection.d.ts.map +1 -1
  151. package/lib/channelCollection.js +72 -53
  152. package/lib/channelCollection.js.map +1 -1
  153. package/lib/connectionTelemetry.d.ts +1 -2
  154. package/lib/connectionTelemetry.d.ts.map +1 -1
  155. package/lib/connectionTelemetry.js +33 -15
  156. package/lib/connectionTelemetry.js.map +1 -1
  157. package/lib/containerHandleContext.js +4 -0
  158. package/lib/containerHandleContext.js.map +1 -1
  159. package/lib/containerRuntime.d.ts +7 -18
  160. package/lib/containerRuntime.d.ts.map +1 -1
  161. package/lib/containerRuntime.js +145 -43
  162. package/lib/containerRuntime.js.map +1 -1
  163. package/lib/dataStore.js +9 -1
  164. package/lib/dataStore.js.map +1 -1
  165. package/lib/dataStoreContext.d.ts +23 -37
  166. package/lib/dataStoreContext.d.ts.map +1 -1
  167. package/lib/dataStoreContext.js +162 -136
  168. package/lib/dataStoreContext.js.map +1 -1
  169. package/lib/dataStoreContexts.js +29 -28
  170. package/lib/dataStoreContexts.js.map +1 -1
  171. package/lib/dataStoreRegistry.js +1 -0
  172. package/lib/dataStoreRegistry.js.map +1 -1
  173. package/lib/deltaManagerProxies.d.ts +4 -4
  174. package/lib/deltaManagerProxies.d.ts.map +1 -1
  175. package/lib/deltaManagerProxies.js +33 -28
  176. package/lib/deltaManagerProxies.js.map +1 -1
  177. package/lib/deltaScheduler.d.ts +1 -2
  178. package/lib/deltaScheduler.d.ts.map +1 -1
  179. package/lib/deltaScheduler.js +13 -9
  180. package/lib/deltaScheduler.js.map +1 -1
  181. package/lib/error.js +2 -1
  182. package/lib/error.js.map +1 -1
  183. package/lib/gc/garbageCollection.d.ts.map +1 -1
  184. package/lib/gc/garbageCollection.js +37 -17
  185. package/lib/gc/garbageCollection.js.map +1 -1
  186. package/lib/gc/gcDefinitions.d.ts +0 -4
  187. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  188. package/lib/gc/gcDefinitions.js +0 -2
  189. package/lib/gc/gcDefinitions.js.map +1 -1
  190. package/lib/gc/gcSummaryStateTracker.js +19 -14
  191. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  192. package/lib/gc/gcTelemetry.js +12 -5
  193. package/lib/gc/gcTelemetry.js.map +1 -1
  194. package/lib/gc/gcUnreferencedStateTracker.js +12 -1
  195. package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
  196. package/lib/gc/index.d.ts +1 -1
  197. package/lib/gc/index.d.ts.map +1 -1
  198. package/lib/gc/index.js +1 -1
  199. package/lib/gc/index.js.map +1 -1
  200. package/lib/messageTypes.d.ts +1 -1
  201. package/lib/messageTypes.d.ts.map +1 -1
  202. package/lib/messageTypes.js.map +1 -1
  203. package/lib/opLifecycle/batchManager.js +5 -3
  204. package/lib/opLifecycle/batchManager.js.map +1 -1
  205. package/lib/opLifecycle/opCompressor.js +1 -0
  206. package/lib/opLifecycle/opCompressor.js.map +1 -1
  207. package/lib/opLifecycle/opDecompressor.d.ts +1 -1
  208. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  209. package/lib/opLifecycle/opDecompressor.js +6 -4
  210. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  211. package/lib/opLifecycle/opGroupingManager.d.ts +1 -1
  212. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  213. package/lib/opLifecycle/opGroupingManager.js +3 -1
  214. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  215. package/lib/opLifecycle/opSplitter.d.ts +1 -1
  216. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  217. package/lib/opLifecycle/opSplitter.js +6 -0
  218. package/lib/opLifecycle/opSplitter.js.map +1 -1
  219. package/lib/opLifecycle/outbox.js +15 -10
  220. package/lib/opLifecycle/outbox.js.map +1 -1
  221. package/lib/opLifecycle/remoteMessageProcessor.d.ts +1 -1
  222. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  223. package/lib/opLifecycle/remoteMessageProcessor.js +4 -1
  224. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  225. package/lib/opProperties.d.ts +1 -1
  226. package/lib/opProperties.d.ts.map +1 -1
  227. package/lib/opProperties.js.map +1 -1
  228. package/lib/packageVersion.d.ts +1 -1
  229. package/lib/packageVersion.js +1 -1
  230. package/lib/packageVersion.js.map +1 -1
  231. package/lib/pendingStateManager.d.ts.map +1 -1
  232. package/lib/pendingStateManager.js +34 -18
  233. package/lib/pendingStateManager.js.map +1 -1
  234. package/lib/scheduleManager.d.ts +1 -2
  235. package/lib/scheduleManager.d.ts.map +1 -1
  236. package/lib/scheduleManager.js +15 -4
  237. package/lib/scheduleManager.js.map +1 -1
  238. package/lib/storageServiceWithAttachBlobs.js +1 -0
  239. package/lib/storageServiceWithAttachBlobs.js.map +1 -1
  240. package/lib/summary/documentSchema.js +17 -1
  241. package/lib/summary/documentSchema.js.map +1 -1
  242. package/lib/summary/orderedClientElection.js +19 -11
  243. package/lib/summary/orderedClientElection.js.map +1 -1
  244. package/lib/summary/runWhileConnectedCoordinator.js +4 -2
  245. package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
  246. package/lib/summary/runningSummarizer.d.ts +1 -1
  247. package/lib/summary/runningSummarizer.d.ts.map +1 -1
  248. package/lib/summary/runningSummarizer.js +57 -39
  249. package/lib/summary/runningSummarizer.js.map +1 -1
  250. package/lib/summary/summarizer.js +17 -8
  251. package/lib/summary/summarizer.js.map +1 -1
  252. package/lib/summary/summarizerClientElection.js +18 -7
  253. package/lib/summary/summarizerClientElection.js.map +1 -1
  254. package/lib/summary/summarizerHeuristics.js +30 -25
  255. package/lib/summary/summarizerHeuristics.js.map +1 -1
  256. package/lib/summary/summarizerNode/summarizerNode.d.ts +1 -2
  257. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  258. package/lib/summary/summarizerNode/summarizerNode.js +12 -3
  259. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  260. package/lib/summary/summarizerNode/summarizerNodeUtils.js +2 -0
  261. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  262. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +20 -6
  263. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  264. package/lib/summary/summarizerTypes.d.ts +2 -2
  265. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  266. package/lib/summary/summarizerTypes.js.map +1 -1
  267. package/lib/summary/summaryCollection.d.ts +1 -2
  268. package/lib/summary/summaryCollection.d.ts.map +1 -1
  269. package/lib/summary/summaryCollection.js +23 -11
  270. package/lib/summary/summaryCollection.js.map +1 -1
  271. package/lib/summary/summaryFormat.d.ts +1 -2
  272. package/lib/summary/summaryFormat.d.ts.map +1 -1
  273. package/lib/summary/summaryFormat.js.map +1 -1
  274. package/lib/summary/summaryGenerator.js +12 -5
  275. package/lib/summary/summaryGenerator.js.map +1 -1
  276. package/lib/summary/summaryManager.js +58 -48
  277. package/lib/summary/summaryManager.js.map +1 -1
  278. package/lib/throttler.js +4 -1
  279. package/lib/throttler.js.map +1 -1
  280. package/package.json +23 -20
  281. package/src/batchTracker.ts +1 -1
  282. package/src/blobManager.ts +1 -39
  283. package/src/channelCollection.ts +63 -76
  284. package/src/connectionTelemetry.ts +5 -2
  285. package/src/containerRuntime.ts +9 -32
  286. package/src/dataStoreContext.ts +38 -79
  287. package/src/deltaManagerProxies.ts +3 -5
  288. package/src/deltaScheduler.ts +4 -2
  289. package/src/gc/garbageCollection.ts +0 -2
  290. package/src/gc/gcDefinitions.ts +0 -4
  291. package/src/gc/index.ts +0 -1
  292. package/src/messageTypes.ts +1 -1
  293. package/src/opLifecycle/opDecompressor.ts +1 -1
  294. package/src/opLifecycle/opGroupingManager.ts +1 -1
  295. package/src/opLifecycle/opSplitter.ts +1 -1
  296. package/src/opLifecycle/remoteMessageProcessor.ts +4 -2
  297. package/src/opProperties.ts +4 -2
  298. package/src/packageVersion.ts +1 -1
  299. package/src/pendingStateManager.ts +16 -5
  300. package/src/scheduleManager.ts +4 -2
  301. package/src/summary/runningSummarizer.ts +5 -2
  302. package/src/summary/summarizerNode/summarizerNode.ts +5 -2
  303. package/src/summary/summarizerTypes.ts +5 -2
  304. package/src/summary/summaryCollection.ts +1 -1
  305. package/src/summary/summaryFormat.ts +2 -1
  306. package/tsconfig.json +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-runtime",
3
- "version": "2.0.0-dev-rc.5.0.0.268409",
3
+ "version": "2.0.0-dev-rc.5.0.0.270987",
4
4
  "description": "Fluid container runtime",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -127,18 +127,18 @@
127
127
  "temp-directory": "nyc/.nyc_output"
128
128
  },
129
129
  "dependencies": {
130
- "@fluid-internal/client-utils": "2.0.0-dev-rc.5.0.0.268409",
131
- "@fluidframework/container-definitions": "2.0.0-dev-rc.5.0.0.268409",
132
- "@fluidframework/container-runtime-definitions": "2.0.0-dev-rc.5.0.0.268409",
133
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.268409",
134
- "@fluidframework/core-utils": "2.0.0-dev-rc.5.0.0.268409",
135
- "@fluidframework/datastore": "2.0.0-dev-rc.5.0.0.268409",
136
- "@fluidframework/driver-definitions": "2.0.0-dev-rc.5.0.0.268409",
137
- "@fluidframework/driver-utils": "2.0.0-dev-rc.5.0.0.268409",
138
- "@fluidframework/id-compressor": "2.0.0-dev-rc.5.0.0.268409",
139
- "@fluidframework/runtime-definitions": "2.0.0-dev-rc.5.0.0.268409",
140
- "@fluidframework/runtime-utils": "2.0.0-dev-rc.5.0.0.268409",
141
- "@fluidframework/telemetry-utils": "2.0.0-dev-rc.5.0.0.268409",
130
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.5.0.0.270987",
131
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.5.0.0.270987",
132
+ "@fluidframework/container-runtime-definitions": "2.0.0-dev-rc.5.0.0.270987",
133
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.270987",
134
+ "@fluidframework/core-utils": "2.0.0-dev-rc.5.0.0.270987",
135
+ "@fluidframework/datastore": "2.0.0-dev-rc.5.0.0.270987",
136
+ "@fluidframework/driver-definitions": "2.0.0-dev-rc.5.0.0.270987",
137
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.5.0.0.270987",
138
+ "@fluidframework/id-compressor": "2.0.0-dev-rc.5.0.0.270987",
139
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.5.0.0.270987",
140
+ "@fluidframework/runtime-utils": "2.0.0-dev-rc.5.0.0.270987",
141
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.5.0.0.270987",
142
142
  "@tylerbu/sorted-btree-es6": "^1.8.0",
143
143
  "double-ended-queue": "^2.1.0-0",
144
144
  "lz4js": "^0.2.0",
@@ -147,16 +147,16 @@
147
147
  "devDependencies": {
148
148
  "@arethetypeswrong/cli": "^0.15.2",
149
149
  "@biomejs/biome": "^1.7.3",
150
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.268409",
151
- "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.5.0.0.268409",
152
- "@fluid-private/test-pairwise-generator": "2.0.0-dev-rc.5.0.0.268409",
150
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.270987",
151
+ "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.5.0.0.270987",
152
+ "@fluid-private/test-pairwise-generator": "2.0.0-dev-rc.5.0.0.270987",
153
153
  "@fluid-tools/benchmark": "^0.48.0",
154
- "@fluid-tools/build-cli": "^0.39.0-264124",
154
+ "@fluid-tools/build-cli": "^0.39.0",
155
155
  "@fluidframework/build-common": "^2.0.3",
156
- "@fluidframework/build-tools": "^0.39.0-264124",
156
+ "@fluidframework/build-tools": "^0.39.0",
157
157
  "@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-rc.4.0.0",
158
158
  "@fluidframework/eslint-config-fluid": "^5.3.0",
159
- "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.5.0.0.268409",
159
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.5.0.0.270987",
160
160
  "@microsoft/api-extractor": "^7.45.1",
161
161
  "@types/double-ended-queue": "^2.1.0",
162
162
  "@types/mocha": "^9.1.1",
@@ -254,13 +254,16 @@
254
254
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
255
255
  "build:test:esm": "tsc --project ./src/test/tsconfig.json",
256
256
  "check:are-the-types-wrong": "attw --pack . --exclude-entrypoints ./internal/test/containerRuntime ./internal/test/deltaScheduler ./internal/test/scheduleManager ./internal/test/blobManager ./internal/test/summary ./internal/test/gc",
257
+ "check:biome": "biome check . --formatter-enabled=true",
258
+ "check:format": "npm run check:prettier",
257
259
  "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
258
260
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
259
261
  "ci:build:docs": "api-extractor run",
260
262
  "clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
261
263
  "eslint": "eslint --format stylish src",
262
264
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
263
- "format": "fluid-build --task format .",
265
+ "format": "npm run format:prettier",
266
+ "format:biome": "biome check . --formatter-enabled=true --apply",
264
267
  "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
265
268
  "lint": "fluid-build . --task lint",
266
269
  "lint:fix": "fluid-build . --task eslint:fix --task format",
@@ -7,7 +7,7 @@ import type { EventEmitter } from "@fluid-internal/client-utils";
7
7
  import { performance } from "@fluid-internal/client-utils";
8
8
  import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
9
9
  import { assert } from "@fluidframework/core-utils/internal";
10
- import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
10
+ import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
11
11
  import { ITelemetryLoggerExt, createChildLogger } from "@fluidframework/telemetry-utils/internal";
12
12
 
13
13
  export class BatchTracker {
@@ -14,11 +14,11 @@ import {
14
14
  type IFluidHandleInternal,
15
15
  } from "@fluidframework/core-interfaces/internal";
16
16
  import { assert, Deferred } from "@fluidframework/core-utils/internal";
17
- import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
18
17
  import {
19
18
  IDocumentStorageService,
20
19
  ICreateBlobResponse,
21
20
  ISnapshotTree,
21
+ ISequencedDocumentMessage,
22
22
  } from "@fluidframework/driver-definitions/internal";
23
23
  import { canRetryOnError, runWithRetry } from "@fluidframework/driver-utils/internal";
24
24
  import {
@@ -166,14 +166,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
166
166
  */
167
167
  private readonly opsInFlight: Map<string, string[]> = new Map();
168
168
 
169
- /**
170
- * This stores IDs of tombstoned blobs.
171
- *
172
- * A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.
173
- * Tombstoned objects are eventually deleted by GC.
174
- */
175
- private readonly tombstonedBlobs: Set<string> = new Set();
176
-
177
169
  private readonly sendBlobAttachOp: (localId: string, storageId?: string) => void;
178
170
  private stopAttaching: boolean = false;
179
171
 
@@ -827,36 +819,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
827
819
  }
828
820
  }
829
821
 
830
- /**
831
- * This is called to update blobs whose routes are tombstones.
832
- *
833
- * A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.
834
- * Tombstoned objects are eventually deleted by GC.
835
- *
836
- * @param tombstonedRoutes - The routes of blob nodes that are tombstones.
837
- */
838
- public updateTombstonedRoutes(tombstonedRoutes: readonly string[]) {
839
- const tombstonedBlobsSet: Set<string> = new Set();
840
- // The routes or blob node paths are in the same format as returned in getGCData -
841
- // `/<BlobManager.basePath>/<blobId>`.
842
- for (const route of tombstonedRoutes) {
843
- const blobId = getBlobIdFromGCNodePath(route);
844
- tombstonedBlobsSet.add(blobId);
845
- }
846
-
847
- // Remove blobs from the tombstone list that were tombstoned but aren't anymore as per the tombstoneRoutes.
848
- for (const blobId of this.tombstonedBlobs) {
849
- if (!tombstonedBlobsSet.has(blobId)) {
850
- this.tombstonedBlobs.delete(blobId);
851
- }
852
- }
853
-
854
- // Mark blobs that are now tombstoned by adding them to the tombstone list.
855
- for (const blobId of tombstonedBlobsSet) {
856
- this.tombstonedBlobs.add(blobId);
857
- }
858
- }
859
-
860
822
  /**
861
823
  * Verifies that the blob with given id is not deleted, i.e., it has not been garbage collected. If the blob is GC'd,
862
824
  * log an error and throw if necessary.
@@ -14,9 +14,11 @@ import {
14
14
  import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
15
15
  import { assert, Lazy, LazyPromise } from "@fluidframework/core-utils/internal";
16
16
  import { FluidObjectHandle } from "@fluidframework/datastore/internal";
17
- import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
18
17
  import type { ISnapshot } from "@fluidframework/driver-definitions/internal";
19
- import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
18
+ import {
19
+ ISnapshotTree,
20
+ ISequencedDocumentMessage,
21
+ } from "@fluidframework/driver-definitions/internal";
20
22
  import {
21
23
  buildSnapshotTree,
22
24
  getSnapshotTree,
@@ -41,11 +43,13 @@ import {
41
43
  NamedFluidDataStoreRegistryEntries,
42
44
  channelsTreeName,
43
45
  IInboundSignalMessage,
46
+ gcDataBlobKey,
44
47
  } from "@fluidframework/runtime-definitions/internal";
45
48
  import {
46
49
  GCDataBuilder,
47
50
  RequestParser,
48
51
  SummaryTreeBuilder,
52
+ addBlobToSummary,
49
53
  convertSnapshotTreeToSummaryTree,
50
54
  convertSummaryTreeToITree,
51
55
  create404Response,
@@ -88,12 +92,7 @@ import {
88
92
  } from "./dataStoreContext.js";
89
93
  import { DataStoreContexts } from "./dataStoreContexts.js";
90
94
  import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
91
- import {
92
- GCNodeType,
93
- detectOutboundRoutesViaDDSKey,
94
- IGCNodeUpdatedProps,
95
- urlToGCNodePath,
96
- } from "./gc/index.js";
95
+ import { GCNodeType, IGCNodeUpdatedProps, urlToGCNodePath } from "./gc/index.js";
97
96
  import { ContainerMessageType, LocalContainerRuntimeMessage } from "./messageTypes.js";
98
97
  import { StorageServiceWithAttachBlobs } from "./storageServiceWithAttachBlobs.js";
99
98
  import {
@@ -188,8 +187,8 @@ export function wrapContext(context: IFluidParentContext): IFluidParentContext {
188
187
  uploadBlob: async (...args) => {
189
188
  return context.uploadBlob(...args);
190
189
  },
191
- addedGCOutboundReference: (...args) => {
192
- return context.addedGCOutboundReference?.(...args);
190
+ addedGCOutboundRoute: (...args) => {
191
+ return context.addedGCOutboundRoute(...args);
193
192
  },
194
193
  getCreateChildSummarizerNodeFn: (...args) => {
195
194
  return context.getCreateChildSummarizerNodeFn?.(...args);
@@ -244,6 +243,13 @@ export function wrapContextForInnerChannel(
244
243
  return context;
245
244
  }
246
245
 
246
+ /**
247
+ * Returns the type of the given local data store from its package path.
248
+ */
249
+ export function getLocalDataStoreType(localDataStore: LocalFluidDataStoreContext) {
250
+ return localDataStore.packagePath[localDataStore.packagePath.length - 1];
251
+ }
252
+
247
253
  /**
248
254
  * This class encapsulates data store handling. Currently it is only used by the container runtime,
249
255
  * but eventually could be hosted on any channel once we formalize the channel api boundary.
@@ -268,12 +274,6 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
268
274
  readonly referencedDataStoreCount: number;
269
275
  };
270
276
 
271
- // Stores the ids of new data stores between two GC runs. This is used to notify the garbage collector of new
272
- // root data stores that are added.
273
- private dataStoresSinceLastGC: string[] = [];
274
- // The handle to the container runtime. This is used mainly for GC purposes to represent outbound reference from
275
- // the container runtime to other nodes.
276
- private readonly containerRuntimeHandle: IFluidHandleInternal;
277
277
  private readonly pendingAliasMap: Map<string, Promise<AliasResult>> = new Map<
278
278
  string,
279
279
  Promise<AliasResult>
@@ -293,11 +293,6 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
293
293
  ) {
294
294
  this.mc = createChildMonitoringContext({ logger: baseLogger });
295
295
  this.contexts = new DataStoreContexts(baseLogger);
296
- this.containerRuntimeHandle = new FluidObjectHandle(
297
- this.parentContext,
298
- "/",
299
- this.parentContext.IFluidHandleContext,
300
- );
301
296
  this.entryPoint = new FluidObjectHandle<FluidObject>(
302
297
  new LazyPromise(async () => provideEntryPoint(this)),
303
298
  "",
@@ -401,16 +396,11 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
401
396
  private processAttachMessage(message: ISequencedDocumentMessage, local: boolean) {
402
397
  const attachMessage = message.contents as InboundAttachMessage;
403
398
 
404
- this.dataStoresSinceLastGC.push(attachMessage.id);
405
-
406
399
  // We need to process the GC Data for both local and remote attach messages
407
400
  const foundGCData = processAttachMessageGCData(attachMessage.snapshot, (nodeId, toPath) => {
408
401
  // nodeId is the relative path under the node being attached. Always starts with "/", but no trailing "/" after an id
409
402
  const fromPath = `/${attachMessage.id}${nodeId === "/" ? "" : nodeId}`;
410
- this.parentContext.addedGCOutboundReference?.(
411
- { absolutePath: fromPath },
412
- { absolutePath: toPath },
413
- );
403
+ this.parentContext.addedGCOutboundRoute(fromPath, toPath);
414
404
  });
415
405
 
416
406
  // Only log once per container to avoid noise/cost.
@@ -531,12 +521,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
531
521
  return false;
532
522
  }
533
523
 
534
- const handle = new FluidObjectHandle(
535
- context,
536
- internalId,
537
- this.parentContext.IFluidHandleContext,
538
- );
539
- this.parentContext.addedGCOutboundReference?.(this.containerRuntimeHandle, handle);
524
+ this.parentContext.addedGCOutboundRoute("/", `/${internalId}`);
540
525
 
541
526
  this.aliasMap.set(alias, context.id);
542
527
  this.aliasedDataStores.add(context.id);
@@ -549,9 +534,13 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
549
534
  }
550
535
 
551
536
  /** Package up the context's attach summary etc into an IAttachMessage */
552
- private generateAttachMessage(localContext: IFluidDataStoreContextInternal): IAttachMessage {
553
- const { attachSummary } = localContext.getAttachData(/* includeGCData: */ true);
554
- const type = localContext.packagePath[localContext.packagePath.length - 1];
537
+ private generateAttachMessage(localContext: LocalFluidDataStoreContext): IAttachMessage {
538
+ // Get the attach summary.
539
+ const attachSummary = localContext.getAttachSummary();
540
+
541
+ // Get the GC data and add it to the attach summary.
542
+ const attachGCData = localContext.getAttachGCData();
543
+ addBlobToSummary(attachSummary, gcDataBlobKey, JSON.stringify(attachGCData));
555
544
 
556
545
  // Attach message needs the summary in ITree format. Convert the ISummaryTree into an ITree.
557
546
  const snapshot = convertSummaryTreeToITree(attachSummary.summary);
@@ -559,7 +548,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
559
548
  return {
560
549
  id: localContext.id,
561
550
  snapshot,
562
- type,
551
+ type: getLocalDataStoreType(localContext),
563
552
  } satisfies IAttachMessage;
564
553
  }
565
554
 
@@ -816,7 +805,6 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
816
805
  message: ISequencedDocumentMessage,
817
806
  local: boolean,
818
807
  localMessageMetadata: unknown,
819
- addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void,
820
808
  ) {
821
809
  switch (message.type) {
822
810
  case ContainerMessageType.Attach:
@@ -836,19 +824,13 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
836
824
 
837
825
  this.processChannelOp(envelope.address, transformed, local, localMessageMetadata);
838
826
 
839
- // By default, we use the new behavior of detecting outbound routes here.
840
- // If this setting is true, then DataStoreContext would be notifying GC instead.
841
- if (
842
- this.mc.config.getBoolean(detectOutboundRoutesViaDDSKey) !== true &&
843
- addedOutboundReference !== undefined
844
- ) {
845
- // Notify GC of any outbound references that were added by this op.
846
- detectOutboundReferences(
847
- envelope.address,
848
- transformed.contents,
849
- addedOutboundReference,
850
- );
851
- }
827
+ // Notify GC of any outbound references that were added by this op.
828
+ detectOutboundReferences(
829
+ envelope.address,
830
+ transformed.contents,
831
+ (fromPath: string, toPath: string) =>
832
+ this.parentContext.addedGCOutboundRoute(fromPath, toPath),
833
+ );
852
834
  break;
853
835
  }
854
836
  default:
@@ -989,9 +971,9 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
989
971
  : dataStoreNodePath;
990
972
 
991
973
  // Log the package details asynchronously since getInitialSnapshotDetails is async
992
- const recentelyDeletedContext = this.contexts.getRecentlyDeletedContext(id);
993
- if (recentelyDeletedContext !== undefined) {
994
- recentelyDeletedContext
974
+ const recentlyDeletedContext = this.contexts.getRecentlyDeletedContext(id);
975
+ if (recentlyDeletedContext !== undefined) {
976
+ recentlyDeletedContext
995
977
  .getInitialSnapshotDetails()
996
978
  .then((details) => {
997
979
  return details.pkg.join("/");
@@ -1157,10 +1139,7 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
1157
1139
  .map(([key, value]) => {
1158
1140
  let dataStoreSummary: ISummarizeResult;
1159
1141
  if (value.isLoaded) {
1160
- dataStoreSummary = value.getAttachData(
1161
- /* includeGCCData: */ false,
1162
- telemetryContext,
1163
- ).attachSummary;
1142
+ dataStoreSummary = value.getAttachSummary(telemetryContext);
1164
1143
  } else {
1165
1144
  // If this data store is not yet loaded, then there should be no changes in the snapshot from
1166
1145
  // which it was created as it is detached container. So just use the previous snapshot.
@@ -1180,25 +1159,33 @@ export class ChannelCollection implements IFluidDataStoreChannel, IDisposable {
1180
1159
  }
1181
1160
 
1182
1161
  /**
1183
- * Before GC runs, called by the garbage collector to update any pending GC state.
1184
- * The garbage collector needs to know all outbound references that are added. Since root data stores are not
1185
- * explicitly marked as referenced, notify GC of new root data stores that were added since the last GC run.
1162
+ * Gets the GC data. Used when attaching or serializing a detached container.
1186
1163
  */
1187
- public async updateStateBeforeGC(): Promise<void> {
1188
- for (const id of this.dataStoresSinceLastGC) {
1189
- const context = this.contexts.get(id);
1190
- assert(context !== undefined, 0x2b6 /* Missing data store context */);
1191
- if (await context.isRoot()) {
1192
- // A root data store is basically a reference from the container runtime to the data store.
1193
- const handle = new FluidObjectHandle(
1194
- context,
1195
- id,
1196
- this.parentContext.IFluidHandleContext,
1197
- );
1198
- this.parentContext.addedGCOutboundReference?.(this.containerRuntimeHandle, handle);
1199
- }
1200
- }
1201
- this.dataStoresSinceLastGC = [];
1164
+ public getAttachGCData(telemetryContext?: ITelemetryContext): IGarbageCollectionData {
1165
+ const builder = new GCDataBuilder();
1166
+ // Attaching graph of some stores can cause other stores to get bound too.
1167
+ // So keep taking summary until no new stores get bound.
1168
+ let notBoundContextsLength: number;
1169
+ do {
1170
+ notBoundContextsLength = this.contexts.notBoundLength();
1171
+ // Iterate over each data store and ask for its GC data.
1172
+ Array.from(this.contexts)
1173
+ .filter(
1174
+ ([key, _]) =>
1175
+ // Take GC data of bounded data stores only.
1176
+ !this.contexts.isNotBound(key),
1177
+ )
1178
+ .map(([key, value]) => {
1179
+ const contextGCData = value.getAttachGCData(telemetryContext);
1180
+ // Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.
1181
+ // This also gradually builds the id of each node to be a path from the root.
1182
+ builder.prefixAndAddNodes(key, contextGCData.gcNodes);
1183
+ });
1184
+ } while (notBoundContextsLength !== this.contexts.notBoundLength());
1185
+
1186
+ // Get the outbound routes (aliased data stores) and add a GC node for this channel.
1187
+ builder.addNode("/", Array.from(this.aliasedDataStores));
1188
+ return builder.getGCData();
1202
1189
  }
1203
1190
 
1204
1191
  /**
@@ -8,8 +8,11 @@ import { IDeltaManager } from "@fluidframework/container-definitions/internal";
8
8
  import { IContainerRuntimeEvents } from "@fluidframework/container-runtime-definitions/internal";
9
9
  import { IEventProvider } from "@fluidframework/core-interfaces";
10
10
  import { assert } from "@fluidframework/core-utils/internal";
11
- import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
12
- import { IDocumentMessage, MessageType } from "@fluidframework/driver-definitions/internal";
11
+ import {
12
+ IDocumentMessage,
13
+ MessageType,
14
+ ISequencedDocumentMessage,
15
+ } from "@fluidframework/driver-definitions/internal";
13
16
  import { isRuntimeMessage } from "@fluidframework/driver-utils/internal";
14
17
  import {
15
18
  IEventSampler,
@@ -47,8 +47,6 @@ import {
47
47
  import {
48
48
  IClientDetails,
49
49
  IQuorumClients,
50
- ISequencedDocumentMessage,
51
- ISignalMessage,
52
50
  ISummaryTree,
53
51
  SummaryType,
54
52
  } from "@fluidframework/driver-definitions";
@@ -61,6 +59,8 @@ import {
61
59
  ISnapshotTree,
62
60
  ISummaryContent,
63
61
  MessageType,
62
+ ISequencedDocumentMessage,
63
+ ISignalMessage,
64
64
  } from "@fluidframework/driver-definitions/internal";
65
65
  import { readAndParse } from "@fluidframework/driver-utils/internal";
66
66
  import type { IIdCompressor } from "@fluidframework/id-compressor";
@@ -2685,12 +2685,7 @@ export class ContainerRuntime
2685
2685
  case ContainerMessageType.Attach:
2686
2686
  case ContainerMessageType.Alias:
2687
2687
  case ContainerMessageType.FluidDataStoreOp:
2688
- this.channelCollection.process(
2689
- messageWithContext.message,
2690
- local,
2691
- localOpMetadata,
2692
- (from, to) => this.garbageCollector.addedOutboundReference(from, to),
2693
- );
2688
+ this.channelCollection.process(messageWithContext.message, local, localOpMetadata);
2694
2689
  break;
2695
2690
  case ContainerMessageType.BlobAttach:
2696
2691
  this.blobManager.processBlobAttachOp(messageWithContext.message, local);
@@ -3252,16 +3247,6 @@ export class ContainerRuntime
3252
3247
  }
3253
3248
  }
3254
3249
 
3255
- /**
3256
- * Before GC runs, called by the garbage collector to update any pending GC state. This is mainly used to notify
3257
- * the garbage collector of references detected since the last GC run. Most references are notified immediately
3258
- * but there can be some for which async operation is required (such as detecting new root data stores).
3259
- * @see IGarbageCollectionRuntime.updateStateBeforeGC
3260
- */
3261
- public async updateStateBeforeGC() {
3262
- return this.channelCollection.updateStateBeforeGC();
3263
- }
3264
-
3265
3250
  private async getGCDataInternal(fullGC?: boolean): Promise<IGarbageCollectionData> {
3266
3251
  return this.channelCollection.getGCData(fullGC);
3267
3252
  }
@@ -3318,9 +3303,7 @@ export class ContainerRuntime
3318
3303
  * @param tombstonedRoutes - Data store and attachment blob routes that are tombstones in this Container.
3319
3304
  */
3320
3305
  public updateTombstonedRoutes(tombstonedRoutes: readonly string[]) {
3321
- const { blobManagerRoutes, dataStoreRoutes } =
3322
- this.getDataStoreAndBlobManagerRoutes(tombstonedRoutes);
3323
- this.blobManager.updateTombstonedRoutes(blobManagerRoutes);
3306
+ const { dataStoreRoutes } = this.getDataStoreAndBlobManagerRoutes(tombstonedRoutes);
3324
3307
  this.channelCollection.updateTombstonedRoutes(dataStoreRoutes);
3325
3308
  }
3326
3309
 
@@ -3415,19 +3398,13 @@ export class ContainerRuntime
3415
3398
  }
3416
3399
 
3417
3400
  /**
3418
- * Called when a new outbound reference is added to another node. This is used by garbage collection to identify
3401
+ * Called when a new outbound route is added to another node. This is used by garbage collection to identify
3419
3402
  * all references added in the system.
3420
- * @param srcHandle - The handle of the node that added the reference.
3421
- * @param outboundHandle - The handle of the outbound node that is referenced.
3403
+ * @param fromPath - The absolute path of the node that added the reference.
3404
+ * @param toPath - The absolute path of the outbound node that is referenced.
3422
3405
  */
3423
- public addedGCOutboundReference(
3424
- srcHandle: { absolutePath: string },
3425
- outboundHandle: { absolutePath: string },
3426
- ) {
3427
- this.garbageCollector.addedOutboundReference(
3428
- srcHandle.absolutePath,
3429
- outboundHandle.absolutePath,
3430
- );
3406
+ public addedGCOutboundRoute(fromPath: string, toPath: string) {
3407
+ this.garbageCollector.addedOutboundReference(fromPath, toPath);
3431
3408
  }
3432
3409
 
3433
3410
  /**