@fluidframework/container-runtime 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (554) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-report/container-runtime.api.md +471 -52
  3. package/dist/batchTracker.d.ts +1 -1
  4. package/dist/batchTracker.d.ts.map +1 -1
  5. package/dist/batchTracker.js +4 -4
  6. package/dist/batchTracker.js.map +1 -1
  7. package/dist/blobManager.d.ts +33 -30
  8. package/dist/blobManager.d.ts.map +1 -1
  9. package/dist/blobManager.js +82 -107
  10. package/dist/blobManager.js.map +1 -1
  11. package/dist/channelCollection.d.ts +27 -22
  12. package/dist/channelCollection.d.ts.map +1 -1
  13. package/dist/channelCollection.js +189 -165
  14. package/dist/channelCollection.js.map +1 -1
  15. package/dist/connectionTelemetry.d.ts +3 -3
  16. package/dist/connectionTelemetry.d.ts.map +1 -1
  17. package/dist/connectionTelemetry.js +17 -17
  18. package/dist/connectionTelemetry.js.map +1 -1
  19. package/dist/containerHandleContext.d.ts.map +1 -1
  20. package/dist/containerHandleContext.js +2 -2
  21. package/dist/containerHandleContext.js.map +1 -1
  22. package/dist/containerRuntime.d.ts +42 -39
  23. package/dist/containerRuntime.d.ts.map +1 -1
  24. package/dist/containerRuntime.js +425 -292
  25. package/dist/containerRuntime.js.map +1 -1
  26. package/dist/dataStore.d.ts +1 -1
  27. package/dist/dataStore.d.ts.map +1 -1
  28. package/dist/dataStore.js +8 -8
  29. package/dist/dataStore.js.map +1 -1
  30. package/dist/dataStoreContext.d.ts +58 -19
  31. package/dist/dataStoreContext.d.ts.map +1 -1
  32. package/dist/dataStoreContext.js +171 -114
  33. package/dist/dataStoreContext.js.map +1 -1
  34. package/dist/dataStoreContexts.d.ts +1 -0
  35. package/dist/dataStoreContexts.d.ts.map +1 -1
  36. package/dist/dataStoreContexts.js +12 -11
  37. package/dist/dataStoreContexts.js.map +1 -1
  38. package/dist/dataStoreRegistry.d.ts +5 -1
  39. package/dist/dataStoreRegistry.d.ts.map +1 -1
  40. package/dist/dataStoreRegistry.js +4 -4
  41. package/dist/dataStoreRegistry.js.map +1 -1
  42. package/dist/deltaManagerSummarizerProxy.d.ts +1 -1
  43. package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -1
  44. package/dist/deltaManagerSummarizerProxy.js.map +1 -1
  45. package/dist/deltaScheduler.d.ts +1 -1
  46. package/dist/deltaScheduler.d.ts.map +1 -1
  47. package/dist/deltaScheduler.js +6 -6
  48. package/dist/deltaScheduler.js.map +1 -1
  49. package/dist/error.d.ts +1 -1
  50. package/dist/error.d.ts.map +1 -1
  51. package/dist/error.js +4 -4
  52. package/dist/error.js.map +1 -1
  53. package/dist/gc/garbageCollection.d.ts +3 -2
  54. package/dist/gc/garbageCollection.d.ts.map +1 -1
  55. package/dist/gc/garbageCollection.js +23 -23
  56. package/dist/gc/garbageCollection.js.map +1 -1
  57. package/dist/gc/gcConfigs.d.ts +2 -2
  58. package/dist/gc/gcConfigs.d.ts.map +1 -1
  59. package/dist/gc/gcConfigs.js +4 -5
  60. package/dist/gc/gcConfigs.js.map +1 -1
  61. package/dist/gc/gcDefinitions.d.ts +4 -5
  62. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  63. package/dist/gc/gcDefinitions.js.map +1 -1
  64. package/dist/gc/gcHelpers.d.ts +5 -1
  65. package/dist/gc/gcHelpers.d.ts.map +1 -1
  66. package/dist/gc/gcHelpers.js +21 -12
  67. package/dist/gc/gcHelpers.js.map +1 -1
  68. package/dist/gc/gcSummaryStateTracker.d.ts +2 -2
  69. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  70. package/dist/gc/gcSummaryStateTracker.js +11 -11
  71. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  72. package/dist/gc/gcTelemetry.d.ts +2 -1
  73. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  74. package/dist/gc/gcTelemetry.js +11 -9
  75. package/dist/gc/gcTelemetry.js.map +1 -1
  76. package/dist/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  77. package/dist/gc/gcUnreferencedStateTracker.js +6 -6
  78. package/dist/gc/gcUnreferencedStateTracker.js.map +1 -1
  79. package/dist/gc/index.d.ts +1 -1
  80. package/dist/gc/index.d.ts.map +1 -1
  81. package/dist/gc/index.js +2 -1
  82. package/dist/gc/index.js.map +1 -1
  83. package/dist/index.d.ts +5 -2
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js +12 -2
  86. package/dist/index.js.map +1 -1
  87. package/dist/legacy.d.ts +91 -0
  88. package/dist/messageTypes.d.ts +11 -5
  89. package/dist/messageTypes.d.ts.map +1 -1
  90. package/dist/messageTypes.js +4 -0
  91. package/dist/messageTypes.js.map +1 -1
  92. package/dist/opLifecycle/batchManager.d.ts.map +1 -1
  93. package/dist/opLifecycle/batchManager.js.map +1 -1
  94. package/dist/opLifecycle/definitions.d.ts +2 -20
  95. package/dist/opLifecycle/definitions.d.ts.map +1 -1
  96. package/dist/opLifecycle/definitions.js.map +1 -1
  97. package/dist/opLifecycle/index.d.ts +3 -3
  98. package/dist/opLifecycle/index.d.ts.map +1 -1
  99. package/dist/opLifecycle/index.js +3 -1
  100. package/dist/opLifecycle/index.js.map +1 -1
  101. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  102. package/dist/opLifecycle/opCompressor.js +5 -6
  103. package/dist/opLifecycle/opCompressor.js.map +1 -1
  104. package/dist/opLifecycle/opDecompressor.d.ts +15 -4
  105. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  106. package/dist/opLifecycle/opDecompressor.js +62 -63
  107. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  108. package/dist/opLifecycle/opGroupingManager.d.ts +2 -1
  109. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  110. package/dist/opLifecycle/opGroupingManager.js +14 -16
  111. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  112. package/dist/opLifecycle/opSplitter.d.ts +12 -4
  113. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  114. package/dist/opLifecycle/opSplitter.js +63 -53
  115. package/dist/opLifecycle/opSplitter.js.map +1 -1
  116. package/dist/opLifecycle/outbox.d.ts +2 -1
  117. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  118. package/dist/opLifecycle/outbox.js +30 -29
  119. package/dist/opLifecycle/outbox.js.map +1 -1
  120. package/dist/opLifecycle/remoteMessageProcessor.d.ts +8 -0
  121. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  122. package/dist/opLifecycle/remoteMessageProcessor.js +36 -32
  123. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  124. package/dist/packageVersion.d.ts +1 -1
  125. package/dist/packageVersion.js +1 -1
  126. package/dist/packageVersion.js.map +1 -1
  127. package/dist/pendingStateManager.d.ts +1 -1
  128. package/dist/pendingStateManager.d.ts.map +1 -1
  129. package/dist/pendingStateManager.js +18 -18
  130. package/dist/pendingStateManager.js.map +1 -1
  131. package/dist/public.d.ts +12 -0
  132. package/dist/scheduleManager.d.ts +1 -1
  133. package/dist/scheduleManager.d.ts.map +1 -1
  134. package/dist/scheduleManager.js +28 -24
  135. package/dist/scheduleManager.js.map +1 -1
  136. package/dist/storageServiceWithAttachBlobs.d.ts +2 -2
  137. package/dist/storageServiceWithAttachBlobs.d.ts.map +1 -1
  138. package/dist/storageServiceWithAttachBlobs.js +2 -2
  139. package/dist/storageServiceWithAttachBlobs.js.map +1 -1
  140. package/dist/summary/documentSchema.d.ts +209 -0
  141. package/dist/summary/documentSchema.d.ts.map +1 -0
  142. package/dist/summary/documentSchema.js +390 -0
  143. package/dist/summary/documentSchema.js.map +1 -0
  144. package/dist/summary/index.d.ts +2 -1
  145. package/dist/summary/index.d.ts.map +1 -1
  146. package/dist/summary/index.js +4 -1
  147. package/dist/summary/index.js.map +1 -1
  148. package/dist/summary/orderedClientElection.d.ts +2 -2
  149. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  150. package/dist/summary/orderedClientElection.js +12 -7
  151. package/dist/summary/orderedClientElection.js.map +1 -1
  152. package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -1
  153. package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  154. package/dist/summary/runWhileConnectedCoordinator.js +3 -3
  155. package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
  156. package/dist/summary/runningSummarizer.d.ts +3 -3
  157. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  158. package/dist/summary/runningSummarizer.js +16 -16
  159. package/dist/summary/runningSummarizer.js.map +1 -1
  160. package/dist/summary/summarizer.d.ts +3 -2
  161. package/dist/summary/summarizer.d.ts.map +1 -1
  162. package/dist/summary/summarizer.js +13 -13
  163. package/dist/summary/summarizer.js.map +1 -1
  164. package/dist/summary/summarizerClientElection.d.ts +2 -2
  165. package/dist/summary/summarizerClientElection.d.ts.map +1 -1
  166. package/dist/summary/summarizerClientElection.js.map +1 -1
  167. package/dist/summary/summarizerHeuristics.d.ts +1 -1
  168. package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
  169. package/dist/summary/summarizerHeuristics.js +2 -2
  170. package/dist/summary/summarizerHeuristics.js.map +1 -1
  171. package/dist/summary/summarizerNode/summarizerNode.d.ts +3 -2
  172. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  173. package/dist/summary/summarizerNode/summarizerNode.js +28 -28
  174. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  175. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
  176. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  177. package/dist/summary/summarizerNode/summarizerNodeUtils.js +3 -3
  178. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  179. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -1
  180. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  181. package/dist/summary/summarizerNode/summarizerNodeWithGc.js +14 -14
  182. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  183. package/dist/summary/summarizerTypes.d.ts +5 -3
  184. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  185. package/dist/summary/summarizerTypes.js.map +1 -1
  186. package/dist/summary/summaryCollection.d.ts +2 -2
  187. package/dist/summary/summaryCollection.d.ts.map +1 -1
  188. package/dist/summary/summaryCollection.js +7 -7
  189. package/dist/summary/summaryCollection.js.map +1 -1
  190. package/dist/summary/summaryFormat.d.ts +6 -17
  191. package/dist/summary/summaryFormat.d.ts.map +1 -1
  192. package/dist/summary/summaryFormat.js +8 -8
  193. package/dist/summary/summaryFormat.js.map +1 -1
  194. package/dist/summary/summaryGenerator.d.ts +4 -3
  195. package/dist/summary/summaryGenerator.d.ts.map +1 -1
  196. package/dist/summary/summaryGenerator.js +17 -17
  197. package/dist/summary/summaryGenerator.js.map +1 -1
  198. package/dist/summary/summaryManager.d.ts +1 -1
  199. package/dist/summary/summaryManager.d.ts.map +1 -1
  200. package/dist/summary/summaryManager.js +15 -14
  201. package/dist/summary/summaryManager.js.map +1 -1
  202. package/internal.d.ts +11 -0
  203. package/legacy.d.ts +11 -0
  204. package/lib/batchTracker.d.ts +1 -1
  205. package/lib/batchTracker.d.ts.map +1 -1
  206. package/lib/batchTracker.js +2 -2
  207. package/lib/batchTracker.js.map +1 -1
  208. package/lib/blobManager.d.ts +33 -30
  209. package/lib/blobManager.d.ts.map +1 -1
  210. package/lib/blobManager.js +48 -73
  211. package/lib/blobManager.js.map +1 -1
  212. package/lib/channelCollection.d.ts +27 -22
  213. package/lib/channelCollection.d.ts.map +1 -1
  214. package/lib/channelCollection.js +132 -108
  215. package/lib/channelCollection.js.map +1 -1
  216. package/lib/connectionTelemetry.d.ts +3 -3
  217. package/lib/connectionTelemetry.d.ts.map +1 -1
  218. package/lib/connectionTelemetry.js +3 -3
  219. package/lib/connectionTelemetry.js.map +1 -1
  220. package/lib/containerHandleContext.d.ts.map +1 -1
  221. package/lib/containerHandleContext.js +1 -1
  222. package/lib/containerHandleContext.js.map +1 -1
  223. package/lib/containerRuntime.d.ts +42 -39
  224. package/lib/containerRuntime.d.ts.map +1 -1
  225. package/lib/containerRuntime.js +276 -141
  226. package/lib/containerRuntime.js.map +1 -1
  227. package/lib/dataStore.d.ts +1 -1
  228. package/lib/dataStore.d.ts.map +1 -1
  229. package/lib/dataStore.js +3 -3
  230. package/lib/dataStore.js.map +1 -1
  231. package/lib/dataStoreContext.d.ts +58 -19
  232. package/lib/dataStoreContext.d.ts.map +1 -1
  233. package/lib/dataStoreContext.js +110 -53
  234. package/lib/dataStoreContext.js.map +1 -1
  235. package/lib/dataStoreContexts.d.ts +1 -0
  236. package/lib/dataStoreContexts.d.ts.map +1 -1
  237. package/lib/dataStoreContexts.js +3 -2
  238. package/lib/dataStoreContexts.js.map +1 -1
  239. package/lib/dataStoreRegistry.d.ts +5 -1
  240. package/lib/dataStoreRegistry.d.ts.map +1 -1
  241. package/lib/dataStoreRegistry.js +1 -1
  242. package/lib/dataStoreRegistry.js.map +1 -1
  243. package/lib/deltaManagerSummarizerProxy.d.ts +1 -1
  244. package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -1
  245. package/lib/deltaManagerSummarizerProxy.js.map +1 -1
  246. package/lib/deltaScheduler.d.ts +1 -1
  247. package/lib/deltaScheduler.d.ts.map +1 -1
  248. package/lib/deltaScheduler.js +1 -1
  249. package/lib/deltaScheduler.js.map +1 -1
  250. package/lib/error.d.ts +1 -1
  251. package/lib/error.d.ts.map +1 -1
  252. package/lib/error.js +2 -2
  253. package/lib/error.js.map +1 -1
  254. package/lib/gc/garbageCollection.d.ts +3 -2
  255. package/lib/gc/garbageCollection.d.ts.map +1 -1
  256. package/lib/gc/garbageCollection.js +8 -8
  257. package/lib/gc/garbageCollection.js.map +1 -1
  258. package/lib/gc/gcConfigs.d.ts +2 -2
  259. package/lib/gc/gcConfigs.d.ts.map +1 -1
  260. package/lib/gc/gcConfigs.js +4 -5
  261. package/lib/gc/gcConfigs.js.map +1 -1
  262. package/lib/gc/gcDefinitions.d.ts +4 -5
  263. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  264. package/lib/gc/gcDefinitions.js.map +1 -1
  265. package/lib/gc/gcHelpers.d.ts +5 -1
  266. package/lib/gc/gcHelpers.d.ts.map +1 -1
  267. package/lib/gc/gcHelpers.js +10 -2
  268. package/lib/gc/gcHelpers.js.map +1 -1
  269. package/lib/gc/gcSummaryStateTracker.d.ts +2 -2
  270. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  271. package/lib/gc/gcSummaryStateTracker.js +2 -2
  272. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  273. package/lib/gc/gcTelemetry.d.ts +2 -1
  274. package/lib/gc/gcTelemetry.d.ts.map +1 -1
  275. package/lib/gc/gcTelemetry.js +4 -2
  276. package/lib/gc/gcTelemetry.js.map +1 -1
  277. package/lib/gc/gcUnreferencedStateTracker.d.ts.map +1 -1
  278. package/lib/gc/gcUnreferencedStateTracker.js +2 -2
  279. package/lib/gc/gcUnreferencedStateTracker.js.map +1 -1
  280. package/lib/gc/index.d.ts +1 -1
  281. package/lib/gc/index.d.ts.map +1 -1
  282. package/lib/gc/index.js +1 -1
  283. package/lib/gc/index.js.map +1 -1
  284. package/lib/index.d.ts +5 -2
  285. package/lib/index.d.ts.map +1 -1
  286. package/lib/index.js +5 -2
  287. package/lib/index.js.map +1 -1
  288. package/lib/legacy.d.ts +91 -0
  289. package/lib/messageTypes.d.ts +11 -5
  290. package/lib/messageTypes.d.ts.map +1 -1
  291. package/lib/messageTypes.js +4 -0
  292. package/lib/messageTypes.js.map +1 -1
  293. package/lib/opLifecycle/batchManager.d.ts.map +1 -1
  294. package/lib/opLifecycle/batchManager.js.map +1 -1
  295. package/lib/opLifecycle/definitions.d.ts +2 -20
  296. package/lib/opLifecycle/definitions.d.ts.map +1 -1
  297. package/lib/opLifecycle/definitions.js.map +1 -1
  298. package/lib/opLifecycle/index.d.ts +3 -3
  299. package/lib/opLifecycle/index.d.ts.map +1 -1
  300. package/lib/opLifecycle/index.js +2 -2
  301. package/lib/opLifecycle/index.js.map +1 -1
  302. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  303. package/lib/opLifecycle/opCompressor.js +2 -3
  304. package/lib/opLifecycle/opCompressor.js.map +1 -1
  305. package/lib/opLifecycle/opDecompressor.d.ts +15 -4
  306. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  307. package/lib/opLifecycle/opDecompressor.js +61 -62
  308. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  309. package/lib/opLifecycle/opGroupingManager.d.ts +2 -1
  310. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  311. package/lib/opLifecycle/opGroupingManager.js +9 -12
  312. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  313. package/lib/opLifecycle/opSplitter.d.ts +12 -4
  314. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  315. package/lib/opLifecycle/opSplitter.js +47 -38
  316. package/lib/opLifecycle/opSplitter.js.map +1 -1
  317. package/lib/opLifecycle/outbox.d.ts +2 -1
  318. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  319. package/lib/opLifecycle/outbox.js +19 -18
  320. package/lib/opLifecycle/outbox.js.map +1 -1
  321. package/lib/opLifecycle/remoteMessageProcessor.d.ts +8 -0
  322. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  323. package/lib/opLifecycle/remoteMessageProcessor.js +36 -32
  324. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  325. package/lib/packageVersion.d.ts +1 -1
  326. package/lib/packageVersion.js +1 -1
  327. package/lib/packageVersion.js.map +1 -1
  328. package/lib/pendingStateManager.d.ts +1 -1
  329. package/lib/pendingStateManager.d.ts.map +1 -1
  330. package/lib/pendingStateManager.js +2 -2
  331. package/lib/pendingStateManager.js.map +1 -1
  332. package/lib/public.d.ts +12 -0
  333. package/lib/scheduleManager.d.ts +1 -1
  334. package/lib/scheduleManager.d.ts.map +1 -1
  335. package/lib/scheduleManager.js +7 -3
  336. package/lib/scheduleManager.js.map +1 -1
  337. package/lib/storageServiceWithAttachBlobs.d.ts +2 -2
  338. package/lib/storageServiceWithAttachBlobs.d.ts.map +1 -1
  339. package/lib/storageServiceWithAttachBlobs.js +1 -1
  340. package/lib/storageServiceWithAttachBlobs.js.map +1 -1
  341. package/lib/summary/documentSchema.d.ts +209 -0
  342. package/lib/summary/documentSchema.d.ts.map +1 -0
  343. package/lib/summary/documentSchema.js +386 -0
  344. package/lib/summary/documentSchema.js.map +1 -0
  345. package/lib/summary/index.d.ts +2 -1
  346. package/lib/summary/index.d.ts.map +1 -1
  347. package/lib/summary/index.js +1 -0
  348. package/lib/summary/index.js.map +1 -1
  349. package/lib/summary/orderedClientElection.d.ts +2 -2
  350. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  351. package/lib/summary/orderedClientElection.js +7 -2
  352. package/lib/summary/orderedClientElection.js.map +1 -1
  353. package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -1
  354. package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
  355. package/lib/summary/runWhileConnectedCoordinator.js +1 -1
  356. package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
  357. package/lib/summary/runningSummarizer.d.ts +3 -3
  358. package/lib/summary/runningSummarizer.d.ts.map +1 -1
  359. package/lib/summary/runningSummarizer.js +3 -3
  360. package/lib/summary/runningSummarizer.js.map +1 -1
  361. package/lib/summary/summarizer.d.ts +3 -2
  362. package/lib/summary/summarizer.d.ts.map +1 -1
  363. package/lib/summary/summarizer.js +3 -3
  364. package/lib/summary/summarizer.js.map +1 -1
  365. package/lib/summary/summarizerClientElection.d.ts +2 -2
  366. package/lib/summary/summarizerClientElection.d.ts.map +1 -1
  367. package/lib/summary/summarizerClientElection.js.map +1 -1
  368. package/lib/summary/summarizerHeuristics.d.ts +1 -1
  369. package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
  370. package/lib/summary/summarizerHeuristics.js +1 -1
  371. package/lib/summary/summarizerHeuristics.js.map +1 -1
  372. package/lib/summary/summarizerNode/summarizerNode.d.ts +3 -2
  373. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  374. package/lib/summary/summarizerNode/summarizerNode.js +5 -5
  375. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  376. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
  377. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  378. package/lib/summary/summarizerNode/summarizerNodeUtils.js +1 -1
  379. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  380. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -1
  381. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  382. package/lib/summary/summarizerNode/summarizerNodeWithGc.js +3 -3
  383. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  384. package/lib/summary/summarizerTypes.d.ts +5 -3
  385. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  386. package/lib/summary/summarizerTypes.js.map +1 -1
  387. package/lib/summary/summaryCollection.d.ts +2 -2
  388. package/lib/summary/summaryCollection.d.ts.map +1 -1
  389. package/lib/summary/summaryCollection.js +1 -1
  390. package/lib/summary/summaryCollection.js.map +1 -1
  391. package/lib/summary/summaryFormat.d.ts +6 -17
  392. package/lib/summary/summaryFormat.d.ts.map +1 -1
  393. package/lib/summary/summaryFormat.js +3 -3
  394. package/lib/summary/summaryFormat.js.map +1 -1
  395. package/lib/summary/summaryGenerator.d.ts +4 -3
  396. package/lib/summary/summaryGenerator.d.ts.map +1 -1
  397. package/lib/summary/summaryGenerator.js +4 -4
  398. package/lib/summary/summaryGenerator.js.map +1 -1
  399. package/lib/summary/summaryManager.d.ts +1 -1
  400. package/lib/summary/summaryManager.d.ts.map +1 -1
  401. package/lib/summary/summaryManager.js +9 -8
  402. package/lib/summary/summaryManager.js.map +1 -1
  403. package/package.json +57 -65
  404. package/src/batchTracker.ts +4 -3
  405. package/src/blobManager.ts +100 -77
  406. package/src/channelCollection.ts +223 -167
  407. package/src/connectionTelemetry.ts +12 -12
  408. package/src/containerHandleContext.ts +3 -2
  409. package/src/containerRuntime.ts +481 -277
  410. package/src/dataStore.ts +9 -4
  411. package/src/dataStoreContext.ts +201 -97
  412. package/src/dataStoreContexts.ts +5 -2
  413. package/src/dataStoreRegistry.ts +3 -2
  414. package/src/deltaManagerSummarizerProxy.ts +1 -1
  415. package/src/deltaScheduler.ts +2 -1
  416. package/src/error.ts +2 -2
  417. package/src/gc/garbageCollection.ts +21 -20
  418. package/src/gc/gcConfigs.ts +15 -18
  419. package/src/gc/gcDefinitions.ts +6 -8
  420. package/src/gc/gcHelpers.ts +22 -5
  421. package/src/gc/gcSummaryStateTracker.ts +7 -5
  422. package/src/gc/gcTelemetry.ts +13 -7
  423. package/src/gc/gcUnreferencedStateTracker.ts +3 -2
  424. package/src/gc/index.ts +1 -0
  425. package/src/index.ts +22 -1
  426. package/src/messageTypes.ts +20 -6
  427. package/src/opLifecycle/README.md +89 -0
  428. package/src/opLifecycle/batchManager.ts +1 -0
  429. package/src/opLifecycle/definitions.ts +3 -21
  430. package/src/opLifecycle/index.ts +3 -9
  431. package/src/opLifecycle/opCompressor.ts +6 -5
  432. package/src/opLifecycle/opDecompressor.ts +90 -100
  433. package/src/opLifecycle/opGroupingManager.ts +12 -14
  434. package/src/opLifecycle/opSplitter.ts +76 -48
  435. package/src/opLifecycle/outbox.ts +30 -38
  436. package/src/opLifecycle/remoteMessageProcessor.ts +43 -55
  437. package/src/packageVersion.ts +1 -1
  438. package/src/pendingStateManager.ts +6 -6
  439. package/src/scheduleManager.ts +10 -8
  440. package/src/storageServiceWithAttachBlobs.ts +2 -2
  441. package/src/summary/documentSchema.ts +631 -0
  442. package/src/summary/index.ts +10 -1
  443. package/src/summary/orderedClientElection.ts +7 -7
  444. package/src/summary/runWhileConnectedCoordinator.ts +3 -2
  445. package/src/summary/runningSummarizer.ts +22 -20
  446. package/src/summary/summarizer.ts +17 -15
  447. package/src/summary/summarizerClientElection.ts +3 -2
  448. package/src/summary/summarizerHeuristics.ts +4 -2
  449. package/src/summary/summarizerNode/summarizerNode.ts +20 -18
  450. package/src/summary/summarizerNode/summarizerNodeUtils.ts +3 -2
  451. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +16 -8
  452. package/src/summary/summarizerTypes.ts +7 -3
  453. package/src/summary/summaryCollection.ts +3 -3
  454. package/src/summary/summaryFormat.ts +14 -26
  455. package/src/summary/summaryGenerator.ts +12 -15
  456. package/src/summary/summaryManager.ts +16 -13
  457. package/api-extractor-cjs.json +0 -8
  458. package/dist/container-runtime-alpha.d.ts +0 -1753
  459. package/dist/container-runtime-beta.d.ts +0 -268
  460. package/dist/container-runtime-public.d.ts +0 -268
  461. package/dist/container-runtime-untrimmed.d.ts +0 -1893
  462. package/lib/container-runtime-alpha.d.ts +0 -1753
  463. package/lib/container-runtime-beta.d.ts +0 -268
  464. package/lib/container-runtime-public.d.ts +0 -268
  465. package/lib/container-runtime-untrimmed.d.ts +0 -1893
  466. package/lib/test/batchTracker.spec.js +0 -88
  467. package/lib/test/batchTracker.spec.js.map +0 -1
  468. package/lib/test/blobManager.spec.js +0 -835
  469. package/lib/test/blobManager.spec.js.map +0 -1
  470. package/lib/test/channelCollection.spec.js +0 -141
  471. package/lib/test/channelCollection.spec.js.map +0 -1
  472. package/lib/test/containerRuntime.spec.js +0 -1748
  473. package/lib/test/containerRuntime.spec.js.map +0 -1
  474. package/lib/test/dataStoreContext.spec.js +0 -801
  475. package/lib/test/dataStoreContext.spec.js.map +0 -1
  476. package/lib/test/dataStoreCreation.spec.js +0 -312
  477. package/lib/test/dataStoreCreation.spec.js.map +0 -1
  478. package/lib/test/dataStoreRegistry.spec.js +0 -26
  479. package/lib/test/dataStoreRegistry.spec.js.map +0 -1
  480. package/lib/test/fuzz/fuzzUtils.js +0 -66
  481. package/lib/test/fuzz/fuzzUtils.js.map +0 -1
  482. package/lib/test/fuzz/summarizer.fuzz.spec.js +0 -31
  483. package/lib/test/fuzz/summarizer.fuzz.spec.js.map +0 -1
  484. package/lib/test/fuzz/summarizerFuzzMocks.js +0 -162
  485. package/lib/test/fuzz/summarizerFuzzMocks.js.map +0 -1
  486. package/lib/test/fuzz/summarizerFuzzSuite.js +0 -106
  487. package/lib/test/fuzz/summarizerFuzzSuite.js.map +0 -1
  488. package/lib/test/gc/garbageCollection.spec.js +0 -1465
  489. package/lib/test/gc/garbageCollection.spec.js.map +0 -1
  490. package/lib/test/gc/gcConfigs.spec.js +0 -690
  491. package/lib/test/gc/gcConfigs.spec.js.map +0 -1
  492. package/lib/test/gc/gcHelpers.spec.js +0 -110
  493. package/lib/test/gc/gcHelpers.spec.js.map +0 -1
  494. package/lib/test/gc/gcReferenceGraphAlgorithm.spec.js +0 -68
  495. package/lib/test/gc/gcReferenceGraphAlgorithm.spec.js.map +0 -1
  496. package/lib/test/gc/gcStats.spec.js +0 -391
  497. package/lib/test/gc/gcStats.spec.js.map +0 -1
  498. package/lib/test/gc/gcSummaryStateTracker.spec.js +0 -228
  499. package/lib/test/gc/gcSummaryStateTracker.spec.js.map +0 -1
  500. package/lib/test/gc/gcTelemetry.spec.js +0 -530
  501. package/lib/test/gc/gcTelemetry.spec.js.map +0 -1
  502. package/lib/test/gc/gcUnitTestHelpers.js +0 -29
  503. package/lib/test/gc/gcUnitTestHelpers.js.map +0 -1
  504. package/lib/test/gc/gcUnreferencedStateTracker.spec.js +0 -192
  505. package/lib/test/gc/gcUnreferencedStateTracker.spec.js.map +0 -1
  506. package/lib/test/getPendingBlobs.spec.js +0 -193
  507. package/lib/test/getPendingBlobs.spec.js.map +0 -1
  508. package/lib/test/hardwareStats.spec.js +0 -93
  509. package/lib/test/hardwareStats.spec.js.map +0 -1
  510. package/lib/test/index.js +0 -6
  511. package/lib/test/index.js.map +0 -1
  512. package/lib/test/opLifecycle/OpGroupingManager.spec.js +0 -225
  513. package/lib/test/opLifecycle/OpGroupingManager.spec.js.map +0 -1
  514. package/lib/test/opLifecycle/batchManager.spec.js +0 -189
  515. package/lib/test/opLifecycle/batchManager.spec.js.map +0 -1
  516. package/lib/test/opLifecycle/opCompressor.spec.js +0 -74
  517. package/lib/test/opLifecycle/opCompressor.spec.js.map +0 -1
  518. package/lib/test/opLifecycle/opDecompressor.spec.js +0 -218
  519. package/lib/test/opLifecycle/opDecompressor.spec.js.map +0 -1
  520. package/lib/test/opLifecycle/opSplitter.spec.js +0 -272
  521. package/lib/test/opLifecycle/opSplitter.spec.js.map +0 -1
  522. package/lib/test/opLifecycle/outbox.spec.js +0 -675
  523. package/lib/test/opLifecycle/outbox.spec.js.map +0 -1
  524. package/lib/test/opLifecycle/remoteMessageProcessor.spec.js +0 -196
  525. package/lib/test/opLifecycle/remoteMessageProcessor.spec.js.map +0 -1
  526. package/lib/test/pendingStateManager.spec.js +0 -329
  527. package/lib/test/pendingStateManager.spec.js.map +0 -1
  528. package/lib/test/scheduleManager.spec.js +0 -270
  529. package/lib/test/scheduleManager.spec.js.map +0 -1
  530. package/lib/test/summarizerNode.spec.js +0 -326
  531. package/lib/test/summarizerNode.spec.js.map +0 -1
  532. package/lib/test/summarizerNodeWithGc.spec.js +0 -318
  533. package/lib/test/summarizerNodeWithGc.spec.js.map +0 -1
  534. package/lib/test/summary/orderedClientElection.spec.js +0 -535
  535. package/lib/test/summary/orderedClientElection.spec.js.map +0 -1
  536. package/lib/test/summary/runningSummarizer.spec.js +0 -1349
  537. package/lib/test/summary/runningSummarizer.spec.js.map +0 -1
  538. package/lib/test/summary/summarizer.spec.js +0 -29
  539. package/lib/test/summary/summarizer.spec.js.map +0 -1
  540. package/lib/test/summary/summarizerClientElection.spec.js +0 -436
  541. package/lib/test/summary/summarizerClientElection.spec.js.map +0 -1
  542. package/lib/test/summary/summarizerHeuristics.spec.js +0 -289
  543. package/lib/test/summary/summarizerHeuristics.spec.js.map +0 -1
  544. package/lib/test/summary/summaryCollection.spec.js +0 -200
  545. package/lib/test/summary/summaryCollection.spec.js.map +0 -1
  546. package/lib/test/summary/summaryManager.spec.js +0 -430
  547. package/lib/test/summary/summaryManager.spec.js.map +0 -1
  548. package/lib/test/summary/testQuorumClients.js +0 -34
  549. package/lib/test/summary/testQuorumClients.js.map +0 -1
  550. package/lib/test/throttler.spec.js +0 -175
  551. package/lib/test/throttler.spec.js.map +0 -1
  552. package/lib/test/types/validateContainerRuntimePrevious.generated.js +0 -180
  553. package/lib/test/types/validateContainerRuntimePrevious.generated.js.map +0 -1
  554. /package/{dist → lib}/tsdoc-metadata.json +0 -0
@@ -1,1753 +0,0 @@
1
- import { AttachState } from '@fluidframework/container-definitions';
2
- import { ContainerWarning } from '@fluidframework/container-definitions';
3
- import { CreateChildSummarizerNodeParam } from '@fluidframework/runtime-definitions';
4
- import { FluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
5
- import { FluidObject } from '@fluidframework/core-interfaces';
6
- import { FlushMode } from '@fluidframework/runtime-definitions';
7
- import { IAudience } from '@fluidframework/container-definitions';
8
- import { IClientDetails } from '@fluidframework/protocol-definitions';
9
- import { IContainerContext } from '@fluidframework/container-definitions';
10
- import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
11
- import { IContainerRuntimeEvents } from '@fluidframework/container-runtime-definitions';
12
- import { ICriticalContainerError } from '@fluidframework/container-definitions';
13
- import { IDataStore } from '@fluidframework/runtime-definitions';
14
- import { IDeltaManager } from '@fluidframework/container-definitions';
15
- import { IDisposable } from '@fluidframework/core-interfaces';
16
- import { IDocumentMessage } from '@fluidframework/protocol-definitions';
17
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
18
- import { IEnvelope } from '@fluidframework/runtime-definitions';
19
- import { IEvent } from '@fluidframework/core-interfaces';
20
- import { IEventProvider } from '@fluidframework/core-interfaces';
21
- import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
22
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
23
- import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
24
- import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
25
- import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
26
- import { IFluidHandle } from '@fluidframework/core-interfaces';
27
- import { IFluidHandleContext } from '@fluidframework/core-interfaces';
28
- import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
29
- import { IGetPendingLocalStateProps } from '@fluidframework/container-definitions';
30
- import type { IIdCompressor } from '@fluidframework/id-compressor';
31
- import type { IIdCompressorCore } from '@fluidframework/id-compressor';
32
- import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
33
- import { IQuorumClients } from '@fluidframework/protocol-definitions';
34
- import { IRequest } from '@fluidframework/core-interfaces';
35
- import { IResponse } from '@fluidframework/core-interfaces';
36
- import { IRuntime } from '@fluidframework/container-definitions';
37
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
38
- import { ISignalMessage } from '@fluidframework/protocol-definitions';
39
- import { ISnapshotTree } from '@fluidframework/protocol-definitions';
40
- import { ISummarizerNodeWithGC } from '@fluidframework/runtime-definitions';
41
- import { ISummaryAck } from '@fluidframework/protocol-definitions';
42
- import { ISummaryContent } from '@fluidframework/protocol-definitions';
43
- import { ISummaryNack } from '@fluidframework/protocol-definitions';
44
- import { ISummaryStats } from '@fluidframework/runtime-definitions';
45
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
46
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
47
- import { ITelemetryContext } from '@fluidframework/runtime-definitions';
48
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
49
- import { MessageType } from '@fluidframework/protocol-definitions';
50
- import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
51
- import { SummarizeInternalFn } from '@fluidframework/runtime-definitions';
52
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
53
-
54
- /* Excluded from this release type: agentSchedulerId */
55
-
56
- /* Excluded from this release type: AllowInactiveRequestHeaderKey */
57
-
58
- /** True if a tombstoned object should be returned without erroring
59
- * @alpha
60
- */
61
- export declare const AllowTombstoneRequestHeaderKey = "allowTombstone";
62
-
63
- /* Excluded from this release type: ChannelCollectionFactory */
64
-
65
- /* Excluded from this release type: CompatModeBehavior */
66
-
67
- /**
68
- * Available compression algorithms for op compression.
69
- * @alpha
70
- */
71
- export declare enum CompressionAlgorithms {
72
- lz4 = "lz4"
73
- }
74
-
75
- /**
76
- * @alpha
77
- */
78
- export declare enum ContainerMessageType {
79
- FluidDataStoreOp = "component",
80
- Attach = "attach",
81
- ChunkedOp = "chunkedOp",
82
- BlobAttach = "blobAttach",
83
- Rejoin = "rejoin",
84
- Alias = "alias",
85
- /**
86
- * An op containing an IdRange of Ids allocated using the runtime's IdCompressor since
87
- * the last allocation op was sent.
88
- * See the [IdCompressor README](./id-compressor/README.md) for more details.
89
- */
90
- IdAllocation = "idAllocation",
91
- /**
92
- * Garbage collection specific op. This is sent by the summarizer client when GC runs. It's used to synchronize GC
93
- * state across all clients.
94
- */
95
- GC = "GC"
96
- }
97
-
98
- /**
99
- * Represents the runtime of the container. Contains helper functions/state of the container.
100
- * It will define the store level mappings.
101
- * @alpha
102
- */
103
- export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents & ISummarizerEvents> implements IContainerRuntime, IRuntime, ISummarizerRuntime, ISummarizerInternalsProvider, IProvideFluidHandleContext {
104
- private readonly registry;
105
- private readonly metadata;
106
- private readonly runtimeOptions;
107
- private readonly containerScope;
108
- readonly logger: ITelemetryLoggerExt;
109
- private readonly _storage;
110
- private readonly createIdCompressor;
111
- private readonly idCompressorMode;
112
- private readonly requestHandler?;
113
- private readonly summaryConfiguration;
114
- /**
115
- * Load the stores from a snapshot and returns the runtime.
116
- * @param params - An object housing the runtime properties:
117
- * - context - Context of the container.
118
- * - registryEntries - Mapping from data store types to their corresponding factories.
119
- * - existing - Pass 'true' if loading from an existing snapshot.
120
- * - requestHandler - (optional) Request handler for the request() method of the container runtime.
121
- * Only relevant for back-compat while we remove the request() method and move fully to entryPoint as the main pattern.
122
- * - runtimeOptions - Additional options to be passed to the runtime
123
- * - containerScope - runtime services provided with context
124
- * - containerRuntimeCtor - Constructor to use to create the ContainerRuntime instance.
125
- * This allows mixin classes to leverage this method to define their own async initializer.
126
- * - provideEntryPoint - Promise that resolves to an object which will act as entryPoint for the Container.
127
- * This object should provide all the functionality that the Container is expected to provide to the loader layer.
128
- */
129
- static loadRuntime(params: {
130
- context: IContainerContext;
131
- registryEntries: NamedFluidDataStoreRegistryEntries;
132
- existing: boolean;
133
- runtimeOptions?: IContainerRuntimeOptions;
134
- containerScope?: FluidObject;
135
- containerRuntimeCtor?: typeof ContainerRuntime;
136
- /** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
137
- requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
138
- provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;
139
- }): Promise<ContainerRuntime>;
140
- readonly options: Record<string | number, any>;
141
- private imminentClosure;
142
- private readonly _getClientId;
143
- get clientId(): string | undefined;
144
- readonly clientDetails: IClientDetails;
145
- get storage(): IDocumentStorageService;
146
- get containerRuntime(): this;
147
- private readonly submitFn;
148
- /**
149
- * Although current IContainerContext guarantees submitBatchFn, it is not available on older loaders.
150
- */
151
- private readonly submitBatchFn;
152
- private readonly submitSummaryFn;
153
- private readonly submitSignalFn;
154
- readonly disposeFn: (error?: ICriticalContainerError) => void;
155
- readonly closeFn: (error?: ICriticalContainerError) => void;
156
- get flushMode(): FlushMode;
157
- get scope(): FluidObject;
158
- get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
159
- private readonly _getAttachState;
160
- get attachState(): AttachState;
161
- private _idCompressor;
162
- private pendingIdCompressorOps;
163
- private readonly skipSavedCompressorOps;
164
- /**
165
- * See IContainerRuntimeBase.idCompressor() for details.
166
- */
167
- get idCompressor(): (IIdCompressor & IIdCompressorCore) | undefined;
168
- /**
169
- * True if we have ID compressor loading in-flight (async operation). Useful only for
170
- * this.idCompressorMode === "delayed" mode
171
- */
172
- protected compressorLoadInitiated: boolean;
173
- /**
174
- * See IContainerRuntimeBase.generateDocumentUniqueId() for details.
175
- */
176
- generateDocumentUniqueId(): string | (number & {
177
- readonly SessionUnique: "cea55054-6b82-4cbf-ad19-1fa645ea3b3e";
178
- } & {
179
- readonly OpNormalized: "9209432d-a959-4df7-b2ad-767ead4dbcae";
180
- });
181
- get IFluidHandleContext(): IFluidHandleContext;
182
- private readonly handleContext;
183
- /**
184
- * This is a proxy to the delta manager provided by the container context (innerDeltaManager). It restricts certain
185
- * accesses such as sets "read-only" mode for the summarizer client. This is the default delta manager that should
186
- * be used unless the innerDeltaManager is required.
187
- */
188
- readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
189
- /**
190
- * The delta manager provided by the container context. By default, using the default delta manager (proxy)
191
- * should be sufficient. This should be used only if necessary. For example, for validating and propagating connected
192
- * events which requires access to the actual real only info, this is needed.
193
- */
194
- private readonly innerDeltaManager;
195
- private readonly mc;
196
- private readonly summarizerClientElection?;
197
- /**
198
- * summaryManager will only be created if this client is permitted to spawn a summarizing client
199
- * It is created only by interactive client, i.e. summarizer client, as well as non-interactive bots
200
- * do not create it (see SummarizerClientElection.clientDetailsPermitElection() for details)
201
- */
202
- private readonly summaryManager?;
203
- private readonly summaryCollection;
204
- private readonly summarizerNode;
205
- private readonly maxConsecutiveReconnects;
206
- private readonly defaultMaxConsecutiveReconnects;
207
- private _orderSequentiallyCalls;
208
- private readonly _flushMode;
209
- private flushTaskExists;
210
- private _connected;
211
- private consecutiveReconnects;
212
- /**
213
- * Used to delay transition to "connected" state while we upload
214
- * attachment blobs that were added while disconnected
215
- */
216
- private delayConnectClientId?;
217
- private ensureNoDataModelChangesCalls;
218
- /**
219
- * Tracks the number of detected reentrant ops to report,
220
- * in order to self-throttle the telemetry events.
221
- *
222
- * This should be removed as part of ADO:2322
223
- */
224
- private opReentryCallsToReport;
225
- /**
226
- * Invokes the given callback and expects that no ops are submitted
227
- * until execution finishes. If an op is submitted, an error will be raised.
228
- *
229
- * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`
230
- *
231
- * @param callback - the callback to be invoked
232
- */
233
- ensureNoDataModelChanges<T>(callback: () => T): T;
234
- get connected(): boolean;
235
- /** clientId of parent (non-summarizing) container that owns summarizer container */
236
- get summarizerClientId(): string | undefined;
237
- private _disposed;
238
- get disposed(): boolean;
239
- private dirtyContainer;
240
- private emitDirtyDocumentEvent;
241
- private readonly enableOpReentryCheck;
242
- private readonly disableAttachReorder;
243
- private readonly closeSummarizerDelayMs;
244
- /**
245
- * If true, summary generated is validate before uploading it to the server. With single commit summaries,
246
- * summaries will be accepted once uploaded, so they should be validated before upload. However, this can
247
- * currently be controlled via a feature flag as its a new functionality.
248
- */
249
- private readonly validateSummaryBeforeUpload;
250
- private readonly defaultTelemetrySignalSampleCount;
251
- private readonly _perfSignalData;
252
- /**
253
- * Summarizer is responsible for coordinating when to send generate and send summaries.
254
- * It is the main entry point for summary work.
255
- * It is created only by summarizing container (i.e. one with clientType === "summarizer")
256
- */
257
- private readonly _summarizer?;
258
- private readonly scheduleManager;
259
- private readonly blobManager;
260
- private readonly pendingStateManager;
261
- private readonly outbox;
262
- private readonly garbageCollector;
263
- private readonly channelCollection;
264
- private readonly remoteMessageProcessor;
265
- /** The last message processed at the time of the last summary. */
266
- private messageAtLastSummary;
267
- private get summarizer();
268
- private readonly summariesDisabled;
269
- private isSummariesDisabled;
270
- private readonly maxOpsSinceLastSummary;
271
- private getMaxOpsSinceLastSummary;
272
- private readonly initialSummarizerDelayMs;
273
- private getInitialSummarizerDelayMs;
274
- private readonly createContainerMetadata;
275
- /**
276
- * The summary number of the next summary that will be generated for this container. This is incremented every time
277
- * a summary is generated.
278
- */
279
- private nextSummaryNumber;
280
- /** If false, loading or using a Tombstoned object should merely log, not fail */
281
- get gcTombstoneEnforcementAllowed(): boolean;
282
- /** If true, throw an error when a tombstone data store is used. */
283
- get gcThrowOnTombstoneUsage(): boolean;
284
- /**
285
- * GUID to identify a document in telemetry
286
- * ! Note: should not be used for anything other than telemetry and is not considered a stable GUID
287
- */
288
- private readonly telemetryDocumentId;
289
- /**
290
- * Whether this client is the summarizer client itself (type is summarizerClientType)
291
- */
292
- private readonly isSummarizerClient;
293
- /**
294
- * The id of the version used to initially load this runtime, or undefined if it's newly created.
295
- */
296
- private readonly loadedFromVersionId;
297
- /**
298
- * It a cache for holding mapping for loading groupIds with its snapshot from the service. Add expiry policy of 1 minute.
299
- * Starting with 1 min and based on recorded usage we can tweak it later on.
300
- */
301
- private readonly snapshotCacheForLoadingGroupIds;
302
- /***/
303
- protected constructor(context: IContainerContext, registry: IFluidDataStoreRegistry, metadata: IContainerRuntimeMetadata | undefined, electedSummarizerData: ISerializedElection | undefined, chunks: [string, string[]][], dataStoreAliasMap: [string, string][], runtimeOptions: Readonly<Required<IContainerRuntimeOptions>>, containerScope: FluidObject, logger: ITelemetryLoggerExt, existing: boolean, blobManagerSnapshot: IBlobManagerLoadInfo, _storage: IDocumentStorageService, createIdCompressor: () => Promise<IIdCompressor & IIdCompressorCore>, idCompressorMode: IdCompressorMode, provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>, requestHandler?: ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined, summaryConfiguration?: ISummaryConfiguration);
304
- getCreateChildSummarizerNodeFn(id: string, createParam: CreateChildSummarizerNodeParam): (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>) => ISummarizerNodeWithGC;
305
- deleteChildSummarizerNode(id: string): void;
306
- makeLocallyVisible(): void;
307
- /**
308
- * Initializes the state from the base snapshot this container runtime loaded from.
309
- */
310
- private initializeBaseState;
311
- dispose(error?: Error): void;
312
- /**
313
- * Api to fetch the snapshot from the service for a loadingGroupIds.
314
- * @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
315
- * @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
316
- * @returns - snapshotTree and the sequence number of the snapshot.
317
- */
318
- getSnapshotForLoadingGroupId(loadingGroupIds: string[], pathParts: string[]): Promise<{
319
- snapshotTree: ISnapshotTree;
320
- sequenceNumber: number;
321
- }>;
322
- /**
323
- * Api to find a snapshot tree inside a bigger snapshot tree based on the path in the pathParts array.
324
- * @param snapshotTree - snapshot tree to look into.
325
- * @param pathParts - Part of the path, which we want to extract from the snapshot tree.
326
- * @param hasIsolatedChannels - whether the channels are present inside ".channels" subtree. Older
327
- * snapshots will not have trees inside ".channels", so check that.
328
- * @returns - requested snapshot tree based on the path parts.
329
- */
330
- private getSnapshotTreeForPath;
331
- /**
332
- * Notifies this object about the request made to the container.
333
- * @param request - Request made to the handler.
334
- * @deprecated Will be removed in future major release. This method needs to stay private until LTS version of Loader moves to "2.0.0-internal.7.0.0".
335
- */
336
- private request;
337
- /**
338
- * Resolves URI representing handle
339
- * @param request - Request made to the handler.
340
- */
341
- resolveHandle(request: IRequest): Promise<IResponse>;
342
- /**
343
- * {@inheritDoc @fluidframework/container-definitions#IRuntime.getEntryPoint}
344
- */
345
- getEntryPoint(): Promise<FluidObject>;
346
- private readonly entryPoint;
347
- private internalId;
348
- /** Adds the container's metadata to the given summary tree. */
349
- private addMetadataToSummary;
350
- protected addContainerStateToSummary(summaryTree: ISummaryTreeWithStats, fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext): void;
351
- private shouldContinueReconnecting;
352
- private resetReconnectCount;
353
- private replayPendingStates;
354
- /**
355
- * Parse an op's type and actual content from given serialized content
356
- * ! Note: this format needs to be in-line with what is set in the "ContainerRuntime.submit(...)" method
357
- */
358
- private parseLocalOpContent;
359
- private applyStashedOp;
360
- setConnectionState(connected: boolean, clientId?: string): void;
361
- private setConnectionStateCore;
362
- notifyOpReplay(message: ISequencedDocumentMessage): Promise<void>;
363
- process(messageArg: ISequencedDocumentMessage, local: boolean): void;
364
- private _processedClientSequenceNumber;
365
- /**
366
- * Direct the message to the correct subsystem for processing, and implement other side effects
367
- */
368
- private processCore;
369
- /**
370
- * Assuming the given message is also a TypedContainerRuntimeMessage,
371
- * checks its type and dispatches the message to the appropriate handler in the runtime.
372
- * Throws a DataProcessingError if the message looks like but doesn't conform to a known TypedContainerRuntimeMessage type.
373
- */
374
- private validateAndProcessRuntimeMessage;
375
- /**
376
- * Emits the Signal event and update the perf signal data.
377
- * @param clientSignalSequenceNumber - is the client signal sequence number to be uploaded.
378
- */
379
- private sendSignalTelemetryEvent;
380
- processSignal(message: ISignalMessage, local: boolean): void;
381
- /**
382
- * Flush the pending ops manually.
383
- * This method is expected to be called at the end of a batch.
384
- */
385
- private flush;
386
- /**
387
- * {@inheritDoc @fluidframework/runtime-definitions#IContainerRuntimeBase.orderSequentially}
388
- */
389
- orderSequentially<T>(callback: () => T): T;
390
- /**
391
- * Returns the aliased data store's entryPoint, given the alias.
392
- * @param alias - The alias for the data store.
393
- * @returns The data store's entry point ({@link @fluidframework/core-interfaces#IFluidHandle}) if it exists and is aliased.
394
- * Returns undefined if no data store has been assigned the given alias.
395
- */
396
- getAliasedDataStoreEntryPoint(alias: string): Promise<IFluidHandle<FluidObject> | undefined>;
397
- createDetachedDataStore(pkg: Readonly<string[]>, loadingGroupId?: string): IFluidDataStoreContextDetached;
398
- createDataStore(pkg: Readonly<string | string[]>, loadingGroupId?: string): Promise<IDataStore>;
399
- /**
400
- * @deprecated 0.16 Issue #1537, #3631
401
- */
402
- _createDataStoreWithProps(pkg: Readonly<string | string[]>, props?: any): Promise<IDataStore>;
403
- private canSendOps;
404
- /**
405
- * Are we in the middle of batching ops together?
406
- */
407
- private currentlyBatching;
408
- private readonly _quorum;
409
- getQuorum(): IQuorumClients;
410
- private readonly _audience;
411
- getAudience(): IAudience;
412
- /**
413
- * Returns true of container is dirty, i.e. there are some pending local changes that
414
- * either were not sent out to delta stream or were not yet acknowledged.
415
- */
416
- get isDirty(): boolean;
417
- private isContainerMessageDirtyable;
418
- private createNewSignalEnvelope;
419
- /**
420
- * Submits the signal to be sent to other clients.
421
- * @param type - Type of the signal.
422
- * @param content - Content of the signal.
423
- * @param targetClientId - When specified, the signal is only sent to the provided client id.
424
- */
425
- submitSignal(type: string, content: any, targetClientId?: string): void;
426
- setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
427
- /**
428
- * Create a summary. Used when attaching or serializing a detached container.
429
- *
430
- * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported
431
- * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the
432
- * new storage IDs so requests can be redirected.
433
- * @param telemetryContext - summary data passed through the layers for telemetry purposes
434
- */
435
- createSummary(blobRedirectTable?: Map<string, string>, telemetryContext?: ITelemetryContext): ISummaryTree;
436
- readonly getAbsoluteUrl: (relativeUrl: string) => Promise<string | undefined>;
437
- private summarizeInternal;
438
- /**
439
- * Returns a summary of the runtime at the current sequence number.
440
- */
441
- summarize(options: {
442
- /** True to generate the full tree with no handle reuse optimizations; defaults to false */
443
- fullTree?: boolean;
444
- /** True to track the state for this summary in the SummarizerNodes; defaults to true */
445
- trackState?: boolean;
446
- /** Logger to use for correlated summary events */
447
- summaryLogger?: ITelemetryLoggerExt;
448
- /** True to run garbage collection before summarizing; defaults to true */
449
- runGC?: boolean;
450
- /** True to generate full GC data */
451
- fullGC?: boolean;
452
- /** True to run GC sweep phase after the mark phase */
453
- runSweep?: boolean;
454
- }): Promise<ISummaryTreeWithStats>;
455
- /**
456
- * Before GC runs, called by the garbage collector to update any pending GC state. This is mainly used to notify
457
- * the garbage collector of references detected since the last GC run. Most references are notified immediately
458
- * but there can be some for which async operation is required (such as detecting new root data stores).
459
- * @see IGarbageCollectionRuntime.updateStateBeforeGC
460
- */
461
- updateStateBeforeGC(): Promise<void>;
462
- private getGCDataInternal;
463
- /**
464
- * Generates and returns the GC data for this container.
465
- * @param fullGC - true to bypass optimizations and force full generation of GC data.
466
- * @see IGarbageCollectionRuntime.getGCData
467
- */
468
- getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
469
- /**
470
- * After GC has run, called to notify this container's nodes of routes that are used in it.
471
- * @param usedRoutes - The routes that are used in all nodes in this Container.
472
- * @see IGarbageCollectionRuntime.updateUsedRoutes
473
- */
474
- updateUsedRoutes(usedRoutes: readonly string[]): void;
475
- /**
476
- * This is called to update objects whose routes are unused.
477
- * @param unusedRoutes - Data store and attachment blob routes that are unused in this Container.
478
- */
479
- updateUnusedRoutes(unusedRoutes: readonly string[]): void;
480
- /**
481
- * @deprecated Replaced by deleteSweepReadyNodes.
482
- */
483
- deleteUnusedNodes(unusedRoutes: readonly string[]): string[];
484
- /**
485
- * After GC has run and identified nodes that are sweep ready, this is called to delete the sweep ready nodes.
486
- * @param sweepReadyRoutes - The routes of nodes that are sweep ready and should be deleted.
487
- * @returns The routes of nodes that were deleted.
488
- */
489
- deleteSweepReadyNodes(sweepReadyRoutes: readonly string[]): readonly string[];
490
- /**
491
- * This is called to update objects that are tombstones.
492
- *
493
- * A Tombstoned object has been unreferenced long enough that GC knows it won't be referenced again.
494
- * Tombstoned objects are eventually deleted by GC.
495
- *
496
- * @param tombstonedRoutes - Data store and attachment blob routes that are tombstones in this Container.
497
- */
498
- updateTombstonedRoutes(tombstonedRoutes: readonly string[]): void;
499
- /**
500
- * Returns a server generated referenced timestamp to be used to track unreferenced nodes by GC.
501
- */
502
- getCurrentReferenceTimestampMs(): number | undefined;
503
- /**
504
- * Returns the type of the GC node. Currently, there are nodes that belong to the root ("/"), data stores or
505
- * blob manager.
506
- */
507
- getNodeType(nodePath: string): GCNodeType;
508
- /**
509
- * Called by GC to retrieve the package path of the node with the given path. The node should belong to a
510
- * data store or an attachment blob.
511
- */
512
- getGCNodePackagePath(nodePath: string): Promise<readonly string[] | undefined>;
513
- /**
514
- * Returns whether a given path is for attachment blobs that are in the format - "/BlobManager.basePath/...".
515
- */
516
- private isBlobPath;
517
- /**
518
- * From a given list of routes, separate and return routes that belong to blob manager and data stores.
519
- * @param routes - A list of routes that can belong to data stores or blob manager.
520
- * @returns Two route lists - One that contains routes for blob manager and another one that contains routes
521
- * for data stores.
522
- */
523
- private getDataStoreAndBlobManagerRoutes;
524
- /**
525
- * Runs garbage collection and updates the reference / used state of the nodes in the container.
526
- * @returns the statistics of the garbage collection run; undefined if GC did not run.
527
- */
528
- collectGarbage(options: {
529
- /** Logger to use for logging GC events */
530
- logger?: ITelemetryLoggerExt;
531
- /** True to run GC sweep phase after the mark phase */
532
- runSweep?: boolean;
533
- /** True to generate full GC data */
534
- fullGC?: boolean;
535
- }, telemetryContext?: ITelemetryContext): Promise<IGCStats | undefined>;
536
- /**
537
- * Called when a new outbound reference is added to another node. This is used by garbage collection to identify
538
- * all references added in the system.
539
- * @param srcHandle - The handle of the node that added the reference.
540
- * @param outboundHandle - The handle of the outbound node that is referenced.
541
- */
542
- addedGCOutboundReference(srcHandle: {
543
- absolutePath: string;
544
- }, outboundHandle: {
545
- absolutePath: string;
546
- }): void;
547
- /**
548
- * Generates the summary tree, uploads it to storage, and then submits the summarize op.
549
- * This is intended to be called by the summarizer, since it is the implementation of
550
- * ISummarizerInternalsProvider.submitSummary.
551
- * It takes care of state management at the container level, including pausing inbound
552
- * op processing, updating SummarizerNode state tracking, and garbage collection.
553
- * @param options - options controlling how the summary is generated or submitted
554
- */
555
- submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
556
- /**
557
- * This helper is called during summarization. If the container is dirty, it will return a failed summarize result
558
- * (IBaseSummarizeResult) unless this is the final summarize attempt and SkipFailingIncorrectSummary option is set.
559
- * @param logger - The logger to be used for sending telemetry.
560
- * @param referenceSequenceNumber - The reference sequence number of the summary attempt.
561
- * @param minimumSequenceNumber - The minimum sequence number of the summary attempt.
562
- * @param finalAttempt - Whether this is the final summary attempt.
563
- * @param beforeSummaryGeneration - Whether this is called before summary generation or after.
564
- * @returns failed summarize result (IBaseSummarizeResult) if summary should be failed, undefined otherwise.
565
- */
566
- private shouldFailSummaryOnPendingOps;
567
- private get pendingMessagesCount();
568
- private hasPendingMessages;
569
- private updateDocumentDirtyState;
570
- submitMessage(type: ContainerMessageType.FluidDataStoreOp | ContainerMessageType.Alias | ContainerMessageType.Attach, contents: any, localOpMetadata?: unknown): void;
571
- uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
572
- private submitIdAllocationOpIfNeeded;
573
- private submit;
574
- private scheduleFlush;
575
- private submitSummaryMessage;
576
- /**
577
- * Throw an error if the runtime is closed. Methods that are expected to potentially
578
- * be called after dispose due to asynchrony should not call this.
579
- */
580
- private verifyNotClosed;
581
- private verifyCanSubmitOps;
582
- private reSubmitBatch;
583
- private reSubmit;
584
- /**
585
- * Finds the right store and asks it to resubmit the message. This typically happens when we
586
- * reconnect and there are pending messages.
587
- * ! Note: successfully resubmitting an op that has been successfully sequenced is not possible due to checks in the ConnectionStateHandler (Loader layer)
588
- * @param message - The original LocalContainerRuntimeMessage.
589
- * @param localOpMetadata - The local metadata associated with the original message.
590
- */
591
- private reSubmitCore;
592
- private rollback;
593
- /** Implementation of ISummarizerInternalsProvider.refreshLatestSummaryAck */
594
- refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
595
- /**
596
- * Fetches the latest snapshot from storage to refresh the cache as a performance optimization and closes the
597
- * summarizer to reload from new state.
598
- * @param summaryLogger - logger to use when fetching snapshot from storage
599
- * @returns a generic summarization error
600
- */
601
- private prefetchLatestSummaryThenClose;
602
- private closeStaleSummarizer;
603
- /**
604
- * Downloads the latest snapshot from storage.
605
- * By default, it also closes the container after downloading the snapshot. However, this may be
606
- * overridden via options.
607
- */
608
- private fetchLatestSnapshotFromStorage;
609
- getPendingLocalState(props?: IGetPendingLocalStateProps): unknown;
610
- summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
611
- enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;
612
- /**
613
- * Forms a function that will create and retrieve a Summarizer.
614
- */
615
- private formCreateSummarizerFn;
616
- private validateSummaryHeuristicConfiguration;
617
- private get groupedBatchingEnabled();
618
- }
619
-
620
- /* Excluded from this release type: ContainerRuntimeMessage */
621
-
622
- /**
623
- * @alpha
624
- */
625
- export declare const DefaultSummaryConfiguration: ISummaryConfiguration;
626
-
627
- /* Excluded from this release type: detectOutboundReferences */
628
-
629
- /**
630
- * @alpha
631
- */
632
- export declare type EnqueueSummarizeResult = (ISummarizeResults & {
633
- /**
634
- * Indicates that another summarize attempt is not already enqueued,
635
- * and this attempt has been enqueued.
636
- */
637
- readonly alreadyEnqueued?: undefined;
638
- }) | (ISummarizeResults & {
639
- /** Indicates that another summarize attempt was already enqueued. */
640
- readonly alreadyEnqueued: true;
641
- /**
642
- * Indicates that the other enqueued summarize attempt was abandoned,
643
- * and this attempt has been enqueued enqueued.
644
- */
645
- readonly overridden: true;
646
- }) | {
647
- /** Indicates that another summarize attempt was already enqueued. */
648
- readonly alreadyEnqueued: true;
649
- /**
650
- * Indicates that the other enqueued summarize attempt remains enqueued,
651
- * and this attempt has not been enqueued.
652
- */
653
- readonly overridden?: undefined;
654
- };
655
-
656
- /* Excluded from this release type: FluidDataStoreRegistry */
657
-
658
- /**
659
- * @see IGCMetadata.gcFeatureMatrix and @see gcGenerationOptionName
660
- * @alpha
661
- */
662
- export declare type GCFeatureMatrix = {
663
- /**
664
- * The GC Generation value in effect when this file was created.
665
- * Gives a way for an app to disqualify old files from GC Sweep.
666
- * Provided via Container Runtime Options.
667
- */
668
- gcGeneration?: number;
669
- /** Deprecated property from legacy type. Will not be set concurrently with gcGeneration */
670
- tombstoneGeneration?: undefined;
671
- } | {
672
- /**
673
- * The Tombstone Generation value in effect when this file was created.
674
- * Legacy - new containers would get gcGeneration instead (if anything)
675
- */
676
- tombstoneGeneration: number;
677
- };
678
-
679
- /**
680
- * The types of GC nodes in the GC reference graph.
681
- * @alpha
682
- */
683
- export declare const GCNodeType: {
684
- DataStore: string;
685
- SubDataStore: string;
686
- Blob: string;
687
- Other: string;
688
- };
689
-
690
- /**
691
- * @alpha
692
- */
693
- export declare type GCNodeType = (typeof GCNodeType)[keyof typeof GCNodeType];
694
-
695
- /**
696
- * @alpha
697
- */
698
- export declare type GCVersion = number;
699
-
700
- /**
701
- * A single summary which has already been acked by the server.
702
- * @alpha
703
- */
704
- export declare interface IAckedSummary {
705
- readonly summaryOp: ISummaryOpMessage;
706
- readonly summaryAck: ISummaryAckMessage;
707
- }
708
-
709
- /**
710
- * @alpha
711
- */
712
- export declare interface IAckSummaryResult {
713
- readonly summaryAckOp: ISummaryAckMessage;
714
- readonly ackNackDuration: number;
715
- }
716
-
717
- /**
718
- * Base results for all submitSummary attempts.
719
- * @alpha
720
- */
721
- export declare interface IBaseSummarizeResult {
722
- readonly stage: "base";
723
- /** Error object related to failed summarize attempt. */
724
- readonly error: any;
725
- /** Reference sequence number as of the generate summary attempt. */
726
- readonly referenceSequenceNumber: number;
727
- readonly minimumSequenceNumber: number;
728
- }
729
-
730
- /**
731
- * Information from a snapshot needed to load BlobManager
732
- * @alpha
733
- */
734
- export declare interface IBlobManagerLoadInfo {
735
- ids?: string[];
736
- redirectTable?: [string, string][];
737
- }
738
-
739
- /**
740
- * @alpha
741
- */
742
- export declare interface IBroadcastSummaryResult {
743
- readonly summarizeOp: ISummaryOpMessage;
744
- readonly broadcastDuration: number;
745
- }
746
-
747
- /**
748
- * Similar to AbortController, but using promise instead of events
749
- * @alpha
750
- */
751
- export declare interface ICancellableSummarizerController extends ISummaryCancellationToken {
752
- stop(reason: SummarizerStopReason): void;
753
- }
754
-
755
- /**
756
- * Similar to AbortSignal, but using promise instead of events
757
- * @param T - cancellation reason type
758
- * @alpha
759
- */
760
- export declare interface ICancellationToken<T> {
761
- /** Tells if this cancellable token is cancelled */
762
- readonly cancelled: boolean;
763
- /**
764
- * Promise that gets fulfilled when this cancellable token is cancelled
765
- * @returns reason of cancellation
766
- */
767
- readonly waitCancelled: Promise<T>;
768
- }
769
-
770
- /* Excluded from this release type: IChunkedOp */
771
-
772
- /**
773
- * Watches summaries created by a specific client.
774
- * @alpha
775
- */
776
- export declare interface IClientSummaryWatcher extends IDisposable {
777
- watchSummary(clientSequenceNumber: number): ISummary;
778
- waitFlushed(): Promise<IAckedSummary | undefined>;
779
- }
780
-
781
- /**
782
- * Options for op compression.
783
- * @alpha
784
- */
785
- export declare interface ICompressionRuntimeOptions {
786
- /**
787
- * The value the batch's content size must exceed for the batch to be compressed.
788
- * By default the value is 600 * 1024 = 614400 bytes. If the value is set to `Infinity`, compression will be disabled.
789
- */
790
- readonly minimumBatchSizeInBytes: number;
791
- /**
792
- * The compression algorithm that will be used to compress the op.
793
- * By default the value is `lz4` which is the only compression algorithm currently supported.
794
- */
795
- readonly compressionAlgorithm: CompressionAlgorithms;
796
- }
797
-
798
- /**
799
- * @alpha
800
- */
801
- export declare interface IConnectableRuntime {
802
- readonly disposed: boolean;
803
- readonly connected: boolean;
804
- readonly clientId: string | undefined;
805
- once(event: "connected" | "disconnected" | "dispose", listener: () => void): this;
806
- }
807
-
808
- /* Excluded from this release type: IContainerRuntimeMessageCompatDetails */
809
-
810
- /**
811
- * @alpha
812
- */
813
- export declare interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {
814
- readonly summaryFormatVersion: 1;
815
- /** The last message processed at the time of summary. Only primitive property types are added to the summary. */
816
- readonly message: ISummaryMetadataMessage | undefined;
817
- /** True if channels are not isolated in .channels subtrees, otherwise isolated. */
818
- readonly disableIsolatedChannels?: true;
819
- /** The summary number for a container's summary. Incremented on summaries throughout its lifetime. */
820
- readonly summaryNumber?: number;
821
- /** GUID to identify a document in telemetry */
822
- readonly telemetryDocumentId?: string;
823
- /** True if the runtime IdCompressor is enabled */
824
- readonly idCompressorMode?: IdCompressorMode;
825
- }
826
-
827
- /**
828
- * Options for container runtime.
829
- * @alpha
830
- */
831
- export declare interface IContainerRuntimeOptions {
832
- readonly summaryOptions?: ISummaryRuntimeOptions;
833
- readonly gcOptions?: IGCRuntimeOptions;
834
- /**
835
- * Affects the behavior while loading the runtime when the data verification check which
836
- * compares the DeltaManager sequence number (obtained from protocol in summary) to the
837
- * runtime sequence number (obtained from runtime metadata in summary) finds a mismatch.
838
- * 1. "close" (default) will close the container with an assertion.
839
- * 2. "log" will log an error event to telemetry, but still continue to load.
840
- * 3. "bypass" will skip the check entirely. This is not recommended.
841
- */
842
- readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
843
- /**
844
- * Sets the flush mode for the runtime. In Immediate flush mode the runtime will immediately
845
- * send all operations to the driver layer, while in TurnBased the operations will be buffered
846
- * and then sent them as a single batch at the end of the turn.
847
- * By default, flush mode is TurnBased.
848
- */
849
- readonly flushMode?: FlushMode;
850
- /**
851
- * Enables the runtime to compress ops. See {@link ICompressionRuntimeOptions}.
852
- */
853
- readonly compressionOptions?: ICompressionRuntimeOptions;
854
- /**
855
- * If specified, when in FlushMode.TurnBased, if the size of the ops between JS turns exceeds this value,
856
- * an error will be thrown and the container will close.
857
- *
858
- * If unspecified, the limit is 950 * 1024.
859
- *
860
- * 'Infinity' will disable any limit.
861
- *
862
- * @experimental This config should be driven by the connection with the service and will be moved in the future.
863
- */
864
- readonly maxBatchSizeInBytes?: number;
865
- /**
866
- * If the op payload needs to be chunked in order to work around the maximum size of the batch, this value represents
867
- * how large the individual chunks will be. This is only supported when compression is enabled. If after compression, the
868
- * batch content size exceeds this value, it will be chunked into smaller ops of this exact size.
869
- *
870
- * This value is a trade-off between having many small chunks vs fewer larger chunks and by default, the runtime is configured to use
871
- * 200 * 1024 = 204800 bytes. This default value ensures that no compressed payload's content is able to exceed {@link IContainerRuntimeOptions.maxBatchSizeInBytes}
872
- * regardless of the overhead of an individual op.
873
- *
874
- * Any value of `chunkSizeInBytes` exceeding {@link IContainerRuntimeOptions.maxBatchSizeInBytes} will disable this feature, therefore if a compressed batch's content
875
- * size exceeds {@link IContainerRuntimeOptions.maxBatchSizeInBytes} after compression, the container will close with an instance of `GenericError` with
876
- * the `BatchTooLarge` message.
877
- */
878
- readonly chunkSizeInBytes?: number;
879
- /**
880
- * Enable the IdCompressor in the runtime.
881
- * @experimental Not ready for use.
882
- */
883
- readonly enableRuntimeIdCompressor?: IdCompressorMode;
884
- /**
885
- * If enabled, the runtime will block all attempts to send an op inside the
886
- * {@link ContainerRuntime#ensureNoDataModelChanges} callback. The callback is used by
887
- * {@link @fluidframework/shared-object-base#SharedObjectCore} for event handlers so enabling this
888
- * will disallow modifying DDSes while handling DDS events.
889
- *
890
- * By default, the feature is disabled. If enabled from options, the `Fluid.ContainerRuntime.DisableOpReentryCheck`
891
- * can be used to disable it at runtime.
892
- */
893
- readonly enableOpReentryCheck?: boolean;
894
- /**
895
- * If enabled, the runtime will group messages within a batch into a single
896
- * message to be sent to the service.
897
- * The grouping an ungrouping of such messages is handled by the "OpGroupingManager".
898
- *
899
- * By default, the feature is disabled. If enabled from options, the `Fluid.ContainerRuntime.DisableGroupedBatching`
900
- * flag can be used to disable it at runtime.
901
- *
902
- * @experimental Not ready for use.
903
- */
904
- readonly enableGroupedBatching?: boolean;
905
- }
906
-
907
- /**
908
- * @alpha
909
- */
910
- export declare interface ICreateContainerMetadata {
911
- /** Runtime version of the container when it was first created */
912
- createContainerRuntimeVersion?: string;
913
- /** Timestamp of the container when it was first created */
914
- createContainerTimestamp?: number;
915
- }
916
-
917
- /**
918
- * ID Compressor mode.
919
- * "on" - compressor is On. It's loaded as part of container load. This mode is sticky - once on, compressor is On for all
920
- * sessions for a given document. This results in IContainerRuntime.idCompressor to be always available.
921
- * "delayed" - ID compressor bundle is loaded only on establishing of first delta connection, i.e. it does not impact boot of cotnainer.
922
- * In such mode IContainerRuntime.idCompressor is not made available (unless previous sessions of same document had it "On").
923
- * The only thing that is available is IContainerRuntime.generateDocumentUniqueId() that provides opportunistically short IDs.
924
- * "off" - ID compressor is not laoded (unless it is "on" due to previous session for same document having it "on").
925
- * While IContainerRuntime.generateDocumentUniqueId() is available, it will produce long IDs that are do not compress well.
926
- *
927
- * @alpha
928
- */
929
- export declare type IdCompressorMode = "on" | "delayed" | "off";
930
-
931
- /**
932
- * Options to use when enqueueing a summarize attempt.
933
- * @alpha
934
- */
935
- export declare interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {
936
- /** If specified, The summarize attempt will not occur until after this sequence number. */
937
- readonly afterSequenceNumber?: number;
938
- /**
939
- * True to override the existing enqueued summarize attempt if there is one.
940
- * This will guarantee that this attempt gets enqueued. If override is false,
941
- * than an existing enqueued summarize attempt will block a new one from being
942
- * enqueued. There can only be one enqueued at a time. Defaults to false.
943
- */
944
- readonly override?: boolean;
945
- }
946
-
947
- /**
948
- * GC-specific metadata to be written into the summary.
949
- *
950
- * @alpha
951
- */
952
- export declare interface IGCMetadata {
953
- /**
954
- * The version of the GC code that was run to generate the GC data that is written in the summary.
955
- * If the persisted value doesn't match the current value in the code, saved GC data will be discarded and regenerated from scratch.
956
- * Also, used to determine whether GC is enabled for this container or not:
957
- * - A value of 0 or undefined means GC is disabled.
958
- * - A value greater than 0 means GC is enabled.
959
- */
960
- readonly gcFeature?: GCVersion;
961
- /**
962
- * A collection of different numerical "Generations" for different features,
963
- * used to determine feature availability over time.
964
- * This info may come from multiple sources (FF code, config service, app via Container Runtime Options),
965
- * and pertains to aspects of the document that may be fixed for its lifetime.
966
- *
967
- * For each dimension, if the persisted value doesn't match the currently provided value,
968
- * then this file does not support the corresponding feature as currently implemented.
969
- *
970
- * Guidance is that if no value is provided at runtime, it should result in the current default behavior.
971
- */
972
- readonly gcFeatureMatrix?: GCFeatureMatrix;
973
- /**
974
- * Tells whether the GC sweep phase is enabled for this container.
975
- * - True means sweep phase is enabled.
976
- * - False means sweep phase is disabled. If GC is disabled as per gcFeature, sweep is also disabled.
977
- *
978
- * @deprecated use GCFeatureMatrix.gcGeneration instead. @see GCFeatureMatrix.gcGeneration
979
- */
980
- readonly sweepEnabled?: boolean;
981
- /** If this is present, the session for this container will expire after this time and the container will close */
982
- readonly sessionExpiryTimeoutMs?: number;
983
- /**
984
- * How long to wait after an object is unreferenced before it becomes a Tombstone.
985
- *
986
- * After this point, there's a grace period before the object is deleted.
987
- * @see IGCRuntimeOptions.sweepGracePeriodMs
988
- *
989
- * So the full sweep timeout in a session is tombstoneTimeoutMs + sweepGracePeriodMs.
990
- */
991
- readonly tombstoneTimeoutMs?: number;
992
- }
993
-
994
- /**
995
- * @alpha
996
- */
997
- export declare interface IGCRuntimeOptions {
998
- /**
999
- * Flag that if true, will enable running garbage collection (GC) for a new container.
1000
- *
1001
- * GC has mark phase and sweep phase. In mark phase, unreferenced objects are identified
1002
- * and marked as such in the summary. This option enables the mark phase.
1003
- * In sweep phase, unreferenced objects are eventually deleted from the container if they meet certain conditions.
1004
- * Sweep phase can be enabled using the "enableGCSweep" option.
1005
- *
1006
- * Note: This setting is persisted in the container's summary and cannot be changed.
1007
- */
1008
- gcAllowed?: boolean;
1009
- /**
1010
- * Flag that if true, will disable garbage collection for the session.
1011
- * Can be used to disable running GC on containers where it is allowed via the gcAllowed option.
1012
- */
1013
- disableGC?: boolean;
1014
- /**
1015
- * Flag that if true, will enable the full Sweep Phase of garbage collection for this session,
1016
- * where Tombstoned objects are permanently deleted from the container.
1017
- *
1018
- * IMPORTANT: This only applies if this document is allowed to run Sweep Phase.
1019
- *
1020
- * Current default behavior is for Sweep Phase not to delete Tombstoned objects,
1021
- * but merely to prevent them from being loaded.
1022
- */
1023
- enableGCSweep?: true;
1024
- /**
1025
- * Flag that will bypass optimizations and generate GC data for all nodes irrespective of whether a node
1026
- * changed or not.
1027
- */
1028
- runFullGC?: boolean;
1029
- /**
1030
- * Maximum session duration for a new container. If not present, a default value will be used.
1031
- *
1032
- * Note: This setting is persisted in the container's summary and cannot be changed.
1033
- */
1034
- sessionExpiryTimeoutMs?: number;
1035
- /**
1036
- * Delay between when Tombstone should run and when the object should be deleted.
1037
- * This grace period gives a chance to intervene to recover if needed, before Sweep deletes the object.
1038
- * If not present, a default (non-zero) value will be used.
1039
- */
1040
- sweepGracePeriodMs?: number;
1041
- /**
1042
- * Allows additional GC options to be passed.
1043
- */
1044
- [key: string]: any;
1045
- }
1046
-
1047
- /**
1048
- * The statistics of the system state after a garbage collection run.
1049
- * @alpha
1050
- */
1051
- export declare interface IGCStats extends IMarkPhaseStats, ISweepPhaseStats {
1052
- }
1053
-
1054
- /**
1055
- * In addition to the normal summary tree + stats, this contains additional stats
1056
- * only relevant at the root of the tree.
1057
- * @alpha
1058
- */
1059
- export declare interface IGeneratedSummaryStats extends ISummaryStats {
1060
- /** The total number of data stores in the container. */
1061
- readonly dataStoreCount: number;
1062
- /** The number of data stores that were summarized in this summary. */
1063
- readonly summarizedDataStoreCount: number;
1064
- /** The number of data stores whose GC reference state was updated in this summary. */
1065
- readonly gcStateUpdatedDataStoreCount?: number;
1066
- /** The size of the gc blobs in this summary. */
1067
- readonly gcTotalBlobsSize?: number;
1068
- /** The number of gc blobs in this summary. */
1069
- readonly gcBlobNodeCount?: number;
1070
- /** The summary number for a container's summary. Incremented on summaries throughout its lifetime. */
1071
- readonly summaryNumber: number;
1072
- }
1073
-
1074
- /**
1075
- * Results of submitSummary after generating the summary tree.
1076
- * @alpha
1077
- */
1078
- export declare interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "stage"> {
1079
- readonly stage: "generate";
1080
- /** Generated summary tree. */
1081
- readonly summaryTree: ISummaryTree;
1082
- /** Stats for generated summary tree. */
1083
- readonly summaryStats: IGeneratedSummaryStats;
1084
- /** Time it took to generate the summary tree and stats. */
1085
- readonly generateDuration: number;
1086
- /** True if the full tree regeneration with no handle reuse optimizations was forced. */
1087
- readonly forcedFullTree: boolean;
1088
- }
1089
-
1090
- /**
1091
- * The statistics of the system state after a garbage collection mark phase run.
1092
- * @alpha
1093
- */
1094
- export declare interface IMarkPhaseStats {
1095
- /** The number of nodes in the container. */
1096
- nodeCount: number;
1097
- /** The number of data stores in the container. */
1098
- dataStoreCount: number;
1099
- /** The number of attachment blobs in the container. */
1100
- attachmentBlobCount: number;
1101
- /** The number of unreferenced nodes in the container. */
1102
- unrefNodeCount: number;
1103
- /** The number of unreferenced data stores in the container. */
1104
- unrefDataStoreCount: number;
1105
- /** The number of unreferenced attachment blobs in the container. */
1106
- unrefAttachmentBlobCount: number;
1107
- /** The number of nodes whose reference state updated since last GC run. */
1108
- updatedNodeCount: number;
1109
- /** The number of data stores whose reference state updated since last GC run. */
1110
- updatedDataStoreCount: number;
1111
- /** The number of attachment blobs whose reference state updated since last GC run. */
1112
- updatedAttachmentBlobCount: number;
1113
- }
1114
-
1115
- /**
1116
- * @alpha
1117
- */
1118
- export declare interface INackSummaryResult extends IRetriableFailureResult {
1119
- readonly summaryNackOp: ISummaryNackMessage;
1120
- readonly ackNackDuration: number;
1121
- }
1122
-
1123
- /**
1124
- * Inactive error responses will have this header set to true
1125
- * @alpha
1126
- */
1127
- export declare const InactiveResponseHeaderKey = "isInactive";
1128
-
1129
- /**
1130
- * @alpha
1131
- */
1132
- export declare interface IOnDemandSummarizeOptions extends ISummarizeOptions {
1133
- /** Reason for generating summary. */
1134
- readonly reason: string;
1135
- /** In case of a failure, will attempt to retry based on if the failure is retriable. */
1136
- readonly retryOnFailure?: boolean;
1137
- }
1138
-
1139
- /**
1140
- * Data required to update internal tracking state after receiving a Summary Ack.
1141
- * @alpha
1142
- */
1143
- export declare interface IRefreshSummaryAckOptions {
1144
- /** Handle from the ack's summary op. */
1145
- readonly proposalHandle: string | undefined;
1146
- /** Handle from the summary ack just received */
1147
- readonly ackHandle: string;
1148
- /** Reference sequence number from the ack's summary op */
1149
- readonly summaryRefSeq: number;
1150
- /** Telemetry logger to which telemetry events will be forwarded. */
1151
- readonly summaryLogger: ITelemetryLoggerExt;
1152
- }
1153
-
1154
- /**
1155
- * Type for summarization failures that are retriable.
1156
- * @alpha
1157
- */
1158
- export declare interface IRetriableFailureResult {
1159
- readonly retryAfterSeconds?: number;
1160
- }
1161
-
1162
- /**
1163
- * Serialized state of IOrderedClientElection.
1164
- * @alpha
1165
- */
1166
- export declare interface ISerializedElection {
1167
- /** Sequence number at the time of the latest election. */
1168
- readonly electionSequenceNumber: number;
1169
- /**
1170
- * Most recently elected client id. This is either:
1171
- *
1172
- * 1. the interactive elected parent client, in which case electedClientId === electedParentId,
1173
- * and the SummaryManager on the elected client will spawn a summarizer client, or
1174
- *
1175
- * 2. the non-interactive summarizer client itself.
1176
- */
1177
- readonly electedClientId: string | undefined;
1178
- /** Most recently elected parent client id. This is always an interactive client. */
1179
- readonly electedParentId: string | undefined;
1180
- }
1181
-
1182
- /* Excluded from this release type: isRuntimeMessage */
1183
-
1184
- /**
1185
- * Results of submitSummary after submitting the summarize op.
1186
- * @alpha
1187
- */
1188
- export declare interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, "stage" | "error"> {
1189
- readonly stage: "submit";
1190
- /** The client sequence number of the summarize op submitted for the summary. */
1191
- readonly clientSequenceNumber: number;
1192
- /** Time it took to submit the summarize op to the broadcasting service. */
1193
- readonly submitOpDuration: number;
1194
- }
1195
-
1196
- /**
1197
- * @alpha
1198
- */
1199
- export declare interface ISubmitSummaryOptions extends ISummarizeOptions {
1200
- /** Logger to use for correlated summary events */
1201
- readonly summaryLogger: ITelemetryLoggerExt;
1202
- /** Tells when summary process should be cancelled */
1203
- readonly cancellationToken: ISummaryCancellationToken;
1204
- /** Summarization may be attempted multiple times. This tells whether this is the final summarization attempt. */
1205
- readonly finalAttempt?: boolean;
1206
- /** The sequence number of the latest summary used to validate if summary state is correct before summarizing */
1207
- readonly latestSummaryRefSeqNum: number;
1208
- }
1209
-
1210
- /**
1211
- * @alpha
1212
- */
1213
- export declare interface ISummarizeEventProps {
1214
- result: "success" | "failure" | "canceled";
1215
- currentAttempt: number;
1216
- maxAttempts: number;
1217
- error?: any;
1218
- }
1219
-
1220
- /**
1221
- * Options affecting summarize behavior.
1222
- * @alpha
1223
- */
1224
- export declare interface ISummarizeOptions {
1225
- /** True to generate the full tree with no handle reuse optimizations; defaults to false */
1226
- readonly fullTree?: boolean;
1227
- /**
1228
- * True to ask the server what the latest summary is first; defaults to false
1229
- *
1230
- * @deprecated Summarize will not refresh latest snapshot state anymore. Instead it updates the cache and closes.
1231
- * It's expected a new summarizer client will be created, likely by the same parent.
1232
- */
1233
- readonly refreshLatestAck?: boolean;
1234
- }
1235
-
1236
- /**
1237
- * @alpha
1238
- */
1239
- export declare interface ISummarizer extends IEventProvider<ISummarizerEvents> {
1240
- /**
1241
- * Allows {@link ISummarizer} to be used with our {@link @fluidframework/core-interfaces#FluidObject} pattern.
1242
- */
1243
- readonly ISummarizer?: ISummarizer;
1244
- stop(reason: SummarizerStopReason): void;
1245
- close(): void;
1246
- run(onBehalfOf: string): Promise<SummarizerStopReason>;
1247
- /**
1248
- * Attempts to generate a summary on demand. If already running, takes no action.
1249
- * @param options - options controlling the summarize attempt
1250
- * @returns an alreadyRunning promise if a summarize attempt is already in progress,
1251
- * which will resolve when the current attempt completes. At that point caller can
1252
- * decide to try again or not. Otherwise, it will return an object containing promises
1253
- * that resolve as the summarize attempt progresses. They will resolve with success
1254
- * false if a failure is encountered.
1255
- */
1256
- summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
1257
- /**
1258
- * Enqueue an attempt to summarize after the specified sequence number.
1259
- * If afterSequenceNumber is provided, the summarize attempt is "enqueued"
1260
- * to run once an eligible op comes in with sequenceNumber \>= afterSequenceNumber.
1261
- * @param options - options controlling the summarize attempt
1262
- * @returns an object containing an alreadyEnqueued flag to indicate if another
1263
- * summarize attempt has already been enqueued. It also may contain an overridden flag
1264
- * when alreadyEnqueued is true, that indicates whether this attempt forced the
1265
- * previous attempt to abort. If this attempt becomes enqueued, it returns an object
1266
- * containing promises that resolve as the summarize attempt progresses. They will
1267
- * resolve with success false if a failure is encountered.
1268
- */
1269
- enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;
1270
- }
1271
-
1272
- /**
1273
- * @alpha
1274
- */
1275
- export declare interface ISummarizeResults {
1276
- /** Resolves when we generate, upload, and submit the summary. */
1277
- readonly summarySubmitted: Promise<SummarizeResultPart<SubmitSummaryResult, SubmitSummaryFailureData>>;
1278
- /** Resolves when we observe our summarize op broadcast. */
1279
- readonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;
1280
- /** Resolves when we receive a summaryAck or summaryNack. */
1281
- readonly receivedSummaryAckOrNack: Promise<SummarizeResultPart<IAckSummaryResult, INackSummaryResult>>;
1282
- }
1283
-
1284
- /**
1285
- * @alpha
1286
- */
1287
- export declare interface ISummarizerEvents extends IEvent {
1288
- (event: "summarize", listener: (props: ISummarizeEventProps) => void): any;
1289
- }
1290
-
1291
- /**
1292
- * @alpha
1293
- */
1294
- export declare interface ISummarizerInternalsProvider {
1295
- /** Encapsulates the work to walk the internals of the running container to generate a summary */
1296
- submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
1297
- /** Callback whenever a new SummaryAck is received, to update internal tracking state */
1298
- refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void>;
1299
- }
1300
-
1301
- /**
1302
- * @alpha
1303
- */
1304
- export declare interface ISummarizerRuntime extends IConnectableRuntime {
1305
- readonly logger: ITelemetryLoggerExt;
1306
- /** clientId of parent (non-summarizing) container that owns summarizer container */
1307
- readonly summarizerClientId: string | undefined;
1308
- readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
1309
- disposeFn(): void;
1310
- closeFn(): void;
1311
- on(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): this;
1312
- off(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): this;
1313
- }
1314
-
1315
- /* Excluded from this release type: ISummarizingWarning */
1316
-
1317
- /**
1318
- * A single summary which can be tracked as it goes through its life cycle.
1319
- * The life cycle is: Local to Broadcast to Acked/Nacked.
1320
- * @alpha
1321
- */
1322
- export declare interface ISummary {
1323
- readonly clientId: string;
1324
- readonly clientSequenceNumber: number;
1325
- waitBroadcast(): Promise<ISummaryOpMessage>;
1326
- waitAckNack(): Promise<ISummaryAckMessage | ISummaryNackMessage>;
1327
- }
1328
-
1329
- /**
1330
- * Interface for summary ack messages with typed contents.
1331
- * @alpha
1332
- */
1333
- export declare interface ISummaryAckMessage extends ISequencedDocumentMessage {
1334
- type: MessageType.SummaryAck;
1335
- contents: ISummaryAck;
1336
- }
1337
-
1338
- /**
1339
- * @alpha
1340
- */
1341
- export declare interface ISummaryBaseConfiguration {
1342
- /**
1343
- * Delay before first attempt to spawn summarizing container.
1344
- */
1345
- initialSummarizerDelayMs: number;
1346
- /**
1347
- * Defines the maximum allowed time to wait for a pending summary ack.
1348
- * The maximum amount of time client will wait for a summarize is the minimum of
1349
- * maxSummarizeAckWaitTime (currently 3 * 60 * 1000) and maxAckWaitTime.
1350
- */
1351
- maxAckWaitTime: number;
1352
- /**
1353
- * Defines the maximum number of Ops in between Summaries that can be
1354
- * allowed before forcibly electing a new summarizer client.
1355
- */
1356
- maxOpsSinceLastSummary: number;
1357
- }
1358
-
1359
- /**
1360
- * Similar to AbortSignal, but using promise instead of events
1361
- * @alpha
1362
- */
1363
- export declare type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;
1364
-
1365
- /**
1366
- * @alpha
1367
- */
1368
- export declare interface ISummaryCollectionOpEvents extends IEvent {
1369
- (event: OpActionEventName, listener: OpActionEventListener): any;
1370
- }
1371
-
1372
- /**
1373
- * @alpha
1374
- */
1375
- export declare type ISummaryConfiguration = ISummaryConfigurationDisableSummarizer | ISummaryConfigurationDisableHeuristics | ISummaryConfigurationHeuristics;
1376
-
1377
- /**
1378
- * @alpha
1379
- */
1380
- export declare interface ISummaryConfigurationDisableHeuristics extends ISummaryBaseConfiguration {
1381
- state: "disableHeuristics";
1382
- }
1383
-
1384
- /**
1385
- * @alpha
1386
- */
1387
- export declare interface ISummaryConfigurationDisableSummarizer {
1388
- state: "disabled";
1389
- }
1390
-
1391
- /**
1392
- * @alpha
1393
- */
1394
- export declare interface ISummaryConfigurationHeuristics extends ISummaryBaseConfiguration {
1395
- state: "enabled";
1396
- /**
1397
- * Defines the maximum allowed time, since the last received Ack, before running the summary
1398
- * with reason maxTime.
1399
- * For example, say we receive ops one by one just before the idle time is triggered.
1400
- * In this case, we still want to run a summary since it's been a while since the last summary.
1401
- */
1402
- maxTime: number;
1403
- /**
1404
- * Defines the maximum number of Ops, since the last received Ack, that can be allowed
1405
- * before running the summary with reason maxOps.
1406
- */
1407
- maxOps: number;
1408
- /**
1409
- * Defines the minimum number of Ops, since the last received Ack, that can be allowed
1410
- * before running the last summary.
1411
- */
1412
- minOpsForLastSummaryAttempt: number;
1413
- /**
1414
- * Defines the lower boundary for the allowed time in between summarizations.
1415
- * Pairs with maxIdleTime to form a range.
1416
- * For example, if we only receive 1 op, we don't want to have the same idle time as say 100 ops.
1417
- * Based on the boundaries we set in minIdleTime and maxIdleTime, the idle time will change
1418
- * linearly depending on the number of ops we receive.
1419
- */
1420
- minIdleTime: number;
1421
- /**
1422
- * Defines the upper boundary for the allowed time in between summarizations.
1423
- * Pairs with minIdleTime to form a range.
1424
- * For example, if we only receive 1 op, we don't want to have the same idle time as say 100 ops.
1425
- * Based on the boundaries we set in minIdleTime and maxIdleTime, the idle time will change
1426
- * linearly depending on the number of ops we receive.
1427
- */
1428
- maxIdleTime: number;
1429
- /**
1430
- * Runtime op weight to use in heuristic summarizing.
1431
- * This number is a multiplier on the number of runtime ops we process when running summarize heuristics.
1432
- * For example: (multiplier) * (number of runtime ops) = weighted number of runtime ops
1433
- */
1434
- runtimeOpWeight: number;
1435
- /**
1436
- * Non-runtime op weight to use in heuristic summarizing
1437
- * This number is a multiplier on the number of non-runtime ops we process when running summarize heuristics.
1438
- * For example: (multiplier) * (number of non-runtime ops) = weighted number of non-runtime ops
1439
- */
1440
- nonRuntimeOpWeight: number;
1441
- /**
1442
- * Number of ops since last summary needed before a non-runtime op can trigger running summary heuristics.
1443
- *
1444
- * Note: Any runtime ops sent before the threshold is reached will trigger heuristics normally.
1445
- * This threshold ONLY applies to non-runtime ops triggering summaries.
1446
- *
1447
- * For example: Say the threshold is 20. Sending 19 non-runtime ops will not trigger any heuristic checks.
1448
- * Sending the 20th non-runtime op will trigger the heuristic checks for summarizing.
1449
- */
1450
- nonRuntimeHeuristicThreshold?: number;
1451
- }
1452
-
1453
- /**
1454
- * The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary.
1455
- * @alpha
1456
- */
1457
- export declare type ISummaryMetadataMessage = Pick<ISequencedDocumentMessage, "clientId" | "clientSequenceNumber" | "minimumSequenceNumber" | "referenceSequenceNumber" | "sequenceNumber" | "timestamp" | "type">;
1458
-
1459
- /**
1460
- * Interface for summary nack messages with typed contents.
1461
- * @alpha
1462
- */
1463
- export declare interface ISummaryNackMessage extends ISequencedDocumentMessage {
1464
- type: MessageType.SummaryNack;
1465
- contents: ISummaryNack;
1466
- }
1467
-
1468
- /**
1469
- * Interface for summary op messages with typed contents.
1470
- * @alpha
1471
- */
1472
- export declare interface ISummaryOpMessage extends ISequencedDocumentMessage {
1473
- type: MessageType.Summarize;
1474
- contents: ISummaryContent;
1475
- }
1476
-
1477
- /**
1478
- * @alpha
1479
- */
1480
- export declare interface ISummaryRuntimeOptions {
1481
- /** Override summary configurations set by the server. */
1482
- summaryConfigOverrides?: ISummaryConfiguration;
1483
- /**
1484
- * Delay before first attempt to spawn summarizing container.
1485
- *
1486
- * @deprecated Use {@link ISummaryRuntimeOptions.summaryConfigOverrides}'s
1487
- * {@link ISummaryBaseConfiguration.initialSummarizerDelayMs} instead.
1488
- */
1489
- initialSummarizerDelayMs?: number;
1490
- }
1491
-
1492
- /**
1493
- * The statistics of the system state after a garbage collection sweep phase run.
1494
- * @alpha
1495
- */
1496
- export declare interface ISweepPhaseStats {
1497
- /** The number of nodes in the lifetime of the container. */
1498
- lifetimeNodeCount: number;
1499
- /** The number of data stores in the lifetime of the container. */
1500
- lifetimeDataStoreCount: number;
1501
- /** The number of attachment blobs in the lifetime of the container. */
1502
- lifetimeAttachmentBlobCount: number;
1503
- /** The number of deleted nodes in the container. */
1504
- deletedNodeCount: number;
1505
- /** The number of deleted data stores in the container. */
1506
- deletedDataStoreCount: number;
1507
- /** The number of deleted attachment blobs in the container. */
1508
- deletedAttachmentBlobCount: number;
1509
- }
1510
-
1511
- /**
1512
- * Results of submitSummary after uploading the tree to storage.
1513
- * @alpha
1514
- */
1515
- export declare interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, "stage"> {
1516
- readonly stage: "upload";
1517
- /** The handle returned by storage pointing to the uploaded summary tree. */
1518
- readonly handle: string;
1519
- /** Time it took to upload the summary tree to storage. */
1520
- readonly uploadDuration: number;
1521
- }
1522
-
1523
- /* Excluded from this release type: neverCancelledSummaryToken */
1524
-
1525
- /**
1526
- * @alpha
1527
- */
1528
- export declare type OpActionEventListener = (op: ISequencedDocumentMessage) => void;
1529
-
1530
- /**
1531
- * @alpha
1532
- */
1533
- export declare type OpActionEventName = MessageType.Summarize | MessageType.SummaryAck | MessageType.SummaryNack | "default";
1534
-
1535
- /* Excluded from this release type: RecentlyAddedContainerRuntimeMessageDetails */
1536
-
1537
- /* Excluded from this release type: RuntimeHeaders */
1538
-
1539
- /* Excluded from this release type: RuntimeMessage */
1540
-
1541
- /**
1542
- * The data in summarizer result when submit summary stage fails.
1543
- * @alpha
1544
- */
1545
- export declare interface SubmitSummaryFailureData extends IRetriableFailureResult {
1546
- stage: SummaryStage;
1547
- }
1548
-
1549
- /**
1550
- * Strict type representing result of a submitSummary attempt.
1551
- * The result consists of 4 possible stages, each with its own data.
1552
- * The data is cumulative, so each stage will contain the data from the previous stages.
1553
- * If the final "submitted" stage is not reached, the result may contain the error object.
1554
- *
1555
- * Stages:
1556
- *
1557
- * 1. "base" - stopped before the summary tree was even generated, and the result only contains the base data
1558
- *
1559
- * 2. "generate" - the summary tree was generated, and the result will contain that tree + stats
1560
- *
1561
- * 3. "upload" - the summary was uploaded to storage, and the result contains the server-provided handle
1562
- *
1563
- * 4. "submit" - the summarize op was submitted, and the result contains the op client sequence number.
1564
- * @alpha
1565
- */
1566
- export declare type SubmitSummaryResult = IBaseSummarizeResult | IGenerateSummaryTreeResult | IUploadSummaryResult | ISubmitSummaryOpResult;
1567
-
1568
- /**
1569
- * Summarizer is responsible for coordinating when to generate and send summaries.
1570
- * It is the main entry point for summary work.
1571
- * It is created only by summarizing container (i.e. one with clientType === "summarizer")
1572
- * @alpha
1573
- */
1574
- export declare class Summarizer extends TypedEventEmitter<ISummarizerEvents> implements ISummarizer {
1575
- /** Reference to runtime that created this object.
1576
- * i.e. runtime with clientType === "summarizer"
1577
- */
1578
- private readonly runtime;
1579
- private readonly configurationGetter;
1580
- /** Represents an object that can generate summary.
1581
- * In practical terms, it's same runtime (this.runtime) with clientType === "summarizer".
1582
- */
1583
- private readonly internalsProvider;
1584
- readonly summaryCollection: SummaryCollection;
1585
- private readonly runCoordinatorCreateFn;
1586
- get ISummarizer(): this;
1587
- private readonly logger;
1588
- private runningSummarizer?;
1589
- private _disposed;
1590
- private starting;
1591
- private readonly stopDeferred;
1592
- constructor(
1593
- /** Reference to runtime that created this object.
1594
- * i.e. runtime with clientType === "summarizer"
1595
- */
1596
- runtime: ISummarizerRuntime, configurationGetter: () => ISummaryConfiguration,
1597
- /** Represents an object that can generate summary.
1598
- * In practical terms, it's same runtime (this.runtime) with clientType === "summarizer".
1599
- */
1600
- internalsProvider: ISummarizerInternalsProvider, handleContext: IFluidHandleContext, summaryCollection: SummaryCollection, runCoordinatorCreateFn: (runtime: IConnectableRuntime) => Promise<ICancellableSummarizerController>);
1601
- run(onBehalfOf: string): Promise<SummarizerStopReason>;
1602
- /**
1603
- * Stops the summarizer from running. This will complete
1604
- * the run promise, and also close the container.
1605
- * @param reason - reason code for stopping
1606
- */
1607
- stop(reason: SummarizerStopReason): void;
1608
- close(): void;
1609
- private runCore;
1610
- /**
1611
- * Should we try to run a last summary for the given stop reason?
1612
- * Currently only allows "parentNotConnected"
1613
- * @param stopReason - SummarizerStopReason
1614
- * @returns `true` if the stop reason can run a last summary, otherwise `false`.
1615
- */
1616
- static stopReasonCanRunLastSummary(stopReason: SummarizerStopReason): boolean;
1617
- private _heuristicData;
1618
- /**
1619
- * Put the summarizer in a started state, including creating and initializing the RunningSummarizer.
1620
- * The start request can come either from the SummaryManager (in the auto-summarize case) or from the user
1621
- * (in the on-demand case).
1622
- * @param onBehalfOf - ID of the client that requested that the summarizer start
1623
- * @param runCoordinator - cancellation token
1624
- * @param newConfig - Summary configuration to override the existing config when invoking the RunningSummarizer.
1625
- * @returns A promise that is fulfilled when the RunningSummarizer is ready.
1626
- */
1627
- private start;
1628
- private readonly handleSummarizeEvent;
1629
- /**
1630
- * Disposes of resources after running. This cleanup will
1631
- * clear any outstanding timers and reset some of the state
1632
- * properties.
1633
- * Called by ContainerRuntime when it is disposed, as well as at the end the run().
1634
- */
1635
- dispose(): void;
1636
- summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
1637
- enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;
1638
- recordSummaryAttempt?(summaryRefSeqNum?: number): void;
1639
- }
1640
-
1641
- /**
1642
- * @alpha
1643
- */
1644
- export declare type SummarizeResultPart<TSuccess, TFailure = undefined> = {
1645
- success: true;
1646
- data: TSuccess;
1647
- } | {
1648
- success: false;
1649
- data: TFailure | undefined;
1650
- message: string;
1651
- error: any;
1652
- };
1653
-
1654
- /**
1655
- * @alpha
1656
- */
1657
- export declare type SummarizerStopReason =
1658
- /** Summarizer client failed to summarize in all attempts. */
1659
- "failToSummarize"
1660
- /** Parent client reported that it is no longer connected. */
1661
- | "parentNotConnected"
1662
- /**
1663
- * Parent client reported that it is no longer elected the summarizer.
1664
- * This is the normal flow; a disconnect will always trigger the parent
1665
- * client to no longer be elected as responsible for summaries. Then it
1666
- * tries to stop its spawned summarizer client.
1667
- */
1668
- | "notElectedParent"
1669
- /**
1670
- * We are not already running the summarizer and we are not the current elected client id.
1671
- */
1672
- | "notElectedClient"
1673
- /** Summarizer client was disconnected */
1674
- | "summarizerClientDisconnected"
1675
- /** running summarizer threw an exception */
1676
- | "summarizerException"
1677
- /**
1678
- * The previous summary state on the summarizer is not the most recently acked summary. this also happens when the
1679
- * first submitSummary attempt fails for any reason and there's a 2nd summary attempt without an ack
1680
- */
1681
- | "latestSummaryStateStale";
1682
-
1683
- /**
1684
- * Data structure that looks at the op stream to track summaries as they
1685
- * are broadcast, acked and nacked.
1686
- * It provides functionality for watching specific summaries.
1687
- * @alpha
1688
- */
1689
- export declare class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEvents> {
1690
- private readonly deltaManager;
1691
- private readonly logger;
1692
- private readonly summaryWatchers;
1693
- private readonly pendingSummaries;
1694
- private refreshWaitNextAck;
1695
- private lastSummaryTimestamp;
1696
- private maxAckWaitTime;
1697
- private pendingAckTimerTimeoutCallback;
1698
- private lastAck;
1699
- get latestAck(): IAckedSummary | undefined;
1700
- emit(event: OpActionEventName, ...args: Parameters<OpActionEventListener>): boolean;
1701
- get opsSinceLastAck(): number;
1702
- addOpListener(listener: () => void): void;
1703
- removeOpListener(listener: () => void): void;
1704
- constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, logger: ITelemetryLoggerExt);
1705
- /**
1706
- * Creates and returns a summary watcher for a specific client.
1707
- * This will allow for local sent summaries to be better tracked.
1708
- * @param clientId - client id for watcher
1709
- */
1710
- createWatcher(clientId: string): IClientSummaryWatcher;
1711
- removeWatcher(clientId: string): void;
1712
- setPendingAckTimerTimeoutCallback(maxAckWaitTime: number, timeoutCallback: () => void): void;
1713
- unsetPendingAckTimerTimeoutCallback(): void;
1714
- /**
1715
- * Returns a promise that resolves once all pending summary ops
1716
- * have been acked or nacked.
1717
- */
1718
- waitFlushed(): Promise<IAckedSummary | undefined>;
1719
- /**
1720
- * Returns a promise that resolves once a summary is acked that has a reference
1721
- * sequence number greater than or equal to the passed in sequence number.
1722
- * @param referenceSequenceNumber - reference sequence number to wait for
1723
- * @returns The latest acked summary
1724
- */
1725
- waitSummaryAck(referenceSequenceNumber: number): Promise<IAckedSummary>;
1726
- private parseContent;
1727
- /**
1728
- * Handler for ops; only handles ops relating to summaries.
1729
- * @param op - op message to handle
1730
- */
1731
- private handleOp;
1732
- private handleSummaryOp;
1733
- private handleSummaryAck;
1734
- private handleSummaryNack;
1735
- }
1736
-
1737
- /**
1738
- * The stages of Summarize, used to describe how far progress succeeded in case of a failure at a later stage.
1739
- * @alpha
1740
- */
1741
- export declare type SummaryStage = SubmitSummaryResult["stage"] | "unknown";
1742
-
1743
- /**
1744
- * Tombstone error responses will have this header set to true
1745
- * @alpha
1746
- */
1747
- export declare const TombstoneResponseHeaderKey = "isTombstoned";
1748
-
1749
- /* Excluded from this release type: UnknownContainerRuntimeMessage */
1750
-
1751
- /* Excluded from this release type: unpackRuntimeMessage */
1752
-
1753
- export { }