@fluidframework/container-runtime 2.53.1 → 2.60.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 (461) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-report/{container-runtime.legacy.alpha.api.md → container-runtime.legacy.beta.api.md} +55 -55
  3. package/container-runtime.test-files.tar +0 -0
  4. package/dist/batchTracker.d.ts +1 -1
  5. package/dist/batchTracker.d.ts.map +1 -1
  6. package/dist/batchTracker.js.map +1 -1
  7. package/dist/blobManager/blobManager.d.ts +8 -2
  8. package/dist/blobManager/blobManager.d.ts.map +1 -1
  9. package/dist/blobManager/blobManager.js +45 -33
  10. package/dist/blobManager/blobManager.js.map +1 -1
  11. package/dist/blobManager/index.d.ts +2 -2
  12. package/dist/blobManager/index.d.ts.map +1 -1
  13. package/dist/blobManager/index.js.map +1 -1
  14. package/dist/channelCollection.d.ts +9 -11
  15. package/dist/channelCollection.d.ts.map +1 -1
  16. package/dist/channelCollection.js +2 -3
  17. package/dist/channelCollection.js.map +1 -1
  18. package/dist/compressionDefinitions.d.ts +3 -6
  19. package/dist/compressionDefinitions.d.ts.map +1 -1
  20. package/dist/compressionDefinitions.js +2 -4
  21. package/dist/compressionDefinitions.js.map +1 -1
  22. package/dist/connectionTelemetry.d.ts +3 -4
  23. package/dist/connectionTelemetry.d.ts.map +1 -1
  24. package/dist/connectionTelemetry.js.map +1 -1
  25. package/dist/containerHandleContext.d.ts +2 -2
  26. package/dist/containerHandleContext.d.ts.map +1 -1
  27. package/dist/containerHandleContext.js.map +1 -1
  28. package/dist/containerRuntime.d.ts +13 -20
  29. package/dist/containerRuntime.d.ts.map +1 -1
  30. package/dist/containerRuntime.js +3 -6
  31. package/dist/containerRuntime.js.map +1 -1
  32. package/dist/dataStore.d.ts +3 -3
  33. package/dist/dataStore.d.ts.map +1 -1
  34. package/dist/dataStore.js.map +1 -1
  35. package/dist/dataStoreContext.d.ts +8 -8
  36. package/dist/dataStoreContext.d.ts.map +1 -1
  37. package/dist/dataStoreContext.js.map +1 -1
  38. package/dist/dataStoreContexts.d.ts +2 -2
  39. package/dist/dataStoreContexts.d.ts.map +1 -1
  40. package/dist/dataStoreContexts.js.map +1 -1
  41. package/dist/dataStoreRegistry.d.ts +1 -1
  42. package/dist/dataStoreRegistry.d.ts.map +1 -1
  43. package/dist/dataStoreRegistry.js.map +1 -1
  44. package/dist/deltaManagerProxies.d.ts +2 -3
  45. package/dist/deltaManagerProxies.d.ts.map +1 -1
  46. package/dist/deltaManagerProxies.js.map +1 -1
  47. package/dist/deltaScheduler.d.ts +2 -2
  48. package/dist/deltaScheduler.d.ts.map +1 -1
  49. package/dist/deltaScheduler.js.map +1 -1
  50. package/dist/error.d.ts +1 -1
  51. package/dist/error.d.ts.map +1 -1
  52. package/dist/error.js.map +1 -1
  53. package/dist/gc/garbageCollection.d.ts +4 -4
  54. package/dist/gc/garbageCollection.d.ts.map +1 -1
  55. package/dist/gc/garbageCollection.js.map +1 -1
  56. package/dist/gc/gcConfigs.d.ts +3 -3
  57. package/dist/gc/gcConfigs.d.ts.map +1 -1
  58. package/dist/gc/gcConfigs.js.map +1 -1
  59. package/dist/gc/gcDefinitions.d.ts +10 -11
  60. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  61. package/dist/gc/gcDefinitions.js.map +1 -1
  62. package/dist/gc/gcHelpers.d.ts +4 -4
  63. package/dist/gc/gcHelpers.d.ts.map +1 -1
  64. package/dist/gc/gcHelpers.js.map +1 -1
  65. package/dist/gc/gcReferenceGraphAlgorithm.d.ts +1 -1
  66. package/dist/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -1
  67. package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
  68. package/dist/gc/gcSummaryDefinitions.d.ts +1 -1
  69. package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
  70. package/dist/gc/gcSummaryDefinitions.js.map +1 -1
  71. package/dist/gc/gcSummaryStateTracker.d.ts +4 -4
  72. package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
  73. package/dist/gc/gcSummaryStateTracker.js.map +1 -1
  74. package/dist/gc/gcTelemetry.d.ts +6 -6
  75. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  76. package/dist/gc/gcTelemetry.js.map +1 -1
  77. package/dist/gc/index.d.ts +3 -3
  78. package/dist/gc/index.d.ts.map +1 -1
  79. package/dist/gc/index.js.map +1 -1
  80. package/dist/inboundBatchAggregator.d.ts +2 -2
  81. package/dist/inboundBatchAggregator.d.ts.map +1 -1
  82. package/dist/inboundBatchAggregator.js.map +1 -1
  83. package/dist/index.d.ts +7 -7
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js.map +1 -1
  86. package/dist/messageTypes.d.ts +7 -8
  87. package/dist/messageTypes.d.ts.map +1 -1
  88. package/dist/messageTypes.js +1 -2
  89. package/dist/messageTypes.js.map +1 -1
  90. package/dist/opLifecycle/batchManager.d.ts +2 -2
  91. package/dist/opLifecycle/batchManager.d.ts.map +1 -1
  92. package/dist/opLifecycle/batchManager.js.map +1 -1
  93. package/dist/opLifecycle/definitions.d.ts +1 -1
  94. package/dist/opLifecycle/definitions.d.ts.map +1 -1
  95. package/dist/opLifecycle/definitions.js.map +1 -1
  96. package/dist/opLifecycle/duplicateBatchDetector.d.ts +1 -1
  97. package/dist/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  98. package/dist/opLifecycle/duplicateBatchDetector.js.map +1 -1
  99. package/dist/opLifecycle/index.d.ts +5 -5
  100. package/dist/opLifecycle/index.d.ts.map +1 -1
  101. package/dist/opLifecycle/index.js.map +1 -1
  102. package/dist/opLifecycle/opCompressor.d.ts +2 -2
  103. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  104. package/dist/opLifecycle/opCompressor.js.map +1 -1
  105. package/dist/opLifecycle/opDecompressor.d.ts +2 -2
  106. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  107. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  108. package/dist/opLifecycle/opGroupingManager.d.ts +3 -3
  109. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  110. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  111. package/dist/opLifecycle/opSplitter.d.ts +4 -4
  112. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  113. package/dist/opLifecycle/opSplitter.js.map +1 -1
  114. package/dist/opLifecycle/outbox.d.ts +9 -9
  115. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  116. package/dist/opLifecycle/outbox.js.map +1 -1
  117. package/dist/opLifecycle/remoteMessageProcessor.d.ts +4 -4
  118. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  119. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  120. package/dist/opProperties.d.ts +1 -1
  121. package/dist/opProperties.d.ts.map +1 -1
  122. package/dist/opProperties.js.map +1 -1
  123. package/dist/packageVersion.d.ts +1 -1
  124. package/dist/packageVersion.js +1 -1
  125. package/dist/packageVersion.js.map +1 -1
  126. package/dist/pendingStateManager.d.ts +3 -3
  127. package/dist/pendingStateManager.d.ts.map +1 -1
  128. package/dist/pendingStateManager.js.map +1 -1
  129. package/dist/storageServiceWithAttachBlobs.d.ts +1 -1
  130. package/dist/storageServiceWithAttachBlobs.d.ts.map +1 -1
  131. package/dist/storageServiceWithAttachBlobs.js.map +1 -1
  132. package/dist/summary/documentSchema.d.ts +1 -2
  133. package/dist/summary/documentSchema.d.ts.map +1 -1
  134. package/dist/summary/documentSchema.js.map +1 -1
  135. package/dist/summary/index.d.ts +10 -10
  136. package/dist/summary/index.d.ts.map +1 -1
  137. package/dist/summary/index.js.map +1 -1
  138. package/dist/summary/orderedClientElection.d.ts +4 -4
  139. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  140. package/dist/summary/orderedClientElection.js.map +1 -1
  141. package/dist/summary/summarizerClientElection.d.ts +5 -5
  142. package/dist/summary/summarizerClientElection.d.ts.map +1 -1
  143. package/dist/summary/summarizerClientElection.js.map +1 -1
  144. package/dist/summary/summarizerNode/index.d.ts +3 -3
  145. package/dist/summary/summarizerNode/index.d.ts.map +1 -1
  146. package/dist/summary/summarizerNode/index.js.map +1 -1
  147. package/dist/summary/summarizerNode/summarizerNode.d.ts +5 -6
  148. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  149. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  150. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +3 -3
  151. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  152. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  153. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -3
  154. package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  155. package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  156. package/dist/summary/summarizerTypes.d.ts +25 -44
  157. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  158. package/dist/summary/summarizerTypes.js.map +1 -1
  159. package/dist/summary/summarizerUtils.d.ts +3 -3
  160. package/dist/summary/summarizerUtils.d.ts.map +1 -1
  161. package/dist/summary/summarizerUtils.js.map +1 -1
  162. package/dist/summary/summaryCollection.d.ts +13 -23
  163. package/dist/summary/summaryCollection.d.ts.map +1 -1
  164. package/dist/summary/summaryCollection.js +1 -2
  165. package/dist/summary/summaryCollection.js.map +1 -1
  166. package/dist/summary/summaryDelayLoadedModule/index.d.ts +2 -2
  167. package/dist/summary/summaryDelayLoadedModule/index.d.ts.map +1 -1
  168. package/dist/summary/summaryDelayLoadedModule/index.js.map +1 -1
  169. package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts +1 -1
  170. package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts.map +1 -1
  171. package/dist/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.js.map +1 -1
  172. package/dist/summary/summaryDelayLoadedModule/runningSummarizer.d.ts +3 -3
  173. package/dist/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -1
  174. package/dist/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -1
  175. package/dist/summary/summaryDelayLoadedModule/summarizer.d.ts +5 -5
  176. package/dist/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -1
  177. package/dist/summary/summaryDelayLoadedModule/summarizer.js.map +1 -1
  178. package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts +3 -4
  179. package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -1
  180. package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -1
  181. package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +3 -3
  182. package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -1
  183. package/dist/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -1
  184. package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts +1 -1
  185. package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts.map +1 -1
  186. package/dist/summary/summaryDelayLoadedModule/summaryResultBuilder.js.map +1 -1
  187. package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts +5 -10
  188. package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts.map +1 -1
  189. package/dist/summary/summaryDelayLoadedModule/summaryResultTypes.js.map +1 -1
  190. package/dist/summary/summaryFormat.d.ts +9 -14
  191. package/dist/summary/summaryFormat.d.ts.map +1 -1
  192. package/dist/summary/summaryFormat.js.map +1 -1
  193. package/dist/summary/summaryHelpers.d.ts +1 -2
  194. package/dist/summary/summaryHelpers.d.ts.map +1 -1
  195. package/dist/summary/summaryHelpers.js +1 -2
  196. package/dist/summary/summaryHelpers.js.map +1 -1
  197. package/dist/summary/summaryManager.d.ts +3 -3
  198. package/dist/summary/summaryManager.d.ts.map +1 -1
  199. package/dist/summary/summaryManager.js.map +1 -1
  200. package/lib/batchTracker.d.ts +1 -1
  201. package/lib/batchTracker.d.ts.map +1 -1
  202. package/lib/batchTracker.js.map +1 -1
  203. package/lib/blobManager/blobManager.d.ts +8 -2
  204. package/lib/blobManager/blobManager.d.ts.map +1 -1
  205. package/lib/blobManager/blobManager.js +37 -25
  206. package/lib/blobManager/blobManager.js.map +1 -1
  207. package/lib/blobManager/index.d.ts +2 -2
  208. package/lib/blobManager/index.d.ts.map +1 -1
  209. package/lib/blobManager/index.js.map +1 -1
  210. package/lib/channelCollection.d.ts +9 -11
  211. package/lib/channelCollection.d.ts.map +1 -1
  212. package/lib/channelCollection.js +2 -3
  213. package/lib/channelCollection.js.map +1 -1
  214. package/lib/compressionDefinitions.d.ts +3 -6
  215. package/lib/compressionDefinitions.d.ts.map +1 -1
  216. package/lib/compressionDefinitions.js +2 -4
  217. package/lib/compressionDefinitions.js.map +1 -1
  218. package/lib/connectionTelemetry.d.ts +3 -4
  219. package/lib/connectionTelemetry.d.ts.map +1 -1
  220. package/lib/connectionTelemetry.js.map +1 -1
  221. package/lib/containerHandleContext.d.ts +2 -2
  222. package/lib/containerHandleContext.d.ts.map +1 -1
  223. package/lib/containerHandleContext.js.map +1 -1
  224. package/lib/containerRuntime.d.ts +13 -20
  225. package/lib/containerRuntime.d.ts.map +1 -1
  226. package/lib/containerRuntime.js +3 -6
  227. package/lib/containerRuntime.js.map +1 -1
  228. package/lib/dataStore.d.ts +3 -3
  229. package/lib/dataStore.d.ts.map +1 -1
  230. package/lib/dataStore.js.map +1 -1
  231. package/lib/dataStoreContext.d.ts +8 -8
  232. package/lib/dataStoreContext.d.ts.map +1 -1
  233. package/lib/dataStoreContext.js.map +1 -1
  234. package/lib/dataStoreContexts.d.ts +2 -2
  235. package/lib/dataStoreContexts.d.ts.map +1 -1
  236. package/lib/dataStoreContexts.js.map +1 -1
  237. package/lib/dataStoreRegistry.d.ts +1 -1
  238. package/lib/dataStoreRegistry.d.ts.map +1 -1
  239. package/lib/dataStoreRegistry.js.map +1 -1
  240. package/lib/deltaManagerProxies.d.ts +2 -3
  241. package/lib/deltaManagerProxies.d.ts.map +1 -1
  242. package/lib/deltaManagerProxies.js.map +1 -1
  243. package/lib/deltaScheduler.d.ts +2 -2
  244. package/lib/deltaScheduler.d.ts.map +1 -1
  245. package/lib/deltaScheduler.js +1 -1
  246. package/lib/deltaScheduler.js.map +1 -1
  247. package/lib/error.d.ts +1 -1
  248. package/lib/error.d.ts.map +1 -1
  249. package/lib/error.js.map +1 -1
  250. package/lib/gc/garbageCollection.d.ts +4 -4
  251. package/lib/gc/garbageCollection.d.ts.map +1 -1
  252. package/lib/gc/garbageCollection.js.map +1 -1
  253. package/lib/gc/gcConfigs.d.ts +3 -3
  254. package/lib/gc/gcConfigs.d.ts.map +1 -1
  255. package/lib/gc/gcConfigs.js.map +1 -1
  256. package/lib/gc/gcDefinitions.d.ts +10 -11
  257. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  258. package/lib/gc/gcDefinitions.js.map +1 -1
  259. package/lib/gc/gcHelpers.d.ts +4 -4
  260. package/lib/gc/gcHelpers.d.ts.map +1 -1
  261. package/lib/gc/gcHelpers.js.map +1 -1
  262. package/lib/gc/gcReferenceGraphAlgorithm.d.ts +1 -1
  263. package/lib/gc/gcReferenceGraphAlgorithm.d.ts.map +1 -1
  264. package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
  265. package/lib/gc/gcSummaryDefinitions.d.ts +1 -1
  266. package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
  267. package/lib/gc/gcSummaryDefinitions.js.map +1 -1
  268. package/lib/gc/gcSummaryStateTracker.d.ts +4 -4
  269. package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
  270. package/lib/gc/gcSummaryStateTracker.js.map +1 -1
  271. package/lib/gc/gcTelemetry.d.ts +6 -6
  272. package/lib/gc/gcTelemetry.d.ts.map +1 -1
  273. package/lib/gc/gcTelemetry.js.map +1 -1
  274. package/lib/gc/index.d.ts +3 -3
  275. package/lib/gc/index.d.ts.map +1 -1
  276. package/lib/gc/index.js.map +1 -1
  277. package/lib/inboundBatchAggregator.d.ts +2 -2
  278. package/lib/inboundBatchAggregator.d.ts.map +1 -1
  279. package/lib/inboundBatchAggregator.js.map +1 -1
  280. package/lib/index.d.ts +7 -7
  281. package/lib/index.d.ts.map +1 -1
  282. package/lib/index.js.map +1 -1
  283. package/lib/messageTypes.d.ts +7 -8
  284. package/lib/messageTypes.d.ts.map +1 -1
  285. package/lib/messageTypes.js +1 -2
  286. package/lib/messageTypes.js.map +1 -1
  287. package/lib/opLifecycle/batchManager.d.ts +2 -2
  288. package/lib/opLifecycle/batchManager.d.ts.map +1 -1
  289. package/lib/opLifecycle/batchManager.js.map +1 -1
  290. package/lib/opLifecycle/definitions.d.ts +1 -1
  291. package/lib/opLifecycle/definitions.d.ts.map +1 -1
  292. package/lib/opLifecycle/definitions.js.map +1 -1
  293. package/lib/opLifecycle/duplicateBatchDetector.d.ts +1 -1
  294. package/lib/opLifecycle/duplicateBatchDetector.d.ts.map +1 -1
  295. package/lib/opLifecycle/duplicateBatchDetector.js.map +1 -1
  296. package/lib/opLifecycle/index.d.ts +5 -5
  297. package/lib/opLifecycle/index.d.ts.map +1 -1
  298. package/lib/opLifecycle/index.js.map +1 -1
  299. package/lib/opLifecycle/opCompressor.d.ts +2 -2
  300. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  301. package/lib/opLifecycle/opCompressor.js.map +1 -1
  302. package/lib/opLifecycle/opDecompressor.d.ts +2 -2
  303. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  304. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  305. package/lib/opLifecycle/opGroupingManager.d.ts +3 -3
  306. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  307. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  308. package/lib/opLifecycle/opSplitter.d.ts +4 -4
  309. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  310. package/lib/opLifecycle/opSplitter.js +1 -1
  311. package/lib/opLifecycle/opSplitter.js.map +1 -1
  312. package/lib/opLifecycle/outbox.d.ts +9 -9
  313. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  314. package/lib/opLifecycle/outbox.js.map +1 -1
  315. package/lib/opLifecycle/remoteMessageProcessor.d.ts +4 -4
  316. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  317. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  318. package/lib/opProperties.d.ts +1 -1
  319. package/lib/opProperties.d.ts.map +1 -1
  320. package/lib/opProperties.js.map +1 -1
  321. package/lib/packageVersion.d.ts +1 -1
  322. package/lib/packageVersion.js +1 -1
  323. package/lib/packageVersion.js.map +1 -1
  324. package/lib/pendingStateManager.d.ts +3 -3
  325. package/lib/pendingStateManager.d.ts.map +1 -1
  326. package/lib/pendingStateManager.js.map +1 -1
  327. package/lib/storageServiceWithAttachBlobs.d.ts +1 -1
  328. package/lib/storageServiceWithAttachBlobs.d.ts.map +1 -1
  329. package/lib/storageServiceWithAttachBlobs.js.map +1 -1
  330. package/lib/summary/documentSchema.d.ts +1 -2
  331. package/lib/summary/documentSchema.d.ts.map +1 -1
  332. package/lib/summary/documentSchema.js.map +1 -1
  333. package/lib/summary/index.d.ts +10 -10
  334. package/lib/summary/index.d.ts.map +1 -1
  335. package/lib/summary/index.js.map +1 -1
  336. package/lib/summary/orderedClientElection.d.ts +4 -4
  337. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  338. package/lib/summary/orderedClientElection.js.map +1 -1
  339. package/lib/summary/summarizerClientElection.d.ts +5 -5
  340. package/lib/summary/summarizerClientElection.d.ts.map +1 -1
  341. package/lib/summary/summarizerClientElection.js.map +1 -1
  342. package/lib/summary/summarizerNode/index.d.ts +3 -3
  343. package/lib/summary/summarizerNode/index.d.ts.map +1 -1
  344. package/lib/summary/summarizerNode/index.js.map +1 -1
  345. package/lib/summary/summarizerNode/summarizerNode.d.ts +5 -6
  346. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  347. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  348. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +3 -3
  349. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  350. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  351. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -3
  352. package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
  353. package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
  354. package/lib/summary/summarizerTypes.d.ts +25 -44
  355. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  356. package/lib/summary/summarizerTypes.js.map +1 -1
  357. package/lib/summary/summarizerUtils.d.ts +3 -3
  358. package/lib/summary/summarizerUtils.d.ts.map +1 -1
  359. package/lib/summary/summarizerUtils.js.map +1 -1
  360. package/lib/summary/summaryCollection.d.ts +13 -23
  361. package/lib/summary/summaryCollection.d.ts.map +1 -1
  362. package/lib/summary/summaryCollection.js +1 -2
  363. package/lib/summary/summaryCollection.js.map +1 -1
  364. package/lib/summary/summaryDelayLoadedModule/index.d.ts +2 -2
  365. package/lib/summary/summaryDelayLoadedModule/index.d.ts.map +1 -1
  366. package/lib/summary/summaryDelayLoadedModule/index.js.map +1 -1
  367. package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts +1 -1
  368. package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.d.ts.map +1 -1
  369. package/lib/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.js.map +1 -1
  370. package/lib/summary/summaryDelayLoadedModule/runningSummarizer.d.ts +3 -3
  371. package/lib/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -1
  372. package/lib/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -1
  373. package/lib/summary/summaryDelayLoadedModule/summarizer.d.ts +5 -5
  374. package/lib/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -1
  375. package/lib/summary/summaryDelayLoadedModule/summarizer.js.map +1 -1
  376. package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts +3 -4
  377. package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -1
  378. package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -1
  379. package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +3 -3
  380. package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -1
  381. package/lib/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -1
  382. package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts +1 -1
  383. package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.d.ts.map +1 -1
  384. package/lib/summary/summaryDelayLoadedModule/summaryResultBuilder.js.map +1 -1
  385. package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts +5 -10
  386. package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.d.ts.map +1 -1
  387. package/lib/summary/summaryDelayLoadedModule/summaryResultTypes.js.map +1 -1
  388. package/lib/summary/summaryFormat.d.ts +9 -14
  389. package/lib/summary/summaryFormat.d.ts.map +1 -1
  390. package/lib/summary/summaryFormat.js.map +1 -1
  391. package/lib/summary/summaryHelpers.d.ts +1 -2
  392. package/lib/summary/summaryHelpers.d.ts.map +1 -1
  393. package/lib/summary/summaryHelpers.js +1 -2
  394. package/lib/summary/summaryHelpers.js.map +1 -1
  395. package/lib/summary/summaryManager.d.ts +3 -3
  396. package/lib/summary/summaryManager.d.ts.map +1 -1
  397. package/lib/summary/summaryManager.js.map +1 -1
  398. package/package.json +18 -18
  399. package/src/batchTracker.ts +3 -3
  400. package/src/blobManager/blobManager.ts +47 -53
  401. package/src/blobManager/index.ts +4 -4
  402. package/src/channelCollection.ts +28 -29
  403. package/src/compressionDefinitions.ts +3 -6
  404. package/src/connectionTelemetry.ts +8 -9
  405. package/src/containerHandleContext.ts +2 -2
  406. package/src/containerRuntime.ts +42 -49
  407. package/src/dataStore.ts +6 -6
  408. package/src/dataStoreContext.ts +33 -33
  409. package/src/dataStoreContexts.ts +3 -3
  410. package/src/dataStoreRegistry.ts +1 -1
  411. package/src/deltaManagerProxies.ts +3 -3
  412. package/src/deltaScheduler.ts +6 -3
  413. package/src/error.ts +1 -1
  414. package/src/gc/garbageCollection.ts +18 -18
  415. package/src/gc/gcConfigs.ts +7 -7
  416. package/src/gc/gcDefinitions.ts +11 -12
  417. package/src/gc/gcHelpers.ts +7 -7
  418. package/src/gc/gcReferenceGraphAlgorithm.ts +1 -1
  419. package/src/gc/gcSummaryDefinitions.ts +1 -1
  420. package/src/gc/gcSummaryStateTracker.ts +5 -5
  421. package/src/gc/gcTelemetry.ts +8 -8
  422. package/src/gc/index.ts +18 -18
  423. package/src/inboundBatchAggregator.ts +4 -4
  424. package/src/index.ts +79 -79
  425. package/src/messageTypes.ts +9 -10
  426. package/src/opLifecycle/batchManager.ts +2 -2
  427. package/src/opLifecycle/definitions.ts +1 -1
  428. package/src/opLifecycle/duplicateBatchDetector.ts +1 -1
  429. package/src/opLifecycle/index.ts +9 -9
  430. package/src/opLifecycle/opCompressor.ts +2 -2
  431. package/src/opLifecycle/opDecompressor.ts +3 -3
  432. package/src/opLifecycle/opGroupingManager.ts +6 -6
  433. package/src/opLifecycle/opSplitter.ts +10 -7
  434. package/src/opLifecycle/outbox.ts +17 -14
  435. package/src/opLifecycle/remoteMessageProcessor.ts +4 -4
  436. package/src/opProperties.ts +1 -1
  437. package/src/packageVersion.ts +1 -1
  438. package/src/pendingStateManager.ts +10 -10
  439. package/src/storageServiceWithAttachBlobs.ts +11 -11
  440. package/src/summary/documentSchema.ts +1 -2
  441. package/src/summary/index.ts +69 -69
  442. package/src/summary/orderedClientElection.ts +12 -4
  443. package/src/summary/summarizerClientElection.ts +5 -5
  444. package/src/summary/summarizerNode/index.ts +3 -3
  445. package/src/summary/summarizerNode/summarizerNode.ts +14 -12
  446. package/src/summary/summarizerNode/summarizerNodeUtils.ts +3 -3
  447. package/src/summary/summarizerNode/summarizerNodeWithGc.ts +3 -3
  448. package/src/summary/summarizerTypes.ts +25 -44
  449. package/src/summary/summarizerUtils.ts +3 -3
  450. package/src/summary/summaryCollection.ts +19 -29
  451. package/src/summary/summaryDelayLoadedModule/index.ts +2 -2
  452. package/src/summary/summaryDelayLoadedModule/runWhileConnectedCoordinator.ts +1 -1
  453. package/src/summary/summaryDelayLoadedModule/runningSummarizer.ts +4 -4
  454. package/src/summary/summaryDelayLoadedModule/summarizer.ts +8 -8
  455. package/src/summary/summaryDelayLoadedModule/summarizerHeuristics.ts +4 -4
  456. package/src/summary/summaryDelayLoadedModule/summaryGenerator.ts +3 -3
  457. package/src/summary/summaryDelayLoadedModule/summaryResultBuilder.ts +3 -3
  458. package/src/summary/summaryDelayLoadedModule/summaryResultTypes.ts +5 -10
  459. package/src/summary/summaryFormat.ts +9 -14
  460. package/src/summary/summaryHelpers.ts +1 -2
  461. package/src/summary/summaryManager.ts +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA0D;AAAjD,wHAAA,gBAAgB,OAAA;AACzB,+CAAyD;AAAhD,uHAAA,uBAAuB,OAAA;AAChC,uDA+B4B;AA9B3B,iHAAA,aAAa,OAAA;AACb,4HAAA,wBAAwB,OAAA;AACxB,6HAAA,yBAAyB,OAAA;AACzB,kIAAA,8BAA8B,OAAA;AAC9B,8GAAA,UAAU,OAAA;AACV,iHAAA,aAAa,OAAA;AACb,0HAAA,sBAAsB,OAAA;AAGtB,2HAAA,uBAAuB,OAAA;AAavB,4GAAA,QAAQ,OAAA;AACR,uHAAA,mBAAmB,OAAA;AACnB,mHAAA,eAAe,OAAA;AACf,qHAAA,iBAAiB,OAAA;AACjB,kIAAA,8BAA8B,OAAA;AAE9B,gIAAA,4BAA4B,OAAA;AAG7B,+CAMwB;AALvB,2GAAA,WAAW,OAAA;AACX,6HAAA,6BAA6B,OAAA;AAC7B,oHAAA,oBAAoB,OAAA;AACpB,yHAAA,yBAAyB,OAAA;AACzB,+GAAA,eAAe,OAAA;AAEhB,+EAAsE;AAA7D,oIAAA,oBAAoB,OAAA;AAO7B,uEAIoC;AAHnC,0HAAA,cAAc,OAAA;AACd,iIAAA,qBAAqB,OAAA;AAGtB,mDAAsD;AAA7C,oHAAA,kBAAkB,OAAA;AAC3B,iFAA2E;AAAlE,yIAAA,wBAAwB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { GarbageCollector } from \"./garbageCollection.js\";\nexport { computeTombstoneTimeout } from \"./gcConfigs.js\";\nexport {\n\tnextGCVersion,\n\tdefaultInactiveTimeoutMs,\n\tdefaultSweepGracePeriodMs,\n\tdefaultSessionExpiryDurationMs,\n\tGCNodeType,\n\tgcTestModeKey,\n\tgcGenerationOptionName,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tgcVersionUpgradeToV4Key,\n\tIGarbageCollectionRuntime,\n\tIGarbageCollector,\n\tIGarbageCollectorConfigs,\n\tIGarbageCollectorCreateParams,\n\tIGCMetadata,\n\tIGCMetadata_Deprecated,\n\tIGCNodeUpdatedProps,\n\tIGCResult,\n\tIGCRuntimeOptions,\n\tIMarkPhaseStats,\n\tISweepPhaseStats,\n\tIGCStats,\n\toneDayMs,\n\trunSessionExpiryKey,\n\tstableGCVersion,\n\tUnreferencedState,\n\tdisableThrowOnTombstoneLoadKey,\n\tGarbageCollectionMessage,\n\tGarbageCollectionMessageType,\n\tISweepMessage,\n} from \"./gcDefinitions.js\";\nexport {\n\tcloneGCData,\n\tconcatGarbageCollectionStates,\n\tgetGCVersionInEffect,\n\tunpackChildNodesGCDetails,\n\turlToGCNodePath,\n} from \"./gcHelpers.js\";\nexport { runGarbageCollection } from \"./gcReferenceGraphAlgorithm.js\";\nexport {\n\tIGarbageCollectionNodeData,\n\tIGarbageCollectionSnapshotData,\n\tIGarbageCollectionState,\n\tIGarbageCollectionSummaryDetailsLegacy,\n} from \"./gcSummaryDefinitions.js\";\nexport {\n\tgcStateBlobKey,\n\tGCSummaryStateTracker,\n\tIGCSummaryTrackingData,\n} from \"./gcSummaryStateTracker.js\";\nexport { GCTelemetryTracker } from \"./gcTelemetry.js\";\nexport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA0D;AAAjD,wHAAA,gBAAgB,OAAA;AACzB,+CAAyD;AAAhD,uHAAA,uBAAuB,OAAA;AAChC,uDA+B4B;AA9B3B,iHAAA,aAAa,OAAA;AACb,4HAAA,wBAAwB,OAAA;AACxB,6HAAA,yBAAyB,OAAA;AACzB,kIAAA,8BAA8B,OAAA;AAC9B,8GAAA,UAAU,OAAA;AACV,iHAAA,aAAa,OAAA;AACb,0HAAA,sBAAsB,OAAA;AAGtB,2HAAA,uBAAuB,OAAA;AAavB,4GAAA,QAAQ,OAAA;AACR,uHAAA,mBAAmB,OAAA;AACnB,mHAAA,eAAe,OAAA;AACf,qHAAA,iBAAiB,OAAA;AACjB,kIAAA,8BAA8B,OAAA;AAE9B,gIAAA,4BAA4B,OAAA;AAG7B,+CAMwB;AALvB,2GAAA,WAAW,OAAA;AACX,6HAAA,6BAA6B,OAAA;AAC7B,oHAAA,oBAAoB,OAAA;AACpB,yHAAA,yBAAyB,OAAA;AACzB,+GAAA,eAAe,OAAA;AAEhB,+EAAsE;AAA7D,oIAAA,oBAAoB,OAAA;AAO7B,uEAIoC;AAHnC,0HAAA,cAAc,OAAA;AACd,iIAAA,qBAAqB,OAAA;AAGtB,mDAAsD;AAA7C,oHAAA,kBAAkB,OAAA;AAC3B,iFAA2E;AAAlE,yIAAA,wBAAwB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { GarbageCollector } from \"./garbageCollection.js\";\nexport { computeTombstoneTimeout } from \"./gcConfigs.js\";\nexport {\n\tnextGCVersion,\n\tdefaultInactiveTimeoutMs,\n\tdefaultSweepGracePeriodMs,\n\tdefaultSessionExpiryDurationMs,\n\tGCNodeType,\n\tgcTestModeKey,\n\tgcGenerationOptionName,\n\ttype GCFeatureMatrix,\n\ttype GCVersion,\n\tgcVersionUpgradeToV4Key,\n\ttype IGarbageCollectionRuntime,\n\ttype IGarbageCollector,\n\ttype IGarbageCollectorConfigs,\n\ttype IGarbageCollectorCreateParams,\n\ttype IGCMetadata,\n\ttype IGCMetadata_Deprecated,\n\ttype IGCNodeUpdatedProps,\n\ttype IGCResult,\n\ttype IGCRuntimeOptions,\n\ttype IMarkPhaseStats,\n\ttype ISweepPhaseStats,\n\ttype IGCStats,\n\toneDayMs,\n\trunSessionExpiryKey,\n\tstableGCVersion,\n\tUnreferencedState,\n\tdisableThrowOnTombstoneLoadKey,\n\ttype GarbageCollectionMessage,\n\tGarbageCollectionMessageType,\n\ttype ISweepMessage,\n} from \"./gcDefinitions.js\";\nexport {\n\tcloneGCData,\n\tconcatGarbageCollectionStates,\n\tgetGCVersionInEffect,\n\tunpackChildNodesGCDetails,\n\turlToGCNodePath,\n} from \"./gcHelpers.js\";\nexport { runGarbageCollection } from \"./gcReferenceGraphAlgorithm.js\";\nexport type {\n\tIGarbageCollectionNodeData,\n\tIGarbageCollectionSnapshotData,\n\tIGarbageCollectionState,\n\tIGarbageCollectionSummaryDetailsLegacy,\n} from \"./gcSummaryDefinitions.js\";\nexport {\n\tgcStateBlobKey,\n\tGCSummaryStateTracker,\n\ttype IGCSummaryTrackingData,\n} from \"./gcSummaryStateTracker.js\";\nexport { GCTelemetryTracker } from \"./gcTelemetry.js\";\nexport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker.js\";\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IDeltaManagerFull } from "@fluidframework/container-definitions/internal";
6
- import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
5
+ import type { IDeltaManagerFull } from "@fluidframework/container-definitions/internal";
6
+ import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
7
7
  /**
8
8
  * This class ensures that we aggregate a complete batch of incoming ops before processing them. It basically ensures
9
9
  * that we never start processing ops in a batch IF we do not have all ops in the batch.
@@ -1 +1 @@
1
- {"version":3,"file":"inboundBatchAggregator.d.ts","sourceRoot":"","sources":["../src/inboundBatchAggregator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAInF,OAAO,EACN,mBAAmB,EAInB,MAAM,0CAA0C,CAAC;AAWlD;;;GAGG;AACH,qBAAa,sBAAsB;IAQjC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IATxB,OAAO,CAAC,mBAAmB,CAAqB;IAChD,OAAO,CAAC,oBAAoB,CAAqB;IACjD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;gBAGL,YAAY,EAAE,iBAAiB,EAC/B,WAAW,EAAE,MAAM,MAAM,GAAG,SAAS,EACrC,MAAM,EAAE,mBAAmB;IAgBtC,OAAO,IAAI,IAAI;IAKtB;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CA4ChC;IAEF;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,YAAY,CA8G3B;IAEF,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,WAAW;CA0BnB"}
1
+ {"version":3,"file":"inboundBatchAggregator.d.ts","sourceRoot":"","sources":["../src/inboundBatchAggregator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAIxF,OAAO,EACN,KAAK,mBAAmB,EAIxB,MAAM,0CAA0C,CAAC;AAWlD;;;GAGG;AACH,qBAAa,sBAAsB;IAQjC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IATxB,OAAO,CAAC,mBAAmB,CAAqB;IAChD,OAAO,CAAC,oBAAoB,CAAqB;IACjD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,UAAU,CAAK;gBAGL,YAAY,EAAE,iBAAiB,EAC/B,WAAW,EAAE,MAAM,MAAM,GAAG,SAAS,EACrC,MAAM,EAAE,mBAAmB;IAgBtC,OAAO,IAAI,IAAI;IAKtB;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CA4ChC;IAEF;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,YAAY,CA8G3B;IAEF,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,WAAW;CA0BnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"inboundBatchAggregator.js","sourceRoot":"","sources":["../src/inboundBatchAggregator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAE9D,kEAA6D;AAE7D,oEAAyE;AACzE,uEAKkD;AAGlD,2DAAiD;AAQjD;;;GAGG;AACH,MAAa,sBAAsB;IAOlC,YACkB,YAA+B,EAC/B,WAAqC,EACrC,MAA2B;QAF3B,iBAAY,GAAZ,YAAY,CAAmB;QAC/B,gBAAW,GAAX,WAAW,CAA0B;QACrC,WAAM,GAAN,MAAM,CAAqB;QAPrC,gBAAW,GAAG,KAAK,CAAC;QACpB,eAAU,GAAG,CAAC,CAA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ACjB,IAAA,iBAAM,EAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC1E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,IAAA,6BAAc,GAAE,CAAC;QACnC,mEAAmE;QACnE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACnC,CAAC;IAEO,WAAW,CAAC,UAAkB,EAAE,eAA0C;QACjF,MAAM,QAAQ,GAAG,eAAe,CAAC,cAAc,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,6BAAc,GAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;QAEnF,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;gBAC9B,SAAS,EAAE,YAAY;gBACvB,cAAc,EAAE,QAAQ;gBACxB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,CAAC;gBACjC,WAAW,EAAE,QAAQ,GAAG,eAAe,CAAC,qBAAqB;gBAC7D,QAAQ;gBACR,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;aAC7B,CAAC,CAAC;QACJ,CAAC;QAED,qCAAqC;QACrC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACvB,OAAO;QACR,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;CACD;AAtOD,wDAsOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport { IDeltaManagerFull } from \"@fluidframework/container-definitions/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport { isRuntimeMessage } from \"@fluidframework/driver-utils/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tDataCorruptionError,\n\tDataProcessingError,\n\textractSafePropertiesFromMessage,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { IBatchMetadata } from \"./metadata.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\ntype IRuntimeMessageMetadata =\n\t| undefined\n\t| {\n\t\t\tbatch?: boolean;\n\t };\n\n/**\n * This class ensures that we aggregate a complete batch of incoming ops before processing them. It basically ensures\n * that we never start processing ops in a batch IF we do not have all ops in the batch.\n */\nexport class InboundBatchAggregator {\n\tprivate pauseSequenceNumber: number | undefined;\n\tprivate currentBatchClientId: string | undefined;\n\tprivate localPaused = false;\n\tprivate timePaused = 0;\n\tprivate batchCount = 0;\n\n\tconstructor(\n\t\tprivate readonly deltaManager: IDeltaManagerFull,\n\t\tprivate readonly getClientId: () => string | undefined,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t) {\n\t\t// Listen for updates and peek at the inbound\n\t\tthis.deltaManager.inbound.on(\"push\", this.trackPending);\n\n\t\tconst allPending = this.deltaManager.inbound.toArray();\n\t\tfor (const pending of allPending) {\n\t\t\tthis.trackPending(pending);\n\t\t}\n\n\t\t// We are intentionally directly listening to the \"op\" to inspect system ops as well.\n\t\t// If we do not observe system ops, we are likely to hit an error when system ops\n\t\t// precedes start of incomplete batch.\n\t\tthis.deltaManager.on(\"op\", this.afterOpProcessing);\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.deltaManager.off(\"op\", this.afterOpProcessing);\n\t\tthis.deltaManager.inbound.off(\"push\", this.trackPending);\n\t}\n\n\t/**\n\t * Callback for DeltaManager's \"op\" event, for us to make decision if op processing should\n\t * be paused or not after that.\n\t */\n\tprivate readonly afterOpProcessing = (message: ISequencedDocumentMessage): void => {\n\t\tassert(\n\t\t\t!this.localPaused,\n\t\t\t0x294 /* \"can't have op processing paused if we are processing an op\" */,\n\t\t);\n\n\t\t// If the inbound queue is ever empty, nothing to do!\n\t\tif (this.deltaManager.inbound.length === 0) {\n\t\t\tassert(\n\t\t\t\tthis.pauseSequenceNumber === undefined,\n\t\t\t\t0x295 /* \"there should be no pending batch if we have no ops\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// The queue is\n\t\t// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:\n\t\t// - here (processing ops until reaching start of incomplete batch)\n\t\t// - in trackPending(), when queue was empty and start of batch showed up.\n\t\t// 2. resumed when batch end comes in (in trackPending())\n\n\t\t// do we have incomplete batch to worry about?\n\t\tif (this.pauseSequenceNumber !== undefined) {\n\t\t\tif (message.sequenceNumber >= this.pauseSequenceNumber) {\n\t\t\t\tthrow DataProcessingError.create(\n\t\t\t\t\t// Former assert 0x296\n\t\t\t\t\t\"Incomplete batch\",\n\t\t\t\t\t\"InboundBatchAggregator\",\n\t\t\t\t\tmessage,\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: message.type,\n\t\t\t\t\t\tcontentType: typeof message.contents,\n\t\t\t\t\t\tbatch: (message.metadata as IBatchMetadata | undefined)?.batch,\n\t\t\t\t\t\tcompression: message.compression,\n\t\t\t\t\t\tpauseSeqNum: this.pauseSequenceNumber,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If the next op is the start of incomplete batch, then we can't process it until it's fully in - pause!\n\t\t\tif (message.sequenceNumber + 1 === this.pauseSequenceNumber) {\n\t\t\t\tthis.pauseQueue();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Called for each incoming op (i.e. inbound \"push\" notification)\n\t */\n\tprivate readonly trackPending = (message: ISequencedDocumentMessage): void => {\n\t\tassert(\n\t\t\tthis.deltaManager.inbound.length > 0,\n\t\t\t0x298 /* \"we have something in the queue that generates this event\" */,\n\t\t);\n\n\t\tassert(\n\t\t\t(this.currentBatchClientId === undefined) === (this.pauseSequenceNumber === undefined),\n\t\t\t0x299 /* \"non-synchronized state\" */,\n\t\t);\n\n\t\tconst metadata = message.metadata as IRuntimeMessageMetadata;\n\t\t// batchMetadata will be true for the message that starts a batch, false for the one that ends it, and\n\t\t// undefined for all other messages.\n\t\tconst batchMetadata = metadata?.batch;\n\n\t\t// Protocol messages are never part of a runtime batch of messages\n\t\tif (!isRuntimeMessage(message)) {\n\t\t\t// Protocol messages should never show up in the middle of the batch!\n\t\t\tif (this.currentBatchClientId !== undefined) {\n\t\t\t\tthrow DataProcessingError.create(\n\t\t\t\t\t\"Received a system message during batch processing\", // Formerly known as assert 0x29a\n\t\t\t\t\t\"trackPending\",\n\t\t\t\t\tmessage,\n\t\t\t\t\t{\n\t\t\t\t\t\truntimeVersion: pkgVersion,\n\t\t\t\t\t\tbatchClientId:\n\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\t\t\t\tthis.currentBatchClientId === null ? \"null\" : this.currentBatchClientId,\n\t\t\t\t\t\tpauseSequenceNumber: this.pauseSequenceNumber,\n\t\t\t\t\t\tlocalBatch: this.currentBatchClientId === this.getClientId(),\n\t\t\t\t\t\tmessageType: message.type,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tassert(batchMetadata === undefined, 0x29b /* \"system op in a batch?\" */);\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29c /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.currentBatchClientId === undefined && batchMetadata === undefined) {\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29d /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// If we got here, the message is part of a batch. Either starting, in progress, or ending.\n\n\t\t// If this is not the start of the batch, error out if the message was sent by a client other than the one that\n\t\t// started the current batch (it should not be possible for ops from other clients to get interleaved with a batch).\n\t\tif (\n\t\t\tthis.currentBatchClientId !== undefined &&\n\t\t\tthis.currentBatchClientId !== message.clientId\n\t\t) {\n\t\t\tthrow new DataCorruptionError(\"OpBatchIncomplete\", {\n\t\t\t\truntimeVersion: pkgVersion,\n\t\t\t\tbatchClientId:\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\t\tthis.currentBatchClientId === null ? \"null\" : this.currentBatchClientId,\n\t\t\t\tpauseSequenceNumber: this.pauseSequenceNumber,\n\t\t\t\tlocalBatch: this.currentBatchClientId === this.getClientId(),\n\t\t\t\tlocalMessage: message.clientId === this.getClientId(),\n\t\t\t\t...extractSafePropertiesFromMessage(message),\n\t\t\t});\n\t\t}\n\n\t\t// The queue is\n\t\t// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:\n\t\t// - in afterOpProcessing() - processing ops until reaching start of incomplete batch\n\t\t// - here, when queue was empty and start of batch showed up (batchMetadata === true below).\n\t\t// 2. resumed when batch end comes in (batchMetadata === false below)\n\n\t\tif (batchMetadata) {\n\t\t\tassert(\n\t\t\t\tthis.currentBatchClientId === undefined,\n\t\t\t\t0x29e /* \"there can't be active batch\" */,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29f /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\tthis.pauseSequenceNumber = message.sequenceNumber;\n\t\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\n\t\t\tthis.currentBatchClientId = message.clientId as string;\n\t\t\t// Start of the batch\n\t\t\t// Only pause processing if queue has no other ops!\n\t\t\t// If there are any other ops in the queue, processing will be stopped when they are processed!\n\t\t\tif (this.deltaManager.inbound.length === 1) {\n\t\t\t\tthis.pauseQueue();\n\t\t\t}\n\t\t} else if (batchMetadata === false) {\n\t\t\tassert(\n\t\t\t\tthis.pauseSequenceNumber !== undefined,\n\t\t\t\t0x2a0 /* \"batch presence was validated above\" */,\n\t\t\t);\n\t\t\t// Batch is complete, we can process it!\n\t\t\tthis.resumeQueue(this.pauseSequenceNumber, message);\n\t\t\tthis.pauseSequenceNumber = undefined;\n\t\t\tthis.currentBatchClientId = undefined;\n\t\t} else {\n\t\t\t// Continuation of current batch. Do nothing\n\t\t\tassert(this.currentBatchClientId !== undefined, 0x2a1 /* \"logic error\" */);\n\t\t}\n\t};\n\n\tprivate pauseQueue(): void {\n\t\tassert(!this.localPaused, 0x297 /* \"always called from resumed state\" */);\n\t\tthis.localPaused = true;\n\t\tthis.timePaused = performanceNow();\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tthis.deltaManager.inbound.pause();\n\t}\n\n\tprivate resumeQueue(startBatch: number, messageEndBatch: ISequencedDocumentMessage): void {\n\t\tconst endBatch = messageEndBatch.sequenceNumber;\n\t\tconst duration = this.localPaused ? performanceNow() - this.timePaused : undefined;\n\n\t\tthis.batchCount++;\n\t\tif (this.batchCount % 1000 === 1) {\n\t\t\tthis.logger.sendTelemetryEvent({\n\t\t\t\teventName: \"BatchStats\",\n\t\t\t\tsequenceNumber: endBatch,\n\t\t\t\tlength: endBatch - startBatch + 1,\n\t\t\t\tmsnDistance: endBatch - messageEndBatch.minimumSequenceNumber,\n\t\t\t\tduration,\n\t\t\t\tbatchCount: this.batchCount,\n\t\t\t\tinterrupted: this.localPaused,\n\t\t\t});\n\t\t}\n\n\t\t// Return early if no change in value\n\t\tif (!this.localPaused) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.localPaused = false;\n\n\t\tthis.deltaManager.inbound.resume();\n\t}\n}\n"]}
1
+ {"version":3,"file":"inboundBatchAggregator.js","sourceRoot":"","sources":["../src/inboundBatchAggregator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAE9D,kEAA6D;AAE7D,oEAAyE;AACzE,uE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W,EAAE,CAAC;YACvB,OAAO;QACR,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;CACD;AAtOD,wDAsOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport type { IDeltaManagerFull } from \"@fluidframework/container-definitions/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport { isRuntimeMessage } from \"@fluidframework/driver-utils/internal\";\nimport {\n\ttype ITelemetryLoggerExt,\n\tDataCorruptionError,\n\tDataProcessingError,\n\textractSafePropertiesFromMessage,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { IBatchMetadata } from \"./metadata.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\ntype IRuntimeMessageMetadata =\n\t| undefined\n\t| {\n\t\t\tbatch?: boolean;\n\t };\n\n/**\n * This class ensures that we aggregate a complete batch of incoming ops before processing them. It basically ensures\n * that we never start processing ops in a batch IF we do not have all ops in the batch.\n */\nexport class InboundBatchAggregator {\n\tprivate pauseSequenceNumber: number | undefined;\n\tprivate currentBatchClientId: string | undefined;\n\tprivate localPaused = false;\n\tprivate timePaused = 0;\n\tprivate batchCount = 0;\n\n\tconstructor(\n\t\tprivate readonly deltaManager: IDeltaManagerFull,\n\t\tprivate readonly getClientId: () => string | undefined,\n\t\tprivate readonly logger: ITelemetryLoggerExt,\n\t) {\n\t\t// Listen for updates and peek at the inbound\n\t\tthis.deltaManager.inbound.on(\"push\", this.trackPending);\n\n\t\tconst allPending = this.deltaManager.inbound.toArray();\n\t\tfor (const pending of allPending) {\n\t\t\tthis.trackPending(pending);\n\t\t}\n\n\t\t// We are intentionally directly listening to the \"op\" to inspect system ops as well.\n\t\t// If we do not observe system ops, we are likely to hit an error when system ops\n\t\t// precedes start of incomplete batch.\n\t\tthis.deltaManager.on(\"op\", this.afterOpProcessing);\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.deltaManager.off(\"op\", this.afterOpProcessing);\n\t\tthis.deltaManager.inbound.off(\"push\", this.trackPending);\n\t}\n\n\t/**\n\t * Callback for DeltaManager's \"op\" event, for us to make decision if op processing should\n\t * be paused or not after that.\n\t */\n\tprivate readonly afterOpProcessing = (message: ISequencedDocumentMessage): void => {\n\t\tassert(\n\t\t\t!this.localPaused,\n\t\t\t0x294 /* \"can't have op processing paused if we are processing an op\" */,\n\t\t);\n\n\t\t// If the inbound queue is ever empty, nothing to do!\n\t\tif (this.deltaManager.inbound.length === 0) {\n\t\t\tassert(\n\t\t\t\tthis.pauseSequenceNumber === undefined,\n\t\t\t\t0x295 /* \"there should be no pending batch if we have no ops\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// The queue is\n\t\t// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:\n\t\t// - here (processing ops until reaching start of incomplete batch)\n\t\t// - in trackPending(), when queue was empty and start of batch showed up.\n\t\t// 2. resumed when batch end comes in (in trackPending())\n\n\t\t// do we have incomplete batch to worry about?\n\t\tif (this.pauseSequenceNumber !== undefined) {\n\t\t\tif (message.sequenceNumber >= this.pauseSequenceNumber) {\n\t\t\t\tthrow DataProcessingError.create(\n\t\t\t\t\t// Former assert 0x296\n\t\t\t\t\t\"Incomplete batch\",\n\t\t\t\t\t\"InboundBatchAggregator\",\n\t\t\t\t\tmessage,\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: message.type,\n\t\t\t\t\t\tcontentType: typeof message.contents,\n\t\t\t\t\t\tbatch: (message.metadata as IBatchMetadata | undefined)?.batch,\n\t\t\t\t\t\tcompression: message.compression,\n\t\t\t\t\t\tpauseSeqNum: this.pauseSequenceNumber,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If the next op is the start of incomplete batch, then we can't process it until it's fully in - pause!\n\t\t\tif (message.sequenceNumber + 1 === this.pauseSequenceNumber) {\n\t\t\t\tthis.pauseQueue();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Called for each incoming op (i.e. inbound \"push\" notification)\n\t */\n\tprivate readonly trackPending = (message: ISequencedDocumentMessage): void => {\n\t\tassert(\n\t\t\tthis.deltaManager.inbound.length > 0,\n\t\t\t0x298 /* \"we have something in the queue that generates this event\" */,\n\t\t);\n\n\t\tassert(\n\t\t\t(this.currentBatchClientId === undefined) === (this.pauseSequenceNumber === undefined),\n\t\t\t0x299 /* \"non-synchronized state\" */,\n\t\t);\n\n\t\tconst metadata = message.metadata as IRuntimeMessageMetadata;\n\t\t// batchMetadata will be true for the message that starts a batch, false for the one that ends it, and\n\t\t// undefined for all other messages.\n\t\tconst batchMetadata = metadata?.batch;\n\n\t\t// Protocol messages are never part of a runtime batch of messages\n\t\tif (!isRuntimeMessage(message)) {\n\t\t\t// Protocol messages should never show up in the middle of the batch!\n\t\t\tif (this.currentBatchClientId !== undefined) {\n\t\t\t\tthrow DataProcessingError.create(\n\t\t\t\t\t\"Received a system message during batch processing\", // Formerly known as assert 0x29a\n\t\t\t\t\t\"trackPending\",\n\t\t\t\t\tmessage,\n\t\t\t\t\t{\n\t\t\t\t\t\truntimeVersion: pkgVersion,\n\t\t\t\t\t\tbatchClientId:\n\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\t\t\t\tthis.currentBatchClientId === null ? \"null\" : this.currentBatchClientId,\n\t\t\t\t\t\tpauseSequenceNumber: this.pauseSequenceNumber,\n\t\t\t\t\t\tlocalBatch: this.currentBatchClientId === this.getClientId(),\n\t\t\t\t\t\tmessageType: message.type,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tassert(batchMetadata === undefined, 0x29b /* \"system op in a batch?\" */);\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29c /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.currentBatchClientId === undefined && batchMetadata === undefined) {\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29d /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// If we got here, the message is part of a batch. Either starting, in progress, or ending.\n\n\t\t// If this is not the start of the batch, error out if the message was sent by a client other than the one that\n\t\t// started the current batch (it should not be possible for ops from other clients to get interleaved with a batch).\n\t\tif (\n\t\t\tthis.currentBatchClientId !== undefined &&\n\t\t\tthis.currentBatchClientId !== message.clientId\n\t\t) {\n\t\t\tthrow new DataCorruptionError(\"OpBatchIncomplete\", {\n\t\t\t\truntimeVersion: pkgVersion,\n\t\t\t\tbatchClientId:\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\t\tthis.currentBatchClientId === null ? \"null\" : this.currentBatchClientId,\n\t\t\t\tpauseSequenceNumber: this.pauseSequenceNumber,\n\t\t\t\tlocalBatch: this.currentBatchClientId === this.getClientId(),\n\t\t\t\tlocalMessage: message.clientId === this.getClientId(),\n\t\t\t\t...extractSafePropertiesFromMessage(message),\n\t\t\t});\n\t\t}\n\n\t\t// The queue is\n\t\t// 1. paused only when the next message to be processed is the beginning of a batch. Done in two places:\n\t\t// - in afterOpProcessing() - processing ops until reaching start of incomplete batch\n\t\t// - here, when queue was empty and start of batch showed up (batchMetadata === true below).\n\t\t// 2. resumed when batch end comes in (batchMetadata === false below)\n\n\t\tif (batchMetadata) {\n\t\t\tassert(\n\t\t\t\tthis.currentBatchClientId === undefined,\n\t\t\t\t0x29e /* \"there can't be active batch\" */,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\t!this.localPaused,\n\t\t\t\t0x29f /* \"we should be processing ops when there is no active batch\" */,\n\t\t\t);\n\t\t\tthis.pauseSequenceNumber = message.sequenceNumber;\n\t\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\n\t\t\tthis.currentBatchClientId = message.clientId as string;\n\t\t\t// Start of the batch\n\t\t\t// Only pause processing if queue has no other ops!\n\t\t\t// If there are any other ops in the queue, processing will be stopped when they are processed!\n\t\t\tif (this.deltaManager.inbound.length === 1) {\n\t\t\t\tthis.pauseQueue();\n\t\t\t}\n\t\t} else if (batchMetadata === false) {\n\t\t\tassert(\n\t\t\t\tthis.pauseSequenceNumber !== undefined,\n\t\t\t\t0x2a0 /* \"batch presence was validated above\" */,\n\t\t\t);\n\t\t\t// Batch is complete, we can process it!\n\t\t\tthis.resumeQueue(this.pauseSequenceNumber, message);\n\t\t\tthis.pauseSequenceNumber = undefined;\n\t\t\tthis.currentBatchClientId = undefined;\n\t\t} else {\n\t\t\t// Continuation of current batch. Do nothing\n\t\t\tassert(this.currentBatchClientId !== undefined, 0x2a1 /* \"logic error\" */);\n\t\t}\n\t};\n\n\tprivate pauseQueue(): void {\n\t\tassert(!this.localPaused, 0x297 /* \"always called from resumed state\" */);\n\t\tthis.localPaused = true;\n\t\tthis.timePaused = performanceNow();\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tthis.deltaManager.inbound.pause();\n\t}\n\n\tprivate resumeQueue(startBatch: number, messageEndBatch: ISequencedDocumentMessage): void {\n\t\tconst endBatch = messageEndBatch.sequenceNumber;\n\t\tconst duration = this.localPaused ? performanceNow() - this.timePaused : undefined;\n\n\t\tthis.batchCount++;\n\t\tif (this.batchCount % 1000 === 1) {\n\t\t\tthis.logger.sendTelemetryEvent({\n\t\t\t\teventName: \"BatchStats\",\n\t\t\t\tsequenceNumber: endBatch,\n\t\t\t\tlength: endBatch - startBatch + 1,\n\t\t\t\tmsnDistance: endBatch - messageEndBatch.minimumSequenceNumber,\n\t\t\t\tduration,\n\t\t\t\tbatchCount: this.batchCount,\n\t\t\t\tinterrupted: this.localPaused,\n\t\t\t});\n\t\t}\n\n\t\t// Return early if no change in value\n\t\tif (!this.localPaused) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.localPaused = false;\n\n\t\tthis.deltaManager.inbound.resume();\n\t}\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -2,20 +2,20 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { ContainerRuntimeOptions, ContainerRuntimeOptionsInternal, ISummaryRuntimeOptions, IContainerRuntimeOptions, IContainerRuntimeOptionsInternal, loadContainerRuntime, LoadContainerRuntimeParams, agentSchedulerId, ContainerRuntime, DeletedResponseHeaderKey, TombstoneResponseHeaderKey, InactiveResponseHeaderKey, RuntimeHeaderData, } from "./containerRuntime.js";
5
+ export { type ContainerRuntimeOptions, type ContainerRuntimeOptionsInternal, type ISummaryRuntimeOptions, type IContainerRuntimeOptions, type IContainerRuntimeOptionsInternal, loadContainerRuntime, type LoadContainerRuntimeParams, agentSchedulerId, ContainerRuntime, DeletedResponseHeaderKey, TombstoneResponseHeaderKey, InactiveResponseHeaderKey, type RuntimeHeaderData, } from "./containerRuntime.js";
6
6
  export type { ICompressionRuntimeOptions } from "./compressionDefinitions.js";
7
7
  export { CompressionAlgorithms, disabledCompressionConfig } from "./compressionDefinitions.js";
8
- export {
8
+ export type {
9
9
  /**
10
10
  * @deprecated Import from `@fluidframework/runtime-definitions/legacy` instead.
11
11
  */
12
12
  MinimumVersionForCollab, } from "@fluidframework/runtime-definitions/internal";
13
- export { ContainerMessageType, UnknownContainerRuntimeMessage, } from "./messageTypes.js";
14
- export { IBlobManagerLoadInfo } from "./blobManager/index.js";
13
+ export { ContainerMessageType, type UnknownContainerRuntimeMessage, } from "./messageTypes.js";
14
+ export type { IBlobManagerLoadInfo } from "./blobManager/index.js";
15
15
  export { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
16
16
  export { detectOutboundReferences, ChannelCollectionFactory, AllowTombstoneRequestHeaderKey, } from "./channelCollection.js";
17
- export { GCNodeType, IGCMetadata, GCFeatureMatrix, GCVersion, IGarbageCollectionRuntime, IGCRuntimeOptions, IMarkPhaseStats, ISweepPhaseStats, IGCNodeUpdatedProps, IGCStats, } from "./gc/index.js";
18
- export { IAckedSummary, ISummarizer, ISummarizeResults, ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer, SummaryCollection, EnqueueSummarizeResult, IAckSummaryResult, IBaseSummarizeResult, IBroadcastSummaryResult, ICancellationToken, IConnectableRuntime, IContainerRuntimeMetadata, ICreateContainerMetadata, IEnqueueSummarizeOptions, IGenerateSummaryTreeResult, IGeneratedSummaryStats, INackSummaryResult, IOnDemandSummarizeOptions, IRefreshSummaryAckOptions, ISubmitSummaryOpResult, ISubmitSummaryOptions, ISerializedElection, ISummarizeOptions, ISummarizerInternalsProvider, ISummarizerRuntime, ISummarizingWarning, IUploadSummaryResult, SubmitSummaryResult, SummarizeResultPart, IClientSummaryWatcher, ISummary, ISummaryCollectionOpEvents, ISummaryAckMessage, ISummaryMetadataMessage, ISummaryNackMessage, ISummaryOpMessage, OpActionEventListener, OpActionEventName, ICancellableSummarizerController, SubmitSummaryFailureData, SummaryStage, IRetriableFailureError, IdCompressorMode, IDocumentSchema, IDocumentSchemaInfo, DocumentSchemaValueType, IDocumentSchemaCurrent, currentDocumentVersionSchema, DocumentsSchemaController, IDocumentSchemaChangeMessageIncoming, IDocumentSchemaChangeMessageOutgoing, IDocumentSchemaFeatures, ReadFluidDataStoreAttributes, IFluidDataStoreAttributes0, IFluidDataStoreAttributes1, IFluidDataStoreAttributes2, OmitAttributesVersions, ISummaryBaseConfiguration, ISummaryConfigurationHeuristics, ISummaryConfigurationDisableSummarizer, ISummaryConfigurationDisableHeuristics, ISummaryConfiguration, DefaultSummaryConfiguration, } from "./summary/index.js";
19
- export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle/index.js";
17
+ export { GCNodeType, type IGCMetadata, type GCFeatureMatrix, type GCVersion, type IGarbageCollectionRuntime, type IGCRuntimeOptions, type IMarkPhaseStats, type ISweepPhaseStats, type IGCNodeUpdatedProps, type IGCStats, } from "./gc/index.js";
18
+ export { type IAckedSummary, type ISummarizer, type ISummarizeResults, type ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer, SummaryCollection, type EnqueueSummarizeResult, type IAckSummaryResult, type IBaseSummarizeResult, type IBroadcastSummaryResult, type ICancellationToken, type IConnectableRuntime, type IContainerRuntimeMetadata, type ICreateContainerMetadata, type IEnqueueSummarizeOptions, type IGenerateSummaryTreeResult, type IGeneratedSummaryStats, type INackSummaryResult, type IOnDemandSummarizeOptions, type IRefreshSummaryAckOptions, type ISubmitSummaryOpResult, type ISubmitSummaryOptions, type ISerializedElection, type ISummarizeOptions, type ISummarizerInternalsProvider, type ISummarizerRuntime, type ISummarizingWarning, type IUploadSummaryResult, type SubmitSummaryResult, type SummarizeResultPart, type IClientSummaryWatcher, type ISummary, type ISummaryCollectionOpEvents, type ISummaryAckMessage, type ISummaryMetadataMessage, type ISummaryNackMessage, type ISummaryOpMessage, type OpActionEventListener, type OpActionEventName, type ICancellableSummarizerController, type SubmitSummaryFailureData, type SummaryStage, type IRetriableFailureError, type IdCompressorMode, type IDocumentSchema, type IDocumentSchemaInfo, type DocumentSchemaValueType, type IDocumentSchemaCurrent, currentDocumentVersionSchema, DocumentsSchemaController, type IDocumentSchemaChangeMessageIncoming, type IDocumentSchemaChangeMessageOutgoing, type IDocumentSchemaFeatures, type ReadFluidDataStoreAttributes, type IFluidDataStoreAttributes0, type IFluidDataStoreAttributes1, type IFluidDataStoreAttributes2, type OmitAttributesVersions, type ISummaryBaseConfiguration, type ISummaryConfigurationHeuristics, type ISummaryConfigurationDisableSummarizer, type ISummaryConfigurationDisableHeuristics, type ISummaryConfiguration, DefaultSummaryConfiguration, } from "./summary/index.js";
19
+ export { type IChunkedOp, unpackRuntimeMessage } from "./opLifecycle/index.js";
20
20
  export { runtimeCoreCompatDetails, runtimeCompatDetailsForLoader, runtimeCompatDetailsForDataStore, loaderSupportRequirementsForRuntime, dataStoreSupportRequirementsForRuntime, } from "./runtimeLayerCompatState.js";
21
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,uBAAuB,EACvB,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,iBAAiB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO;AACN;;GAEG;AACH,uBAAuB,GACvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACN,oBAAoB,EACpB,8BAA8B,GAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EACN,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,UAAU,EACV,WAAW,EACX,eAAe,EACf,SAAS,EACT,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC1B,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB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;AAChB,+HAAA,wBAAwB,OAAA;AACxB,iIAAA,0BAA0B,OAAA;AAC1B,gIAAA,yBAAyB,OAAA;AAI1B,yEAA+F;AAAtF,kIAAA,qBAAqB,OAAA;AAAE,sIAAA,yBAAyB,OAAA;AAOzD,qDAG2B;AAF1B,uHAAA,oBAAoB,OAAA;AAIrB,+DAAgE;AAAvD,8HAAA,sBAAsB,OAAA;AAC/B,+DAIgC;AAH/B,gIAAA,wBAAwB,OAAA;AACxB,gIAAA,wBAAwB,OAAA;AACxB,sIAAA,8BAA8B,OAAA;AAE/B,0CAWuB;AAVtB,sGAAA,UAAU,OAAA;AAWX,+CAkE4B;AA7D3B,sHAAA,0BAA0B,OAAA;AAC1B,sGAAA,UAAU,OAAA;AACV,6GAAA,iBAAiB,OAAA;AA2CjB,wHAAA,4BAA4B,OAAA;AAC5B,qHAAA,yBAAyB,OAAA;AAczB,uHAAA,2BAA2B,OAAA;AAE5B,mDAA0E;AAArD,gHAAA,oBAAoB,OAAA;AACzC,2EAMsC;AALrC,sIAAA,wBAAwB,OAAA;AACxB,2IAAA,6BAA6B,OAAA;AAC7B,8IAAA,gCAAgC,OAAA;AAChC,iJAAA,mCAAmC,OAAA;AACnC,oJAAA,sCAAsC,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tContainerRuntimeOptions,\n\tContainerRuntimeOptionsInternal,\n\tISummaryRuntimeOptions,\n\tIContainerRuntimeOptions,\n\tIContainerRuntimeOptionsInternal,\n\tloadContainerRuntime,\n\tLoadContainerRuntimeParams,\n\tagentSchedulerId,\n\tContainerRuntime,\n\tDeletedResponseHeaderKey,\n\tTombstoneResponseHeaderKey,\n\tInactiveResponseHeaderKey,\n\tRuntimeHeaderData,\n} from \"./containerRuntime.js\";\nexport type { ICompressionRuntimeOptions } from \"./compressionDefinitions.js\";\nexport { CompressionAlgorithms, disabledCompressionConfig } from \"./compressionDefinitions.js\";\nexport {\n\t/**\n\t * @deprecated Import from `@fluidframework/runtime-definitions/legacy` instead.\n\t */\n\tMinimumVersionForCollab,\n} from \"@fluidframework/runtime-definitions/internal\";\nexport {\n\tContainerMessageType,\n\tUnknownContainerRuntimeMessage,\n} from \"./messageTypes.js\";\nexport { IBlobManagerLoadInfo } from \"./blobManager/index.js\";\nexport { FluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nexport {\n\tdetectOutboundReferences,\n\tChannelCollectionFactory,\n\tAllowTombstoneRequestHeaderKey,\n} from \"./channelCollection.js\";\nexport {\n\tGCNodeType,\n\tIGCMetadata,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tIGarbageCollectionRuntime,\n\tIGCRuntimeOptions,\n\tIMarkPhaseStats,\n\tISweepPhaseStats,\n\tIGCNodeUpdatedProps,\n\tIGCStats,\n} from \"./gc/index.js\";\nexport {\n\tIAckedSummary,\n\tISummarizer,\n\tISummarizeResults,\n\tISummaryCancellationToken,\n\tneverCancelledSummaryToken,\n\tSummarizer,\n\tSummaryCollection,\n\tEnqueueSummarizeResult,\n\tIAckSummaryResult,\n\tIBaseSummarizeResult,\n\tIBroadcastSummaryResult,\n\tICancellationToken,\n\tIConnectableRuntime,\n\tIContainerRuntimeMetadata,\n\tICreateContainerMetadata,\n\tIEnqueueSummarizeOptions,\n\tIGenerateSummaryTreeResult,\n\tIGeneratedSummaryStats,\n\tINackSummaryResult,\n\tIOnDemandSummarizeOptions,\n\tIRefreshSummaryAckOptions,\n\tISubmitSummaryOpResult,\n\tISubmitSummaryOptions,\n\tISerializedElection,\n\tISummarizeOptions,\n\tISummarizerInternalsProvider,\n\tISummarizerRuntime,\n\tISummarizingWarning,\n\tIUploadSummaryResult,\n\tSubmitSummaryResult,\n\tSummarizeResultPart,\n\tIClientSummaryWatcher,\n\tISummary,\n\tISummaryCollectionOpEvents,\n\tISummaryAckMessage,\n\tISummaryMetadataMessage,\n\tISummaryNackMessage,\n\tISummaryOpMessage,\n\tOpActionEventListener,\n\tOpActionEventName,\n\tICancellableSummarizerController,\n\tSubmitSummaryFailureData,\n\tSummaryStage,\n\tIRetriableFailureError,\n\tIdCompressorMode,\n\tIDocumentSchema,\n\tIDocumentSchemaInfo,\n\tDocumentSchemaValueType,\n\tIDocumentSchemaCurrent,\n\tcurrentDocumentVersionSchema,\n\tDocumentsSchemaController,\n\tIDocumentSchemaChangeMessageIncoming,\n\tIDocumentSchemaChangeMessageOutgoing,\n\tIDocumentSchemaFeatures,\n\tReadFluidDataStoreAttributes,\n\tIFluidDataStoreAttributes0,\n\tIFluidDataStoreAttributes1,\n\tIFluidDataStoreAttributes2,\n\tOmitAttributesVersions,\n\tISummaryBaseConfiguration,\n\tISummaryConfigurationHeuristics,\n\tISummaryConfigurationDisableSummarizer,\n\tISummaryConfigurationDisableHeuristics,\n\tISummaryConfiguration,\n\tDefaultSummaryConfiguration,\n} from \"./summary/index.js\";\nexport { IChunkedOp, unpackRuntimeMessage } from \"./opLifecycle/index.js\";\nexport {\n\truntimeCoreCompatDetails,\n\truntimeCompatDetailsForLoader,\n\truntimeCompatDetailsForDataStore,\n\tloaderSupportRequirementsForRuntime,\n\tdataStoreSupportRequirementsForRuntime,\n} from \"./runtimeLayerCompatState.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6DAc+B;AAR9B,2HAAA,oBAAoB,OAAA;AAEpB,uHAAA,gBAAgB,OAAA;AAChB,uHAAA,gBAAgB,OAAA;AAChB,+HAAA,wBAAwB,OAAA;AACxB,iIAAA,0BAA0B,OAAA;AAC1B,gIAAA,yBAAyB,OAAA;AAI1B,yEAA+F;AAAtF,kIAAA,qBAAqB,OAAA;AAAE,sIAAA,yBAAyB,OAAA;AAOzD,qDAG2B;AAF1B,uHAAA,oBAAoB,OAAA;AAIrB,+DAAgE;AAAvD,8HAAA,sBAAsB,OAAA;AAC/B,+DAIgC;AAH/B,gIAAA,wBAAwB,OAAA;AACxB,gIAAA,wBAAwB,OAAA;AACxB,sIAAA,8BAA8B,OAAA;AAE/B,0CAWuB;AAVtB,sGAAA,UAAU,OAAA;AAWX,+CAkE4B;AA7D3B,sHAAA,0BAA0B,OAAA;AAC1B,sGAAA,UAAU,OAAA;AACV,6GAAA,iBAAiB,OAAA;AA2CjB,wHAAA,4BAA4B,OAAA;AAC5B,qHAAA,yBAAyB,OAAA;AAczB,uHAAA,2BAA2B,OAAA;AAE5B,mDAA+E;AAArD,gHAAA,oBAAoB,OAAA;AAC9C,2EAMsC;AALrC,sIAAA,wBAAwB,OAAA;AACxB,2IAAA,6BAA6B,OAAA;AAC7B,8IAAA,gCAAgC,OAAA;AAChC,iJAAA,mCAAmC,OAAA;AACnC,oJAAA,sCAAsC,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ContainerRuntimeOptions,\n\ttype ContainerRuntimeOptionsInternal,\n\ttype ISummaryRuntimeOptions,\n\ttype IContainerRuntimeOptions,\n\ttype IContainerRuntimeOptionsInternal,\n\tloadContainerRuntime,\n\ttype LoadContainerRuntimeParams,\n\tagentSchedulerId,\n\tContainerRuntime,\n\tDeletedResponseHeaderKey,\n\tTombstoneResponseHeaderKey,\n\tInactiveResponseHeaderKey,\n\ttype RuntimeHeaderData,\n} from \"./containerRuntime.js\";\nexport type { ICompressionRuntimeOptions } from \"./compressionDefinitions.js\";\nexport { CompressionAlgorithms, disabledCompressionConfig } from \"./compressionDefinitions.js\";\nexport type {\n\t/**\n\t * @deprecated Import from `@fluidframework/runtime-definitions/legacy` instead.\n\t */\n\tMinimumVersionForCollab,\n} from \"@fluidframework/runtime-definitions/internal\";\nexport {\n\tContainerMessageType,\n\ttype UnknownContainerRuntimeMessage,\n} from \"./messageTypes.js\";\nexport type { IBlobManagerLoadInfo } from \"./blobManager/index.js\";\nexport { FluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nexport {\n\tdetectOutboundReferences,\n\tChannelCollectionFactory,\n\tAllowTombstoneRequestHeaderKey,\n} from \"./channelCollection.js\";\nexport {\n\tGCNodeType,\n\ttype IGCMetadata,\n\ttype GCFeatureMatrix,\n\ttype GCVersion,\n\ttype IGarbageCollectionRuntime,\n\ttype IGCRuntimeOptions,\n\ttype IMarkPhaseStats,\n\ttype ISweepPhaseStats,\n\ttype IGCNodeUpdatedProps,\n\ttype IGCStats,\n} from \"./gc/index.js\";\nexport {\n\ttype IAckedSummary,\n\ttype ISummarizer,\n\ttype ISummarizeResults,\n\ttype ISummaryCancellationToken,\n\tneverCancelledSummaryToken,\n\tSummarizer,\n\tSummaryCollection,\n\ttype EnqueueSummarizeResult,\n\ttype IAckSummaryResult,\n\ttype IBaseSummarizeResult,\n\ttype IBroadcastSummaryResult,\n\ttype ICancellationToken,\n\ttype IConnectableRuntime,\n\ttype IContainerRuntimeMetadata,\n\ttype ICreateContainerMetadata,\n\ttype IEnqueueSummarizeOptions,\n\ttype IGenerateSummaryTreeResult,\n\ttype IGeneratedSummaryStats,\n\ttype INackSummaryResult,\n\ttype IOnDemandSummarizeOptions,\n\ttype IRefreshSummaryAckOptions,\n\ttype ISubmitSummaryOpResult,\n\ttype ISubmitSummaryOptions,\n\ttype ISerializedElection,\n\ttype ISummarizeOptions,\n\ttype ISummarizerInternalsProvider,\n\ttype ISummarizerRuntime,\n\ttype ISummarizingWarning,\n\ttype IUploadSummaryResult,\n\ttype SubmitSummaryResult,\n\ttype SummarizeResultPart,\n\ttype IClientSummaryWatcher,\n\ttype ISummary,\n\ttype ISummaryCollectionOpEvents,\n\ttype ISummaryAckMessage,\n\ttype ISummaryMetadataMessage,\n\ttype ISummaryNackMessage,\n\ttype ISummaryOpMessage,\n\ttype OpActionEventListener,\n\ttype OpActionEventName,\n\ttype ICancellableSummarizerController,\n\ttype SubmitSummaryFailureData,\n\ttype SummaryStage,\n\ttype IRetriableFailureError,\n\ttype IdCompressorMode,\n\ttype IDocumentSchema,\n\ttype IDocumentSchemaInfo,\n\ttype DocumentSchemaValueType,\n\ttype IDocumentSchemaCurrent,\n\tcurrentDocumentVersionSchema,\n\tDocumentsSchemaController,\n\ttype IDocumentSchemaChangeMessageIncoming,\n\ttype IDocumentSchemaChangeMessageOutgoing,\n\ttype IDocumentSchemaFeatures,\n\ttype ReadFluidDataStoreAttributes,\n\ttype IFluidDataStoreAttributes0,\n\ttype IFluidDataStoreAttributes1,\n\ttype IFluidDataStoreAttributes2,\n\ttype OmitAttributesVersions,\n\ttype ISummaryBaseConfiguration,\n\ttype ISummaryConfigurationHeuristics,\n\ttype ISummaryConfigurationDisableSummarizer,\n\ttype ISummaryConfigurationDisableHeuristics,\n\ttype ISummaryConfiguration,\n\tDefaultSummaryConfiguration,\n} from \"./summary/index.js\";\nexport { type IChunkedOp, unpackRuntimeMessage } from \"./opLifecycle/index.js\";\nexport {\n\truntimeCoreCompatDetails,\n\truntimeCompatDetailsForLoader,\n\truntimeCompatDetailsForDataStore,\n\tloaderSupportRequirementsForRuntime,\n\tdataStoreSupportRequirementsForRuntime,\n} from \"./runtimeLayerCompatState.js\";\n"]}
@@ -2,16 +2,15 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
5
+ import type { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
6
6
  import type { IdCreationRange } from "@fluidframework/id-compressor/internal";
7
- import { IAttachMessage, IEnvelope, InboundAttachMessage } from "@fluidframework/runtime-definitions/internal";
8
- import { IDataStoreAliasMessage } from "./dataStore.js";
9
- import { GarbageCollectionMessage } from "./gc/index.js";
10
- import { IChunkedOp } from "./opLifecycle/index.js";
11
- import { type IDocumentSchemaChangeMessageIncoming, type IDocumentSchemaChangeMessageOutgoing } from "./summary/index.js";
7
+ import type { IAttachMessage, IEnvelope, InboundAttachMessage } from "@fluidframework/runtime-definitions/internal";
8
+ import type { IDataStoreAliasMessage } from "./dataStore.js";
9
+ import type { GarbageCollectionMessage } from "./gc/index.js";
10
+ import type { IChunkedOp } from "./opLifecycle/index.js";
11
+ import type { IDocumentSchemaChangeMessageIncoming, IDocumentSchemaChangeMessageOutgoing } from "./summary/index.js";
12
12
  /**
13
- * @legacy
14
- * @alpha
13
+ * @legacy @beta
15
14
  */
16
15
  export declare enum ContainerMessageType {
17
16
  FluidDataStoreOp = "component",
@@ -1 +1 @@
1
- {"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EACN,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACN,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EACzC,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,oBAAY,oBAAoB;IAE/B,gBAAgB,cAAc;IAG9B,MAAM,WAAW;IAGjB,SAAS,cAAc;IAGvB,UAAU,eAAe;IAGzB,MAAM,WAAW;IAGjB,KAAK,UAAU;IAEf;;;;OAIG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,oBAAoB,WAAW;IAE/B;;;OAGG;IACH,EAAE,OAAO;CACT;AAED;;;;;;GAMG;AACH,UAAU,4BAA4B,CAAC,KAAK,SAAS,oBAAoB,EAAE,SAAS;IACnF;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IACZ;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED,MAA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,CAAC;IAE/D;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACvC,kCAAkC,GAClC,oCAAoC,GACpC,gCAAgC,GAChC,iCAAiC,GACjC,6BAA6B,GAC7B,4BAA4B,GAC5B,mCAAmC,GACnC,yBAAyB,GACzB,4CAA4C,GAE5C,8BAA8B,CAAC;AAElC;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GACrC,kCAAkC,GAClC,qCAAqC,GACrC,iCAAiC,GACjC,6BAA6B,GAC7B,4BAA4B,GAC5B,mCAAmC,GACnC,yBAAyB,GACzB,6CAA6C,GAE7C,8BAA8B,CAAC;AAElC;;;GAGG;AACH,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACzD,yBAAyB,EACzB,MAAM,GAAG,UAAU,CACnB,GACA,8BAA8B,CAAC"}
@@ -6,8 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.ContainerMessageType = void 0;
8
8
  /**
9
- * @legacy
10
- * @alpha
9
+ * @legacy @beta
11
10
  */
12
11
  var ContainerMessageType;
13
12
  (function (ContainerMessageType) {
@@ -1 +1 @@
1
- {"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAkBH;;;GAGG;AACH,IAAY,oBAoCX;AApCD,WAAY,oBAAoB;IAC/B,iCAAiC;IACjC,sDAA8B,CAAA;IAE9B,sBAAsB;IACtB,yCAAiB,CAAA;IAEjB,qBAAqB;IACrB,+CAAuB,CAAA;IAEvB,yFAAyF;IACzF,iDAAyB,CAAA;IAEzB,oDAAoD;IACpD,yCAAiB,CAAA;IAEjB,sCAAsC;IACtC,uCAAe,CAAA;IAEf;;;;OAIG;IACH,qDAA6B,CAAA;IAE7B;;OAEG;IACH,uDAA+B,CAAA;IAE/B;;;OAGG;IACH,iCAAS,CAAA;AACV,CAAC,EApCW,oBAAoB,oCAApB,oBAAoB,QAoC/B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport type { IdCreationRange } from \"@fluidframework/id-compressor/internal\";\nimport {\n\tIAttachMessage,\n\tIEnvelope,\n\tInboundAttachMessage,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { IDataStoreAliasMessage } from \"./dataStore.js\";\nimport { GarbageCollectionMessage } from \"./gc/index.js\";\nimport { IChunkedOp } from \"./opLifecycle/index.js\";\nimport {\n\ttype IDocumentSchemaChangeMessageIncoming,\n\ttype IDocumentSchemaChangeMessageOutgoing,\n} from \"./summary/index.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport enum ContainerMessageType {\n\t// An op to be delivered to store\n\tFluidDataStoreOp = \"component\",\n\n\t// Creates a new store\n\tAttach = \"attach\",\n\n\t// Chunked operation.\n\tChunkedOp = \"chunkedOp\",\n\n\t// Signifies that a blob has been attached and should not be garbage collected by storage\n\tBlobAttach = \"blobAttach\",\n\n\t// Ties our new clientId to our old one on reconnect\n\tRejoin = \"rejoin\",\n\n\t// Sets the alias of a root data store\n\tAlias = \"alias\",\n\n\t/**\n\t * An op containing an IdRange of Ids allocated using the runtime's IdCompressor since\n\t * the last allocation op was sent.\n\t * See the [IdCompressor README](./id-compressor/README.md) for more details.\n\t */\n\tIdAllocation = \"idAllocation\",\n\n\t/**\n\t * An op that changes document schema\n\t */\n\tDocumentSchemaChange = \"schema\",\n\n\t/**\n\t * Garbage collection specific op. This is sent by the summarizer client when GC runs. It's used to synchronize GC\n\t * state across all clients.\n\t */\n\tGC = \"GC\",\n}\n\n/**\n * The unpacked runtime message / details to be handled or dispatched by the ContainerRuntime.\n * Message type are differentiated via a `type` string and contain different contents depending on their type.\n *\n * IMPORTANT: when creating one to be serialized, set the properties in the order they appear here.\n * This way stringified values can be compared.\n */\ninterface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TContents> {\n\t/**\n\t * Type of the op, within the ContainerRuntime's domain\n\t */\n\ttype: TType;\n\t/**\n\t * Domain-specific contents, interpreted according to the type\n\t */\n\tcontents: TContents;\n}\n\nexport type ContainerRuntimeDataStoreOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.FluidDataStoreOp,\n\tIEnvelope\n>;\nexport type InboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tInboundAttachMessage\n>;\nexport type OutboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tIAttachMessage\n>;\nexport type ContainerRuntimeChunkedOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.ChunkedOp,\n\tIChunkedOp\n>;\nexport type ContainerRuntimeBlobAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.BlobAttach,\n\tundefined\n>;\nexport type ContainerRuntimeRejoinMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Rejoin,\n\tundefined\n>;\nexport type ContainerRuntimeAliasMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Alias,\n\tIDataStoreAliasMessage\n>;\nexport type ContainerRuntimeIdAllocationMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.IdAllocation,\n\tIdCreationRange\n>;\nexport type ContainerRuntimeGCMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.GC,\n\tGarbageCollectionMessage\n>;\nexport type InboundContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.DocumentSchemaChange,\n\tIDocumentSchemaChangeMessageIncoming\n>;\nexport type OutboundContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.DocumentSchemaChange,\n\tIDocumentSchemaChangeMessageOutgoing\n>;\n\n/**\n * Represents an unrecognized TypedContainerRuntimeMessage, e.g. a message from a future version of the container runtime.\n * @internal\n */\nexport interface UnknownContainerRuntimeMessage {\n\t/**\n\t * Invalid type of the op, within the ContainerRuntime's domain. This value should never exist at runtime.\n\t * This is useful for type narrowing but should never be used as an actual message type at runtime.\n\t * Actual value will not be \"__unknown...\", but the type `Exclude<string, ContainerMessageType>` is not supported.\n\t */\n\ttype: \"__unknown_container_message_type__never_use_as_value__\";\n\n\t/**\n\t * Domain-specific contents, but not decipherable by an unknown op.\n\t */\n\tcontents: unknown;\n}\n\n/**\n * A {@link TypedContainerRuntimeMessage} that is received from the server and will be processed by the container runtime.\n */\nexport type InboundContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| InboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeChunkedOpMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t| InboundContainerRuntimeDocumentSchemaMessage\n\t// Inbound messages may include unknown types from other clients, so we include that as a special case here\n\t| UnknownContainerRuntimeMessage;\n\n/**\n * A {@link TypedContainerRuntimeMessage} that has been generated by the container runtime, eventually to be sent to the ordering service.\n * These are messages generated by the local runtime, before the outbox's op virtualization step.\n */\nexport type LocalContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| OutboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t| OutboundContainerRuntimeDocumentSchemaMessage\n\t// In rare cases (e.g. related to stashed ops) we could have a local message of an unknown type\n\t| UnknownContainerRuntimeMessage;\n\n/**\n * An unpacked ISequencedDocumentMessage with the inner TypedContainerRuntimeMessage type/contents/etc\n * promoted up to the outer object\n */\nexport type InboundSequencedContainerRuntimeMessage = Omit<\n\tISequencedDocumentMessage,\n\t\"type\" | \"contents\"\n> &\n\tInboundContainerRuntimeMessage;\n"]}
1
+ {"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAkBH;;GAEG;AACH,IAAY,oBAoCX;AApCD,WAAY,oBAAoB;IAC/B,iCAAiC;IACjC,sDAA8B,CAAA;IAE9B,sBAAsB;IACtB,yCAAiB,CAAA;IAEjB,qBAAqB;IACrB,+CAAuB,CAAA;IAEvB,yFAAyF;IACzF,iDAAyB,CAAA;IAEzB,oDAAoD;IACpD,yCAAiB,CAAA;IAEjB,sCAAsC;IACtC,uCAAe,CAAA;IAEf;;;;OAIG;IACH,qDAA6B,CAAA;IAE7B;;OAEG;IACH,uDAA+B,CAAA;IAE/B;;;OAGG;IACH,iCAAS,CAAA;AACV,CAAC,EApCW,oBAAoB,oCAApB,oBAAoB,QAoC/B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport type { IdCreationRange } from \"@fluidframework/id-compressor/internal\";\nimport type {\n\tIAttachMessage,\n\tIEnvelope,\n\tInboundAttachMessage,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport type { IDataStoreAliasMessage } from \"./dataStore.js\";\nimport type { GarbageCollectionMessage } from \"./gc/index.js\";\nimport type { IChunkedOp } from \"./opLifecycle/index.js\";\nimport type {\n\tIDocumentSchemaChangeMessageIncoming,\n\tIDocumentSchemaChangeMessageOutgoing,\n} from \"./summary/index.js\";\n\n/**\n * @legacy @beta\n */\nexport enum ContainerMessageType {\n\t// An op to be delivered to store\n\tFluidDataStoreOp = \"component\",\n\n\t// Creates a new store\n\tAttach = \"attach\",\n\n\t// Chunked operation.\n\tChunkedOp = \"chunkedOp\",\n\n\t// Signifies that a blob has been attached and should not be garbage collected by storage\n\tBlobAttach = \"blobAttach\",\n\n\t// Ties our new clientId to our old one on reconnect\n\tRejoin = \"rejoin\",\n\n\t// Sets the alias of a root data store\n\tAlias = \"alias\",\n\n\t/**\n\t * An op containing an IdRange of Ids allocated using the runtime's IdCompressor since\n\t * the last allocation op was sent.\n\t * See the [IdCompressor README](./id-compressor/README.md) for more details.\n\t */\n\tIdAllocation = \"idAllocation\",\n\n\t/**\n\t * An op that changes document schema\n\t */\n\tDocumentSchemaChange = \"schema\",\n\n\t/**\n\t * Garbage collection specific op. This is sent by the summarizer client when GC runs. It's used to synchronize GC\n\t * state across all clients.\n\t */\n\tGC = \"GC\",\n}\n\n/**\n * The unpacked runtime message / details to be handled or dispatched by the ContainerRuntime.\n * Message type are differentiated via a `type` string and contain different contents depending on their type.\n *\n * IMPORTANT: when creating one to be serialized, set the properties in the order they appear here.\n * This way stringified values can be compared.\n */\ninterface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TContents> {\n\t/**\n\t * Type of the op, within the ContainerRuntime's domain\n\t */\n\ttype: TType;\n\t/**\n\t * Domain-specific contents, interpreted according to the type\n\t */\n\tcontents: TContents;\n}\n\nexport type ContainerRuntimeDataStoreOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.FluidDataStoreOp,\n\tIEnvelope\n>;\nexport type InboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tInboundAttachMessage\n>;\nexport type OutboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tIAttachMessage\n>;\nexport type ContainerRuntimeChunkedOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.ChunkedOp,\n\tIChunkedOp\n>;\nexport type ContainerRuntimeBlobAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.BlobAttach,\n\tundefined\n>;\nexport type ContainerRuntimeRejoinMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Rejoin,\n\tundefined\n>;\nexport type ContainerRuntimeAliasMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Alias,\n\tIDataStoreAliasMessage\n>;\nexport type ContainerRuntimeIdAllocationMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.IdAllocation,\n\tIdCreationRange\n>;\nexport type ContainerRuntimeGCMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.GC,\n\tGarbageCollectionMessage\n>;\nexport type InboundContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.DocumentSchemaChange,\n\tIDocumentSchemaChangeMessageIncoming\n>;\nexport type OutboundContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.DocumentSchemaChange,\n\tIDocumentSchemaChangeMessageOutgoing\n>;\n\n/**\n * Represents an unrecognized TypedContainerRuntimeMessage, e.g. a message from a future version of the container runtime.\n * @internal\n */\nexport interface UnknownContainerRuntimeMessage {\n\t/**\n\t * Invalid type of the op, within the ContainerRuntime's domain. This value should never exist at runtime.\n\t * This is useful for type narrowing but should never be used as an actual message type at runtime.\n\t * Actual value will not be \"__unknown...\", but the type `Exclude<string, ContainerMessageType>` is not supported.\n\t */\n\ttype: \"__unknown_container_message_type__never_use_as_value__\";\n\n\t/**\n\t * Domain-specific contents, but not decipherable by an unknown op.\n\t */\n\tcontents: unknown;\n}\n\n/**\n * A {@link TypedContainerRuntimeMessage} that is received from the server and will be processed by the container runtime.\n */\nexport type InboundContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| InboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeChunkedOpMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t| InboundContainerRuntimeDocumentSchemaMessage\n\t// Inbound messages may include unknown types from other clients, so we include that as a special case here\n\t| UnknownContainerRuntimeMessage;\n\n/**\n * A {@link TypedContainerRuntimeMessage} that has been generated by the container runtime, eventually to be sent to the ordering service.\n * These are messages generated by the local runtime, before the outbox's op virtualization step.\n */\nexport type LocalContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| OutboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t| OutboundContainerRuntimeDocumentSchemaMessage\n\t// In rare cases (e.g. related to stashed ops) we could have a local message of an unknown type\n\t| UnknownContainerRuntimeMessage;\n\n/**\n * An unpacked ISequencedDocumentMessage with the inner TypedContainerRuntimeMessage type/contents/etc\n * promoted up to the outer object\n */\nexport type InboundSequencedContainerRuntimeMessage = Omit<\n\tISequencedDocumentMessage,\n\t\"type\" | \"contents\"\n> &\n\tInboundContainerRuntimeMessage;\n"]}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ICompressionRuntimeOptions } from "../compressionDefinitions.js";
5
+ import type { ICompressionRuntimeOptions } from "../compressionDefinitions.js";
6
6
  import type { IPendingMessage } from "../pendingStateManager.js";
7
- import { LocalBatchMessage, IBatchCheckpoint, type LocalBatch } from "./definitions.js";
7
+ import type { LocalBatchMessage, IBatchCheckpoint, LocalBatch } from "./definitions.js";
8
8
  import type { BatchStartInfo } from "./remoteMessageProcessor.js";
9
9
  export interface IBatchManagerOptions {
10
10
  readonly compressionOptions?: ICompressionRuntimeOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"batchManager.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/batchManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAExF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C3B,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;QAChC,QAAQ,CAAC,QAAQ,GAAG,aAAa,CAAC;IACnC,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AA5BW,QAAA,gBAAgB,oBA4B3B;AAEK,MAAM,oBAAoB,GAAG,CACnC,OAA6B,EAC7B,YAAkC,EACxB,EAAE;IACZ,OAAO,CACN,CAAC,OAAO,CAAC,uBAAuB,KAAK,SAAS;QAC7C,YAAY,CAAC,uBAAuB,KAAK,SAAS;QAClD,OAAO,CAAC,uBAAuB,KAAK,YAAY,CAAC,uBAAuB,CAAC;QAC1E,CAAC,OAAO,CAAC,oBAAoB,KAAK,SAAS;YAC1C,YAAY,CAAC,oBAAoB,KAAK,SAAS;YAC/C,OAAO,CAAC,oBAAoB,KAAK,YAAY,CAAC,oBAAoB,CAAC,CACpE,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,oBAAoB,wBAY/B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tLoggingError,\n\ttagData,\n\tTelemetryDataTag,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { ICompressionRuntimeOptions } from \"../compressionDefinitions.js\";\nimport { isContainerMessageDirtyable } from \"../containerRuntime.js\";\nimport { asBatchMetadata, type IBatchMetadata } from \"../metadata.js\";\nimport type { IPendingMessage } from \"../pendingStateManager.js\";\n\nimport { LocalBatchMessage, IBatchCheckpoint, type LocalBatch } from \"./definitions.js\";\nimport { serializeOp } from \"./opSerialization.js\";\nimport type { BatchStartInfo } from \"./remoteMessageProcessor.js\";\n\nexport interface IBatchManagerOptions {\n\treadonly compressionOptions?: ICompressionRuntimeOptions;\n\n\t/**\n\t * If true, the outbox is allowed to rebase the batch during flushing.\n\t */\n\treadonly canRebase: boolean;\n\n\t/**\n\t * If true, don't compare batchID of incoming batches to this. e.g. ID Allocation Batch IDs should be ignored\n\t */\n\treadonly ignoreBatchId?: boolean;\n}\n\nexport interface BatchSequenceNumbers {\n\treferenceSequenceNumber?: number;\n\tclientSequenceNumber?: number;\n}\n\n/**\n * Type alias for the batchId stored in batch metadata\n */\nexport type BatchId = string;\n\n/**\n * Compose original client ID and client sequence number into BatchId to stamp on the message during reconnect\n */\nexport function generateBatchId(originalClientId: string, batchStartCsn: number): BatchId {\n\treturn `${originalClientId}_[${batchStartCsn}]`;\n}\n\n/**\n * Get the effective batch ID for the input argument.\n * Supports either an IPendingMessage or BatchStartInfo.\n * If the batch ID is explicitly present, return it.\n * Otherwise, generate a new batch ID using the client ID and batch start CSN.\n */\nexport function getEffectiveBatchId(\n\tpendingMessageOrBatchStartInfo: IPendingMessage | BatchStartInfo,\n): string {\n\tif (\"localOpMetadata\" in pendingMessageOrBatchStartInfo) {\n\t\tconst pendingMessage: IPendingMessage = pendingMessageOrBatchStartInfo;\n\t\treturn (\n\t\t\tasBatchMetadata(pendingMessage.opMetadata)?.batchId ??\n\t\t\tgenerateBatchId(\n\t\t\t\tpendingMessage.batchInfo.clientId,\n\t\t\t\tpendingMessage.batchInfo.batchStartCsn,\n\t\t\t)\n\t\t);\n\t}\n\n\tconst batchStart: BatchStartInfo = pendingMessageOrBatchStartInfo;\n\treturn batchStart.batchId ?? generateBatchId(batchStart.clientId, batchStart.batchStartCsn);\n}\n\n/**\n * Helper class that manages partial batch & rollback.\n */\nexport class BatchManager {\n\tprivate pendingBatch: LocalBatchMessage[] = [];\n\tprivate hasReentrantOps = false;\n\n\tpublic get length(): number {\n\t\treturn this.pendingBatch.length;\n\t}\n\n\tpublic get sequenceNumbers(): BatchSequenceNumbers {\n\t\treturn {\n\t\t\treferenceSequenceNumber: this.referenceSequenceNumber,\n\t\t\tclientSequenceNumber: this.clientSequenceNumber,\n\t\t};\n\t}\n\n\tprivate get referenceSequenceNumber(): number | undefined {\n\t\treturn this.pendingBatch.length === 0\n\t\t\t? undefined\n\t\t\t: // NOTE: In case of reentrant ops, there could be multiple reference sequence numbers, but we will rebase before submitting.\n\t\t\t\tthis.pendingBatch[this.pendingBatch.length - 1].referenceSequenceNumber;\n\t}\n\n\t/**\n\t * The last-processed CSN when this batch started.\n\t * This is used to ensure that while the batch is open, no incoming ops are processed.\n\t */\n\tprivate clientSequenceNumber: number | undefined;\n\n\tconstructor(public readonly options: IBatchManagerOptions) {}\n\n\tpublic push(\n\t\tmessage: LocalBatchMessage,\n\t\treentrant: boolean,\n\t\tcurrentClientSequenceNumber?: number,\n\t): void {\n\t\tthis.hasReentrantOps = this.hasReentrantOps || reentrant;\n\n\t\tif (this.pendingBatch.length === 0) {\n\t\t\tthis.clientSequenceNumber = currentClientSequenceNumber;\n\t\t}\n\n\t\tthis.pendingBatch.push(message);\n\t}\n\n\tpublic get empty(): boolean {\n\t\treturn this.pendingBatch.length === 0;\n\t}\n\n\t/**\n\t * Gets the pending batch and clears state for the next batch.\n\t */\n\tpublic popBatch(batchId?: BatchId): LocalBatch {\n\t\tassert(this.pendingBatch[0] !== undefined, 0xb8a /* expected non-empty batch */);\n\t\tconst batch: LocalBatch = {\n\t\t\tmessages: this.pendingBatch,\n\t\t\treferenceSequenceNumber: this.referenceSequenceNumber,\n\t\t\thasReentrantOps: this.hasReentrantOps,\n\t\t\tstaged: this.pendingBatch[0].staged,\n\t\t};\n\n\t\tthis.pendingBatch = [];\n\t\tthis.clientSequenceNumber = undefined;\n\t\tthis.hasReentrantOps = false;\n\n\t\treturn addBatchMetadata(batch, batchId);\n\t}\n\n\t/**\n\t * Capture the pending state at this point\n\t */\n\tpublic checkpoint(): IBatchCheckpoint {\n\t\tconst startSequenceNumber = this.clientSequenceNumber;\n\t\tconst startPoint = this.pendingBatch.length;\n\t\treturn {\n\t\t\trollback: (process: (message: LocalBatchMessage) => void) => {\n\t\t\t\tthis.clientSequenceNumber = startSequenceNumber;\n\t\t\t\tconst rollbackOpsLifo = this.pendingBatch.splice(startPoint).reverse();\n\t\t\t\tfor (const message of rollbackOpsLifo) {\n\t\t\t\t\tprocess(message);\n\t\t\t\t}\n\t\t\t\tconst count = this.pendingBatch.length - startPoint;\n\t\t\t\tif (count !== 0) {\n\t\t\t\t\tthrow new LoggingError(\"Ops generated during rollback\", {\n\t\t\t\t\t\tcount,\n\t\t\t\t\t\t...tagData(TelemetryDataTag.UserData, {\n\t\t\t\t\t\t\tops: serializeOp(this.pendingBatch.slice(startPoint).map((b) => b.runtimeOp)),\n\t\t\t\t\t\t}),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Does this batch current contain user changes (\"dirtyable\" ops)?\n\t */\n\tpublic containsUserChanges(): boolean {\n\t\treturn this.pendingBatch.some((message) => isContainerMessageDirtyable(message.runtimeOp));\n\t}\n}\n\nexport const addBatchMetadata = (batch: LocalBatch, batchId?: BatchId): LocalBatch => {\n\tconst batchEnd = batch.messages.length - 1;\n\n\tconst firstMsg = batch.messages[0];\n\tconst lastMsg = batch.messages[batchEnd];\n\tassert(\n\t\tfirstMsg !== undefined && lastMsg !== undefined,\n\t\t0x9d1 /* expected non-empty batch */,\n\t);\n\n\tconst firstMetadata: Partial<IBatchMetadata> = firstMsg.metadata ?? {};\n\tconst lastMetadata: Partial<IBatchMetadata> = lastMsg.metadata ?? {};\n\n\t// Multi-message batches: mark the first and last messages with the \"batch\" flag indicating batch start/end\n\tif (batch.messages.length > 1) {\n\t\tfirstMetadata.batch = true;\n\t\tlastMetadata.batch = false;\n\t\tfirstMsg.metadata = firstMetadata;\n\t\tlastMsg.metadata = lastMetadata;\n\t}\n\n\t// If batchId is provided (e.g. in case of resubmit): stamp it on the first message\n\tif (batchId !== undefined) {\n\t\tfirstMetadata.batchId = batchId;\n\t\tfirstMsg.metadata = firstMetadata;\n\t}\n\n\treturn batch;\n};\n\nexport const sequenceNumbersMatch = (\n\tseqNums: BatchSequenceNumbers,\n\totherSeqNums: BatchSequenceNumbers,\n): boolean => {\n\treturn (\n\t\t(seqNums.referenceSequenceNumber === undefined ||\n\t\t\totherSeqNums.referenceSequenceNumber === undefined ||\n\t\t\tseqNums.referenceSequenceNumber === otherSeqNums.referenceSequenceNumber) &&\n\t\t(seqNums.clientSequenceNumber === undefined ||\n\t\t\totherSeqNums.clientSequenceNumber === undefined ||\n\t\t\tseqNums.clientSequenceNumber === otherSeqNums.clientSequenceNumber)\n\t);\n};\n"]}
1
+ {"version":3,"file":"batchManager.js","sourceRoot":"","sources":["../../src/opLifecycle/batchManager.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,uEAIkD;AAGlD,gEAAqE;AACrE,gDAAsE;AAItE,6DAAmD;AA2BnD;;GAEG;AACH,SAAgB,eAAe,CAAC,gBAAwB,EAAE,aAAqB;IAC9E,OAAO,GAAG,gBAAgB,KAAK,aAAa,GAAG,CAAC;AACjD,CAAC;AAFD,0CAEC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAClC,8BAAgE;IAEhE,IAAI,iBAAiB,IAAI,8BAA8B,EAAE,CAAC;QACzD,MAAM,cAAc,GAAoB,8BAA8B,CAAC;QACvE,OAAO,CACN,IAAA,6BAAe,EAAC,cAAc,CAAC,UAAU,CAAC,EAAE,OAAO;YACnD,eAAe,CACd,cAAc,CAAC,SAAS,CAAC,QAAQ,EACjC,cAAc,CAAC,SAAS,CAAC,aAAa,CACtC,CACD,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAAmB,8BAA8B,CAAC;IAClE,OAAO,UAAU,CAAC,OAAO,IAAI,eAAe,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;AAC7F,CAAC;AAhBD,kDAgBC;AAED;;GAEG;AACH,MAAa,YAAY;IAIxB,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;IACjC,CAAC;IAED,IAAW,eAAe;QACzB,OAAO;YACN,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;Y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D,OAAO,CAAC,uBAAuB,KAAK,YAAY,CAAC,uBAAuB,CAAC;QAC1E,CAAC,OAAO,CAAC,oBAAoB,KAAK,SAAS;YAC1C,YAAY,CAAC,oBAAoB,KAAK,SAAS;YAC/C,OAAO,CAAC,oBAAoB,KAAK,YAAY,CAAC,oBAAoB,CAAC,CACpE,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,oBAAoB,wBAY/B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tLoggingError,\n\ttagData,\n\tTelemetryDataTag,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ICompressionRuntimeOptions } from \"../compressionDefinitions.js\";\nimport { isContainerMessageDirtyable } from \"../containerRuntime.js\";\nimport { asBatchMetadata, type IBatchMetadata } from \"../metadata.js\";\nimport type { IPendingMessage } from \"../pendingStateManager.js\";\n\nimport type { LocalBatchMessage, IBatchCheckpoint, LocalBatch } from \"./definitions.js\";\nimport { serializeOp } from \"./opSerialization.js\";\nimport type { BatchStartInfo } from \"./remoteMessageProcessor.js\";\n\nexport interface IBatchManagerOptions {\n\treadonly compressionOptions?: ICompressionRuntimeOptions;\n\n\t/**\n\t * If true, the outbox is allowed to rebase the batch during flushing.\n\t */\n\treadonly canRebase: boolean;\n\n\t/**\n\t * If true, don't compare batchID of incoming batches to this. e.g. ID Allocation Batch IDs should be ignored\n\t */\n\treadonly ignoreBatchId?: boolean;\n}\n\nexport interface BatchSequenceNumbers {\n\treferenceSequenceNumber?: number;\n\tclientSequenceNumber?: number;\n}\n\n/**\n * Type alias for the batchId stored in batch metadata\n */\nexport type BatchId = string;\n\n/**\n * Compose original client ID and client sequence number into BatchId to stamp on the message during reconnect\n */\nexport function generateBatchId(originalClientId: string, batchStartCsn: number): BatchId {\n\treturn `${originalClientId}_[${batchStartCsn}]`;\n}\n\n/**\n * Get the effective batch ID for the input argument.\n * Supports either an IPendingMessage or BatchStartInfo.\n * If the batch ID is explicitly present, return it.\n * Otherwise, generate a new batch ID using the client ID and batch start CSN.\n */\nexport function getEffectiveBatchId(\n\tpendingMessageOrBatchStartInfo: IPendingMessage | BatchStartInfo,\n): string {\n\tif (\"localOpMetadata\" in pendingMessageOrBatchStartInfo) {\n\t\tconst pendingMessage: IPendingMessage = pendingMessageOrBatchStartInfo;\n\t\treturn (\n\t\t\tasBatchMetadata(pendingMessage.opMetadata)?.batchId ??\n\t\t\tgenerateBatchId(\n\t\t\t\tpendingMessage.batchInfo.clientId,\n\t\t\t\tpendingMessage.batchInfo.batchStartCsn,\n\t\t\t)\n\t\t);\n\t}\n\n\tconst batchStart: BatchStartInfo = pendingMessageOrBatchStartInfo;\n\treturn batchStart.batchId ?? generateBatchId(batchStart.clientId, batchStart.batchStartCsn);\n}\n\n/**\n * Helper class that manages partial batch & rollback.\n */\nexport class BatchManager {\n\tprivate pendingBatch: LocalBatchMessage[] = [];\n\tprivate hasReentrantOps = false;\n\n\tpublic get length(): number {\n\t\treturn this.pendingBatch.length;\n\t}\n\n\tpublic get sequenceNumbers(): BatchSequenceNumbers {\n\t\treturn {\n\t\t\treferenceSequenceNumber: this.referenceSequenceNumber,\n\t\t\tclientSequenceNumber: this.clientSequenceNumber,\n\t\t};\n\t}\n\n\tprivate get referenceSequenceNumber(): number | undefined {\n\t\treturn this.pendingBatch.length === 0\n\t\t\t? undefined\n\t\t\t: // NOTE: In case of reentrant ops, there could be multiple reference sequence numbers, but we will rebase before submitting.\n\t\t\t\tthis.pendingBatch[this.pendingBatch.length - 1].referenceSequenceNumber;\n\t}\n\n\t/**\n\t * The last-processed CSN when this batch started.\n\t * This is used to ensure that while the batch is open, no incoming ops are processed.\n\t */\n\tprivate clientSequenceNumber: number | undefined;\n\n\tconstructor(public readonly options: IBatchManagerOptions) {}\n\n\tpublic push(\n\t\tmessage: LocalBatchMessage,\n\t\treentrant: boolean,\n\t\tcurrentClientSequenceNumber?: number,\n\t): void {\n\t\tthis.hasReentrantOps = this.hasReentrantOps || reentrant;\n\n\t\tif (this.pendingBatch.length === 0) {\n\t\t\tthis.clientSequenceNumber = currentClientSequenceNumber;\n\t\t}\n\n\t\tthis.pendingBatch.push(message);\n\t}\n\n\tpublic get empty(): boolean {\n\t\treturn this.pendingBatch.length === 0;\n\t}\n\n\t/**\n\t * Gets the pending batch and clears state for the next batch.\n\t */\n\tpublic popBatch(batchId?: BatchId): LocalBatch {\n\t\tassert(this.pendingBatch[0] !== undefined, 0xb8a /* expected non-empty batch */);\n\t\tconst batch: LocalBatch = {\n\t\t\tmessages: this.pendingBatch,\n\t\t\treferenceSequenceNumber: this.referenceSequenceNumber,\n\t\t\thasReentrantOps: this.hasReentrantOps,\n\t\t\tstaged: this.pendingBatch[0].staged,\n\t\t};\n\n\t\tthis.pendingBatch = [];\n\t\tthis.clientSequenceNumber = undefined;\n\t\tthis.hasReentrantOps = false;\n\n\t\treturn addBatchMetadata(batch, batchId);\n\t}\n\n\t/**\n\t * Capture the pending state at this point\n\t */\n\tpublic checkpoint(): IBatchCheckpoint {\n\t\tconst startSequenceNumber = this.clientSequenceNumber;\n\t\tconst startPoint = this.pendingBatch.length;\n\t\treturn {\n\t\t\trollback: (process: (message: LocalBatchMessage) => void) => {\n\t\t\t\tthis.clientSequenceNumber = startSequenceNumber;\n\t\t\t\tconst rollbackOpsLifo = this.pendingBatch.splice(startPoint).reverse();\n\t\t\t\tfor (const message of rollbackOpsLifo) {\n\t\t\t\t\tprocess(message);\n\t\t\t\t}\n\t\t\t\tconst count = this.pendingBatch.length - startPoint;\n\t\t\t\tif (count !== 0) {\n\t\t\t\t\tthrow new LoggingError(\"Ops generated during rollback\", {\n\t\t\t\t\t\tcount,\n\t\t\t\t\t\t...tagData(TelemetryDataTag.UserData, {\n\t\t\t\t\t\t\tops: serializeOp(this.pendingBatch.slice(startPoint).map((b) => b.runtimeOp)),\n\t\t\t\t\t\t}),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Does this batch current contain user changes (\"dirtyable\" ops)?\n\t */\n\tpublic containsUserChanges(): boolean {\n\t\treturn this.pendingBatch.some((message) => isContainerMessageDirtyable(message.runtimeOp));\n\t}\n}\n\nexport const addBatchMetadata = (batch: LocalBatch, batchId?: BatchId): LocalBatch => {\n\tconst batchEnd = batch.messages.length - 1;\n\n\tconst firstMsg = batch.messages[0];\n\tconst lastMsg = batch.messages[batchEnd];\n\tassert(\n\t\tfirstMsg !== undefined && lastMsg !== undefined,\n\t\t0x9d1 /* expected non-empty batch */,\n\t);\n\n\tconst firstMetadata: Partial<IBatchMetadata> = firstMsg.metadata ?? {};\n\tconst lastMetadata: Partial<IBatchMetadata> = lastMsg.metadata ?? {};\n\n\t// Multi-message batches: mark the first and last messages with the \"batch\" flag indicating batch start/end\n\tif (batch.messages.length > 1) {\n\t\tfirstMetadata.batch = true;\n\t\tlastMetadata.batch = false;\n\t\tfirstMsg.metadata = firstMetadata;\n\t\tlastMsg.metadata = lastMetadata;\n\t}\n\n\t// If batchId is provided (e.g. in case of resubmit): stamp it on the first message\n\tif (batchId !== undefined) {\n\t\tfirstMetadata.batchId = batchId;\n\t\tfirstMsg.metadata = firstMetadata;\n\t}\n\n\treturn batch;\n};\n\nexport const sequenceNumbersMatch = (\n\tseqNums: BatchSequenceNumbers,\n\totherSeqNums: BatchSequenceNumbers,\n): boolean => {\n\treturn (\n\t\t(seqNums.referenceSequenceNumber === undefined ||\n\t\t\totherSeqNums.referenceSequenceNumber === undefined ||\n\t\t\tseqNums.referenceSequenceNumber === otherSeqNums.referenceSequenceNumber) &&\n\t\t(seqNums.clientSequenceNumber === undefined ||\n\t\t\totherSeqNums.clientSequenceNumber === undefined ||\n\t\t\tseqNums.clientSequenceNumber === otherSeqNums.clientSequenceNumber)\n\t);\n};\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { IBatchMessage } from "@fluidframework/container-definitions/internal";
6
- import { CompressionAlgorithms } from "../compressionDefinitions.js";
6
+ import type { CompressionAlgorithms } from "../compressionDefinitions.js";
7
7
  import type { LocalContainerRuntimeMessage } from "../messageTypes.js";
8
8
  import type { IEmptyBatchMetadata } from "../metadata.js";
9
9
  import type { EmptyGroupedBatch } from "./opGroupingManager.js";
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/definitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,SAAS,EAAE,4BAA4B,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,eAAe,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC/C,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,iBAAiB,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,oBAA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,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/opLifecycle/definitions.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IBatchMessage } from \"@fluidframework/container-definitions/internal\";\n\nimport { CompressionAlgorithms } from \"../compressionDefinitions.js\";\nimport type { LocalContainerRuntimeMessage } from \"../messageTypes.js\";\nimport type { IEmptyBatchMetadata } from \"../metadata.js\";\n\nimport type { EmptyGroupedBatch } from \"./opGroupingManager.js\";\n\n/**\n * Local Batch message, before it is virtualized and sent to the ordering service\n */\nexport interface LocalBatchMessage {\n\t/**\n\t * The original local op\n\t */\n\truntimeOp: LocalContainerRuntimeMessage;\n\t/**\n\t * Optional metadata which is not to be serialized with the op, and is visible to the ordering service\n\t */\n\tmetadata?: Record<string, unknown>;\n\t/**\n\t * Metadata used by this local client in flows such as rebase\n\t */\n\tlocalOpMetadata?: unknown;\n\t/**\n\t * Reference sequence number this op is based on\n\t */\n\treferenceSequenceNumber: number;\n\t/**\n\t * If true, this op is not to be submitted to the ordering service yet, since it was submitted during Staging Mode\n\t */\n\tstaged?: boolean;\n\n\t/**\n\t * @deprecated Use runtimeOp\n\t */\n\tcontents?: never; // To ensure we don't leave this one when converting from OutboundBatchMessage\n}\n\n/**\n * Placeholder for an empty batch, for tracking the pending local empty batch\n */\nexport interface LocalEmptyBatchPlaceholder {\n\tmetadata?: Record<string, unknown>;\n\tlocalOpMetadata: Required<IEmptyBatchMetadata>;\n\treferenceSequenceNumber: number;\n\truntimeOp: EmptyGroupedBatch;\n}\n\n/**\n * Virtualized Batch message, on its way out the door to the ordering service\n */\nexport type OutboundBatchMessage = IBatchMessage & {\n\tlocalOpMetadata?: unknown;\n\treferenceSequenceNumber: number;\n\tcompression?: CompressionAlgorithms;\n\n\t/**\n\t * @deprecated Use contents\n\t */\n\truntimeOp?: never; // To ensure we don't leave this one when converting from LocalBatchMessage\n};\n\n/**\n * A batch of messages we have accumulated locally, but haven't sent to the ordering service yet.\n */\nexport interface LocalBatch extends IBatch<LocalBatchMessage[]> {\n\t/**\n\t * If true, this batch is not to be submitted to the ordering service yet, since it was submitted during Staging Mode\n\t */\n\tstaged?: boolean;\n}\n\n/**\n * A batch of messages that has been virtualized as needed (grouped, compressed, chunked)\n * and is ready to be sent to the ordering service.\n * At the very least, the op contents have been serialized to string.\n */\nexport interface OutboundBatch<\n\tTMessages extends OutboundBatchMessage[] = OutboundBatchMessage[],\n> extends IBatch<TMessages> {\n\t/**\n\t * Sum of the in-memory content sizes of all messages in the batch.\n\t * If the batch is compressed, this number reflects the post-compression size.\n\t */\n\treadonly contentSizeInBytes: number;\n}\n\n/**\n * An {@link OutboundBatch} with exactly one message\n * This type is helpful as Grouping yields this kind of batch, and Compression only operates on this type of batch.\n */\nexport type OutboundSingletonBatch = OutboundBatch<[OutboundBatchMessage]>;\n\n/**\n * Base batch interface used internally by the runtime.\n * See {@link LocalBatch} and {@link OutboundBatch} for the concrete types.\n */\ninterface IBatch<TMessages extends LocalBatchMessage[] | OutboundBatchMessage[]> {\n\t/**\n\t * All the messages in the batch\n\t */\n\treadonly messages: TMessages;\n\t/**\n\t * The reference sequence number for the batch\n\t */\n\treadonly referenceSequenceNumber: number | undefined;\n\t/**\n\t * Wether or not the batch contains at least one op which was produced as the result\n\t * of processing another op. This means that the batch must be rebased before\n\t * submitted, to ensure that all ops have the same reference sequence numbers and a\n\t * consistent view of the data model. This happens when the op is created within a\n\t * 'changed' event handler of a DDS and will have a different reference sequence number\n\t * than the rest of the ops in the batch, meaning that it has a different view of the\n\t * state of the data model, therefore all ops must be resubmitted and rebased to the current\n\t * reference sequence number to be in agreement about the data model state.\n\t */\n\treadonly hasReentrantOps?: boolean;\n}\n\nexport interface IBatchCheckpoint {\n\trollback: (action: (message: LocalBatchMessage) => void) => void;\n}\n\n/**\n * @internal\n */\nexport interface IChunkedOp {\n\tchunkId: number;\n\ttotalChunks: number;\n\tcontents: string;\n\toriginalMetadata?: Record<string, unknown>;\n\toriginalCompression?: string;\n}\n\n/**\n * The state of remote message processing:\n * `Processed` - the message can be considered processed\n * `Skipped` - the message was ignored by the processor\n * `Accepted` - the message was processed partially. Eventually, a message\n * will make the processor return `Processed`.\n */\nexport type ProcessingState = \"Processed\" | \"Skipped\" | \"Accepted\";\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/opLifecycle/definitions.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IBatchMessage } from \"@fluidframework/container-definitions/internal\";\n\nimport type { CompressionAlgorithms } from \"../compressionDefinitions.js\";\nimport type { LocalContainerRuntimeMessage } from \"../messageTypes.js\";\nimport type { IEmptyBatchMetadata } from \"../metadata.js\";\n\nimport type { EmptyGroupedBatch } from \"./opGroupingManager.js\";\n\n/**\n * Local Batch message, before it is virtualized and sent to the ordering service\n */\nexport interface LocalBatchMessage {\n\t/**\n\t * The original local op\n\t */\n\truntimeOp: LocalContainerRuntimeMessage;\n\t/**\n\t * Optional metadata which is not to be serialized with the op, and is visible to the ordering service\n\t */\n\tmetadata?: Record<string, unknown>;\n\t/**\n\t * Metadata used by this local client in flows such as rebase\n\t */\n\tlocalOpMetadata?: unknown;\n\t/**\n\t * Reference sequence number this op is based on\n\t */\n\treferenceSequenceNumber: number;\n\t/**\n\t * If true, this op is not to be submitted to the ordering service yet, since it was submitted during Staging Mode\n\t */\n\tstaged?: boolean;\n\n\t/**\n\t * @deprecated Use runtimeOp\n\t */\n\tcontents?: never; // To ensure we don't leave this one when converting from OutboundBatchMessage\n}\n\n/**\n * Placeholder for an empty batch, for tracking the pending local empty batch\n */\nexport interface LocalEmptyBatchPlaceholder {\n\tmetadata?: Record<string, unknown>;\n\tlocalOpMetadata: Required<IEmptyBatchMetadata>;\n\treferenceSequenceNumber: number;\n\truntimeOp: EmptyGroupedBatch;\n}\n\n/**\n * Virtualized Batch message, on its way out the door to the ordering service\n */\nexport type OutboundBatchMessage = IBatchMessage & {\n\tlocalOpMetadata?: unknown;\n\treferenceSequenceNumber: number;\n\tcompression?: CompressionAlgorithms;\n\n\t/**\n\t * @deprecated Use contents\n\t */\n\truntimeOp?: never; // To ensure we don't leave this one when converting from LocalBatchMessage\n};\n\n/**\n * A batch of messages we have accumulated locally, but haven't sent to the ordering service yet.\n */\nexport interface LocalBatch extends IBatch<LocalBatchMessage[]> {\n\t/**\n\t * If true, this batch is not to be submitted to the ordering service yet, since it was submitted during Staging Mode\n\t */\n\tstaged?: boolean;\n}\n\n/**\n * A batch of messages that has been virtualized as needed (grouped, compressed, chunked)\n * and is ready to be sent to the ordering service.\n * At the very least, the op contents have been serialized to string.\n */\nexport interface OutboundBatch<\n\tTMessages extends OutboundBatchMessage[] = OutboundBatchMessage[],\n> extends IBatch<TMessages> {\n\t/**\n\t * Sum of the in-memory content sizes of all messages in the batch.\n\t * If the batch is compressed, this number reflects the post-compression size.\n\t */\n\treadonly contentSizeInBytes: number;\n}\n\n/**\n * An {@link OutboundBatch} with exactly one message\n * This type is helpful as Grouping yields this kind of batch, and Compression only operates on this type of batch.\n */\nexport type OutboundSingletonBatch = OutboundBatch<[OutboundBatchMessage]>;\n\n/**\n * Base batch interface used internally by the runtime.\n * See {@link LocalBatch} and {@link OutboundBatch} for the concrete types.\n */\ninterface IBatch<TMessages extends LocalBatchMessage[] | OutboundBatchMessage[]> {\n\t/**\n\t * All the messages in the batch\n\t */\n\treadonly messages: TMessages;\n\t/**\n\t * The reference sequence number for the batch\n\t */\n\treadonly referenceSequenceNumber: number | undefined;\n\t/**\n\t * Wether or not the batch contains at least one op which was produced as the result\n\t * of processing another op. This means that the batch must be rebased before\n\t * submitted, to ensure that all ops have the same reference sequence numbers and a\n\t * consistent view of the data model. This happens when the op is created within a\n\t * 'changed' event handler of a DDS and will have a different reference sequence number\n\t * than the rest of the ops in the batch, meaning that it has a different view of the\n\t * state of the data model, therefore all ops must be resubmitted and rebased to the current\n\t * reference sequence number to be in agreement about the data model state.\n\t */\n\treadonly hasReentrantOps?: boolean;\n}\n\nexport interface IBatchCheckpoint {\n\trollback: (action: (message: LocalBatchMessage) => void) => void;\n}\n\n/**\n * @internal\n */\nexport interface IChunkedOp {\n\tchunkId: number;\n\ttotalChunks: number;\n\tcontents: string;\n\toriginalMetadata?: Record<string, unknown>;\n\toriginalCompression?: string;\n}\n\n/**\n * The state of remote message processing:\n * `Processed` - the message can be considered processed\n * `Skipped` - the message was ignored by the processor\n * `Accepted` - the message was processed partially. Eventually, a message\n * will make the processor return `Processed`.\n */\nexport type ProcessingState = \"Processed\" | \"Skipped\" | \"Accepted\";\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { ITelemetryContext } from "@fluidframework/runtime-definitions/internal";
6
- import { type BatchStartInfo } from "./remoteMessageProcessor.js";
6
+ import type { BatchStartInfo } from "./remoteMessageProcessor.js";
7
7
  /**
8
8
  * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"duplicateBatchDetector.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,qBAAa,sBAAsB;IAClC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D;;OAEG;gBACS,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS;IAShE;;;;;OAKG;IACI,mBAAmB,CACzB,UAAU,EAAE,cAAc,GACxB;QAAE,SAAS,EAAE,IAAI,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,SAAS,EAAE,KAAK,CAAA;KAAE;IAqC1E;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IASxB;;;;;OAKG;IACI,4BAA4B,CAClC,gBAAgB,CAAC,EAAE,iBAAiB,GAClC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS;CAajC"}
1
+ {"version":3,"file":"duplicateBatchDetector.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,qBAAa,sBAAsB;IAClC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D;;OAEG;gBACS,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS;IAShE;;;;;OAKG;IACI,mBAAmB,CACzB,UAAU,EAAE,cAAc,GACxB;QAAE,SAAS,EAAE,IAAI,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,SAAS,EAAE,KAAK,CAAA;KAAE;IAqC1E;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IASxB;;;;;OAKG;IACI,4BAA4B,CAClC,gBAAgB,CAAC,EAAE,iBAAiB,GAClC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS;CAajC"}
@@ -1 +1 @@
1
- {"version":3,"file":"duplicateBatchDetector.js","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":";AAAA;;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jF,CAAC;QAED,kFAAkF;QAClF,IAAA,iBAAM,EACL,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,cAAc,CAAC,EAC1C,KAAK,CAAC,wDAAwD,CAC9D,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE9B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,gBAAgB,CAAC,GAAW;QACnC,KAAK,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC/D,IAAI,cAAc,GAAG,GAAG,EAAE,CAAC;gBAC1B,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBAC7C,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAClC,CAAC;QACF,CAAC;IACF,CAAC;IAED;;;;;OAKG;IACI,4BAA4B,CAClC,gBAAoC;QAEpC,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACtC,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,gBAAgB,EAAE,GAAG,CACpB,+BAA+B,EAC/B,kBAAkB,EAClB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAC1B,CAAC;QAEF,OAAO,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;CACD;AAtGD,wDAsGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { ITelemetryContext } from \"@fluidframework/runtime-definitions/internal\";\n\nimport { getEffectiveBatchId } from \"./batchManager.js\";\nimport { type BatchStartInfo } from \"./remoteMessageProcessor.js\";\n\n/**\n * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.\n */\nexport class DuplicateBatchDetector {\n\t/**\n\t * All batchIds we've seen recently enough (based on MSN) that we need to watch for duplicates\n\t */\n\tprivate readonly batchIdsAll = new Set<string>();\n\n\t/**\n\t * We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances\n\t */\n\tprivate readonly batchIdsBySeqNum = new Map<number, string>();\n\n\t/**\n\t * Initialize from snapshot data if provided - otherwise initialize empty\n\t */\n\tconstructor(batchIdsFromSnapshot: [number, string][] | undefined) {\n\t\tif (batchIdsFromSnapshot) {\n\t\t\tthis.batchIdsBySeqNum = new Map(batchIdsFromSnapshot);\n\t\t\tfor (const batchId of this.batchIdsBySeqNum.values()) {\n\t\t\t\tthis.batchIdsAll.add(batchId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.\n\t * If it's a duplicate, also return the sequence number of the other batch for logging.\n\t *\n\t * @remarks - We also use the minimumSequenceNumber to clear out old batchIds that are no longer at risk for duplicates.\n\t */\n\tpublic processInboundBatch(\n\t\tbatchStart: BatchStartInfo,\n\t): { duplicate: true; otherSequenceNumber: number } | { duplicate: false } {\n\t\tconst { sequenceNumber, minimumSequenceNumber } = batchStart.keyMessage;\n\n\t\t// Glance at this batch's MSN. Any batchIds we're tracking with a lower sequence number are now safe to forget.\n\t\t// Why? Because any other client holding the same batch locally would have seen the earlier batch and closed before submitting its duplicate.\n\t\tthis.clearOldBatchIds(minimumSequenceNumber);\n\n\t\t// getEffectiveBatchId is only needed in the SUPER rare/surprising case where\n\t\t// the original batch (not resubmitted, so no batchId) arrives in parallel with a resubmitted batch.\n\t\t// In the presence of typical network conditions, this would not be possible\n\t\t// (the original batch should roundtrip WAY before another container could rehydrate, connect, and resubmit)\n\t\tconst batchId = getEffectiveBatchId(batchStart);\n\n\t\t// Check this batch against the tracked batchIds to see if it's a duplicate\n\t\tif (this.batchIdsAll.has(batchId)) {\n\t\t\tfor (const [otherSequenceNumber, otherBatchId] of this.batchIdsBySeqNum.entries()) {\n\t\t\t\tif (otherBatchId === batchId) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tduplicate: true,\n\t\t\t\t\t\totherSequenceNumber,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tassert(false, 0xa34 /* Should have found the batchId in batchIdBySeqNum map */);\n\t\t}\n\n\t\t// Now we know it's not a duplicate, so add it to the tracked batchIds and return.\n\t\tassert(\n\t\t\t!this.batchIdsBySeqNum.has(sequenceNumber),\n\t\t\t0xa35 /* batchIdsAll and batchIdsBySeqNum should be in sync */,\n\t\t);\n\t\tthis.batchIdsBySeqNum.set(sequenceNumber, batchId);\n\t\tthis.batchIdsAll.add(batchId);\n\n\t\treturn { duplicate: false };\n\t}\n\n\t/**\n\t * Batches that started before the MSN are not at risk for a sequenced duplicate to arrive,\n\t * since the batch start has been processed by all clients, and local batches are deduped and the forked client would close.\n\t */\n\tprivate clearOldBatchIds(msn: number): void {\n\t\tfor (const [sequenceNumber, batchId] of this.batchIdsBySeqNum) {\n\t\t\tif (sequenceNumber < msn) {\n\t\t\t\tthis.batchIdsBySeqNum.delete(sequenceNumber);\n\t\t\t\tthis.batchIdsAll.delete(batchId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a snapshot of the state of the detector which can be included in a summary\n\t * and used to \"rehydrate\" this class when loading from a snapshot.\n\t *\n\t * @returns - A serializable object representing the state of the detector, or undefined if there is nothing to save.\n\t */\n\tpublic getRecentBatchInfoForSummary(\n\t\ttelemetryContext?: ITelemetryContext,\n\t): [number, string][] | undefined {\n\t\tif (this.batchIdsBySeqNum.size === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\ttelemetryContext?.set(\n\t\t\t\"fluid_DuplicateBatchDetector_\",\n\t\t\t\"recentBatchCount\",\n\t\t\tthis.batchIdsBySeqNum.size,\n\t\t);\n\n\t\treturn [...this.batchIdsBySeqNum.entries()];\n\t}\n}\n"]}
1
+ {"version":3,"file":"duplicateBatchDetector.js","sourceRoot":"","sources":["../../src/opLifecycle/duplicateBatchDetector.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAG7D,uDAAwD;AAGxD;;GAEG;AACH,MAAa,sBAAsB;IAWlC;;OAEG;IACH,YAAY,oBAAoD;QAbhE;;WAEG;QACc,gBAAW,GAAG,IAAI,GAAG,EAAU,CAAC;QAEjD;;WAEG;QACc,qBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;QAM7D,IAAI,oBAAoB,EAAE,CAAC;YAC1B,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC;YACtD,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC;gBACtD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC;QACF,CAAC;IACF,CAAC;IAED;;;;;OAKG;IACI,mBAAmB,CACzB,UAA0B;QAE1B,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC;QAExE,+GAA+G;QAC/G,6IAA6I;QAC7I,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;QAE7C,6EAA6E;QAC7E,oGAAoG;QACpG,4EAA4E;QAC5E,4GAA4G;QAC5G,MAAM,OAAO,GAAG,IAAA,qCAAmB,EAAC,UAAU,CAAC,CAAC;QAEhD,2EAA2E;QAC3E,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,KAAK,MAAM,CAAC,mBAAmB,EAAE,YAAY,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE,CAAC;gBACnF,IAAI,YAAY,KAAK,OAAO,EAAE,CAAC;oBAC9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rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { ITelemetryContext } from \"@fluidframework/runtime-definitions/internal\";\n\nimport { getEffectiveBatchId } from \"./batchManager.js\";\nimport type { BatchStartInfo } from \"./remoteMessageProcessor.js\";\n\n/**\n * This class tracks recent batchIds we've seen, and checks incoming batches for duplicates.\n */\nexport class DuplicateBatchDetector {\n\t/**\n\t * All batchIds we've seen recently enough (based on MSN) that we need to watch for duplicates\n\t */\n\tprivate readonly batchIdsAll = new Set<string>();\n\n\t/**\n\t * We map from sequenceNumber to batchId to find which ones we can stop tracking as MSN advances\n\t */\n\tprivate readonly batchIdsBySeqNum = new Map<number, string>();\n\n\t/**\n\t * Initialize from snapshot data if provided - otherwise initialize empty\n\t */\n\tconstructor(batchIdsFromSnapshot: [number, string][] | undefined) {\n\t\tif (batchIdsFromSnapshot) {\n\t\t\tthis.batchIdsBySeqNum = new Map(batchIdsFromSnapshot);\n\t\t\tfor (const batchId of this.batchIdsBySeqNum.values()) {\n\t\t\t\tthis.batchIdsAll.add(batchId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Records this batch's batchId, and checks if it's a duplicate of a batch we've already seen.\n\t * If it's a duplicate, also return the sequence number of the other batch for logging.\n\t *\n\t * @remarks - We also use the minimumSequenceNumber to clear out old batchIds that are no longer at risk for duplicates.\n\t */\n\tpublic processInboundBatch(\n\t\tbatchStart: BatchStartInfo,\n\t): { duplicate: true; otherSequenceNumber: number } | { duplicate: false } {\n\t\tconst { sequenceNumber, minimumSequenceNumber } = batchStart.keyMessage;\n\n\t\t// Glance at this batch's MSN. Any batchIds we're tracking with a lower sequence number are now safe to forget.\n\t\t// Why? Because any other client holding the same batch locally would have seen the earlier batch and closed before submitting its duplicate.\n\t\tthis.clearOldBatchIds(minimumSequenceNumber);\n\n\t\t// getEffectiveBatchId is only needed in the SUPER rare/surprising case where\n\t\t// the original batch (not resubmitted, so no batchId) arrives in parallel with a resubmitted batch.\n\t\t// In the presence of typical network conditions, this would not be possible\n\t\t// (the original batch should roundtrip WAY before another container could rehydrate, connect, and resubmit)\n\t\tconst batchId = getEffectiveBatchId(batchStart);\n\n\t\t// Check this batch against the tracked batchIds to see if it's a duplicate\n\t\tif (this.batchIdsAll.has(batchId)) {\n\t\t\tfor (const [otherSequenceNumber, otherBatchId] of this.batchIdsBySeqNum.entries()) {\n\t\t\t\tif (otherBatchId === batchId) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tduplicate: true,\n\t\t\t\t\t\totherSequenceNumber,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tassert(false, 0xa34 /* Should have found the batchId in batchIdBySeqNum map */);\n\t\t}\n\n\t\t// Now we know it's not a duplicate, so add it to the tracked batchIds and return.\n\t\tassert(\n\t\t\t!this.batchIdsBySeqNum.has(sequenceNumber),\n\t\t\t0xa35 /* batchIdsAll and batchIdsBySeqNum should be in sync */,\n\t\t);\n\t\tthis.batchIdsBySeqNum.set(sequenceNumber, batchId);\n\t\tthis.batchIdsAll.add(batchId);\n\n\t\treturn { duplicate: false };\n\t}\n\n\t/**\n\t * Batches that started before the MSN are not at risk for a sequenced duplicate to arrive,\n\t * since the batch start has been processed by all clients, and local batches are deduped and the forked client would close.\n\t */\n\tprivate clearOldBatchIds(msn: number): void {\n\t\tfor (const [sequenceNumber, batchId] of this.batchIdsBySeqNum) {\n\t\t\tif (sequenceNumber < msn) {\n\t\t\t\tthis.batchIdsBySeqNum.delete(sequenceNumber);\n\t\t\t\tthis.batchIdsAll.delete(batchId);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a snapshot of the state of the detector which can be included in a summary\n\t * and used to \"rehydrate\" this class when loading from a snapshot.\n\t *\n\t * @returns - A serializable object representing the state of the detector, or undefined if there is nothing to save.\n\t */\n\tpublic getRecentBatchInfoForSummary(\n\t\ttelemetryContext?: ITelemetryContext,\n\t): [number, string][] | undefined {\n\t\tif (this.batchIdsBySeqNum.size === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\ttelemetryContext?.set(\n\t\t\t\"fluid_DuplicateBatchDetector_\",\n\t\t\t\"recentBatchCount\",\n\t\t\tthis.batchIdsBySeqNum.size,\n\t\t);\n\n\t\treturn [...this.batchIdsBySeqNum.entries()];\n\t}\n}\n"]}
@@ -2,14 +2,14 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { addBatchMetadata, BatchId, BatchManager, BatchSequenceNumbers, getEffectiveBatchId, generateBatchId, IBatchManagerOptions, } from "./batchManager.js";
6
- export { LocalBatch, LocalBatchMessage, LocalEmptyBatchPlaceholder, OutboundBatch, OutboundBatchMessage, OutboundSingletonBatch, IBatchCheckpoint, IChunkedOp, } from "./definitions.js";
5
+ export { addBatchMetadata, type BatchId, BatchManager, type BatchSequenceNumbers, getEffectiveBatchId, generateBatchId, type IBatchManagerOptions, } from "./batchManager.js";
6
+ export type { LocalBatch, LocalBatchMessage, LocalEmptyBatchPlaceholder, OutboundBatch, OutboundBatchMessage, OutboundSingletonBatch, IBatchCheckpoint, IChunkedOp, } from "./definitions.js";
7
7
  export { DuplicateBatchDetector } from "./duplicateBatchDetector.js";
8
8
  export { serializeOp, ensureContentsDeserialized, } from "./opSerialization.js";
9
- export { BatchResubmitInfo, estimateSocketSize, localBatchToOutboundBatch, Outbox, getLongStack, } from "./outbox.js";
9
+ export { type BatchResubmitInfo, estimateSocketSize, localBatchToOutboundBatch, Outbox, getLongStack, } from "./outbox.js";
10
10
  export { OpCompressor } from "./opCompressor.js";
11
11
  export { OpDecompressor } from "./opDecompressor.js";
12
12
  export { OpSplitter, splitOp, isChunkedMessage } from "./opSplitter.js";
13
- export { InboundMessageResult, BatchStartInfo, RemoteMessageProcessor, unpackRuntimeMessage, } from "./remoteMessageProcessor.js";
14
- export { EmptyGroupedBatch, OpGroupingManager, OpGroupingManagerConfig, isGroupedBatch, } from "./opGroupingManager.js";
13
+ export { type InboundMessageResult, type BatchStartInfo, RemoteMessageProcessor, unpackRuntimeMessage, } from "./remoteMessageProcessor.js";
14
+ export { type EmptyGroupedBatch, OpGroupingManager, type OpGroupingManagerConfig, isGroupedBatch, } from "./opGroupingManager.js";
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,UAAU,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACN,WAAW,EACX,0BAA0B,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,MAAM,EACN,YAAY,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EACN,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,GACd,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/index.ts"],"names":[],"mappings":"A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;AACX,gIAAA,0BAA0B,OAAA;AAE3B,yCAMqB;AAJpB,+GAAA,kBAAkB,OAAA;AAClB,sHAAA,yBAAyB,OAAA;AACzB,mGAAA,MAAM,OAAA;AACN,yGAAA,YAAY,OAAA;AAEb,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AACrB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,iDAAwE;AAA/D,2GAAA,UAAU,OAAA;AAAE,wGAAA,OAAO,OAAA;AAAE,iHAAA,gBAAgB,OAAA;AAC9C,yEAKqC;AAFpC,mIAAA,sBAAsB,OAAA;AACtB,iIAAA,oBAAoB,OAAA;AAErB,+DAKgC;AAH/B,yHAAA,iBAAiB,OAAA;AAEjB,sHAAA,cAAc,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\taddBatchMetadata,\n\tBatchId,\n\tBatchManager,\n\tBatchSequenceNumbers,\n\tgetEffectiveBatchId,\n\tgenerateBatchId,\n\tIBatchManagerOptions,\n} from \"./batchManager.js\";\nexport {\n\tLocalBatch,\n\tLocalBatchMessage,\n\tLocalEmptyBatchPlaceholder,\n\tOutboundBatch,\n\tOutboundBatchMessage,\n\tOutboundSingletonBatch,\n\tIBatchCheckpoint,\n\tIChunkedOp,\n} from \"./definitions.js\";\nexport { DuplicateBatchDetector } from \"./duplicateBatchDetector.js\";\nexport {\n\tserializeOp,\n\tensureContentsDeserialized,\n} from \"./opSerialization.js\";\nexport {\n\tBatchResubmitInfo,\n\testimateSocketSize,\n\tlocalBatchToOutboundBatch,\n\tOutbox,\n\tgetLongStack,\n} from \"./outbox.js\";\nexport { OpCompressor } from \"./opCompressor.js\";\nexport { OpDecompressor } from \"./opDecompressor.js\";\nexport { OpSplitter, splitOp, isChunkedMessage } from \"./opSplitter.js\";\nexport {\n\tInboundMessageResult,\n\tBatchStartInfo,\n\tRemoteMessageProcessor,\n\tunpackRuntimeMessage,\n} from \"./remoteMessageProcessor.js\";\nexport {\n\tEmptyGroupedBatch,\n\tOpGroupingManager,\n\tOpGroupingManagerConfig,\n\tisGroupedBatch,\n} from \"./opGroupingManager.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/opLifecycle/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAQ2B;AAP1B,mHAAA,gBAAgB,OAAA;AAEhB,+GAAA,YAAY,OAAA;AAEZ,sHAAA,mBAAmB,OAAA;AACnB,kHAAA,eAAe,OAAA;AAahB,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,2DAG8B;AAF7B,iHAAA,WAAW,OAAA;AACX,gIAAA,0BAA0B,OAAA;AAE3B,yCAMqB;AAJpB,+GAAA,kBAAkB,OAAA;AAClB,sHAAA,yBAAyB,OAAA;AACzB,mGAAA,MAAM,OAAA;AACN,yGAAA,YAAY,OAAA;AAEb,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AACrB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,iDAAwE;AAA/D,2GAAA,UAAU,OAAA;AAAE,wGAAA,OAAO,OAAA;AAAE,iHAAA,gBAAgB,OAAA;AAC9C,yEAKqC;AAFpC,mIAAA,sBAAsB,OAAA;AACtB,iIAAA,oBAAoB,OAAA;AAErB,+DAKgC;AAH/B,yHAAA,iBAAiB,OAAA;AAEjB,sHAAA,cAAc,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\taddBatchMetadata,\n\ttype BatchId,\n\tBatchManager,\n\ttype BatchSequenceNumbers,\n\tgetEffectiveBatchId,\n\tgenerateBatchId,\n\ttype IBatchManagerOptions,\n} from \"./batchManager.js\";\nexport type {\n\tLocalBatch,\n\tLocalBatchMessage,\n\tLocalEmptyBatchPlaceholder,\n\tOutboundBatch,\n\tOutboundBatchMessage,\n\tOutboundSingletonBatch,\n\tIBatchCheckpoint,\n\tIChunkedOp,\n} from \"./definitions.js\";\nexport { DuplicateBatchDetector } from \"./duplicateBatchDetector.js\";\nexport {\n\tserializeOp,\n\tensureContentsDeserialized,\n} from \"./opSerialization.js\";\nexport {\n\ttype BatchResubmitInfo,\n\testimateSocketSize,\n\tlocalBatchToOutboundBatch,\n\tOutbox,\n\tgetLongStack,\n} from \"./outbox.js\";\nexport { OpCompressor } from \"./opCompressor.js\";\nexport { OpDecompressor } from \"./opDecompressor.js\";\nexport { OpSplitter, splitOp, isChunkedMessage } from \"./opSplitter.js\";\nexport {\n\ttype InboundMessageResult,\n\ttype BatchStartInfo,\n\tRemoteMessageProcessor,\n\tunpackRuntimeMessage,\n} from \"./remoteMessageProcessor.js\";\nexport {\n\ttype EmptyGroupedBatch,\n\tOpGroupingManager,\n\ttype OpGroupingManagerConfig,\n\tisGroupedBatch,\n} from \"./opGroupingManager.js\";\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
6
- import { type OutboundSingletonBatch } from "./definitions.js";
5
+ import type { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
6
+ import type { OutboundSingletonBatch } from "./definitions.js";
7
7
  /**
8
8
  * Compresses batches of ops.
9
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"opCompressor.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/opCompressor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAWvE,OAAO,EAA6B,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG1F;;;;;GAKG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;gBAEjC,MAAM,EAAE,oBAAoB;IAIxC;;;;;OAKG;IACI,aAAa,CAAC,KAAK,EAAE,sBAAsB,GAAG,sBAAsB;IAyC3E;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAyB9B"}
1
+ {"version":3,"file":"opCompressor.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/opCompressor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAW5E,OAAO,KAAK,EAAwB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAGrF;;;;;GAKG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;gBAEjC,MAAM,EAAE,oBAAoB;IAIxC;;;;;OAKG;IACI,aAAa,CAAC,KAAK,EAAE,sBAAsB,GAAG,sBAAsB;IAyC3E;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAyB9B"}