@fluidframework/container-runtime 2.0.0-internal.6.1.2 → 2.0.0-internal.6.2.1

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 (363) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +4 -3
  3. package/dist/batchTracker.d.ts +1 -1
  4. package/dist/batchTracker.js +1 -1
  5. package/dist/batchTracker.js.map +1 -1
  6. package/dist/blobManager.d.ts +4 -20
  7. package/dist/blobManager.d.ts.map +1 -1
  8. package/dist/blobManager.js +47 -125
  9. package/dist/blobManager.js.map +1 -1
  10. package/dist/containerRuntime.d.ts +82 -14
  11. package/dist/containerRuntime.d.ts.map +1 -1
  12. package/dist/containerRuntime.js +236 -138
  13. package/dist/containerRuntime.js.map +1 -1
  14. package/dist/dataStore.d.ts.map +1 -1
  15. package/dist/dataStore.js +1 -2
  16. package/dist/dataStore.js.map +1 -1
  17. package/dist/dataStoreContext.d.ts.map +1 -1
  18. package/dist/dataStoreContext.js +4 -5
  19. package/dist/dataStoreContext.js.map +1 -1
  20. package/dist/dataStoreContexts.d.ts +1 -2
  21. package/dist/dataStoreContexts.d.ts.map +1 -1
  22. package/dist/dataStoreContexts.js.map +1 -1
  23. package/dist/dataStoreRegistry.js +2 -2
  24. package/dist/dataStoreRegistry.js.map +1 -1
  25. package/dist/dataStores.d.ts.map +1 -1
  26. package/dist/dataStores.js +4 -5
  27. package/dist/dataStores.js.map +1 -1
  28. package/dist/error.d.ts +14 -0
  29. package/dist/error.d.ts.map +1 -0
  30. package/dist/error.js +21 -0
  31. package/dist/error.js.map +1 -0
  32. package/dist/gc/garbageCollection.d.ts +1 -1
  33. package/dist/gc/garbageCollection.d.ts.map +1 -1
  34. package/dist/gc/garbageCollection.js +23 -5
  35. package/dist/gc/garbageCollection.js.map +1 -1
  36. package/dist/gc/gcConfigs.d.ts.map +1 -1
  37. package/dist/gc/gcConfigs.js +5 -3
  38. package/dist/gc/gcConfigs.js.map +1 -1
  39. package/dist/gc/gcDefinitions.d.ts +2 -0
  40. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  41. package/dist/gc/gcDefinitions.js.map +1 -1
  42. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  43. package/dist/gc/gcTelemetry.js +2 -0
  44. package/dist/gc/gcTelemetry.js.map +1 -1
  45. package/dist/id-compressor/appendOnlySortedMap.d.ts +8 -30
  46. package/dist/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
  47. package/dist/id-compressor/appendOnlySortedMap.js +25 -67
  48. package/dist/id-compressor/appendOnlySortedMap.js.map +1 -1
  49. package/dist/id-compressor/finalSpace.d.ts +29 -0
  50. package/dist/id-compressor/finalSpace.d.ts.map +1 -0
  51. package/dist/id-compressor/finalSpace.js +62 -0
  52. package/dist/id-compressor/finalSpace.js.map +1 -0
  53. package/dist/id-compressor/idCompressor.d.ts +25 -250
  54. package/dist/id-compressor/idCompressor.d.ts.map +1 -1
  55. package/dist/id-compressor/idCompressor.js +385 -1149
  56. package/dist/id-compressor/idCompressor.js.map +1 -1
  57. package/dist/id-compressor/identifiers.d.ts +32 -0
  58. package/dist/id-compressor/identifiers.d.ts.map +1 -0
  59. package/dist/id-compressor/identifiers.js +15 -0
  60. package/dist/id-compressor/identifiers.js.map +1 -0
  61. package/dist/id-compressor/index.d.ts +5 -6
  62. package/dist/id-compressor/index.d.ts.map +1 -1
  63. package/dist/id-compressor/index.js +20 -26
  64. package/dist/id-compressor/index.js.map +1 -1
  65. package/dist/id-compressor/persistanceUtilities.d.ts +22 -0
  66. package/dist/id-compressor/persistanceUtilities.d.ts.map +1 -0
  67. package/dist/id-compressor/persistanceUtilities.js +43 -0
  68. package/dist/id-compressor/persistanceUtilities.js.map +1 -0
  69. package/dist/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
  70. package/dist/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
  71. package/dist/id-compressor/sessionSpaceNormalizer.js +80 -0
  72. package/dist/id-compressor/sessionSpaceNormalizer.js.map +1 -0
  73. package/dist/id-compressor/sessions.d.ts +115 -0
  74. package/dist/id-compressor/sessions.d.ts.map +1 -0
  75. package/dist/id-compressor/sessions.js +305 -0
  76. package/dist/id-compressor/sessions.js.map +1 -0
  77. package/dist/id-compressor/utilities.d.ts +49 -0
  78. package/dist/id-compressor/utilities.d.ts.map +1 -0
  79. package/dist/id-compressor/utilities.js +166 -0
  80. package/dist/id-compressor/utilities.js.map +1 -0
  81. package/dist/index.d.ts +3 -3
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +6 -4
  84. package/dist/index.js.map +1 -1
  85. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  86. package/dist/opLifecycle/opCompressor.js +1 -2
  87. package/dist/opLifecycle/opCompressor.js.map +1 -1
  88. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  89. package/dist/opLifecycle/opSplitter.js +2 -3
  90. package/dist/opLifecycle/opSplitter.js.map +1 -1
  91. package/dist/opLifecycle/outbox.d.ts +1 -0
  92. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  93. package/dist/opLifecycle/outbox.js +10 -11
  94. package/dist/opLifecycle/outbox.js.map +1 -1
  95. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  96. package/dist/opLifecycle/remoteMessageProcessor.js +11 -5
  97. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  98. package/dist/packageVersion.d.ts +1 -1
  99. package/dist/packageVersion.js +1 -1
  100. package/dist/packageVersion.js.map +1 -1
  101. package/dist/pendingStateManager.d.ts +12 -5
  102. package/dist/pendingStateManager.d.ts.map +1 -1
  103. package/dist/pendingStateManager.js +24 -10
  104. package/dist/pendingStateManager.js.map +1 -1
  105. package/dist/scheduleManager.d.ts.map +1 -1
  106. package/dist/scheduleManager.js +4 -5
  107. package/dist/scheduleManager.js.map +1 -1
  108. package/dist/summary/index.d.ts +2 -2
  109. package/dist/summary/index.d.ts.map +1 -1
  110. package/dist/summary/index.js +2 -1
  111. package/dist/summary/index.js.map +1 -1
  112. package/dist/summary/orderedClientElection.d.ts +1 -2
  113. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  114. package/dist/summary/orderedClientElection.js +2 -3
  115. package/dist/summary/orderedClientElection.js.map +1 -1
  116. package/dist/summary/runningSummarizer.d.ts +27 -4
  117. package/dist/summary/runningSummarizer.d.ts.map +1 -1
  118. package/dist/summary/runningSummarizer.js +237 -66
  119. package/dist/summary/runningSummarizer.js.map +1 -1
  120. package/dist/summary/summarizer.d.ts +6 -5
  121. package/dist/summary/summarizer.d.ts.map +1 -1
  122. package/dist/summary/summarizer.js +70 -67
  123. package/dist/summary/summarizer.js.map +1 -1
  124. package/dist/summary/summarizerClientElection.d.ts +1 -1
  125. package/dist/summary/summarizerClientElection.d.ts.map +1 -1
  126. package/dist/summary/summarizerClientElection.js.map +1 -1
  127. package/dist/summary/summarizerTypes.d.ts +38 -25
  128. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  129. package/dist/summary/summarizerTypes.js.map +1 -1
  130. package/dist/summary/summaryCollection.d.ts +1 -2
  131. package/dist/summary/summaryCollection.d.ts.map +1 -1
  132. package/dist/summary/summaryCollection.js.map +1 -1
  133. package/dist/summary/summaryGenerator.d.ts +9 -3
  134. package/dist/summary/summaryGenerator.d.ts.map +1 -1
  135. package/dist/summary/summaryGenerator.js +42 -38
  136. package/dist/summary/summaryGenerator.js.map +1 -1
  137. package/dist/summary/summaryManager.d.ts +7 -6
  138. package/dist/summary/summaryManager.d.ts.map +1 -1
  139. package/dist/summary/summaryManager.js +22 -15
  140. package/dist/summary/summaryManager.js.map +1 -1
  141. package/lib/batchTracker.d.ts +1 -1
  142. package/lib/batchTracker.js +1 -1
  143. package/lib/batchTracker.js.map +1 -1
  144. package/lib/blobManager.d.ts +4 -20
  145. package/lib/blobManager.d.ts.map +1 -1
  146. package/lib/blobManager.js +46 -124
  147. package/lib/blobManager.js.map +1 -1
  148. package/lib/containerRuntime.d.ts +82 -14
  149. package/lib/containerRuntime.d.ts.map +1 -1
  150. package/lib/containerRuntime.js +223 -123
  151. package/lib/containerRuntime.js.map +1 -1
  152. package/lib/dataStore.d.ts.map +1 -1
  153. package/lib/dataStore.js +1 -2
  154. package/lib/dataStore.js.map +1 -1
  155. package/lib/dataStoreContext.d.ts.map +1 -1
  156. package/lib/dataStoreContext.js +1 -2
  157. package/lib/dataStoreContext.js.map +1 -1
  158. package/lib/dataStoreContexts.d.ts +1 -2
  159. package/lib/dataStoreContexts.d.ts.map +1 -1
  160. package/lib/dataStoreContexts.js.map +1 -1
  161. package/lib/dataStoreRegistry.js +1 -1
  162. package/lib/dataStoreRegistry.js.map +1 -1
  163. package/lib/dataStores.d.ts.map +1 -1
  164. package/lib/dataStores.js +1 -2
  165. package/lib/dataStores.js.map +1 -1
  166. package/lib/error.d.ts +14 -0
  167. package/lib/error.d.ts.map +1 -0
  168. package/lib/error.js +17 -0
  169. package/lib/error.js.map +1 -0
  170. package/lib/gc/garbageCollection.d.ts +1 -1
  171. package/lib/gc/garbageCollection.d.ts.map +1 -1
  172. package/lib/gc/garbageCollection.js +22 -4
  173. package/lib/gc/garbageCollection.js.map +1 -1
  174. package/lib/gc/gcConfigs.d.ts.map +1 -1
  175. package/lib/gc/gcConfigs.js +3 -1
  176. package/lib/gc/gcConfigs.js.map +1 -1
  177. package/lib/gc/gcDefinitions.d.ts +2 -0
  178. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  179. package/lib/gc/gcDefinitions.js.map +1 -1
  180. package/lib/gc/gcTelemetry.d.ts.map +1 -1
  181. package/lib/gc/gcTelemetry.js +2 -0
  182. package/lib/gc/gcTelemetry.js.map +1 -1
  183. package/lib/id-compressor/appendOnlySortedMap.d.ts +8 -30
  184. package/lib/id-compressor/appendOnlySortedMap.d.ts.map +1 -1
  185. package/lib/id-compressor/appendOnlySortedMap.js +24 -65
  186. package/lib/id-compressor/appendOnlySortedMap.js.map +1 -1
  187. package/lib/id-compressor/finalSpace.d.ts +29 -0
  188. package/lib/id-compressor/finalSpace.d.ts.map +1 -0
  189. package/lib/id-compressor/finalSpace.js +58 -0
  190. package/lib/id-compressor/finalSpace.js.map +1 -0
  191. package/lib/id-compressor/idCompressor.d.ts +25 -250
  192. package/lib/id-compressor/idCompressor.d.ts.map +1 -1
  193. package/lib/id-compressor/idCompressor.js +381 -1139
  194. package/lib/id-compressor/idCompressor.js.map +1 -1
  195. package/lib/id-compressor/identifiers.d.ts +32 -0
  196. package/lib/id-compressor/identifiers.d.ts.map +1 -0
  197. package/lib/id-compressor/identifiers.js +11 -0
  198. package/lib/id-compressor/identifiers.js.map +1 -0
  199. package/lib/id-compressor/index.d.ts +5 -6
  200. package/lib/id-compressor/index.d.ts.map +1 -1
  201. package/lib/id-compressor/index.js +5 -6
  202. package/lib/id-compressor/index.js.map +1 -1
  203. package/lib/id-compressor/persistanceUtilities.d.ts +22 -0
  204. package/lib/id-compressor/persistanceUtilities.d.ts.map +1 -0
  205. package/lib/id-compressor/persistanceUtilities.js +34 -0
  206. package/lib/id-compressor/persistanceUtilities.js.map +1 -0
  207. package/lib/id-compressor/sessionSpaceNormalizer.d.ts +46 -0
  208. package/lib/id-compressor/sessionSpaceNormalizer.d.ts.map +1 -0
  209. package/lib/id-compressor/sessionSpaceNormalizer.js +76 -0
  210. package/lib/id-compressor/sessionSpaceNormalizer.js.map +1 -0
  211. package/lib/id-compressor/sessions.d.ts +115 -0
  212. package/lib/id-compressor/sessions.d.ts.map +1 -0
  213. package/lib/id-compressor/sessions.js +290 -0
  214. package/lib/id-compressor/sessions.js.map +1 -0
  215. package/lib/id-compressor/utilities.d.ts +49 -0
  216. package/lib/id-compressor/utilities.d.ts.map +1 -0
  217. package/lib/id-compressor/utilities.js +148 -0
  218. package/lib/id-compressor/utilities.js.map +1 -0
  219. package/lib/index.d.ts +3 -3
  220. package/lib/index.d.ts.map +1 -1
  221. package/lib/index.js +2 -2
  222. package/lib/index.js.map +1 -1
  223. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  224. package/lib/opLifecycle/opCompressor.js +1 -2
  225. package/lib/opLifecycle/opCompressor.js.map +1 -1
  226. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  227. package/lib/opLifecycle/opSplitter.js +1 -2
  228. package/lib/opLifecycle/opSplitter.js.map +1 -1
  229. package/lib/opLifecycle/outbox.d.ts +1 -0
  230. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  231. package/lib/opLifecycle/outbox.js +6 -7
  232. package/lib/opLifecycle/outbox.js.map +1 -1
  233. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  234. package/lib/opLifecycle/remoteMessageProcessor.js +12 -6
  235. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  236. package/lib/packageVersion.d.ts +1 -1
  237. package/lib/packageVersion.js +1 -1
  238. package/lib/packageVersion.js.map +1 -1
  239. package/lib/pendingStateManager.d.ts +12 -5
  240. package/lib/pendingStateManager.d.ts.map +1 -1
  241. package/lib/pendingStateManager.js +21 -7
  242. package/lib/pendingStateManager.js.map +1 -1
  243. package/lib/scheduleManager.d.ts.map +1 -1
  244. package/lib/scheduleManager.js +1 -2
  245. package/lib/scheduleManager.js.map +1 -1
  246. package/lib/summary/index.d.ts +2 -2
  247. package/lib/summary/index.d.ts.map +1 -1
  248. package/lib/summary/index.js +1 -1
  249. package/lib/summary/index.js.map +1 -1
  250. package/lib/summary/orderedClientElection.d.ts +1 -2
  251. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  252. package/lib/summary/orderedClientElection.js +1 -2
  253. package/lib/summary/orderedClientElection.js.map +1 -1
  254. package/lib/summary/runningSummarizer.d.ts +27 -4
  255. package/lib/summary/runningSummarizer.d.ts.map +1 -1
  256. package/lib/summary/runningSummarizer.js +237 -66
  257. package/lib/summary/runningSummarizer.js.map +1 -1
  258. package/lib/summary/summarizer.d.ts +6 -5
  259. package/lib/summary/summarizer.d.ts.map +1 -1
  260. package/lib/summary/summarizer.js +68 -65
  261. package/lib/summary/summarizer.js.map +1 -1
  262. package/lib/summary/summarizerClientElection.d.ts +1 -1
  263. package/lib/summary/summarizerClientElection.d.ts.map +1 -1
  264. package/lib/summary/summarizerClientElection.js.map +1 -1
  265. package/lib/summary/summarizerTypes.d.ts +38 -25
  266. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  267. package/lib/summary/summarizerTypes.js.map +1 -1
  268. package/lib/summary/summaryCollection.d.ts +1 -2
  269. package/lib/summary/summaryCollection.d.ts.map +1 -1
  270. package/lib/summary/summaryCollection.js.map +1 -1
  271. package/lib/summary/summaryGenerator.d.ts +9 -3
  272. package/lib/summary/summaryGenerator.d.ts.map +1 -1
  273. package/lib/summary/summaryGenerator.js +43 -39
  274. package/lib/summary/summaryGenerator.js.map +1 -1
  275. package/lib/summary/summaryManager.d.ts +7 -6
  276. package/lib/summary/summaryManager.d.ts.map +1 -1
  277. package/lib/summary/summaryManager.js +23 -16
  278. package/lib/summary/summaryManager.js.map +1 -1
  279. package/package.json +26 -23
  280. package/src/batchTracker.ts +1 -1
  281. package/src/blobManager.ts +57 -146
  282. package/src/containerRuntime.ts +331 -158
  283. package/src/dataStore.ts +1 -2
  284. package/src/dataStoreContext.ts +3 -6
  285. package/src/dataStoreContexts.ts +1 -2
  286. package/src/dataStoreRegistry.ts +1 -1
  287. package/src/dataStores.ts +3 -5
  288. package/src/error.ts +18 -0
  289. package/src/gc/garbageCollection.ts +38 -5
  290. package/src/gc/gcConfigs.ts +4 -2
  291. package/src/gc/gcDefinitions.ts +2 -0
  292. package/src/gc/gcTelemetry.ts +2 -0
  293. package/src/id-compressor/appendOnlySortedMap.ts +25 -86
  294. package/src/id-compressor/finalSpace.ts +67 -0
  295. package/src/id-compressor/idCompressor.ts +455 -1681
  296. package/src/id-compressor/identifiers.ts +42 -0
  297. package/src/id-compressor/index.ts +11 -20
  298. package/src/id-compressor/persistanceUtilities.ts +58 -0
  299. package/src/id-compressor/sessionSpaceNormalizer.ts +83 -0
  300. package/src/id-compressor/sessions.ts +405 -0
  301. package/src/id-compressor/utilities.ts +187 -0
  302. package/src/index.ts +7 -1
  303. package/src/opLifecycle/opCompressor.ts +1 -2
  304. package/src/opLifecycle/opSplitter.ts +4 -4
  305. package/src/opLifecycle/outbox.ts +13 -10
  306. package/src/opLifecycle/remoteMessageProcessor.ts +19 -6
  307. package/src/packageVersion.ts +1 -1
  308. package/src/pendingStateManager.ts +49 -27
  309. package/src/scheduleManager.ts +5 -4
  310. package/src/summary/index.ts +3 -1
  311. package/src/summary/orderedClientElection.ts +6 -4
  312. package/src/summary/runningSummarizer.ts +276 -95
  313. package/src/summary/summarizer.ts +22 -12
  314. package/src/summary/summarizerClientElection.ts +1 -1
  315. package/src/summary/summarizerTypes.ts +40 -25
  316. package/src/summary/summaryCollection.ts +1 -2
  317. package/src/summary/summaryGenerator.ts +49 -52
  318. package/src/summary/summaryManager.ts +33 -11
  319. package/dist/id-compressor/idRange.d.ts +0 -11
  320. package/dist/id-compressor/idRange.d.ts.map +0 -1
  321. package/dist/id-compressor/idRange.js +0 -29
  322. package/dist/id-compressor/idRange.js.map +0 -1
  323. package/dist/id-compressor/numericUuid.d.ts +0 -59
  324. package/dist/id-compressor/numericUuid.d.ts.map +0 -1
  325. package/dist/id-compressor/numericUuid.js +0 -325
  326. package/dist/id-compressor/numericUuid.js.map +0 -1
  327. package/dist/id-compressor/sessionIdNormalizer.d.ts +0 -138
  328. package/dist/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
  329. package/dist/id-compressor/sessionIdNormalizer.js +0 -483
  330. package/dist/id-compressor/sessionIdNormalizer.js.map +0 -1
  331. package/dist/id-compressor/utils.d.ts +0 -57
  332. package/dist/id-compressor/utils.d.ts.map +0 -1
  333. package/dist/id-compressor/utils.js +0 -90
  334. package/dist/id-compressor/utils.js.map +0 -1
  335. package/dist/id-compressor/uuidUtilities.d.ts +0 -28
  336. package/dist/id-compressor/uuidUtilities.d.ts.map +0 -1
  337. package/dist/id-compressor/uuidUtilities.js +0 -104
  338. package/dist/id-compressor/uuidUtilities.js.map +0 -1
  339. package/lib/id-compressor/idRange.d.ts +0 -11
  340. package/lib/id-compressor/idRange.d.ts.map +0 -1
  341. package/lib/id-compressor/idRange.js +0 -25
  342. package/lib/id-compressor/idRange.js.map +0 -1
  343. package/lib/id-compressor/numericUuid.d.ts +0 -59
  344. package/lib/id-compressor/numericUuid.d.ts.map +0 -1
  345. package/lib/id-compressor/numericUuid.js +0 -315
  346. package/lib/id-compressor/numericUuid.js.map +0 -1
  347. package/lib/id-compressor/sessionIdNormalizer.d.ts +0 -138
  348. package/lib/id-compressor/sessionIdNormalizer.d.ts.map +0 -1
  349. package/lib/id-compressor/sessionIdNormalizer.js +0 -479
  350. package/lib/id-compressor/sessionIdNormalizer.js.map +0 -1
  351. package/lib/id-compressor/utils.d.ts +0 -57
  352. package/lib/id-compressor/utils.d.ts.map +0 -1
  353. package/lib/id-compressor/utils.js +0 -79
  354. package/lib/id-compressor/utils.js.map +0 -1
  355. package/lib/id-compressor/uuidUtilities.d.ts +0 -28
  356. package/lib/id-compressor/uuidUtilities.d.ts.map +0 -1
  357. package/lib/id-compressor/uuidUtilities.js +0 -96
  358. package/lib/id-compressor/uuidUtilities.js.map +0 -1
  359. package/src/id-compressor/idRange.ts +0 -35
  360. package/src/id-compressor/numericUuid.ts +0 -383
  361. package/src/id-compressor/sessionIdNormalizer.ts +0 -609
  362. package/src/id-compressor/utils.ts +0 -114
  363. package/src/id-compressor/uuidUtilities.ts +0 -120
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @fluidframework/container-runtime
2
2
 
3
+ ## 2.0.0-internal.6.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
8
+
9
+ The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
10
+ imported from the **@fluidframework/core-interfaces** package:
11
+
12
+ - interface IDisposable
13
+ - interface IErrorEvent
14
+ - interface IErrorEvent
15
+ - interface IEvent
16
+ - interface IEventProvider
17
+ - interface ILoggingError
18
+ - interface ITaggedTelemetryPropertyType
19
+ - interface ITelemetryBaseEvent
20
+ - interface ITelemetryBaseLogger
21
+ - interface ITelemetryErrorEvent
22
+ - interface ITelemetryGenericEvent
23
+ - interface ITelemetryLogger
24
+ - interface ITelemetryPerformanceEvent
25
+ - interface ITelemetryProperties
26
+ - type ExtendEventProvider
27
+ - type IEventThisPlaceHolder
28
+ - type IEventTransformer
29
+ - type ReplaceIEventThisPlaceHolder
30
+ - type ReplaceIEventThisPlaceHolder
31
+ - type TelemetryEventCategory
32
+ - type TelemetryEventPropertyType
33
+
34
+ - Deprecated `refreshLatestAck` in `ISummarizeOptions`, `IOnDemandSummarizeOptions` and `IEnqueueSummarizeOptions` ([#16907](https://github.com/microsoft/FluidFramework/issues/16907)) [5a921c56a6](https://github.com/microsoft/FluidFramework/commits/5a921c56a6ccd29a454e235e9d836717ce401714)
35
+
36
+ Passing `refreshLatestAck` as true will result in closing the summarizer. It is not supported anymore and will be removed in a future release. It should not be passed in to `summarizeOnDemand` and `enqueueSummarize` APIs anymore.
37
+
3
38
  ## 2.0.0-internal.6.1.0
4
39
 
5
40
  Dependency updates only.
package/README.md CHANGED
@@ -11,9 +11,10 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
11
11
  While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
12
12
  library consumers should always prefer `^`.
13
13
 
14
- Note that when depending on a library version of the form 2.0.0-internal.x.y.z, called the Fluid internal version
15
- scheme, you must use a `>= <` dependency range. Standard `^` and `~` ranges will not work as expected. See the
16
- [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
14
+ Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
15
+ you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
16
+ Standard `^` and `~` ranges will not work as expected.
17
+ See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
17
18
  package for more information including tools to convert between version schemes.
18
19
 
19
20
  ## Installation
@@ -17,7 +17,7 @@ export declare class BatchTracker {
17
17
  * Track batch sizes in terms of op counts and processing times
18
18
  *
19
19
  * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations
20
- * @param logger - See {@link @fluidframework/common-definitions#ITelemetryLoggerExt}
20
+ * @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}
21
21
  * @param batchLengthThreshold - threshold for the length of a batch when to send an error event
22
22
  * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics
23
23
  */
@@ -50,7 +50,7 @@ exports.BatchTracker = BatchTracker;
50
50
  * Track batch sizes in terms of op counts and processing times
51
51
  *
52
52
  * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations
53
- * @param logger - See {@link @fluidframework/common-definitions#ITelemetryLoggerExt}
53
+ * @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}
54
54
  * @param batchLengthThreshold - threshold for the length of a batch when to send an error event
55
55
  * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics
56
56
  */
@@ -1 +1 @@
1
- {"version":3,"file":"batchTracker.js","sourceRoot":"","sources":["../src/batchTracker.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qEAAyF;AACzF,+DAAmE;AAInE,MAAa,YAAY;IAMxB,YACkB,iBAA+B,EAChD,MAA4B,EAC5B,oBAA4B,EAC5B,sBAA8B,EAC9B,mBAAiC,GAAG,EAAE,CAAC,0BAAW,CAAC,GAAG,EAAE;QAJvC,sBAAiB,GAAjB,iBAAiB,CAAc;QAJzC,sBAAiB,GAAW,CAAC,CAAC;QAUrC,IAAI,CAAC,MAAM,GAAG,IAAA,mC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A6B;iBACjE,CAAC,CAAC;aACH;YAED,IAAI,CAAC,wBAAwB,GAAG,SAAS,CAAC;YAC1C,IAAI,CAAC,6BAA6B,GAAG,SAAS,CAAC;QAChD,CAAC,CACD,CAAC;IACH,CAAC;CACD;AAzDD,oCAyDC;AAED;;;;;;;GAOG;AACI,MAAM,gBAAgB,GAAG,CAC/B,iBAA+B,EAC/B,MAA2B,EAC3B,uBAA+B,IAAI,EACnC,yBAAiC,IAAI,EACpC,EAAE,CAAC,IAAI,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AALlF,QAAA,gBAAgB,oBAKkE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter } from \"events\";\nimport { ITelemetryLoggerExt, createChildLogger } from \"@fluidframework/telemetry-utils\";\nimport { assert, performance } from \"@fluidframework/common-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\n\nexport class BatchTracker {\n\tprivate readonly logger: ITelemetryLoggerExt;\n\tprivate startBatchSequenceNumber: number | undefined;\n\tprivate trackedBatchCount: number = 0;\n\tprivate batchProcessingStartTimeStamp: number | undefined;\n\n\tconstructor(\n\t\tprivate readonly batchEventEmitter: EventEmitter,\n\t\tlogger: ITelemetryBaseLogger,\n\t\tbatchLengthThreshold: number,\n\t\tbatchCountSamplingRate: number,\n\t\tdateTimeProvider: () => number = () => performance.now(),\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"Batching\" });\n\n\t\tthis.batchEventEmitter.on(\"batchBegin\", (message: ISequencedDocumentMessage) => {\n\t\t\tthis.startBatchSequenceNumber = message.sequenceNumber;\n\t\t\tthis.batchProcessingStartTimeStamp = dateTimeProvider();\n\t\t\tthis.trackedBatchCount++;\n\t\t});\n\n\t\tthis.batchEventEmitter.on(\n\t\t\t\"batchEnd\",\n\t\t\t(error: any | undefined, message: ISequencedDocumentMessage) => {\n\t\t\t\tassert(\n\t\t\t\t\tthis.startBatchSequenceNumber !== undefined &&\n\t\t\t\t\t\tthis.batchProcessingStartTimeStamp !== undefined,\n\t\t\t\t\t0x2ba /* \"batchBegin must fire before batchEnd\" */,\n\t\t\t\t);\n\n\t\t\t\tconst length = message.sequenceNumber - this.startBatchSequenceNumber + 1;\n\t\t\t\tif (length >= batchLengthThreshold) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"LengthTooBig\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tthreshold: batchLengthThreshold,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t\tbatchError: error !== undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (this.trackedBatchCount % batchCountSamplingRate === 0) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"Length\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tsamplingRate: batchCountSamplingRate,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.startBatchSequenceNumber = undefined;\n\t\t\t\tthis.batchProcessingStartTimeStamp = undefined;\n\t\t\t},\n\t\t);\n\t}\n}\n\n/**\n * Track batch sizes in terms of op counts and processing times\n *\n * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations\n * @param logger - See {@link @fluidframework/common-definitions#ITelemetryLoggerExt}\n * @param batchLengthThreshold - threshold for the length of a batch when to send an error event\n * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics\n */\nexport const BindBatchTracker = (\n\tbatchEventEmitter: EventEmitter,\n\tlogger: ITelemetryLoggerExt,\n\tbatchLengthThreshold: number = 1000,\n\tbatchCountSamplingRate: number = 1000,\n) => new BatchTracker(batchEventEmitter, logger, batchLengthThreshold, batchCountSamplingRate);\n"]}
1
+ {"version":3,"file":"batchTracker.js","sourceRoot":"","sources":["../src/batchTracker.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qEAAyF;AACzF,+DAAmE;AAInE,MAAa,YAAY;IAMxB,YACkB,iBAA+B,EAChD,MAA4B,EAC5B,oBAA4B,EAC5B,sBAA8B,EAC9B,mBAAiC,GAAG,EAAE,CAAC,0BAAW,CAAC,GAAG,EAAE;QAJvC,sBAAiB,GAAjB,iBAAiB,CAAc;QAJzC,sBAAiB,GAAW,CAAC,CAAC;QAUrC,IAAI,CAAC,MAAM,GAAG,IAAA,mCAAiB,EAAC,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,OAAkC,EAAE,EAAE;YAC9E,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,cAAc,CAAC;YACvD,IAAI,CAAC,6BAA6B,GAAG,gBAAgB,EAAE,CAAC;YACxD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,CAAC,EAAE,CACxB,UAAU,EACV,CAAC,KAAsB,EAAE,OAAkC,EAAE,EAAE;YAC9D,IAAA,qBAAM,EACL,IAAI,CAAC,wBAAwB,KAAK,SAAS;gBAC1C,IAAI,CAAC,6BAA6B,KAAK,SAAS,EACjD,KAAK,CAAC,4CAA4C,CAClD,CAAC;YAEF,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,wBAAwB,GAAG,CAAC,CAAC;YAC1E,IAAI,MAAM,IAAI,oBAAoB,EAAE;gBACnC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC;oBAChC,SAAS,EAAE,cAAc;oBACzB,MAAM;oBACN,SAAS,EAAE,oBAAoB;oBAC/B,sBAAsB,EAAE,OAAO,CAAC,cAAc;oBAC9C,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC,6BAA6B;oBACjE,UAAU,EAAE,KAAK,KAAK,SAAS;iBAC/B,CAAC,CAAC;aACH;YAED,IAAI,IAAI,CAAC,iBAAiB,GAAG,sBAAsB,KAAK,CAAC,EAAE;gBAC1D,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC;oBAChC,SAAS,EAAE,QAAQ;oBACnB,MAAM;oBACN,YAAY,EAAE,sBAAsB;oBACpC,sBAAsB,EAAE,OAAO,CAAC,cAAc;oBAC9C,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC,6BAA6B;iBACjE,CAAC,CAAC;aACH;YAED,IAAI,CAAC,wBAAwB,GAAG,SAAS,CAAC;YAC1C,IAAI,CAAC,6BAA6B,GAAG,SAAS,CAAC;QAChD,CAAC,CACD,CAAC;IACH,CAAC;CACD;AAzDD,oCAyDC;AAED;;;;;;;GAOG;AACI,MAAM,gBAAgB,GAAG,CAC/B,iBAA+B,EAC/B,MAA2B,EAC3B,uBAA+B,IAAI,EACnC,yBAAiC,IAAI,EACpC,EAAE,CAAC,IAAI,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AALlF,QAAA,gBAAgB,oBAKkE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter } from \"events\";\nimport { ITelemetryLoggerExt, createChildLogger } from \"@fluidframework/telemetry-utils\";\nimport { assert, performance } from \"@fluidframework/common-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\n\nexport class BatchTracker {\n\tprivate readonly logger: ITelemetryLoggerExt;\n\tprivate startBatchSequenceNumber: number | undefined;\n\tprivate trackedBatchCount: number = 0;\n\tprivate batchProcessingStartTimeStamp: number | undefined;\n\n\tconstructor(\n\t\tprivate readonly batchEventEmitter: EventEmitter,\n\t\tlogger: ITelemetryBaseLogger,\n\t\tbatchLengthThreshold: number,\n\t\tbatchCountSamplingRate: number,\n\t\tdateTimeProvider: () => number = () => performance.now(),\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"Batching\" });\n\n\t\tthis.batchEventEmitter.on(\"batchBegin\", (message: ISequencedDocumentMessage) => {\n\t\t\tthis.startBatchSequenceNumber = message.sequenceNumber;\n\t\t\tthis.batchProcessingStartTimeStamp = dateTimeProvider();\n\t\t\tthis.trackedBatchCount++;\n\t\t});\n\n\t\tthis.batchEventEmitter.on(\n\t\t\t\"batchEnd\",\n\t\t\t(error: any | undefined, message: ISequencedDocumentMessage) => {\n\t\t\t\tassert(\n\t\t\t\t\tthis.startBatchSequenceNumber !== undefined &&\n\t\t\t\t\t\tthis.batchProcessingStartTimeStamp !== undefined,\n\t\t\t\t\t0x2ba /* \"batchBegin must fire before batchEnd\" */,\n\t\t\t\t);\n\n\t\t\t\tconst length = message.sequenceNumber - this.startBatchSequenceNumber + 1;\n\t\t\t\tif (length >= batchLengthThreshold) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"LengthTooBig\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tthreshold: batchLengthThreshold,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t\tbatchError: error !== undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (this.trackedBatchCount % batchCountSamplingRate === 0) {\n\t\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\t\teventName: \"Length\",\n\t\t\t\t\t\tlength,\n\t\t\t\t\t\tsamplingRate: batchCountSamplingRate,\n\t\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.startBatchSequenceNumber = undefined;\n\t\t\t\tthis.batchProcessingStartTimeStamp = undefined;\n\t\t\t},\n\t\t);\n\t}\n}\n\n/**\n * Track batch sizes in terms of op counts and processing times\n *\n * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations\n * @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}\n * @param batchLengthThreshold - threshold for the length of a batch when to send an error event\n * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics\n */\nexport const BindBatchTracker = (\n\tbatchEventEmitter: EventEmitter,\n\tlogger: ITelemetryLoggerExt,\n\tbatchLengthThreshold: number = 1000,\n\tbatchCountSamplingRate: number = 1000,\n) => new BatchTracker(batchEventEmitter, logger, batchLengthThreshold, batchCountSamplingRate);\n"]}
@@ -38,12 +38,6 @@ export interface IBlobManagerLoadInfo {
38
38
  redirectTable?: [string, string][];
39
39
  }
40
40
  export declare type IBlobManagerRuntime = Pick<IContainerRuntime, "attachState" | "connected" | "logger" | "clientDetails"> & Pick<ContainerRuntime, "gcTombstoneEnforcementAllowed"> & TypedEventEmitter<IContainerRuntimeEvents>;
41
- export declare enum PendingBlobStatus {
42
- OnlinePendingUpload = 0,
43
- OnlinePendingOp = 1,
44
- OfflinePendingUpload = 2,
45
- OfflinePendingOp = 3
46
- }
47
41
  export interface IPendingBlobs {
48
42
  [id: string]: {
49
43
  blob: string;
@@ -76,9 +70,7 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
76
70
  */
77
71
  private readonly redirectTable;
78
72
  /**
79
- * Blobs which have not been uploaded or for which we have not yet seen a BlobAttach op round-trip.
80
- * Until we see the op round-trip, there is a possibility we may need to re-upload the blob, so
81
- * we must save it. This is true for both the online and offline flow.
73
+ * Blobs which we have not yet seen a BlobAttach op round-trip and not yet attached to a DDS.
82
74
  */
83
75
  private readonly pendingBlobs;
84
76
  /**
@@ -108,21 +100,14 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
108
100
  * before any ops that reference the local ID, otherwise, an invalid handle could be added to the document.
109
101
  */
110
102
  sendBlobAttachOp: (localId: string, storageId?: string) => void, blobRequested: (blobPath: string) => void, isBlobDeleted: (blobPath: string) => boolean, runtime: IBlobManagerRuntime, stashedBlobs: IPendingBlobs | undefined, closeContainer: (error?: ICriticalContainerError) => void);
111
- private get pendingOfflineUploads();
112
- get hasPendingOfflineUploads(): boolean;
113
103
  get allBlobsAttached(): boolean;
114
104
  get hasPendingBlobs(): boolean;
115
105
  private createAbortError;
116
106
  /**
117
107
  * Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
118
108
  */
119
- onConnected(): Promise<void>;
120
- /**
121
- * Transition online blobs waiting for BlobAttach op round-trip since we will not see the op until we are connected
122
- * again
123
- */
124
- private onDisconnected;
125
- private shutdownPendingBlobs;
109
+ processStashedChanges(): Promise<void>;
110
+ private stashPendingBlobs;
126
111
  /**
127
112
  * Set of actual storage IDs (i.e., IDs that can be requested from storage). This will be empty if the container is
128
113
  * detached or there are no (non-pending) attachment blobs in the document
@@ -142,7 +127,6 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
142
127
  private deletePendingBlob;
143
128
  private onUploadResolve;
144
129
  private onUploadReject;
145
- private transitionToOffline;
146
130
  /**
147
131
  * Resubmit a BlobAttach op. Used to add storage IDs to ops that were
148
132
  * submitted to runtime while disconnected.
@@ -205,6 +189,6 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
205
189
  */
206
190
  private verifyBlobValidity;
207
191
  setRedirectTable(table: Map<string, string>): void;
208
- getPendingBlobs(waitBlobsToAttach?: boolean): Promise<IPendingBlobs>;
192
+ getPendingBlobs(waitBlobsToAttach?: boolean): Promise<IPendingBlobs | undefined>;
209
193
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;OAIG;IACI,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAiBtD,mBAAmB,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO;IAoD7E;;;;;OAKG;WACiB,IAAI,CACvB,SAAS,EAAE,aAAa,GAAG,SAAS,EACpC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GACvD,OAAO,CAAC,oBAAoB,CAAC;IAehC;;OAEG;IACH,OAAO,CAAC,IAAI;IAgBL,SAAS,CAAC,gBAAgB,CAAC,EAAE,iBAAiB,GAAG,qBAAqB;IA2B7E;;;;;OAKG;IACI,SAAS,CAAC,MAAM,GAAE,OAAe,GAAG,sBAAsB;IAejE;;;OAGG;IACI,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI;IAIvD;;;;;OAKG;IACI,qBAAqB,CAAC,oBAAoB,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAUtE;;;;;;;;;;OAUG;IACH,OAAO,CAAC,4BAA4B;IAwCpC;;;;OAIG;IACI,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,EAAE;IAsBxD;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAiDnB,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAoBrC,eAAe,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAsB7F"}
@@ -4,13 +4,12 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.BlobManager = exports.PendingBlobStatus = exports.BlobHandle = void 0;
7
+ exports.BlobManager = exports.BlobHandle = void 0;
8
8
  const uuid_1 = require("uuid");
9
9
  const runtime_utils_1 = require("@fluidframework/runtime-utils");
10
10
  const common_utils_1 = require("@fluidframework/common-utils");
11
11
  const container_definitions_1 = require("@fluidframework/container-definitions");
12
12
  const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
13
- const container_utils_1 = require("@fluidframework/container-utils");
14
13
  const containerRuntime_1 = require("./containerRuntime");
15
14
  const gc_1 = require("./gc");
16
15
  const throttler_1 = require("./throttler");
@@ -64,15 +63,6 @@ class CancellableThrottler {
64
63
  this.cancelP = new common_utils_1.Deferred();
65
64
  }
66
65
  }
67
- // Note that while offline we "submit" an op before uploading the blob, but we always
68
- // expect blobs to be uploaded before we actually see the op round-trip
69
- var PendingBlobStatus;
70
- (function (PendingBlobStatus) {
71
- PendingBlobStatus[PendingBlobStatus["OnlinePendingUpload"] = 0] = "OnlinePendingUpload";
72
- PendingBlobStatus[PendingBlobStatus["OnlinePendingOp"] = 1] = "OnlinePendingOp";
73
- PendingBlobStatus[PendingBlobStatus["OfflinePendingUpload"] = 2] = "OfflinePendingUpload";
74
- PendingBlobStatus[PendingBlobStatus["OfflinePendingOp"] = 3] = "OfflinePendingOp";
75
- })(PendingBlobStatus = exports.PendingBlobStatus || (exports.PendingBlobStatus = {}));
76
66
  class BlobManager extends common_utils_1.TypedEventEmitter {
77
67
  constructor(routeContext, snapshot, getStorage,
78
68
  /**
@@ -100,9 +90,7 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
100
90
  this.runtime = runtime;
101
91
  this.closeContainer = closeContainer;
102
92
  /**
103
- * Blobs which have not been uploaded or for which we have not yet seen a BlobAttach op round-trip.
104
- * Until we see the op round-trip, there is a possibility we may need to re-upload the blob, so
105
- * we must save it. This is true for both the online and offline flow.
93
+ * Blobs which we have not yet seen a BlobAttach op round-trip and not yet attached to a DDS.
106
94
  */
107
95
  this.pendingBlobs = new Map();
108
96
  /**
@@ -129,7 +117,6 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
129
117
  this.mc.config.getBoolean(gc_1.throwOnTombstoneLoadKey) === true &&
130
118
  this.runtime.gcTombstoneEnforcementAllowed &&
131
119
  this.runtime.clientDetails.type !== summary_1.summarizerClientType;
132
- this.runtime.on("disconnected", () => this.onDisconnected());
133
120
  this.redirectTable = this.load(snapshot);
134
121
  // Begin uploading stashed blobs from previous container instance
135
122
  Object.entries(stashedBlobs).forEach(([localId, entry]) => {
@@ -143,7 +130,8 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
143
130
  if (entry.minTTLInSeconds - timeLapseSinceLocalUpload > entry.minTTLInSeconds / 2) {
144
131
  this.pendingBlobs.set(localId, {
145
132
  blob,
146
- status: PendingBlobStatus.OfflinePendingOp,
133
+ uploading: false,
134
+ opsent: true,
147
135
  handleP: new common_utils_1.Deferred(),
148
136
  storageId,
149
137
  uploadP: undefined,
@@ -157,46 +145,39 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
157
145
  }
158
146
  this.pendingBlobs.set(localId, {
159
147
  blob,
160
- status: PendingBlobStatus.OfflinePendingUpload,
148
+ uploading: true,
161
149
  handleP: new common_utils_1.Deferred(),
162
150
  uploadP: this.uploadBlob(localId, blob),
163
151
  attached,
164
152
  acked,
153
+ opsent: true,
165
154
  });
166
155
  });
167
156
  this.sendBlobAttachOp = (localId, blobId) => {
168
157
  const pendingEntry = this.pendingBlobs.get(localId);
169
158
  (0, common_utils_1.assert)(pendingEntry !== undefined, 0x725 /* Must have pending blob entry for upcoming op */);
170
- pendingEntry.opsent = true;
171
159
  if (pendingEntry?.uploadTime && pendingEntry?.minTTLInSeconds) {
172
160
  const secondsSinceUpload = (Date.now() - pendingEntry.uploadTime) / 1000;
173
161
  const expired = pendingEntry.minTTLInSeconds - secondsSinceUpload < 0;
174
162
  this.mc.logger.sendTelemetryEvent({
175
163
  eventName: "sendBlobAttach",
176
- entryStatus: pendingEntry.status,
177
164
  secondsSinceUpload,
178
165
  minTTLInSeconds: pendingEntry.minTTLInSeconds,
179
166
  expired,
180
167
  });
181
168
  if (expired) {
182
169
  // we want to avoid submitting ops with broken handles
183
- this.closeContainer(new container_utils_1.GenericError("Trying to submit a BlobAttach for expired blob", undefined, {
170
+ this.closeContainer(new telemetry_utils_1.GenericError("Trying to submit a BlobAttach for expired blob", undefined, {
184
171
  localId,
185
172
  blobId,
186
- entryStatus: pendingEntry.status,
187
173
  secondsSinceUpload,
188
174
  }));
189
175
  }
190
176
  }
177
+ pendingEntry.opsent = true;
191
178
  return sendBlobAttachOp(localId, blobId);
192
179
  };
193
180
  }
194
- get pendingOfflineUploads() {
195
- return Array.from(this.pendingBlobs.values()).filter((e) => e.status === PendingBlobStatus.OfflinePendingUpload);
196
- }
197
- get hasPendingOfflineUploads() {
198
- return this.pendingOfflineUploads.length > 0;
199
- }
200
181
  get allBlobsAttached() {
201
182
  for (const [, entry] of this.pendingBlobs) {
202
183
  if (entry.attached === false) {
@@ -212,45 +193,28 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
212
193
  createAbortError(pending) {
213
194
  return new telemetry_utils_1.LoggingError("uploadBlob aborted", {
214
195
  acked: pending?.acked,
215
- status: pending?.status,
216
196
  uploadTime: pending?.uploadTime,
217
197
  });
218
198
  }
219
199
  /**
220
200
  * Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
221
201
  */
222
- async onConnected() {
202
+ async processStashedChanges() {
223
203
  this.retryThrottler.cancel();
224
- const pendingUploads = this.pendingOfflineUploads.map(async (e) => e.uploadP);
204
+ const pendingUploads = Array.from(this.pendingBlobs.values())
205
+ .filter((e) => e.uploading === true)
206
+ .map(async (e) => e.uploadP);
225
207
  await telemetry_utils_1.PerformanceEvent.timedExecAsync(this.mc.logger, {
226
- eventName: "BlobUploadOnConnected",
208
+ eventName: "BlobUploadProcessStashedChanges",
227
209
  count: pendingUploads.length,
228
210
  }, async () => Promise.all(pendingUploads), { start: true, end: true });
229
211
  }
230
- /**
231
- * Transition online blobs waiting for BlobAttach op round-trip since we will not see the op until we are connected
232
- * again
233
- */
234
- onDisconnected() {
235
- for (const [localId, entry] of this.pendingBlobs) {
236
- if (entry.status === PendingBlobStatus.OnlinePendingOp) {
237
- // This will submit another BlobAttach op for this blob. This is necessary because the one we sent
238
- // already didn't have the local ID.
239
- this.transitionToOffline(localId);
240
- }
241
- }
242
- }
243
- async shutdownPendingBlobs() {
212
+ async stashPendingBlobs() {
244
213
  for (const [localId, entry] of this.pendingBlobs) {
245
- if (entry.status === PendingBlobStatus.OnlinePendingUpload) {
214
+ if (!entry.opsent) {
246
215
  this.sendBlobAttachOp(localId, entry.storageId);
247
- entry.status = PendingBlobStatus.OfflinePendingUpload;
248
- entry.handleP.resolve(this.getBlobHandle(localId));
249
- }
250
- else if (entry.status === PendingBlobStatus.OnlinePendingOp) {
251
- entry.status = PendingBlobStatus.OfflinePendingOp;
252
- entry.handleP.resolve(this.getBlobHandle(localId));
253
216
  }
217
+ entry.handleP.resolve(this.getBlobHandle(localId));
254
218
  }
255
219
  return new Promise((resolve) => {
256
220
  if (this.allBlobsAttached) {
@@ -342,7 +306,7 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
342
306
  const localId = (0, uuid_1.v4)();
343
307
  const pendingEntry = {
344
308
  blob,
345
- status: PendingBlobStatus.OnlinePendingUpload,
309
+ uploading: true,
346
310
  handleP: new common_utils_1.Deferred(),
347
311
  uploadP: this.uploadBlob(localId, blob),
348
312
  attached: false,
@@ -391,47 +355,31 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
391
355
  this.deletePendingBlob(localId);
392
356
  return;
393
357
  }
394
- (0, common_utils_1.assert)(entry.status === PendingBlobStatus.OnlinePendingUpload ||
395
- entry.status === PendingBlobStatus.OfflinePendingUpload, 0x386 /* Must have pending blob entry for uploaded blob */);
358
+ (0, common_utils_1.assert)(entry.uploading === true, 0x386 /* Must have pending blob entry for uploaded blob */);
396
359
  entry.storageId = response.id;
397
360
  entry.uploadTime = Date.now();
398
361
  entry.minTTLInSeconds = response.minTTLInSeconds;
399
- if (this.runtime.connected) {
400
- if (entry.status === PendingBlobStatus.OnlinePendingUpload) {
401
- // Send a blob attach op. This serves two purposes:
402
- // 1. If its a new blob, i.e., it isn't de-duped, the server will keep the blob alive if it sees this op
403
- // until its storage ID is added to the next summary.
404
- // 2. It will create a local ID to storage ID mapping in all clients which is needed to retrieve the
405
- // blob from the server via the storage ID.
406
- this.sendBlobAttachOp(localId, response.id);
407
- if (this.storageIds.has(response.id)) {
408
- // The blob is de-duped. Set up a local ID to storage ID mapping and return the blob. Since this is
409
- // an existing blob, we don't have to wait for the op to be ack'd since this step has already
410
- // happened before and so, the server won't delete it.
411
- this.setRedirection(localId, response.id);
412
- entry.handleP.resolve(this.getBlobHandle(localId));
413
- this.deletePendingBlobMaybe(localId);
414
- }
415
- else {
416
- // If there is already an op for this storage ID, append the local ID to the list. Once any op for
417
- // this storage ID is ack'd, all pending blobs for it can be resolved since the op will keep the
418
- // blob alive in storage.
419
- this.opsInFlight.set(response.id, (this.opsInFlight.get(response.id) ?? []).concat(localId));
420
- entry.status = PendingBlobStatus.OnlinePendingOp;
421
- }
422
- }
423
- else if (entry.status === PendingBlobStatus.OfflinePendingUpload) {
424
- // We already submitted a BlobAttach op for this blob when it was transitioned to offline flow
425
- entry.status = PendingBlobStatus.OfflinePendingOp;
426
- }
362
+ // Send a blob attach op. This serves two purposes:
363
+ // 1. If its a new blob, i.e., it isn't de-duped, the server will keep the blob alive if it sees this op
364
+ // until its storage ID is added to the next summary.
365
+ // 2. It will create a local ID to storage ID mapping in all clients which is needed to retrieve the
366
+ // blob from the server via the storage ID.
367
+ if (!entry.opsent) {
368
+ this.sendBlobAttachOp(localId, response.id);
369
+ }
370
+ if (this.storageIds.has(response.id)) {
371
+ // The blob is de-duped. Set up a local ID to storage ID mapping and return the blob. Since this is
372
+ // an existing blob, we don't have to wait for the op to be ack'd since this step has already
373
+ // happened before and so, the server won't delete it.
374
+ this.setRedirection(localId, response.id);
375
+ entry.handleP.resolve(this.getBlobHandle(localId));
376
+ this.deletePendingBlobMaybe(localId);
427
377
  }
428
378
  else {
429
- // connected to storage but not ordering service?
430
- this.mc.logger.sendTelemetryEvent({ eventName: "BlobUploadSuccessWhileDisconnected" });
431
- if (entry.status === PendingBlobStatus.OnlinePendingUpload) {
432
- this.transitionToOffline(localId);
433
- }
434
- entry.status = PendingBlobStatus.OfflinePendingOp;
379
+ // If there is already an op for this storage ID, append the local ID to the list. Once any op for
380
+ // this storage ID is ack'd, all pending blobs for it can be resolved since the op will keep the
381
+ // blob alive in storage.
382
+ this.opsInFlight.set(response.id, (this.opsInFlight.get(response.id) ?? []).concat(localId));
435
383
  }
436
384
  return response;
437
385
  }
@@ -443,9 +391,6 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
443
391
  return;
444
392
  }
445
393
  if (!this.runtime.connected) {
446
- if (entry.status === PendingBlobStatus.OnlinePendingUpload) {
447
- this.transitionToOffline(localId);
448
- }
449
394
  // we are probably not connected to storage but start another upload request in case we are
450
395
  entry.uploadP = this.retryThrottler
451
396
  .getDelay()
@@ -457,27 +402,6 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
457
402
  throw error;
458
403
  }
459
404
  }
460
- transitionToOffline(localId) {
461
- (0, common_utils_1.assert)(!this.runtime.connected, 0x388 /* Must only transition to offline flow while runtime is disconnected */);
462
- const entry = this.pendingBlobs.get(localId);
463
- (0, common_utils_1.assert)(!!entry, 0x389 /* No pending blob entry */);
464
- (0, common_utils_1.assert)([PendingBlobStatus.OnlinePendingUpload, PendingBlobStatus.OnlinePendingOp].includes(entry.status), 0x38a /* Blob must be in online flow to transition to offline flow */);
465
- /**
466
- * If we haven't already submitted a BlobAttach op for this entry, send it before returning the blob handle.
467
- * This will make sure that the BlobAttach op is sequenced prior to any ops referencing the handle. Otherwise,
468
- * an invalid handle could be added to the document.
469
- * storageId may be undefined but since we are not connected we will have a chance to add it when reSubmit()
470
- * is called on reconnection.
471
- */
472
- if (entry.status !== PendingBlobStatus.OnlinePendingOp) {
473
- this.sendBlobAttachOp(localId, entry.storageId);
474
- }
475
- entry.status =
476
- entry.status === PendingBlobStatus.OnlinePendingUpload
477
- ? PendingBlobStatus.OfflinePendingUpload
478
- : PendingBlobStatus.OfflinePendingOp;
479
- entry.handleP.resolve(this.getBlobHandle(localId));
480
- }
481
405
  /**
482
406
  * Resubmit a BlobAttach op. Used to add storage IDs to ops that were
483
407
  * submitted to runtime while disconnected.
@@ -490,8 +414,7 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
490
414
  const pendingEntry = this.pendingBlobs.get(localId);
491
415
  if (!blobId) {
492
416
  // We submitted this op while offline. The blob should have been uploaded by now.
493
- (0, common_utils_1.assert)(pendingEntry?.status === PendingBlobStatus.OfflinePendingOp &&
494
- !!pendingEntry?.storageId, 0x38d /* blob must be uploaded before resubmitting BlobAttach op */);
417
+ (0, common_utils_1.assert)(pendingEntry?.opsent === true && !!pendingEntry?.storageId, 0x38d /* blob must be uploaded before resubmitting BlobAttach op */);
495
418
  return this.sendBlobAttachOp(localId, pendingEntry?.storageId);
496
419
  }
497
420
  return this.sendBlobAttachOp(localId, blobId);
@@ -526,21 +449,17 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
526
449
  waitingBlobs.forEach((pendingLocalId) => {
527
450
  const entry = this.pendingBlobs.get(pendingLocalId);
528
451
  (0, common_utils_1.assert)(entry !== undefined, 0x38f /* local online BlobAttach op with no pending blob entry */);
529
- // It's possible we transitioned to offline flow while waiting for this op.
530
- if (entry.status === PendingBlobStatus.OnlinePendingOp) {
531
- this.setRedirection(pendingLocalId, blobId);
532
- entry.acked = true;
533
- entry.handleP.resolve(this.getBlobHandle(pendingLocalId));
534
- this.deletePendingBlobMaybe(pendingLocalId);
535
- }
452
+ this.setRedirection(pendingLocalId, blobId);
453
+ entry.acked = true;
454
+ entry.handleP.resolve(this.getBlobHandle(pendingLocalId));
455
+ this.deletePendingBlobMaybe(pendingLocalId);
536
456
  });
537
457
  this.opsInFlight.delete(blobId);
538
458
  }
539
- // offline flow does not resolve the handle (since it was already resolved)
540
- // but we still need to delete the entry in case is acked and attached.
541
459
  const localEntry = this.pendingBlobs.get(localId);
542
460
  if (localEntry) {
543
461
  localEntry.acked = true;
462
+ localEntry.handleP.resolve(this.getBlobHandle(localId));
544
463
  this.deletePendingBlobMaybe(localId);
545
464
  }
546
465
  }
@@ -761,7 +680,10 @@ class BlobManager extends common_utils_1.TypedEventEmitter {
761
680
  }
762
681
  async getPendingBlobs(waitBlobsToAttach) {
763
682
  if (waitBlobsToAttach) {
764
- await this.shutdownPendingBlobs();
683
+ await this.stashPendingBlobs();
684
+ }
685
+ if (this.pendingBlobs.size === 0) {
686
+ return;
765
687
  }
766
688
  const blobs = {};
767
689
  for (const [key, entry] of this.pendingBlobs) {