@rocicorp/zero 1.11.0-canary.13 → 1.11.0-canary.15

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 (252) hide show
  1. package/out/analyze-query/src/analyze-cli.js +2 -2
  2. package/out/analyze-query/src/analyze-cli.js.map +1 -1
  3. package/out/ast-to-zql/src/ast-to-zql.d.ts +8 -1
  4. package/out/ast-to-zql/src/ast-to-zql.d.ts.map +1 -1
  5. package/out/ast-to-zql/src/ast-to-zql.js +25 -25
  6. package/out/ast-to-zql/src/ast-to-zql.js.map +1 -1
  7. package/out/otel/src/log-options.d.ts +16 -0
  8. package/out/otel/src/log-options.d.ts.map +1 -1
  9. package/out/otel/src/log-options.js +54 -1
  10. package/out/otel/src/log-options.js.map +1 -1
  11. package/out/replicache/src/get-kv-store-provider.d.ts +1 -1
  12. package/out/replicache/src/get-kv-store-provider.d.ts.map +1 -1
  13. package/out/replicache/src/get-kv-store-provider.js +4 -4
  14. package/out/replicache/src/get-kv-store-provider.js.map +1 -1
  15. package/out/replicache/src/kv/idb-store.d.ts +10 -1
  16. package/out/replicache/src/kv/idb-store.d.ts.map +1 -1
  17. package/out/replicache/src/kv/idb-store.js +18 -2
  18. package/out/replicache/src/kv/idb-store.js.map +1 -1
  19. package/out/replicache/src/kv/mem-fallback-store.d.ts +54 -0
  20. package/out/replicache/src/kv/mem-fallback-store.d.ts.map +1 -0
  21. package/out/replicache/src/kv/mem-fallback-store.js +177 -0
  22. package/out/replicache/src/kv/mem-fallback-store.js.map +1 -0
  23. package/out/replicache/src/kv/op-sqlite/store.js +3 -3
  24. package/out/replicache/src/kv/op-sqlite/store.js.map +1 -1
  25. package/out/replicache/src/kv/sqlite-store.d.ts +9 -0
  26. package/out/replicache/src/kv/sqlite-store.d.ts.map +1 -1
  27. package/out/replicache/src/kv/sqlite-store.js +86 -6
  28. package/out/replicache/src/kv/sqlite-store.js.map +1 -1
  29. package/out/replicache/src/new-client-channel.js.map +1 -1
  30. package/out/replicache/src/persist/collect-idb-databases.d.ts +17 -3
  31. package/out/replicache/src/persist/collect-idb-databases.d.ts.map +1 -1
  32. package/out/replicache/src/persist/collect-idb-databases.js +81 -11
  33. package/out/replicache/src/persist/collect-idb-databases.js.map +1 -1
  34. package/out/replicache/src/persist/idb-databases-store-db-name.js +1 -1
  35. package/out/replicache/src/persist/idb-databases-store-db-name.js.map +1 -1
  36. package/out/replicache/src/persist/persist.d.ts.map +1 -1
  37. package/out/replicache/src/persist/persist.js +6 -3
  38. package/out/replicache/src/persist/persist.js.map +1 -1
  39. package/out/replicache/src/replicache-impl.d.ts +43 -3
  40. package/out/replicache/src/replicache-impl.d.ts.map +1 -1
  41. package/out/replicache/src/replicache-impl.js +135 -17
  42. package/out/replicache/src/replicache-impl.js.map +1 -1
  43. package/out/replicache/src/storage-failure.d.ts +37 -0
  44. package/out/replicache/src/storage-failure.d.ts.map +1 -0
  45. package/out/replicache/src/storage-failure.js +31 -0
  46. package/out/replicache/src/storage-failure.js.map +1 -0
  47. package/out/shared/src/random-values.js +12 -1
  48. package/out/shared/src/random-values.js.map +1 -1
  49. package/out/zero/package.js +1 -1
  50. package/out/zero/package.js.map +1 -1
  51. package/out/zero/src/zero.js +2 -1
  52. package/out/zero-cache/src/config/normalize.d.ts.map +1 -1
  53. package/out/zero-cache/src/config/normalize.js +1 -1
  54. package/out/zero-cache/src/config/normalize.js.map +1 -1
  55. package/out/zero-cache/src/config/zero-config.d.ts +26 -0
  56. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  57. package/out/zero-cache/src/config/zero-config.js +36 -0
  58. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  59. package/out/zero-cache/src/observability/log-throttle.d.ts +44 -0
  60. package/out/zero-cache/src/observability/log-throttle.d.ts.map +1 -0
  61. package/out/zero-cache/src/observability/log-throttle.js +76 -0
  62. package/out/zero-cache/src/observability/log-throttle.js.map +1 -0
  63. package/out/zero-cache/src/scripts/permissions.d.ts +16 -0
  64. package/out/zero-cache/src/scripts/permissions.d.ts.map +1 -1
  65. package/out/zero-cache/src/server/runner/zero-dispatcher.d.ts.map +1 -1
  66. package/out/zero-cache/src/server/runner/zero-dispatcher.js +2 -0
  67. package/out/zero-cache/src/server/runner/zero-dispatcher.js.map +1 -1
  68. package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
  69. package/out/zero-cache/src/server/syncer.js +20 -2
  70. package/out/zero-cache/src/server/syncer.js.map +1 -1
  71. package/out/zero-cache/src/services/change-source/common/backfill-manager.d.ts.map +1 -1
  72. package/out/zero-cache/src/services/change-source/common/backfill-manager.js +27 -15
  73. package/out/zero-cache/src/services/change-source/common/backfill-manager.js.map +1 -1
  74. package/out/zero-cache/src/services/change-source/common/replica-schema.d.ts +1 -0
  75. package/out/zero-cache/src/services/change-source/common/replica-schema.d.ts.map +1 -1
  76. package/out/zero-cache/src/services/change-source/common/replica-schema.js +15 -3
  77. package/out/zero-cache/src/services/change-source/common/replica-schema.js.map +1 -1
  78. package/out/zero-cache/src/services/change-source/custom/change-source.js +2 -2
  79. package/out/zero-cache/src/services/change-source/custom/change-source.js.map +1 -1
  80. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts +9 -0
  81. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts.map +1 -1
  82. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js +204 -18
  83. package/out/zero-cache/src/services/change-source/pg/backfill-stream.js.map +1 -1
  84. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +11 -2
  85. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts.map +1 -1
  86. package/out/zero-cache/src/services/change-source/pg/initial-sync.js +11 -2
  87. package/out/zero-cache/src/services/change-source/pg/initial-sync.js.map +1 -1
  88. package/out/zero-cache/src/services/change-source/protocol/backfill-progress.d.ts +68 -0
  89. package/out/zero-cache/src/services/change-source/protocol/backfill-progress.d.ts.map +1 -0
  90. package/out/zero-cache/src/services/change-source/protocol/backfill-progress.js +141 -0
  91. package/out/zero-cache/src/services/change-source/protocol/backfill-progress.js.map +1 -0
  92. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts +43 -0
  93. package/out/zero-cache/src/services/change-source/protocol/current/data.d.ts.map +1 -1
  94. package/out/zero-cache/src/services/change-source/protocol/current/data.js +10 -1
  95. package/out/zero-cache/src/services/change-source/protocol/current/data.js.map +1 -1
  96. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts +57 -0
  97. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts.map +1 -1
  98. package/out/zero-cache/src/services/change-source/protocol/current/upstream.d.ts +20 -6
  99. package/out/zero-cache/src/services/change-source/protocol/current/upstream.d.ts.map +1 -1
  100. package/out/zero-cache/src/services/change-source/protocol/current/upstream.js +17 -7
  101. package/out/zero-cache/src/services/change-source/protocol/current/upstream.js.map +1 -1
  102. package/out/zero-cache/src/services/change-source/protocol/current.js +2 -1
  103. package/out/zero-cache/src/services/change-streamer/backfill-state-tracker.d.ts +66 -0
  104. package/out/zero-cache/src/services/change-streamer/backfill-state-tracker.d.ts.map +1 -0
  105. package/out/zero-cache/src/services/change-streamer/backfill-state-tracker.js +154 -0
  106. package/out/zero-cache/src/services/change-streamer/backfill-state-tracker.js.map +1 -0
  107. package/out/zero-cache/src/services/change-streamer/backfill-state.d.ts +50 -0
  108. package/out/zero-cache/src/services/change-streamer/backfill-state.d.ts.map +1 -0
  109. package/out/zero-cache/src/services/change-streamer/backfill-state.js +268 -0
  110. package/out/zero-cache/src/services/change-streamer/backfill-state.js.map +1 -0
  111. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +7 -6
  112. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
  113. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts.map +1 -1
  114. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +20 -4
  115. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js.map +1 -1
  116. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +26 -1
  117. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts.map +1 -1
  118. package/out/zero-cache/src/services/change-streamer/change-streamer.js.map +1 -1
  119. package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +1 -1
  120. package/out/zero-cache/src/services/change-streamer/storer.js +1 -1
  121. package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
  122. package/out/zero-cache/src/services/change-streamer/subscribe.d.ts +88 -0
  123. package/out/zero-cache/src/services/change-streamer/subscribe.d.ts.map +1 -1
  124. package/out/zero-cache/src/services/change-streamer/subscribe.js +9 -1
  125. package/out/zero-cache/src/services/change-streamer/subscribe.js.map +1 -1
  126. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts +29 -0
  127. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts.map +1 -1
  128. package/out/zero-cache/src/services/change-streamer/subscriber.js +34 -0
  129. package/out/zero-cache/src/services/change-streamer/subscriber.js.map +1 -1
  130. package/out/zero-cache/src/services/plannerz.d.ts +159 -0
  131. package/out/zero-cache/src/services/plannerz.d.ts.map +1 -0
  132. package/out/zero-cache/src/services/plannerz.js +263 -0
  133. package/out/zero-cache/src/services/plannerz.js.map +1 -0
  134. package/out/zero-cache/src/services/replicator/change-log-cookies.js +1 -1
  135. package/out/zero-cache/src/services/replicator/change-log-cookies.js.map +1 -1
  136. package/out/zero-cache/src/services/replicator/change-processor.d.ts.map +1 -1
  137. package/out/zero-cache/src/services/replicator/change-processor.js +44 -12
  138. package/out/zero-cache/src/services/replicator/change-processor.js.map +1 -1
  139. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
  140. package/out/zero-cache/src/services/replicator/incremental-sync.js +4 -3
  141. package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
  142. package/out/zero-cache/src/services/replicator/schema/backfilling.d.ts +23 -2
  143. package/out/zero-cache/src/services/replicator/schema/backfilling.d.ts.map +1 -1
  144. package/out/zero-cache/src/services/replicator/schema/backfilling.js +54 -2
  145. package/out/zero-cache/src/services/replicator/schema/backfilling.js.map +1 -1
  146. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts +11 -3
  147. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts.map +1 -1
  148. package/out/zero-cache/src/services/replicator/write-worker-client.js.map +1 -1
  149. package/out/zero-cache/src/services/replicator/write-worker.js +5 -1
  150. package/out/zero-cache/src/services/replicator/write-worker.js.map +1 -1
  151. package/out/zero-cache/src/services/view-syncer/deferred-writes-budget.d.ts +81 -0
  152. package/out/zero-cache/src/services/view-syncer/deferred-writes-budget.d.ts.map +1 -0
  153. package/out/zero-cache/src/services/view-syncer/deferred-writes-budget.js +128 -0
  154. package/out/zero-cache/src/services/view-syncer/deferred-writes-budget.js.map +1 -0
  155. package/out/zero-cache/src/services/view-syncer/inspect-handler.js +1 -1
  156. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +36 -1
  157. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
  158. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +362 -20
  159. package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
  160. package/out/zero-cache/src/services/view-syncer/plan-warnings.d.ts +7 -0
  161. package/out/zero-cache/src/services/view-syncer/plan-warnings.d.ts.map +1 -0
  162. package/out/zero-cache/src/services/view-syncer/plan-warnings.js +35 -0
  163. package/out/zero-cache/src/services/view-syncer/plan-warnings.js.map +1 -0
  164. package/out/zero-cache/src/services/view-syncer/query-shape.d.ts +25 -0
  165. package/out/zero-cache/src/services/view-syncer/query-shape.d.ts.map +1 -0
  166. package/out/zero-cache/src/services/view-syncer/query-shape.js +28 -0
  167. package/out/zero-cache/src/services/view-syncer/query-shape.js.map +1 -0
  168. package/out/zero-cache/src/services/view-syncer/query-stats.d.ts +77 -0
  169. package/out/zero-cache/src/services/view-syncer/query-stats.d.ts.map +1 -0
  170. package/out/zero-cache/src/services/view-syncer/query-stats.js +206 -0
  171. package/out/zero-cache/src/services/view-syncer/query-stats.js.map +1 -0
  172. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts +11 -1
  173. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts.map +1 -1
  174. package/out/zero-cache/src/services/view-syncer/snapshotter.js +7 -1
  175. package/out/zero-cache/src/services/view-syncer/snapshotter.js.map +1 -1
  176. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  177. package/out/zero-cache/src/services/view-syncer/view-syncer.js +49 -3
  178. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  179. package/out/zero-cache/src/workers/connection.js +3 -3
  180. package/out/zero-cache/src/workers/connection.js.map +1 -1
  181. package/out/zero-cache/src/workers/syncer.js +2 -2
  182. package/out/zero-cache/src/workers/syncer.js.map +1 -1
  183. package/out/zero-client/src/client/options.d.ts +29 -0
  184. package/out/zero-client/src/client/options.d.ts.map +1 -1
  185. package/out/zero-client/src/client/options.js.map +1 -1
  186. package/out/zero-client/src/client/version.js +1 -1
  187. package/out/zero-client/src/client/zero.d.ts.map +1 -1
  188. package/out/zero-client/src/client/zero.js +8 -23
  189. package/out/zero-client/src/client/zero.js.map +1 -1
  190. package/out/zero-client/src/mod.d.ts +1 -0
  191. package/out/zero-client/src/mod.d.ts.map +1 -1
  192. package/out/zero-client/src/mod.js +1 -0
  193. package/out/zero-protocol/src/down.d.ts +2 -2
  194. package/out/zero-react/src/zero.js +1 -0
  195. package/out/zero-solid/src/zero.js +1 -0
  196. package/out/zql/src/builder/builder.d.ts +6 -0
  197. package/out/zql/src/builder/builder.d.ts.map +1 -1
  198. package/out/zql/src/builder/builder.js +4 -3
  199. package/out/zql/src/builder/builder.js.map +1 -1
  200. package/out/zql/src/ivm/memory-source.d.ts +13 -0
  201. package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
  202. package/out/zql/src/ivm/memory-source.js +1 -1
  203. package/out/zql/src/ivm/memory-source.js.map +1 -1
  204. package/out/zql/src/planner/planner-builder.d.ts +12 -1
  205. package/out/zql/src/planner/planner-builder.d.ts.map +1 -1
  206. package/out/zql/src/planner/planner-builder.js +8 -1
  207. package/out/zql/src/planner/planner-builder.js.map +1 -1
  208. package/out/zql/src/planner/planner-connection.d.ts +43 -0
  209. package/out/zql/src/planner/planner-connection.d.ts.map +1 -1
  210. package/out/zql/src/planner/planner-connection.js +31 -4
  211. package/out/zql/src/planner/planner-connection.js.map +1 -1
  212. package/out/zql/src/planner/planner-graph.d.ts +10 -0
  213. package/out/zql/src/planner/planner-graph.d.ts.map +1 -1
  214. package/out/zql/src/planner/planner-graph.js +14 -0
  215. package/out/zql/src/planner/planner-graph.js.map +1 -1
  216. package/out/zql/src/planner/planner-warnings.d.ts +83 -0
  217. package/out/zql/src/planner/planner-warnings.d.ts.map +1 -0
  218. package/out/zql/src/planner/planner-warnings.js +78 -0
  219. package/out/zql/src/planner/planner-warnings.js.map +1 -0
  220. package/out/zql/src/query/measure-push-operator.d.ts.map +1 -1
  221. package/out/zql/src/query/measure-push-operator.js +30 -8
  222. package/out/zql/src/query/measure-push-operator.js.map +1 -1
  223. package/out/zqlite/src/pending-delta.d.ts +110 -0
  224. package/out/zqlite/src/pending-delta.d.ts.map +1 -0
  225. package/out/zqlite/src/pending-delta.js +278 -0
  226. package/out/zqlite/src/pending-delta.js.map +1 -0
  227. package/out/zqlite/src/query-delegate.d.ts.map +1 -1
  228. package/out/zqlite/src/query-delegate.js +5 -1
  229. package/out/zqlite/src/query-delegate.js.map +1 -1
  230. package/out/zqlite/src/sqlite-cost-model.d.ts.map +1 -1
  231. package/out/zqlite/src/sqlite-cost-model.js +52 -1
  232. package/out/zqlite/src/sqlite-cost-model.js.map +1 -1
  233. package/out/zqlite/src/sqlite-stat-fanout.d.ts.map +1 -1
  234. package/out/zqlite/src/sqlite-stat-fanout.js +2 -26
  235. package/out/zqlite/src/sqlite-stat-fanout.js.map +1 -1
  236. package/out/zqlite/src/sqlite-stat4-sample.d.ts +37 -0
  237. package/out/zqlite/src/sqlite-stat4-sample.d.ts.map +1 -0
  238. package/out/zqlite/src/sqlite-stat4-sample.js +61 -0
  239. package/out/zqlite/src/sqlite-stat4-sample.js.map +1 -0
  240. package/out/zqlite/src/table-source.d.ts +68 -0
  241. package/out/zqlite/src/table-source.d.ts.map +1 -1
  242. package/out/zqlite/src/table-source.js +206 -7
  243. package/out/zqlite/src/table-source.js.map +1 -1
  244. package/package.json +1 -1
  245. package/out/replicache/src/kv/idb-store-with-mem-fallback.d.ts +0 -35
  246. package/out/replicache/src/kv/idb-store-with-mem-fallback.d.ts.map +0 -1
  247. package/out/replicache/src/kv/idb-store-with-mem-fallback.js +0 -83
  248. package/out/replicache/src/kv/idb-store-with-mem-fallback.js.map +0 -1
  249. package/out/zero-cache/src/services/change-source/pg/backfill-resume.d.ts +0 -156
  250. package/out/zero-cache/src/services/change-source/pg/backfill-resume.d.ts.map +0 -1
  251. package/out/zero-cache/src/services/change-source/pg/backfill-resume.js +0 -15
  252. package/out/zero-cache/src/services/change-source/pg/backfill-resume.js.map +0 -1
@@ -0,0 +1,81 @@
1
+ /**
2
+ * The bytes assumed for each row held in memory, which converts the memory
3
+ * given to deferred writes into rows. The width of the rows an advancement
4
+ * will hold is not known before it starts.
5
+ */
6
+ export declare const BYTES_PER_ROW = 1024;
7
+ /**
8
+ * Bounds the memory that deferred IVM writes (see `deferIvmWrites`) use
9
+ * across the client groups of one syncer process.
10
+ *
11
+ * Each client group holds its own in-memory copy of the changes of the
12
+ * advancement it is processing, so the copies add up across the groups that
13
+ * advance at the same time. Before an advancement starts, its pipeline driver
14
+ * reserves the number of change log entries it advances through (of every
15
+ * table, since counting only the tables it reads would take a scan of the
16
+ * entries). That number bounds the rows its sources can hold: the change log
17
+ * has one entry per row key (a truncation, which does not, resets the
18
+ * pipelines instead), and a row displaced through a unique key must itself
19
+ * have changed in the same interval, so it has its own entry. (An entry that
20
+ * sets a row of a table whose primary key in the client schema is not the key
21
+ * the change log uses can change the row's primary key, which is two rows, so
22
+ * the driver reserves a second row for it as it gets to it.) An advancement that does
23
+ * not fit is written through to the replica snapshot instead, which SQLite
24
+ * bounds with its page cache and spills to disk.
25
+ *
26
+ * The rows are reserved at an assumed {@link BYTES_PER_ROW}, but their width
27
+ * is not known until they are held. So the advancements also add up the
28
+ * bytes they are estimated to hold as they go, and the one that takes the
29
+ * total past the budget writes what it holds through to the replica snapshot,
30
+ * and the rest of its changes after them.
31
+ *
32
+ * The budget is a share of the heap, so it does not depend on how many
33
+ * client groups are connected: when advancements do not overlap, each one
34
+ * can use all of it, and when many do, each gets less and the rest write
35
+ * through.
36
+ */
37
+ export declare class DeferredWritesBudget {
38
+ #private;
39
+ /**
40
+ * A budget of `proportion` of the heap limit, and the rows that fit in it
41
+ * at {@link BYTES_PER_ROW}.
42
+ */
43
+ static forHeapProportion(proportion: number): DeferredWritesBudget;
44
+ /** A budget of `bytes`, and the rows that fit in it at {@link BYTES_PER_ROW}. */
45
+ static forBytes(bytes: number): DeferredWritesBudget;
46
+ constructor(maxRows: number, maxBytes: number);
47
+ get maxRows(): number;
48
+ get maxBytes(): number;
49
+ get reservedRows(): number;
50
+ /** The estimated bytes held by the advancements that hold rows. */
51
+ get heldBytes(): number;
52
+ /**
53
+ * Reserves `rows` if they fit in what is left of the budget, and returns
54
+ * whether they did. A successful reservation must be {@link release}d.
55
+ */
56
+ tryReserve(rows: number): boolean;
57
+ /**
58
+ * Reserves `rows` more for an advancement that is already holding rows, if
59
+ * they fit. An advancement reserves a row this way for each change log entry
60
+ * that can change the primary key of the row it sets, as it gets to it, and
61
+ * writes through if it does not fit. The rows are {@link release}d with the rest.
62
+ */
63
+ tryReserveMore(rows: number): boolean;
64
+ /**
65
+ * Adds `bytes` (fewer if negative) to the estimated bytes held by an
66
+ * advancement that has reserved rows, and returns whether the total is
67
+ * still within the budget. If it is not, the advancement is expected to
68
+ * stop holding rows and {@link release} them.
69
+ */
70
+ holdBytes(bytes: number): boolean;
71
+ /**
72
+ * The advancements that have held more rows than they reserved, which the
73
+ * reservation is supposed to rule out. Each writes through the rest of its
74
+ * changes instead.
75
+ */
76
+ get rowOverruns(): number;
77
+ recordRowOverrun(): void;
78
+ /** Returns an advancement's reserved `rows` and the `bytes` it held. */
79
+ release(rows: number, bytes: number): void;
80
+ }
81
+ //# sourceMappingURL=deferred-writes-budget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferred-writes-budget.d.ts","sourceRoot":"","sources":["../../../../../../zero-cache/src/services/view-syncer/deferred-writes-budget.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,oBAAoB;;IAO/B;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,CAIjE;IAED,iFAAiF;IACjF,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAEnD;IAED,YAAY,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAG5C;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,mEAAmE;IACnE,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhC;IAED;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpC;IAUD;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIhC;IAED;;;;OAIG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,gBAAgB,IAAI,IAAI,CAEvB;IAED,wEAAwE;IACxE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAYzC;CACF"}
@@ -0,0 +1,128 @@
1
+ import { assert } from "../../../../shared/src/asserts.js";
2
+ import { getHeapStatistics } from "node:v8";
3
+ //#region ../zero-cache/src/services/view-syncer/deferred-writes-budget.ts
4
+ /**
5
+ * The bytes assumed for each row held in memory, which converts the memory
6
+ * given to deferred writes into rows. The width of the rows an advancement
7
+ * will hold is not known before it starts.
8
+ */
9
+ var BYTES_PER_ROW = 1024;
10
+ /**
11
+ * Bounds the memory that deferred IVM writes (see `deferIvmWrites`) use
12
+ * across the client groups of one syncer process.
13
+ *
14
+ * Each client group holds its own in-memory copy of the changes of the
15
+ * advancement it is processing, so the copies add up across the groups that
16
+ * advance at the same time. Before an advancement starts, its pipeline driver
17
+ * reserves the number of change log entries it advances through (of every
18
+ * table, since counting only the tables it reads would take a scan of the
19
+ * entries). That number bounds the rows its sources can hold: the change log
20
+ * has one entry per row key (a truncation, which does not, resets the
21
+ * pipelines instead), and a row displaced through a unique key must itself
22
+ * have changed in the same interval, so it has its own entry. (An entry that
23
+ * sets a row of a table whose primary key in the client schema is not the key
24
+ * the change log uses can change the row's primary key, which is two rows, so
25
+ * the driver reserves a second row for it as it gets to it.) An advancement that does
26
+ * not fit is written through to the replica snapshot instead, which SQLite
27
+ * bounds with its page cache and spills to disk.
28
+ *
29
+ * The rows are reserved at an assumed {@link BYTES_PER_ROW}, but their width
30
+ * is not known until they are held. So the advancements also add up the
31
+ * bytes they are estimated to hold as they go, and the one that takes the
32
+ * total past the budget writes what it holds through to the replica snapshot,
33
+ * and the rest of its changes after them.
34
+ *
35
+ * The budget is a share of the heap, so it does not depend on how many
36
+ * client groups are connected: when advancements do not overlap, each one
37
+ * can use all of it, and when many do, each gets less and the rest write
38
+ * through.
39
+ */
40
+ var DeferredWritesBudget = class DeferredWritesBudget {
41
+ #maxRows;
42
+ #maxBytes;
43
+ #reservedRows = 0;
44
+ #heldBytes = 0;
45
+ #rowOverruns = 0;
46
+ /**
47
+ * A budget of `proportion` of the heap limit, and the rows that fit in it
48
+ * at {@link BYTES_PER_ROW}.
49
+ */
50
+ static forHeapProportion(proportion) {
51
+ return DeferredWritesBudget.forBytes(Math.floor(getHeapStatistics().heap_size_limit * proportion));
52
+ }
53
+ /** A budget of `bytes`, and the rows that fit in it at {@link BYTES_PER_ROW}. */
54
+ static forBytes(bytes) {
55
+ return new DeferredWritesBudget(Math.floor(bytes / BYTES_PER_ROW), bytes);
56
+ }
57
+ constructor(maxRows, maxBytes) {
58
+ this.#maxRows = maxRows;
59
+ this.#maxBytes = maxBytes;
60
+ }
61
+ get maxRows() {
62
+ return this.#maxRows;
63
+ }
64
+ get maxBytes() {
65
+ return this.#maxBytes;
66
+ }
67
+ get reservedRows() {
68
+ return this.#reservedRows;
69
+ }
70
+ /** The estimated bytes held by the advancements that hold rows. */
71
+ get heldBytes() {
72
+ return this.#heldBytes;
73
+ }
74
+ /**
75
+ * Reserves `rows` if they fit in what is left of the budget, and returns
76
+ * whether they did. A successful reservation must be {@link release}d.
77
+ */
78
+ tryReserve(rows) {
79
+ return this.#tryReserve(rows);
80
+ }
81
+ /**
82
+ * Reserves `rows` more for an advancement that is already holding rows, if
83
+ * they fit. An advancement reserves a row this way for each change log entry
84
+ * that can change the primary key of the row it sets, as it gets to it, and
85
+ * writes through if it does not fit. The rows are {@link release}d with the rest.
86
+ */
87
+ tryReserveMore(rows) {
88
+ return this.#tryReserve(rows);
89
+ }
90
+ #tryReserve(rows) {
91
+ if (this.#reservedRows + rows > this.#maxRows) return false;
92
+ this.#reservedRows += rows;
93
+ return true;
94
+ }
95
+ /**
96
+ * Adds `bytes` (fewer if negative) to the estimated bytes held by an
97
+ * advancement that has reserved rows, and returns whether the total is
98
+ * still within the budget. If it is not, the advancement is expected to
99
+ * stop holding rows and {@link release} them.
100
+ */
101
+ holdBytes(bytes) {
102
+ this.#heldBytes += bytes;
103
+ assert(this.#heldBytes >= 0, () => `Holding ${this.#heldBytes} bytes`);
104
+ return this.#heldBytes <= this.#maxBytes;
105
+ }
106
+ /**
107
+ * The advancements that have held more rows than they reserved, which the
108
+ * reservation is supposed to rule out. Each writes through the rest of its
109
+ * changes instead.
110
+ */
111
+ get rowOverruns() {
112
+ return this.#rowOverruns;
113
+ }
114
+ recordRowOverrun() {
115
+ this.#rowOverruns++;
116
+ }
117
+ /** Returns an advancement's reserved `rows` and the `bytes` it held. */
118
+ release(rows, bytes) {
119
+ assert(rows <= this.#reservedRows, () => `Releasing ${rows} rows but only ${this.#reservedRows} are reserved`);
120
+ assert(bytes <= this.#heldBytes, () => `Releasing ${bytes} bytes but only ${this.#heldBytes} are held`);
121
+ this.#reservedRows -= rows;
122
+ this.#heldBytes -= bytes;
123
+ }
124
+ };
125
+ //#endregion
126
+ export { DeferredWritesBudget };
127
+
128
+ //# sourceMappingURL=deferred-writes-budget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferred-writes-budget.js","names":["#maxRows","#maxBytes","#reservedRows","#heldBytes","#tryReserve","#rowOverruns"],"sources":["../../../../../../zero-cache/src/services/view-syncer/deferred-writes-budget.ts"],"sourcesContent":["import {getHeapStatistics} from 'node:v8';\nimport {assert} from '../../../../shared/src/asserts.ts';\n\n/**\n * The bytes assumed for each row held in memory, which converts the memory\n * given to deferred writes into rows. The width of the rows an advancement\n * will hold is not known before it starts.\n */\nexport const BYTES_PER_ROW = 1024;\n\n/**\n * Bounds the memory that deferred IVM writes (see `deferIvmWrites`) use\n * across the client groups of one syncer process.\n *\n * Each client group holds its own in-memory copy of the changes of the\n * advancement it is processing, so the copies add up across the groups that\n * advance at the same time. Before an advancement starts, its pipeline driver\n * reserves the number of change log entries it advances through (of every\n * table, since counting only the tables it reads would take a scan of the\n * entries). That number bounds the rows its sources can hold: the change log\n * has one entry per row key (a truncation, which does not, resets the\n * pipelines instead), and a row displaced through a unique key must itself\n * have changed in the same interval, so it has its own entry. (An entry that\n * sets a row of a table whose primary key in the client schema is not the key\n * the change log uses can change the row's primary key, which is two rows, so\n * the driver reserves a second row for it as it gets to it.) An advancement that does\n * not fit is written through to the replica snapshot instead, which SQLite\n * bounds with its page cache and spills to disk.\n *\n * The rows are reserved at an assumed {@link BYTES_PER_ROW}, but their width\n * is not known until they are held. So the advancements also add up the\n * bytes they are estimated to hold as they go, and the one that takes the\n * total past the budget writes what it holds through to the replica snapshot,\n * and the rest of its changes after them.\n *\n * The budget is a share of the heap, so it does not depend on how many\n * client groups are connected: when advancements do not overlap, each one\n * can use all of it, and when many do, each gets less and the rest write\n * through.\n */\nexport class DeferredWritesBudget {\n readonly #maxRows: number;\n readonly #maxBytes: number;\n #reservedRows = 0;\n #heldBytes = 0;\n #rowOverruns = 0;\n\n /**\n * A budget of `proportion` of the heap limit, and the rows that fit in it\n * at {@link BYTES_PER_ROW}.\n */\n static forHeapProportion(proportion: number): DeferredWritesBudget {\n return DeferredWritesBudget.forBytes(\n Math.floor(getHeapStatistics().heap_size_limit * proportion),\n );\n }\n\n /** A budget of `bytes`, and the rows that fit in it at {@link BYTES_PER_ROW}. */\n static forBytes(bytes: number): DeferredWritesBudget {\n return new DeferredWritesBudget(Math.floor(bytes / BYTES_PER_ROW), bytes);\n }\n\n constructor(maxRows: number, maxBytes: number) {\n this.#maxRows = maxRows;\n this.#maxBytes = maxBytes;\n }\n\n get maxRows(): number {\n return this.#maxRows;\n }\n\n get maxBytes(): number {\n return this.#maxBytes;\n }\n\n get reservedRows(): number {\n return this.#reservedRows;\n }\n\n /** The estimated bytes held by the advancements that hold rows. */\n get heldBytes(): number {\n return this.#heldBytes;\n }\n\n /**\n * Reserves `rows` if they fit in what is left of the budget, and returns\n * whether they did. A successful reservation must be {@link release}d.\n */\n tryReserve(rows: number): boolean {\n return this.#tryReserve(rows);\n }\n\n /**\n * Reserves `rows` more for an advancement that is already holding rows, if\n * they fit. An advancement reserves a row this way for each change log entry\n * that can change the primary key of the row it sets, as it gets to it, and\n * writes through if it does not fit. The rows are {@link release}d with the rest.\n */\n tryReserveMore(rows: number): boolean {\n return this.#tryReserve(rows);\n }\n\n #tryReserve(rows: number): boolean {\n if (this.#reservedRows + rows > this.#maxRows) {\n return false;\n }\n this.#reservedRows += rows;\n return true;\n }\n\n /**\n * Adds `bytes` (fewer if negative) to the estimated bytes held by an\n * advancement that has reserved rows, and returns whether the total is\n * still within the budget. If it is not, the advancement is expected to\n * stop holding rows and {@link release} them.\n */\n holdBytes(bytes: number): boolean {\n this.#heldBytes += bytes;\n assert(this.#heldBytes >= 0, () => `Holding ${this.#heldBytes} bytes`);\n return this.#heldBytes <= this.#maxBytes;\n }\n\n /**\n * The advancements that have held more rows than they reserved, which the\n * reservation is supposed to rule out. Each writes through the rest of its\n * changes instead.\n */\n get rowOverruns(): number {\n return this.#rowOverruns;\n }\n\n recordRowOverrun(): void {\n this.#rowOverruns++;\n }\n\n /** Returns an advancement's reserved `rows` and the `bytes` it held. */\n release(rows: number, bytes: number): void {\n assert(\n rows <= this.#reservedRows,\n () =>\n `Releasing ${rows} rows but only ${this.#reservedRows} are reserved`,\n );\n assert(\n bytes <= this.#heldBytes,\n () => `Releasing ${bytes} bytes but only ${this.#heldBytes} are held`,\n );\n this.#reservedRows -= rows;\n this.#heldBytes -= bytes;\n }\n}\n"],"mappings":";;;;;;;;AAQA,IAAa,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgC7B,IAAa,uBAAb,MAAa,qBAAqB;CAChC;CACA;CACA,gBAAgB;CAChB,aAAa;CACb,eAAe;;;;;CAMf,OAAO,kBAAkB,YAA0C;EACjE,OAAO,qBAAqB,SAC1B,KAAK,MAAM,kBAAkB,EAAE,kBAAkB,UAAU,CAC7D;CACF;;CAGA,OAAO,SAAS,OAAqC;EACnD,OAAO,IAAI,qBAAqB,KAAK,MAAM,QAAQ,aAAa,GAAG,KAAK;CAC1E;CAEA,YAAY,SAAiB,UAAkB;EAC7C,KAAKA,WAAW;EAChB,KAAKC,YAAY;CACnB;CAEA,IAAI,UAAkB;EACpB,OAAO,KAAKD;CACd;CAEA,IAAI,WAAmB;EACrB,OAAO,KAAKC;CACd;CAEA,IAAI,eAAuB;EACzB,OAAO,KAAKC;CACd;;CAGA,IAAI,YAAoB;EACtB,OAAO,KAAKC;CACd;;;;;CAMA,WAAW,MAAuB;EAChC,OAAO,KAAKC,YAAY,IAAI;CAC9B;;;;;;;CAQA,eAAe,MAAuB;EACpC,OAAO,KAAKA,YAAY,IAAI;CAC9B;CAEA,YAAY,MAAuB;EACjC,IAAI,KAAKF,gBAAgB,OAAO,KAAKF,UACnC,OAAO;EAET,KAAKE,iBAAiB;EACtB,OAAO;CACT;;;;;;;CAQA,UAAU,OAAwB;EAChC,KAAKC,cAAc;EACnB,OAAO,KAAKA,cAAc,SAAS,WAAW,KAAKA,WAAW,OAAO;EACrE,OAAO,KAAKA,cAAc,KAAKF;CACjC;;;;;;CAOA,IAAI,cAAsB;EACxB,OAAO,KAAKI;CACd;CAEA,mBAAyB;EACvB,KAAKA;CACP;;CAGA,QAAQ,MAAc,OAAqB;EACzC,OACE,QAAQ,KAAKH,qBAEX,aAAa,KAAK,iBAAiB,KAAKA,cAAc,cAC1D;EACA,OACE,SAAS,KAAKC,kBACR,aAAa,MAAM,kBAAkB,KAAKA,WAAW,UAC7D;EACA,KAAKD,iBAAiB;EACtB,KAAKC,cAAc;CACrB;AACF"}
@@ -6,8 +6,8 @@ import { getServerVersion, isAdminPasswordValid } from "../../config/zero-config
6
6
  import { Database } from "../../../../zqlite/src/db.js";
7
7
  import { loadPermissions } from "../../auth/load-permissions.js";
8
8
  import { StatementRunner } from "../../db/statements.js";
9
- import { inspectAnalyzeQueryUpSchema } from "../../../../zero-protocol/src/inspect-up.js";
10
9
  import { _usingCtx } from "../../../../_virtual/_@oxc-project_runtime@0.130.0/helpers/usingCtx.js";
10
+ import { inspectAnalyzeQueryUpSchema } from "../../../../zero-protocol/src/inspect-up.js";
11
11
  import { analyzeQuery } from "../analyze.js";
12
12
  //#region ../zero-cache/src/services/view-syncer/inspect-handler.ts
13
13
  async function handleInspect(lc, body, cvr, client, inspectorDelegate, clientGroupID, authOwner, cvrStore, config, ctx) {
@@ -5,6 +5,7 @@ import type { Row } from '../../../../zero-protocol/src/data.ts';
5
5
  import type { PrimaryKey } from '../../../../zero-protocol/src/primary-key.ts';
6
6
  import { ChangeType } from '../../../../zql/src/ivm/change-type.ts';
7
7
  import { type Input } from '../../../../zql/src/ivm/operator.ts';
8
+ import type { PlanWarning } from '../../../../zql/src/planner/planner-warnings.ts';
8
9
  import type { ClientGroupStorage } from '../../../../zqlite/src/database-storage.ts';
9
10
  import { type LoadedPermissions } from '../../auth/load-permissions.ts';
10
11
  import type { LogConfig, ZeroConfig } from '../../config/zero-config.ts';
@@ -12,6 +13,9 @@ import type { LiteAndZqlSpec } from '../../db/specs.ts';
12
13
  import type { InspectorDelegate } from '../../server/inspector-delegate.ts';
13
14
  import { type RowKey } from '../../types/row-key.ts';
14
15
  import { type ShardID } from '../../types/shards.ts';
16
+ import type { DeferredWritesBudget } from './deferred-writes-budget.ts';
17
+ import { type QueryShape } from './query-shape.ts';
18
+ import type { QueryStats } from './query-stats.ts';
15
19
  import type { Snapshotter } from './snapshotter.ts';
16
20
  type RowOp<Op extends Omit<ChangeType, ChangeType.CHILD>> = {
17
21
  readonly type: Op;
@@ -30,6 +34,21 @@ export type QueryInfo = {
30
34
  readonly transformationHash: string;
31
35
  readonly queryName?: string | undefined;
32
36
  };
37
+ export type HydrationStats = {
38
+ /** The rows the hydration output. */
39
+ readonly rowCount: number;
40
+ /**
41
+ * The rows the hydration read from the replica, including rows that were
42
+ * then filtered out, e.g. by a filter that could not be pushed to SQLite or
43
+ * by an EXISTS that did not match. Much greater than {@link rowCount} means
44
+ * the query does a lot of work for the rows it returns.
45
+ */
46
+ readonly rowsRead: number;
47
+ /** What the planner warned about the plan it chose for the query. */
48
+ readonly planWarnings: readonly PlanWarning[];
49
+ /** The {@link queryShape} of the query, computed when it was hydrated. */
50
+ readonly shape: QueryShape;
51
+ };
33
52
  export type PipelineHydrationReason = 'query-set-sync' | 'unchanged-query-rehydrate';
34
53
  type PipelineStopReason = 'replace-query' | 'remove-query' | 'reset' | 'destroy';
35
54
  export type Timer = {
@@ -41,7 +60,7 @@ export type Timer = {
41
60
  */
42
61
  export declare class PipelineDriver {
43
62
  #private;
44
- constructor(lc: LogContext, logConfig: LogConfig, snapshotter: Snapshotter, shardID: ShardID, storage: ClientGroupStorage, clientGroupID: string, inspectorDelegate: InspectorDelegate, yieldThresholdMs: () => number, enablePlanner?: boolean, config?: ZeroConfig);
63
+ constructor(lc: LogContext, logConfig: LogConfig, snapshotter: Snapshotter, shardID: ShardID, storage: ClientGroupStorage, clientGroupID: string, inspectorDelegate: InspectorDelegate, yieldThresholdMs: () => number, enablePlanner?: boolean, config?: ZeroConfig, deferredWrites?: DeferredWritesBudget, queryStats?: QueryStats | undefined);
45
64
  /**
46
65
  * Initializes the PipelineDriver to the current head of the database.
47
66
  * Queries can then be added (i.e. hydrated) with {@link addQuery()}.
@@ -91,7 +110,23 @@ export declare class PipelineDriver {
91
110
  destroy(): void;
92
111
  /** @return Map from query ID to PipelineInfo for all added queries. */
93
112
  queries(): ReadonlyMap<string, QueryInfo>;
113
+ /**
114
+ * Stats from the hydration of the pipeline for `queryID`, or `undefined` if
115
+ * the query has no pipeline.
116
+ */
117
+ hydrationStats(queryID: string): HydrationStats | undefined;
94
118
  totalHydrationTimeMs(): number;
119
+ /**
120
+ * The rows the sources hold in memory for the advancement in progress.
121
+ * The advancement's reservation from the {@link DeferredWritesBudget}
122
+ * bounds this.
123
+ */
124
+ get pendingRows(): number;
125
+ /**
126
+ * The estimated bytes of {@link pendingRows}, which are added to the
127
+ * {@link DeferredWritesBudget}'s held bytes as the advancement goes.
128
+ */
129
+ get pendingBytes(): number;
95
130
  /**
96
131
  * Adds a pipeline for the query. The method will hydrate the query using the
97
132
  * driver's current snapshot of the database and return a stream of results.
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline-driver.d.ts","sourceRoot":"","sources":["../../../../../../zero-cache/src/services/view-syncer/pipeline-dri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