@rocicorp/zero 1.12.0-canary.5 → 1.12.0-canary.7

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 (414) hide show
  1. package/out/replicache/src/btree/node.js +1 -1
  2. package/out/replicache/src/deleted-clients.d.ts.map +1 -1
  3. package/out/replicache/src/deleted-clients.js +2 -1
  4. package/out/replicache/src/deleted-clients.js.map +1 -1
  5. package/out/replicache/src/kv/sqlite-store.d.ts.map +1 -1
  6. package/out/replicache/src/kv/sqlite-store.js +7 -3
  7. package/out/replicache/src/kv/sqlite-store.js.map +1 -1
  8. package/out/replicache/src/replicache-impl.d.ts.map +1 -1
  9. package/out/replicache/src/replicache-impl.js +17 -14
  10. package/out/replicache/src/replicache-impl.js.map +1 -1
  11. package/out/z2s/src/compiler.js +3 -3
  12. package/out/z2s/src/compiler.js.map +1 -1
  13. package/out/zero/package.js +11 -11
  14. package/out/zero/package.js.map +1 -1
  15. package/out/zero-cache/src/auth/write-authorizer.js +9 -2
  16. package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
  17. package/out/zero-cache/src/config/zero-config.js +2 -2
  18. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  19. package/out/zero-cache/src/server/change-streamer.js +33 -9
  20. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  21. package/out/zero-cache/src/services/change-source/common/replica-restore.js.map +1 -1
  22. package/out/zero-cache/src/services/change-source/pg/change-source-init.js +49 -24
  23. package/out/zero-cache/src/services/change-source/pg/change-source-init.js.map +1 -1
  24. package/out/zero-cache/src/services/change-source/pg/change-source.js +64 -7
  25. package/out/zero-cache/src/services/change-source/pg/change-source.js.map +1 -1
  26. package/out/zero-cache/src/services/change-source/pg/fork-request.js +54 -0
  27. package/out/zero-cache/src/services/change-source/pg/fork-request.js.map +1 -0
  28. package/out/zero-cache/src/services/change-source/pg/replication-slots.js +6 -0
  29. package/out/zero-cache/src/services/change-source/pg/replication-slots.js.map +1 -1
  30. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts +1 -0
  31. package/out/zero-cache/src/services/change-source/protocol/current/downstream.d.ts.map +1 -1
  32. package/out/zero-cache/src/services/change-source/protocol/current/status.d.ts +3 -0
  33. package/out/zero-cache/src/services/change-source/protocol/current/status.d.ts.map +1 -1
  34. package/out/zero-cache/src/services/change-source/protocol/current/status.js +2 -1
  35. package/out/zero-cache/src/services/change-source/protocol/current/status.js.map +1 -1
  36. package/out/zero-cache/src/services/change-source/protocol/current/upstream.d.ts +1 -0
  37. package/out/zero-cache/src/services/change-source/protocol/current/upstream.d.ts.map +1 -1
  38. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.js +6 -6
  39. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.js.map +1 -1
  40. package/out/zero-cache/src/services/change-streamer/backup-monitor.js +55 -20
  41. package/out/zero-cache/src/services/change-streamer/backup-monitor.js.map +1 -1
  42. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +27 -8
  43. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js.map +1 -1
  44. package/out/zero-cache/src/services/change-streamer/change-streamer.js.map +1 -1
  45. package/out/zero-cache/src/services/change-streamer/litestream-sync-requester.js +80 -11
  46. package/out/zero-cache/src/services/change-streamer/litestream-sync-requester.js.map +1 -1
  47. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.js.map +1 -1
  48. package/out/zero-cache/src/services/change-streamer/replica-poller.js.map +1 -1
  49. package/out/zero-cache/src/services/change-streamer/server-start-metrics.js +42 -0
  50. package/out/zero-cache/src/services/change-streamer/server-start-metrics.js.map +1 -0
  51. package/out/zero-cache/src/services/change-streamer/subscriber.js +5 -4
  52. package/out/zero-cache/src/services/change-streamer/subscriber.js.map +1 -1
  53. package/out/zero-cache/src/services/mutagen/mutagen.js +1 -2
  54. package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
  55. package/out/zero-cache/src/services/view-syncer/view-syncer.js +19 -2
  56. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  57. package/out/zero-client/src/client/version.js +1 -1
  58. package/out/zero-protocol/src/ast.d.ts.map +1 -1
  59. package/out/zero-protocol/src/ast.js +2 -1
  60. package/out/zero-protocol/src/ast.js.map +1 -1
  61. package/out/zero-protocol/src/down.d.ts +27 -27
  62. package/out/zero-protocol/src/inspect-down.d.ts +81 -81
  63. package/out/zero-protocol/src/up.d.ts +60 -60
  64. package/package.json +11 -11
  65. package/out/shared/src/cache.d.ts +0 -22
  66. package/out/shared/src/cache.d.ts.map +0 -1
  67. package/out/shared/src/custom-key-map.d.ts +0 -26
  68. package/out/shared/src/custom-key-map.d.ts.map +0 -1
  69. package/out/shared/src/custom-key-set.d.ts +0 -25
  70. package/out/shared/src/custom-key-set.d.ts.map +0 -1
  71. package/out/shared/src/logging-test-utils.d.ts +0 -12
  72. package/out/shared/src/logging-test-utils.d.ts.map +0 -1
  73. package/out/shared/src/queue.d.ts +0 -53
  74. package/out/shared/src/queue.d.ts.map +0 -1
  75. package/out/shared/src/ring-buffer.d.ts +0 -42
  76. package/out/shared/src/ring-buffer.d.ts.map +0 -1
  77. package/out/shared/src/sorted-entries.d.ts +0 -2
  78. package/out/shared/src/sorted-entries.d.ts.map +0 -1
  79. package/out/zero/src/server/change-streamer.d.ts +0 -2
  80. package/out/zero/src/server/change-streamer.d.ts.map +0 -1
  81. package/out/zero/src/server/main.d.ts +0 -2
  82. package/out/zero/src/server/main.d.ts.map +0 -1
  83. package/out/zero/src/server/reaper.d.ts +0 -2
  84. package/out/zero/src/server/reaper.d.ts.map +0 -1
  85. package/out/zero/src/server/replicator.d.ts +0 -2
  86. package/out/zero/src/server/replicator.d.ts.map +0 -1
  87. package/out/zero/src/server/syncer.d.ts +0 -2
  88. package/out/zero/src/server/syncer.d.ts.map +0 -1
  89. package/out/zero-cache/src/auth/jwt.d.ts +0 -12
  90. package/out/zero-cache/src/auth/jwt.d.ts.map +0 -1
  91. package/out/zero-cache/src/auth/load-permissions.d.ts +0 -17
  92. package/out/zero-cache/src/auth/load-permissions.d.ts.map +0 -1
  93. package/out/zero-cache/src/auth/write-authorizer.d.ts +0 -28
  94. package/out/zero-cache/src/auth/write-authorizer.d.ts.map +0 -1
  95. package/out/zero-cache/src/config/server-context.d.ts +0 -16
  96. package/out/zero-cache/src/config/server-context.d.ts.map +0 -1
  97. package/out/zero-cache/src/custom/fetch.d.ts +0 -38
  98. package/out/zero-cache/src/custom/fetch.d.ts.map +0 -1
  99. package/out/zero-cache/src/custom/metrics.d.ts +0 -31
  100. package/out/zero-cache/src/custom/metrics.d.ts.map +0 -1
  101. package/out/zero-cache/src/custom-queries/transform-query.d.ts +0 -68
  102. package/out/zero-cache/src/custom-queries/transform-query.d.ts.map +0 -1
  103. package/out/zero-cache/src/db/create.d.ts +0 -12
  104. package/out/zero-cache/src/db/create.d.ts.map +0 -1
  105. package/out/zero-cache/src/db/delete-lite-db.d.ts +0 -2
  106. package/out/zero-cache/src/db/delete-lite-db.d.ts.map +0 -1
  107. package/out/zero-cache/src/db/index-predicate.d.ts +0 -4
  108. package/out/zero-cache/src/db/index-predicate.d.ts.map +0 -1
  109. package/out/zero-cache/src/db/migration-lite.d.ts +0 -78
  110. package/out/zero-cache/src/db/migration-lite.d.ts.map +0 -1
  111. package/out/zero-cache/src/db/migration.d.ts +0 -80
  112. package/out/zero-cache/src/db/migration.d.ts.map +0 -1
  113. package/out/zero-cache/src/db/pg-copy-binary.d.ts +0 -101
  114. package/out/zero-cache/src/db/pg-copy-binary.d.ts.map +0 -1
  115. package/out/zero-cache/src/db/pg-copy.d.ts +0 -30
  116. package/out/zero-cache/src/db/pg-copy.d.ts.map +0 -1
  117. package/out/zero-cache/src/db/pg-type-parser.d.ts +0 -15
  118. package/out/zero-cache/src/db/pg-type-parser.d.ts.map +0 -1
  119. package/out/zero-cache/src/db/transaction-pool.d.ts +0 -205
  120. package/out/zero-cache/src/db/transaction-pool.d.ts.map +0 -1
  121. package/out/zero-cache/src/db/warmup.d.ts +0 -4
  122. package/out/zero-cache/src/db/warmup.d.ts.map +0 -1
  123. package/out/zero-cache/src/observability/events.d.ts +0 -15
  124. package/out/zero-cache/src/observability/events.d.ts.map +0 -1
  125. package/out/zero-cache/src/observability/log-throttle.d.ts +0 -44
  126. package/out/zero-cache/src/observability/log-throttle.d.ts.map +0 -1
  127. package/out/zero-cache/src/server/anonymous-otel-start.d.ts +0 -21
  128. package/out/zero-cache/src/server/anonymous-otel-start.d.ts.map +0 -1
  129. package/out/zero-cache/src/server/change-streamer.d.ts +0 -3
  130. package/out/zero-cache/src/server/change-streamer.d.ts.map +0 -1
  131. package/out/zero-cache/src/server/inspector-delegate.d.ts +0 -71
  132. package/out/zero-cache/src/server/inspector-delegate.d.ts.map +0 -1
  133. package/out/zero-cache/src/server/main.d.ts +0 -3
  134. package/out/zero-cache/src/server/main.d.ts.map +0 -1
  135. package/out/zero-cache/src/server/otel-diag-logger.d.ts +0 -16
  136. package/out/zero-cache/src/server/otel-diag-logger.d.ts.map +0 -1
  137. package/out/zero-cache/src/server/otel-start.d.ts +0 -3
  138. package/out/zero-cache/src/server/otel-start.d.ts.map +0 -1
  139. package/out/zero-cache/src/server/priority-op.d.ts +0 -8
  140. package/out/zero-cache/src/server/priority-op.d.ts.map +0 -1
  141. package/out/zero-cache/src/server/reaper.d.ts +0 -3
  142. package/out/zero-cache/src/server/reaper.d.ts.map +0 -1
  143. package/out/zero-cache/src/server/replicator.d.ts +0 -10
  144. package/out/zero-cache/src/server/replicator.d.ts.map +0 -1
  145. package/out/zero-cache/src/server/slot-keeper.d.ts +0 -26
  146. package/out/zero-cache/src/server/slot-keeper.d.ts.map +0 -1
  147. package/out/zero-cache/src/server/syncer-assigner.d.ts +0 -14
  148. package/out/zero-cache/src/server/syncer-assigner.d.ts.map +0 -1
  149. package/out/zero-cache/src/server/syncer.d.ts +0 -3
  150. package/out/zero-cache/src/server/syncer.d.ts.map +0 -1
  151. package/out/zero-cache/src/server/worker-dispatcher.d.ts +0 -17
  152. package/out/zero-cache/src/server/worker-dispatcher.d.ts.map +0 -1
  153. package/out/zero-cache/src/services/analyze.d.ts +0 -9
  154. package/out/zero-cache/src/services/analyze.d.ts.map +0 -1
  155. package/out/zero-cache/src/services/change-source/change-source.d.ts +0 -32
  156. package/out/zero-cache/src/services/change-source/change-source.d.ts.map +0 -1
  157. package/out/zero-cache/src/services/change-source/common/backfill-manager.d.ts +0 -57
  158. package/out/zero-cache/src/services/change-source/common/backfill-manager.d.ts.map +0 -1
  159. package/out/zero-cache/src/services/change-source/common/change-stream-multiplexer.d.ts +0 -55
  160. package/out/zero-cache/src/services/change-source/common/change-stream-multiplexer.d.ts.map +0 -1
  161. package/out/zero-cache/src/services/change-source/common/init-cleanup.d.ts +0 -24
  162. package/out/zero-cache/src/services/change-source/common/init-cleanup.d.ts.map +0 -1
  163. package/out/zero-cache/src/services/change-source/common/replica-restore.d.ts +0 -115
  164. package/out/zero-cache/src/services/change-source/common/replica-restore.d.ts.map +0 -1
  165. package/out/zero-cache/src/services/change-source/common/replica-schema.d.ts +0 -14
  166. package/out/zero-cache/src/services/change-source/common/replica-schema.d.ts.map +0 -1
  167. package/out/zero-cache/src/services/change-source/custom/change-source.d.ts +0 -25
  168. package/out/zero-cache/src/services/change-source/custom/change-source.d.ts.map +0 -1
  169. package/out/zero-cache/src/services/change-source/pg/backfill-metadata.d.ts +0 -14
  170. package/out/zero-cache/src/services/change-source/pg/backfill-metadata.d.ts.map +0 -1
  171. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts +0 -36
  172. package/out/zero-cache/src/services/change-source/pg/backfill-stream.d.ts.map +0 -1
  173. package/out/zero-cache/src/services/change-source/pg/change-source-init.d.ts +0 -65
  174. package/out/zero-cache/src/services/change-source/pg/change-source-init.d.ts.map +0 -1
  175. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts +0 -115
  176. package/out/zero-cache/src/services/change-source/pg/change-source.d.ts.map +0 -1
  177. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts +0 -155
  178. package/out/zero-cache/src/services/change-source/pg/initial-sync.d.ts.map +0 -1
  179. package/out/zero-cache/src/services/change-source/pg/logical-replication/binary-reader.d.ts +0 -17
  180. package/out/zero-cache/src/services/change-source/pg/logical-replication/binary-reader.d.ts.map +0 -1
  181. package/out/zero-cache/src/services/change-source/pg/logical-replication/pgoutput-parser.d.ts +0 -28
  182. package/out/zero-cache/src/services/change-source/pg/logical-replication/pgoutput-parser.d.ts.map +0 -1
  183. package/out/zero-cache/src/services/change-source/pg/logical-replication/pgoutput.types.d.ts +0 -76
  184. package/out/zero-cache/src/services/change-source/pg/logical-replication/pgoutput.types.d.ts.map +0 -1
  185. package/out/zero-cache/src/services/change-source/pg/logical-replication/stream.d.ts +0 -169
  186. package/out/zero-cache/src/services/change-source/pg/logical-replication/stream.d.ts.map +0 -1
  187. package/out/zero-cache/src/services/change-source/pg/replication-slot-cleanup-monitor.d.ts +0 -16
  188. package/out/zero-cache/src/services/change-source/pg/replication-slot-cleanup-monitor.d.ts.map +0 -1
  189. package/out/zero-cache/src/services/change-source/pg/replication-slot-health.d.ts +0 -15
  190. package/out/zero-cache/src/services/change-source/pg/replication-slot-health.d.ts.map +0 -1
  191. package/out/zero-cache/src/services/change-source/pg/replication-slots.d.ts +0 -127
  192. package/out/zero-cache/src/services/change-source/pg/replication-slots.d.ts.map +0 -1
  193. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts +0 -9
  194. package/out/zero-cache/src/services/change-source/pg/schema/init.d.ts.map +0 -1
  195. package/out/zero-cache/src/services/change-source/protocol/backfill-progress.d.ts +0 -68
  196. package/out/zero-cache/src/services/change-source/protocol/backfill-progress.d.ts.map +0 -1
  197. package/out/zero-cache/src/services/change-streamer/backfill-state-tracker.d.ts +0 -72
  198. package/out/zero-cache/src/services/change-streamer/backfill-state-tracker.d.ts.map +0 -1
  199. package/out/zero-cache/src/services/change-streamer/backfill-state.d.ts +0 -50
  200. package/out/zero-cache/src/services/change-streamer/backfill-state.d.ts.map +0 -1
  201. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.d.ts +0 -14
  202. package/out/zero-cache/src/services/change-streamer/backup-cleanup-monitor-factory.d.ts.map +0 -1
  203. package/out/zero-cache/src/services/change-streamer/backup-monitor.d.ts +0 -18
  204. package/out/zero-cache/src/services/change-streamer/backup-monitor.d.ts.map +0 -1
  205. package/out/zero-cache/src/services/change-streamer/broadcast.d.ts +0 -98
  206. package/out/zero-cache/src/services/change-streamer/broadcast.d.ts.map +0 -1
  207. package/out/zero-cache/src/services/change-streamer/change-log-codec.d.ts +0 -34
  208. package/out/zero-cache/src/services/change-streamer/change-log-codec.d.ts.map +0 -1
  209. package/out/zero-cache/src/services/change-streamer/change-log-compare-digest.d.ts +0 -34
  210. package/out/zero-cache/src/services/change-streamer/change-log-compare-digest.d.ts.map +0 -1
  211. package/out/zero-cache/src/services/change-streamer/change-log-initializer.d.ts +0 -158
  212. package/out/zero-cache/src/services/change-streamer/change-log-initializer.d.ts.map +0 -1
  213. package/out/zero-cache/src/services/change-streamer/change-log-transaction-hash.d.ts +0 -19
  214. package/out/zero-cache/src/services/change-streamer/change-log-transaction-hash.d.ts.map +0 -1
  215. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +0 -78
  216. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +0 -1
  217. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts +0 -143
  218. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts.map +0 -1
  219. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +0 -586
  220. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts.map +0 -1
  221. package/out/zero-cache/src/services/change-streamer/drain-tracker.d.ts +0 -24
  222. package/out/zero-cache/src/services/change-streamer/drain-tracker.d.ts.map +0 -1
  223. package/out/zero-cache/src/services/change-streamer/error-type-enum.d.ts +0 -15
  224. package/out/zero-cache/src/services/change-streamer/error-type-enum.d.ts.map +0 -1
  225. package/out/zero-cache/src/services/change-streamer/forwarder.d.ts +0 -49
  226. package/out/zero-cache/src/services/change-streamer/forwarder.d.ts.map +0 -1
  227. package/out/zero-cache/src/services/change-streamer/litestream-sync-requester.d.ts +0 -53
  228. package/out/zero-cache/src/services/change-streamer/litestream-sync-requester.d.ts.map +0 -1
  229. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.d.ts +0 -88
  230. package/out/zero-cache/src/services/change-streamer/litestream3-prometheus-poller.d.ts.map +0 -1
  231. package/out/zero-cache/src/services/change-streamer/replica-poller.d.ts +0 -15
  232. package/out/zero-cache/src/services/change-streamer/replica-poller.d.ts.map +0 -1
  233. package/out/zero-cache/src/services/change-streamer/restore-admission.d.ts +0 -243
  234. package/out/zero-cache/src/services/change-streamer/restore-admission.d.ts.map +0 -1
  235. package/out/zero-cache/src/services/change-streamer/schema/init.d.ts +0 -6
  236. package/out/zero-cache/src/services/change-streamer/schema/init.d.ts.map +0 -1
  237. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts +0 -152
  238. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts.map +0 -1
  239. package/out/zero-cache/src/services/change-streamer/shard-sampling.d.ts +0 -11
  240. package/out/zero-cache/src/services/change-streamer/shard-sampling.d.ts.map +0 -1
  241. package/out/zero-cache/src/services/change-streamer/snapshot-message.d.ts +0 -92
  242. package/out/zero-cache/src/services/change-streamer/snapshot-message.d.ts.map +0 -1
  243. package/out/zero-cache/src/services/change-streamer/snapshot-reservations.d.ts +0 -36
  244. package/out/zero-cache/src/services/change-streamer/snapshot-reservations.d.ts.map +0 -1
  245. package/out/zero-cache/src/services/change-streamer/snapshot.d.ts +0 -22
  246. package/out/zero-cache/src/services/change-streamer/snapshot.d.ts.map +0 -1
  247. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.d.ts +0 -99
  248. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-catchup.d.ts.map +0 -1
  249. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-comparator.d.ts +0 -83
  250. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-comparator.d.ts.map +0 -1
  251. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-purge-scheduler.d.ts +0 -121
  252. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-purge-scheduler.d.ts.map +0 -1
  253. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-read-router.d.ts +0 -73
  254. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-read-router.d.ts.map +0 -1
  255. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-reader.d.ts +0 -62
  256. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-reader.d.ts.map +0 -1
  257. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-writer.d.ts +0 -114
  258. package/out/zero-cache/src/services/change-streamer/sqlite-change-log-writer.d.ts.map +0 -1
  259. package/out/zero-cache/src/services/change-streamer/storer.d.ts +0 -276
  260. package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +0 -1
  261. package/out/zero-cache/src/services/change-streamer/subscribe.d.ts +0 -485
  262. package/out/zero-cache/src/services/change-streamer/subscribe.d.ts.map +0 -1
  263. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts +0 -194
  264. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts.map +0 -1
  265. package/out/zero-cache/src/services/change-streamer/upstream-acker.d.ts +0 -52
  266. package/out/zero-cache/src/services/change-streamer/upstream-acker.d.ts.map +0 -1
  267. package/out/zero-cache/src/services/limiter/sliding-window-limiter.d.ts +0 -57
  268. package/out/zero-cache/src/services/limiter/sliding-window-limiter.d.ts.map +0 -1
  269. package/out/zero-cache/src/services/litestream/commands.d.ts +0 -77
  270. package/out/zero-cache/src/services/litestream/commands.d.ts.map +0 -1
  271. package/out/zero-cache/src/services/litestream/litestream-controller.d.ts +0 -78
  272. package/out/zero-cache/src/services/litestream/litestream-controller.d.ts.map +0 -1
  273. package/out/zero-cache/src/services/litestream/metrics.d.ts +0 -31
  274. package/out/zero-cache/src/services/litestream/metrics.d.ts.map +0 -1
  275. package/out/zero-cache/src/services/litestream/restore-progress.d.ts +0 -24
  276. package/out/zero-cache/src/services/litestream/restore-progress.d.ts.map +0 -1
  277. package/out/zero-cache/src/services/mutagen/mutagen.d.ts +0 -40
  278. package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +0 -1
  279. package/out/zero-cache/src/services/mutagen/pusher.d.ts +0 -63
  280. package/out/zero-cache/src/services/mutagen/pusher.d.ts.map +0 -1
  281. package/out/zero-cache/src/services/replicator/change-log-db.d.ts +0 -368
  282. package/out/zero-cache/src/services/replicator/change-log-db.d.ts.map +0 -1
  283. package/out/zero-cache/src/services/replicator/change-log-stream-writer.d.ts +0 -56
  284. package/out/zero-cache/src/services/replicator/change-log-stream-writer.d.ts.map +0 -1
  285. package/out/zero-cache/src/services/replicator/change-processor.d.ts +0 -37
  286. package/out/zero-cache/src/services/replicator/change-processor.d.ts.map +0 -1
  287. package/out/zero-cache/src/services/replicator/drain-handler.d.ts +0 -82
  288. package/out/zero-cache/src/services/replicator/drain-handler.d.ts.map +0 -1
  289. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts +0 -25
  290. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +0 -1
  291. package/out/zero-cache/src/services/replicator/notifier.d.ts +0 -9
  292. package/out/zero-cache/src/services/replicator/notifier.d.ts.map +0 -1
  293. package/out/zero-cache/src/services/replicator/replication-status.d.ts +0 -71
  294. package/out/zero-cache/src/services/replicator/replication-status.d.ts.map +0 -1
  295. package/out/zero-cache/src/services/replicator/replicator.d.ts +0 -86
  296. package/out/zero-cache/src/services/replicator/replicator.d.ts.map +0 -1
  297. package/out/zero-cache/src/services/replicator/reporter/recorder.d.ts +0 -55
  298. package/out/zero-cache/src/services/replicator/reporter/recorder.d.ts.map +0 -1
  299. package/out/zero-cache/src/services/replicator/sqlite-change-log-observability.d.ts +0 -132
  300. package/out/zero-cache/src/services/replicator/sqlite-change-log-observability.d.ts.map +0 -1
  301. package/out/zero-cache/src/services/replicator/sqlite-change-log-purger.d.ts +0 -120
  302. package/out/zero-cache/src/services/replicator/sqlite-change-log-purger.d.ts.map +0 -1
  303. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts +0 -111
  304. package/out/zero-cache/src/services/replicator/write-worker-client.d.ts.map +0 -1
  305. package/out/zero-cache/src/services/run-ast.d.ts +0 -39
  306. package/out/zero-cache/src/services/run-ast.d.ts.map +0 -1
  307. package/out/zero-cache/src/services/runner.d.ts +0 -19
  308. package/out/zero-cache/src/services/runner.d.ts.map +0 -1
  309. package/out/zero-cache/src/services/view-syncer/active-users-gauge.d.ts +0 -17
  310. package/out/zero-cache/src/services/view-syncer/active-users-gauge.d.ts.map +0 -1
  311. package/out/zero-cache/src/services/view-syncer/advancement-metrics.d.ts +0 -26
  312. package/out/zero-cache/src/services/view-syncer/advancement-metrics.d.ts.map +0 -1
  313. package/out/zero-cache/src/services/view-syncer/batch-pacer.d.ts +0 -79
  314. package/out/zero-cache/src/services/view-syncer/batch-pacer.d.ts.map +0 -1
  315. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts +0 -97
  316. package/out/zero-cache/src/services/view-syncer/client-handler.d.ts.map +0 -1
  317. package/out/zero-cache/src/services/view-syncer/client-schema.d.ts +0 -18
  318. package/out/zero-cache/src/services/view-syncer/client-schema.d.ts.map +0 -1
  319. package/out/zero-cache/src/services/view-syncer/connection-context-manager.d.ts +0 -184
  320. package/out/zero-cache/src/services/view-syncer/connection-context-manager.d.ts.map +0 -1
  321. package/out/zero-cache/src/services/view-syncer/cvr-purger.d.ts +0 -22
  322. package/out/zero-cache/src/services/view-syncer/cvr-purger.d.ts.map +0 -1
  323. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +0 -128
  324. package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts.map +0 -1
  325. package/out/zero-cache/src/services/view-syncer/cvr.d.ts +0 -294
  326. package/out/zero-cache/src/services/view-syncer/cvr.d.ts.map +0 -1
  327. package/out/zero-cache/src/services/view-syncer/deferred-writes-budget.d.ts +0 -81
  328. package/out/zero-cache/src/services/view-syncer/deferred-writes-budget.d.ts.map +0 -1
  329. package/out/zero-cache/src/services/view-syncer/drain-coordinator.d.ts +0 -45
  330. package/out/zero-cache/src/services/view-syncer/drain-coordinator.d.ts.map +0 -1
  331. package/out/zero-cache/src/services/view-syncer/e2e-serving-lag.d.ts +0 -53
  332. package/out/zero-cache/src/services/view-syncer/e2e-serving-lag.d.ts.map +0 -1
  333. package/out/zero-cache/src/services/view-syncer/hydration-budget.d.ts +0 -33
  334. package/out/zero-cache/src/services/view-syncer/hydration-budget.d.ts.map +0 -1
  335. package/out/zero-cache/src/services/view-syncer/hydration-circuit-breaker.d.ts +0 -51
  336. package/out/zero-cache/src/services/view-syncer/hydration-circuit-breaker.d.ts.map +0 -1
  337. package/out/zero-cache/src/services/view-syncer/inspect-handler.d.ts +0 -34
  338. package/out/zero-cache/src/services/view-syncer/inspect-handler.d.ts.map +0 -1
  339. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +0 -296
  340. package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +0 -1
  341. package/out/zero-cache/src/services/view-syncer/plan-warnings.d.ts +0 -7
  342. package/out/zero-cache/src/services/view-syncer/plan-warnings.d.ts.map +0 -1
  343. package/out/zero-cache/src/services/view-syncer/push-cost.d.ts +0 -132
  344. package/out/zero-cache/src/services/view-syncer/push-cost.d.ts.map +0 -1
  345. package/out/zero-cache/src/services/view-syncer/push-cutoff.d.ts +0 -55
  346. package/out/zero-cache/src/services/view-syncer/push-cutoff.d.ts.map +0 -1
  347. package/out/zero-cache/src/services/view-syncer/query-covering.d.ts +0 -28
  348. package/out/zero-cache/src/services/view-syncer/query-covering.d.ts.map +0 -1
  349. package/out/zero-cache/src/services/view-syncer/query-shape.d.ts +0 -25
  350. package/out/zero-cache/src/services/view-syncer/query-shape.d.ts.map +0 -1
  351. package/out/zero-cache/src/services/view-syncer/query-stats.d.ts +0 -89
  352. package/out/zero-cache/src/services/view-syncer/query-stats.d.ts.map +0 -1
  353. package/out/zero-cache/src/services/view-syncer/row-record-cache.d.ts +0 -90
  354. package/out/zero-cache/src/services/view-syncer/row-record-cache.d.ts.map +0 -1
  355. package/out/zero-cache/src/services/view-syncer/row-set-signature.d.ts +0 -17
  356. package/out/zero-cache/src/services/view-syncer/row-set-signature.d.ts.map +0 -1
  357. package/out/zero-cache/src/services/view-syncer/schema/cvr.d.ts +0 -86
  358. package/out/zero-cache/src/services/view-syncer/schema/cvr.d.ts.map +0 -1
  359. package/out/zero-cache/src/services/view-syncer/schema/init.d.ts +0 -5
  360. package/out/zero-cache/src/services/view-syncer/schema/init.d.ts.map +0 -1
  361. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +0 -563
  362. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts.map +0 -1
  363. package/out/zero-cache/src/services/view-syncer/snapshot-row-cache.d.ts +0 -95
  364. package/out/zero-cache/src/services/view-syncer/snapshot-row-cache.d.ts.map +0 -1
  365. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts +0 -420
  366. package/out/zero-cache/src/services/view-syncer/snapshotter.d.ts.map +0 -1
  367. package/out/zero-cache/src/services/view-syncer/tracer.d.ts +0 -2
  368. package/out/zero-cache/src/services/view-syncer/tracer.d.ts.map +0 -1
  369. package/out/zero-cache/src/services/view-syncer/ttl-clock.d.ts +0 -10
  370. package/out/zero-cache/src/services/view-syncer/ttl-clock.d.ts.map +0 -1
  371. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +0 -133
  372. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +0 -1
  373. package/out/zero-cache/src/types/downstream.d.ts +0 -11
  374. package/out/zero-cache/src/types/downstream.d.ts.map +0 -1
  375. package/out/zero-cache/src/types/error-with-level.d.ts +0 -9
  376. package/out/zero-cache/src/types/error-with-level.d.ts.map +0 -1
  377. package/out/zero-cache/src/types/pg-patch.d.ts +0 -21
  378. package/out/zero-cache/src/types/pg-patch.d.ts.map +0 -1
  379. package/out/zero-cache/src/types/pg-versions.d.ts +0 -3
  380. package/out/zero-cache/src/types/pg-versions.d.ts.map +0 -1
  381. package/out/zero-cache/src/types/poke-chunk.d.ts +0 -18
  382. package/out/zero-cache/src/types/poke-chunk.d.ts.map +0 -1
  383. package/out/zero-cache/src/types/streams.d.ts +0 -115
  384. package/out/zero-cache/src/types/streams.d.ts.map +0 -1
  385. package/out/zero-cache/src/types/subscription.d.ts +0 -197
  386. package/out/zero-cache/src/types/subscription.d.ts.map +0 -1
  387. package/out/zero-cache/src/workers/connect-params.d.ts +0 -28
  388. package/out/zero-cache/src/workers/connect-params.d.ts.map +0 -1
  389. package/out/zero-cache/src/workers/connection.d.ts +0 -77
  390. package/out/zero-cache/src/workers/connection.d.ts.map +0 -1
  391. package/out/zero-cache/src/workers/replicator.d.ts +0 -57
  392. package/out/zero-cache/src/workers/replicator.d.ts.map +0 -1
  393. package/out/zero-cache/src/workers/syncer-ws-message-handler.d.ts +0 -14
  394. package/out/zero-cache/src/workers/syncer-ws-message-handler.d.ts.map +0 -1
  395. package/out/zero-cache/src/workers/syncer.d.ts +0 -67
  396. package/out/zero-cache/src/workers/syncer.d.ts.map +0 -1
  397. package/out/zero-events/src/index.d.ts +0 -27
  398. package/out/zero-events/src/index.d.ts.map +0 -1
  399. package/out/zero-events/src/json.d.ts +0 -20
  400. package/out/zero-events/src/json.d.ts.map +0 -1
  401. package/out/zero-events/src/status.d.ts +0 -144
  402. package/out/zero-events/src/status.d.ts.map +0 -1
  403. package/out/zqlite/src/database-storage.d.ts +0 -43
  404. package/out/zqlite/src/database-storage.d.ts.map +0 -1
  405. package/out/zqlite/src/explain-queries.d.ts +0 -4
  406. package/out/zqlite/src/explain-queries.d.ts.map +0 -1
  407. package/out/zqlite/src/internal/sql-inline.d.ts +0 -13
  408. package/out/zqlite/src/internal/sql-inline.d.ts.map +0 -1
  409. package/out/zqlite/src/resolve-scalar-subqueries.d.ts +0 -72
  410. package/out/zqlite/src/resolve-scalar-subqueries.d.ts.map +0 -1
  411. package/out/zqlite/src/sqlite-cost-model.d.ts +0 -17
  412. package/out/zqlite/src/sqlite-cost-model.d.ts.map +0 -1
  413. package/out/zqlite/src/sqlite-stat-fanout.d.ts +0 -121
  414. package/out/zqlite/src/sqlite-stat-fanout.d.ts.map +0 -1
@@ -1,62 +0,0 @@
1
- import type { LogContext } from '@rocicorp/logger';
2
- import type { WatermarkedChange } from './change-streamer.ts';
3
- export type CatchupPlan = {
4
- readonly kind: 'range';
5
- readonly minWatermark: string;
6
- readonly headWatermark: string;
7
- } | {
8
- readonly kind: 'ahead';
9
- readonly headWatermark: string;
10
- } | {
11
- readonly kind: 'too-old';
12
- readonly minWatermark: string;
13
- readonly headWatermark: string;
14
- } | {
15
- readonly kind: 'not-ready';
16
- };
17
- /**
18
- * Seeks to the final position so validating a boundary does not scan every row
19
- * of a large transaction. Exported so the focused query-plan test covers the
20
- * production subquery.
21
- */
22
- export declare const SQLITE_CHANGE_LOG_BOUNDARY_SQL = "\n SELECT\n \"precommit\" = @fromWatermark AND\n \"tag\" = 'commit' AS \"boundaryExists\"\n FROM \"_zero.changeLogStream\"\n WHERE \"watermark\" = @fromWatermark\n ORDER BY \"pos\" DESC\n LIMIT 1\n";
23
- /**
24
- * The log describes its own bounds; nothing here reads the replica.
25
- * `max("watermark")` is the head because a transaction's rows commit atomically,
26
- * so the log never ends mid-transaction.
27
- *
28
- * `min` and `max` are deliberately kept as *separate* scalar subqueries: SQLite
29
- * applies its single-aggregate index optimization only when the aggregate is
30
- * alone in its query, so `SELECT min(x), max(x) FROM t` degrades to a full scan
31
- * while two scalar subqueries are two index seeks. The query-plan test pins
32
- * this.
33
- *
34
- * Exported so that test can cover the production query.
35
- */
36
- export declare const SQLITE_CHANGE_LOG_PLAN_SQL = "\n SELECT\n (SELECT max(\"watermark\") FROM \"_zero.changeLogStream\")\n AS \"headWatermark\",\n (SELECT min(\"watermark\") FROM \"_zero.changeLogStream\")\n AS \"minWatermark\",\n coalesce((\n SELECT\n \"precommit\" = @fromWatermark AND\n \"tag\" = 'commit' AS \"boundaryExists\"\n FROM \"_zero.changeLogStream\"\n WHERE \"watermark\" = @fromWatermark\n ORDER BY \"pos\" DESC\n LIMIT 1\n), 0) AS \"boundaryExists\"\n";
37
- /** Exported so the focused query-plan test covers the production query. */
38
- export declare const SQLITE_CHANGE_LOG_READ_BATCH_SQL = "\n SELECT\n \"watermark\",\n \"pos\",\n \"tag\",\n \"change\"\n FROM \"_zero.changeLogStream\"\n WHERE (\"watermark\", \"pos\") > (?, ?)\n AND \"watermark\" <= ?\n ORDER BY \"watermark\", \"pos\"\n LIMIT ?\n";
39
- /**
40
- * Reads the change log without retaining a SQLite snapshot while a consumer
41
- * processes a batch.
42
- *
43
- * The log lives in its own database beside the replica
44
- * (`changeLogFileName(replicaFile)`), which this reader opens read-only; it
45
- * never opens the replica. The connection therefore keeps the journal mode
46
- * configured by the change-log writer. Callers pin a head with {@link plan}
47
- * before passing it to {@link read}.
48
- *
49
- * A change-streamer can start before the replicator has created the log, so the
50
- * stream table may not exist yet. Statements are prepared on first use rather
51
- * than in the constructor, and {@link plan} reports `not-ready` until they can
52
- * be; a reader constructed too early becomes usable once the writer catches up.
53
- */
54
- export declare class SQLiteChangeLogReader implements Disposable {
55
- #private;
56
- constructor(lc: LogContext, changeLogFile: string);
57
- plan(fromWatermark: string): CatchupPlan;
58
- read(fromWatermark: string, throughWatermark: string, batchSize: number, signal?: AbortSignal | undefined, maxRows?: number | undefined): AsyncIterable<readonly WatermarkedChange[]>;
59
- close(): void;
60
- [Symbol.dispose](): void;
61
- }
62
- //# sourceMappingURL=sqlite-change-log-reader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sqlite-change-log-reader.d.ts","sourceRoot":"","sources":["../../../../../../zero-cache/src/services/change-streamer/sqlite-change-log-reader.ts"],"names":[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AO,CAAC,IAAI,IAAI,CAEvB;CAqCF"}
@@ -1,114 +0,0 @@
1
- import type { LogContext } from '@rocicorp/logger';
2
- import type { Database } from '../../../../zqlite/src/db.ts';
3
- import type { ChangeStreamData } from '../change-source/protocol/current/downstream.ts';
4
- import { type ChangeLogIdentity, type ChangeLogResumePoint } from '../replicator/change-log-db.ts';
5
- import { type SQLiteChangeLogObservabilityState } from '../replicator/sqlite-change-log-observability.ts';
6
- export type SQLiteChangeLogWriterOptions = {
7
- /** The replica file the log is named after, i.e. `${replicaFile}-change-log`. */
8
- replicaFile: string;
9
- /** The replica whose contents this log belongs to. */
10
- identity: ChangeLogIdentity;
11
- /**
12
- * Called after each transaction's log commit, with the log's new head. This
13
- * is what releases the catchup barrier: after the writer moved in-process,
14
- * the head advances here rather than at a subscriber's ACK.
15
- */
16
- onCommit?: ((watermark: string) => void) | undefined;
17
- /**
18
- * Called when the writer disables itself and deletes the file. The reader is
19
- * cached on the service, so a delete that leaves it open would leave an
20
- * in-process reader serving an unlinked inode while every new open sees
21
- * nothing.
22
- */
23
- onDisabled?: (() => void) | undefined;
24
- /** Called when reconciliation replaces the file, to close cached readers. */
25
- onRebuilt?: (() => void) | undefined;
26
- /** Overridable for tests. */
27
- now?: (() => number) | undefined;
28
- /**
29
- * Percentage of transactions that retain the rollout-only per-message
30
- * timing and source-vs-stored hash validation. Defaults to 1.
31
- */
32
- shadowValidationPercent?: number | undefined;
33
- };
34
- /**
35
- * Appends the canonical change stream to the SQLite change log, from the
36
- * change-streamer's own stream loop.
37
- *
38
- * ### Ordering
39
- *
40
- * The log's commit for a transaction precedes the forward of that transaction's
41
- * `commit` message, and nothing `await`s in between. Everything that can
42
- * advance the watermark the stream would resume from — the storer's Postgres
43
- * commit, `lastWatermark`, the upstream ACK — runs strictly after it, so the
44
- * log's head is always at or above the resume point. A *hole* is therefore
45
- * unreachable at any crash timing, and a *phantom* is the normal state, which is
46
- * what makes truncate-above the whole of reconciliation.
47
- *
48
- * ### Fail-soft
49
- *
50
- * The log is a catchup cache: nothing in it is not either already durable in the
51
- * replica's litestream backup or re-derivable from the replication slot. A write
52
- * failure must therefore not stop replication for the shard. Corruption is
53
- * rebuilt once at open; any other write error — a full disk, an I/O error, a
54
- * permissions problem — logs, disables the writer, deletes the file, closes the
55
- * reader, and lets the stream continue. The cost is catchup reach, and reach is
56
- * recoverable: `too-old` sends a subscriber to a restore.
57
- *
58
- * One carve-out keeps that from hiding the bug class this topology introduces. A
59
- * missed truncate-above surfaces as `SQLITE_CONSTRAINT` on the writer's plain
60
- * `INSERT`, which is "any write error other than corruption" and would be
61
- * absorbed quietly. It is counted as an invariant failure and alerted on before
62
- * failing soft.
63
- */
64
- export declare class SQLiteChangeLogWriter {
65
- #private;
66
- constructor(lc: LogContext, opts: SQLiteChangeLogWriterOptions);
67
- /** False once the writer has failed soft, or after {@link close}. */
68
- get enabled(): boolean;
69
- /**
70
- * The writer's own connection, which is the one purge runs on (§3.3): one
71
- * process appends *and* deletes, on one handle, with no second writable
72
- * connection and no cross-process barrier. `undefined` until the stream
73
- * loop's first reconcile creates the log, and again once the writer has
74
- * failed soft and deleted the file — both of which a purge cycle treats as
75
- * "skip", not as an error.
76
- */
77
- get connection(): Database | undefined;
78
- /** Exposed for tests and for the integration assertions on the metrics. */
79
- state(): SQLiteChangeLogObservabilityState | undefined;
80
- /**
81
- * Opens the log if necessary and reconciles it with the Postgres resume
82
- * point. Returns the resume point stored in the log.
83
- *
84
- * Returns `undefined` when the writer is disabled. The caller must then use
85
- * another source.
86
- *
87
- * This runs for every connection because Postgres supplies a new resume point
88
- * after each reconnect. The log can contain transactions above that point.
89
- * Reconciliation removes them before Postgres sends them again.
90
- *
91
- * `resumeFrom` includes cookies because the cookies must match the resume
92
- * watermark.
93
- */
94
- reconcile(resumeFrom: ChangeLogResumePoint): ChangeLogResumePoint | undefined;
95
- /**
96
- * Reconciles the log without a Postgres resume point.
97
- *
98
- * A valid log uses its own head and cookies. A new or invalid log uses the
99
- * replica values returned by `seed`.
100
- */
101
- reconcileFromLog(seed: () => ChangeLogResumePoint): ChangeLogResumePoint | undefined;
102
- /**
103
- * Writes one stream message, committing at transaction boundaries. Never
104
- * throws: a write failure disables the writer instead of failing the stream.
105
- */
106
- write(change: ChangeStreamData, json: string, storedChange?: string): void;
107
- /**
108
- * Discards the open transaction, if any. Called when the change stream is
109
- * interrupted mid-transaction.
110
- */
111
- abort(): void;
112
- close(): void;
113
- }
114
- //# sourceMappingURL=sqlite-change-log-writer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sqlite-change-log-writer.d.ts","sourceRoot":"","sources":["../../../../../../zero-cache/src/services/change-streamer/sqlite-change-log-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAKjD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,8BAA8B,CAAC;AAM3D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iDAAiD,CAAC;AAKtF,OAAO,EAUL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAE1B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAML,KAAK,iCAAiC,EACvC,MAAM,kDAAkD,CAAC;AAG1D,MAAM,MAAM,4BAA4B,GAAG;IACzC,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACrD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACtC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACrC,6BAA6B;IAC7B,GAAG,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,SAAS,CAAC;IACjC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9C,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,qBAAqB;;IAYhC,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,4BAA4B,EAY7D;IAED,qEAAqE;IACrE,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;;;;OAOG;IACH,IAAI,UAAU,IAAI,QAAQ,GAAG,SAAS,CAErC;IAED,2EAA2E;IAC3E,KAAK,IAAI,iCAAiC,GAAG,SAAS,CAErD;IAED;;;;;;;;;;;;;OAaG;IACH,SAAS,CACP,UAAU,EAAE,oBAAoB,GAC/B,oBAAoB,GAAG,SAAS,CAElC;IAED;;;;;OAKG;IACH,gBAAgB,CACd,IAAI,EAAE,MAAM,oBAAoB,GAC/B,oBAAoB,GAAG,SAAS,CAElC;IA2GD;;;OAGG;IACH,KAAK,CACH,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,EACZ,YAAY,SAA8C,GACzD,IAAI,CA4FN;IAeD;;;OAGG;IACH,KAAK,IAAI,IAAI,CAYZ;IAED,KAAK,IAAI,IAAI,CAYZ;CA6BF"}
@@ -1,276 +0,0 @@
1
- import type { LogContext } from '@rocicorp/logger';
2
- import { type JSONObject } from '../../../../shared/src/bigint-json.ts';
3
- import { TransactionPool } from '../../db/transaction-pool.ts';
4
- import { type PostgresDB } from '../../types/pg.ts';
5
- import { type ShardID } from '../../types/shards.ts';
6
- import { type BackfillRequest } from '../change-source/protocol/current.ts';
7
- import { type ChangeStreamData, type Commit } from '../change-source/protocol/current/downstream.ts';
8
- import type { UpstreamStatusMessage } from '../change-source/protocol/current/status.ts';
9
- import { type CookieSet } from '../replicator/change-log-cookies.ts';
10
- import type { ReplicatorMode } from '../replicator/replicator.ts';
11
- import type { Service } from '../service.ts';
12
- import { type ChangeLogEntry, type SerializedChangeStreamData } from './change-log-codec.ts';
13
- import { type ReplicaSubscriptionState, type ChangeLogReinitialization } from './schema/tables.ts';
14
- import type { Subscriber } from './subscriber.ts';
15
- /**
16
- * Factory for creating dynamic connection pools used by the Storer to
17
- * isolate concurrent transactions into separate pg clients.
18
- */
19
- export type PostgresDBProvider = (applicationName: string, maxConns: number) => PostgresDB;
20
- export type OwnershipTakeover = {
21
- /**
22
- * The lock that prevents the previous owner from purging the change log
23
- * (from which this change-streamer's replica was restored), released once
24
- * ownership is assumed.
25
- */
26
- purgeLock: PurgeLock | null;
27
- /**
28
- * Requests a restart of the change stream (at a transaction boundary),
29
- * which is used to start pending backfills once ownership is assumed.
30
- */
31
- requestRestart: (reason: string) => void;
32
- /**
33
- * Whether to throw an AutoResetSignal if the change db requires a reset.
34
- */
35
- autoReset: boolean;
36
- /**
37
- * Whether the change log was behind the replication slot, in which case it
38
- * is re-initialized from the replica (see `reinitializeFromReplica()`), and
39
- * can thus be reset for a replica at any watermark.
40
- */
41
- pgChangeLogBehindSlot: boolean;
42
- };
43
- export type TuningOptions = {
44
- backPressureLimitHeapProportion: number;
45
- statementTimeoutMs: number;
46
- changeLogBatchSize: number;
47
- drainTimeoutMs?: number | undefined;
48
- };
49
- /**
50
- * Handles the storage of changes and the catchup of subscribers
51
- * that are behind.
52
- *
53
- * In the context of catchup and cleanup, it is the responsibility of the
54
- * Storer to decide whether a client can be caught up, or whether the
55
- * changes needed to catch a client up have been purged.
56
- *
57
- * **Maintained invariant**: The Change DB is only empty for a
58
- * completely new replica (i.e. initial-sync with no changes from the
59
- * replication stream).
60
- * * In this case, all new subscribers are expected start from the
61
- * `replicaVersion`, which is the version at which initial sync
62
- * was performed, and any attempts to catchup from a different
63
- * point fail.
64
- *
65
- * Conversely, if non-initial changes have flowed through the system
66
- * (i.e. via the replication stream), the ChangeDB must *not* be empty,
67
- * and the earliest change in the `changeLog` represents the earliest
68
- * "commit" from (after) which a subscriber can be caught up.
69
- * * Any attempts to catchup from an earlier point must fail with
70
- * a `WatermarkTooOld` error.
71
- * * Failure to do so could result in streaming changes to the
72
- * subscriber such that there is a gap in its replication history.
73
- *
74
- * Note: Subscribers (i.e. `incremental-syncer`) consider an "error" signal
75
- * an unrecoverable error and shut down in response. This allows the
76
- * production system to replace it with a new task and fresh copy of the
77
- * replica backup.
78
- */
79
- export declare class Storer implements Service {
80
- #private;
81
- readonly id = "storer";
82
- constructor(lc: LogContext, shard: ShardID, taskID: string, discoveryAddress: string, discoveryProtocol: string, dbProvider: PostgresDBProvider, subscriptionState: ReplicaSubscriptionState, onCommitted: (c: Commit | UpstreamStatusMessage) => void, onFatal: (err: Error) => void, { backPressureLimitHeapProportion, statementTimeoutMs, changeLogBatchSize, drainTimeoutMs, }: TuningOptions);
83
- /**
84
- * Re-initializes a change log that is no longer maintained from the
85
- * replica's state, taking ownership of it in the process (which is then
86
- * assumed again at its new head, see {@link assumeOwnershipAtHead}).
87
- * See {@link reinitializeChangeLog}.
88
- */
89
- reinitializeFromReplica(params: Omit<ChangeLogReinitialization, 'owner' | 'ownerAddress'>): Promise<'reinitialized' | 'maintained'>;
90
- /**
91
- * Prepares to assume ownership of the change log at its head, while it may
92
- * still be owned and maintained by another change-streamer. This allows the
93
- * previous owner to continue to serve subscribers while this change-source's
94
- * upstream decodes the WAL to catch up to the head of the change log, which
95
- * may be many minutes worth of transactions for large DBs.
96
- *
97
- * Once the change stream is started from the head of the change log:
98
- *
99
- * * Transactions that the change log already contains (i.e. stored by the
100
- * previous owner) are not stored again, but are otherwise processed
101
- * normally (e.g. for upstream acks, since they have been stored).
102
- * * Ownership is assumed in the transaction that stores the first
103
- * transaction past the head of the change log. The previous owner's
104
- * (subsequent) transactions fail its ownership check, which makes this
105
- * transaction the one immediately after the previous owner's last one.
106
- * * Ownership is also assumed upon a {@link status} at or past the head of
107
- * the change log (outside of a transaction), which covers an idle
108
- * upstream: all transactions up to the status position have been
109
- * received, and any past the head would have been stored.
110
- *
111
- * Subscribers are caught up from the change log as usual, as the stream
112
- * (which is forwarded to them) starts from its head.
113
- *
114
- * Backfill transactions are synthesized by each change-streamer's change
115
- * source, and thus never correspond to those stored by the previous owner.
116
- * Until ownership is assumed, they are not stored, and no backfills are
117
- * requested from the change log (see
118
- * {@link getStartStreamInitializationParameters}). Once ownership is
119
- * assumed, a restart of the change stream is requested if the change log has
120
- * pending backfills or if a backfill transaction was skipped.
121
- */
122
- assumeOwnershipAtHead(takeover: OwnershipTakeover): Promise<void>;
123
- /**
124
- * Whether ownership of the change log is pending, i.e. after
125
- * {@link assumeOwnershipAtHead} and before ownership is assumed.
126
- */
127
- get ownershipPending(): boolean;
128
- /**
129
- * Relays a status message received outside of a transaction, which is
130
- * used to assume ownership of the change log on an idle upstream. A no-op
131
- * unless ownership is pending.
132
- */
133
- status(watermark: string): void;
134
- /**
135
- * Assumes ownership of the change log immediately, regardless of its head.
136
- * This is used for in tests.
137
- *
138
- * A production change-streamer instead takes over the change log at its head
139
- * (see {@link assumeOwnershipAtHead}).
140
- */
141
- assumeOwnership(): Promise<void>;
142
- /**
143
- * The whole of what a stream connection starts from: where to resume, what to
144
- * ask the change source to backfill, and the raw cookie set those requests
145
- * were derived from.
146
- *
147
- * All four statements run in one REPEATABLE READ transaction, so they see one
148
- * snapshot. That is invariant 15 — the resume watermark and the cookies must
149
- * come from the same store, read at the same position — and it is why the
150
- * cookies are read here rather than by a second call: a cookie set paired
151
- * with a watermark it was not folded to loses every backfill that completed
152
- * in the interval, and those rows are not replayable from the slot.
153
- *
154
- * `cookies` is not `backfillRequests` in another shape. The request list is
155
- * driven off `backfilling`, so it drops the metadata of every table with no
156
- * in-flight backfill — correct for starting a stream, lossy as the cookie
157
- * snapshot that the SQLite change log continues folding onto.
158
- */
159
- getStartStreamInitializationParameters(): Promise<{
160
- lastWatermark: string;
161
- backfillRequests: BackfillRequest[];
162
- cookies: CookieSet;
163
- }>;
164
- getMinWatermarkForCatchup(): Promise<string | null>;
165
- /**
166
- * Returns the retained Postgres catchup bounds.
167
- * `minWatermark` is the oldest transaction, or `null` for a new replica.
168
- * `lastWatermark` is the durable head.
169
- */
170
- getCatchupBounds(): Promise<{
171
- minWatermark: string | null;
172
- lastWatermark: string;
173
- }>;
174
- /**
175
- * Lists at most `limit` committed transaction watermarks in
176
- * `(afterWatermark, throughWatermark]`, in ascending order.
177
- */
178
- listCommitWatermarks(afterWatermark: string, throughWatermark: string, limit: number): Promise<string[]>;
179
- /**
180
- * Reads `(afterWatermark, throughWatermark]` in stream order and bounded batches.
181
- * This query matches the subscriber catchup query.
182
- *
183
- * Both queries fail when an escaped NUL reaches `change->'tag'`.
184
- * Postgres cannot convert that value to text.
185
- */
186
- readCatchupRange(afterWatermark: string, throughWatermark: string, batchRows?: number): AsyncIterable<ChangeLogEntry[]>;
187
- purgeRecordsBefore(watermark: string): Promise<number>;
188
- /**
189
- * @returns The JSON stringified stream message to be sent downstream.
190
- */
191
- store(watermark: string, data: ChangeStreamData, serialized?: SerializedChangeStreamData): string;
192
- abort(): void;
193
- catchup(subscriber: Subscriber, mode: ReplicatorMode): void;
194
- readyForMore(): Promise<void> | undefined;
195
- /**
196
- * Runs the storer loop until {@link stop()} is called, or an error is thrown.
197
- * Once {@link run()} completes, it can be called again.
198
- */
199
- run(): Promise<void>;
200
- /**
201
- * Waits until all currently queued entries have been processed.
202
- * This is only used in tests.
203
- */
204
- allProcessed(): Promise<void>;
205
- /**
206
- * Stops the storer and waits up to a drain timeout for entries to drain,
207
- * throwing an exception if it doesn't drain in time, in order to abort
208
- * the server when PG (or the connection to it) appears to be wedged.
209
- */
210
- stop(): Promise<void>;
211
- }
212
- export declare class PurgeLock {
213
- #private;
214
- readonly replicaVersion: string;
215
- readonly minWatermark: string;
216
- /**
217
- * The head of the change log (i.e. its `lastWatermark`) when the lock was
218
- * acquired. The change log is resumed from its head, which only advances,
219
- * so a stream cannot (correctly) be started from before it.
220
- */
221
- readonly headWatermark: string;
222
- constructor(lc: LogContext, tx: TransactionPool, replicaVersion: string, watermark: string, headWatermark: string);
223
- release(): Promise<void>;
224
- }
225
- export declare class PurgeLocker {
226
- #private;
227
- constructor(lc: LogContext, shard: ShardID, db: PostgresDB);
228
- /**
229
- * Locks the oldest row of the change log, preventing it from being purged.
230
- *
231
- * @param slotWatermark The position of the replication slot from which the
232
- * change log is to be resumed (as a watermark). If specified and the
233
- * head of the change log is behind it, the change log may be missing
234
- * transactions that the slot will not stream, in which case nothing is
235
- * locked and `'behind-slot'` is returned. Conversely, a head at or past
236
- * the slot's position means that the stream (which resumes from the
237
- * head) will not skip anything.
238
- * @returns `null` if the change log is empty.
239
- */
240
- acquire(): Promise<PurgeLock | null>;
241
- acquire(slotWatermark?: string | undefined): Promise<PurgeLock | null | 'behind-slot'>;
242
- }
243
- type TaskKey = JSONObject;
244
- type TaskDoneFn = () => void;
245
- /**
246
- * Periodic monitor for detecting the pathological condition in which a db
247
- * query hangs forever because of a connection problem, such as a half-closed
248
- * socket.
249
- *
250
- * Use this for db calls that recur or accumulate progress within a single
251
- * logical operation on the main storer loop (e.g. the queue-processing loop,
252
- * or a multi-batch catchup read), where "no progress for N ms" is the
253
- * meaningful signal. For a one-off db call -- including ones made before
254
- * {@link Storer.run} starts this monitor's polling -- use a plain timeout
255
- * (see `Storer.#withTimeout`) instead.
256
- *
257
- * The failure handler should stop the server. The ProgressMonitor will
258
- * assume this and stop itself after calling it.
259
- *
260
- * Internal to the Storer, but exported for testing.
261
- */
262
- export declare class ProgressMonitor {
263
- #private;
264
- constructor(lc: LogContext, failureThresholdMs: number, onFailure: (err: Error) => void);
265
- start(): void;
266
- checkTaskProgress(now: Date): void;
267
- /**
268
- * Starts a task to be tracked.
269
- *
270
- * @return a callback to invoke when the task is done.
271
- */
272
- trackTask(task: TaskKey, now?: Date): TaskDoneFn;
273
- stop(): void;
274
- }
275
- export {};
276
- //# sourceMappingURL=storer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storer.d.ts","sourceRoot":"","sources":["../../../../../../zero-cache/src/services/change-streamer/storer.ts"],"names":[],"mappings":"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