Dotta and Claude Fable 5.2
5b698b68cf
perf(run-events): append a native event in one transaction of two statements ( #21131 )
...
One appended native run event cost eight statements on the database
connection (BEGIN, SAVEPOINT, run lock, replay probe, sequence update,
insert, count/max read, COMMIT). The query builder built five of them
again for every event, and each event created two transaction objects.
A native source event now takes the run lock and then runs one statement
that finds a replayed event or reserves the sequence and inserts, and
reads the retained count and maximum for the acknowledgement. The lock
stays a statement of its own so the append reads a snapshot taken after
the lock was granted. The control-plane port passes its controller check
to the append instead of opening an outer transaction, so there is no
SAVEPOINT. The hot statements are fixed SQL text.
Events that wake a queue still register the wake before the write and
only when the event is new. Order, sequence numbers and durability do
not change: every event still commits before its append returns.
Local benchmark (server/scripts/benchmark-run-event-append.ts), one
native event: 8.3 -> 4.6 statements, 589 -> 222 KB allocated,
1.09 -> 0.53 ms CPU, 28 -> 11.5 garbage collections per 1,000 events.
One ordinary event: 105 -> 27 KB allocated.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com >
2026-11-12 09:58:31 -06:00
..
2026-11-11 15:40:44 -06:00
2026-09-09 09:14:25 -05:00
2026-11-03 10:13:03 -06:00
2026-11-12 01:27:54 -06:00
2026-10-19 17:45:26 -07:00
2026-10-14 20:45:29 -07:00
2026-06-02 17:13:29 -07:00
2026-11-04 08:32:31 -06:00
2026-11-11 09:57:59 -06:00
2026-11-11 22:49:23 -06:00
2026-05-09 18:22:17 -05:00
2026-10-12 23:54:01 -05:00
2026-11-10 13:07:59 -06:00
2026-11-10 12:17:50 -06:00
2026-10-07 13:01:22 -07:00
2026-09-22 16:56:00 -07:00
2026-10-07 10:37:55 -07:00
2026-10-26 16:32:13 -07:00
2026-11-11 16:28:02 -08:00
2026-10-19 16:58:17 -05:00
2026-10-29 11:17:17 -05:00
2026-11-06 17:31:04 -06:00
2026-10-22 18:17:34 -05:00
2026-09-29 08:25:56 -05:00
2026-11-09 20:52:14 -06:00
2026-11-09 15:02:54 -08:00
2026-11-06 11:01:25 -06:00
2026-11-10 13:07:59 -06:00
2026-09-19 08:30:14 -05:00
2026-11-10 13:07:59 -06:00
2026-09-14 10:19:54 -05:00
2026-08-11 08:47:32 -07:00
2026-10-27 11:22:25 -05:00
2026-11-03 12:47:16 -06:00
2026-11-09 11:35:52 -06:00
2026-11-10 13:07:59 -06:00
2026-11-03 18:01:07 -06:00
2026-10-30 19:21:33 +00:00
2026-10-27 11:21:44 -05:00
2026-10-30 16:21:46 -05:00
2026-09-22 11:18:46 -07:00
2026-10-27 23:06:31 -05:00
2026-11-10 13:07:59 -06:00
2026-11-05 22:08:01 -06:00
2026-11-05 17:38:32 -08:00
2026-11-02 17:12:22 -06:00
2026-10-06 21:38:15 -05:00
2026-11-12 09:58:31 -06:00
2026-11-04 07:29:28 -06:00
2026-11-06 11:49:38 -06:00
2026-11-11 10:17:49 -06:00
2026-11-11 20:06:51 -06:00
2026-10-23 11:37:29 -07:00
2026-10-07 19:11:50 -05:00
2026-11-10 13:07:59 -06:00
2026-11-09 21:42:46 -08:00
2026-11-12 08:28:32 -06:00
2026-11-04 07:29:28 -06:00
2026-04-28 16:12:03 -05:00
2026-10-18 07:15:53 -05:00
2026-10-30 09:10:50 -07:00
2026-10-07 18:55:55 -07:00
2026-06-26 16:04:58 -05:00
2026-10-07 09:01:05 -05:00
2026-10-29 08:58:27 -05:00
2026-10-27 20:33:01 -05:00
2026-10-27 19:23:24 -05:00
2026-10-27 16:10:44 -05:00
2026-10-27 17:26:54 -05:00
2026-10-27 17:44:51 -05:00
2026-10-27 18:24:55 -05:00
2026-10-27 18:10:36 -05:00
2026-10-27 18:53:50 -05:00
2026-11-03 22:57:39 -06:00
2026-11-03 15:40:56 -06:00
2026-10-30 17:38:23 -05:00
2026-11-06 07:19:09 -08:00
2026-10-27 14:58:11 -05:00
2026-10-27 19:07:53 -05:00
2026-11-03 14:30:07 -06:00
2026-10-27 16:33:30 -05:00
2026-11-06 16:16:58 -06:00
2026-10-27 20:03:16 -05:00
2026-10-27 14:17:01 -05:00
2026-10-29 03:40:01 -05:00
2026-10-27 21:07:10 -05:00
2026-10-27 14:36:28 -05:00
2026-11-10 12:17:50 -06:00
2026-10-28 10:51:16 -05:00
2026-10-28 10:32:30 -05:00
2026-10-27 19:42:58 -05:00
2026-10-27 21:37:50 -05:00
2026-10-27 15:26:19 -05:00
2026-10-27 17:09:31 -05:00
2026-10-28 09:41:15 -05:00
2026-10-28 08:30:15 -05:00
2026-10-28 08:57:58 -05:00
2026-10-28 07:50:27 -05:00
2026-10-28 07:38:48 -05:00
2026-09-09 13:27:24 -05:00
2026-10-07 07:06:40 -05:00
2026-11-10 14:18:20 -06:00
2026-11-06 12:04:51 -08:00
2026-11-06 14:26:31 -06:00
2026-10-20 11:52:59 -05:00
2026-07-14 15:48:57 -05:00
2026-11-02 16:50:58 -06:00
2026-10-23 11:37:29 -07:00
2026-04-10 22:26:30 -05:00
2026-11-07 16:41:15 -06:00
2026-11-10 12:51:29 -06:00
2026-11-10 19:20:30 +00:00
2026-10-14 06:36:47 -05:00
2026-04-11 07:09:07 -05:00
2026-11-07 02:06:02 -06:00
2026-11-07 08:24:45 -06:00
2026-09-23 19:35:19 -07:00
2026-11-12 09:49:17 -06:00
2026-11-11 09:49:33 -08:00
2026-11-06 19:29:40 -06:00
2026-11-04 07:29:28 -06:00
2026-11-07 08:02:42 -06:00
2026-09-15 13:34:30 -05:00
2026-11-07 14:14:59 -06:00
2026-10-30 15:21:13 -05:00
2026-11-11 06:57:51 -08:00
2026-09-23 19:35:19 -07:00
2026-07-14 15:48:57 -05:00
2026-11-12 07:10:11 -06:00
2026-11-06 21:37:18 -06:00
2026-10-27 16:31:21 -05:00
2026-11-12 00:13:25 -06:00
2026-11-12 02:09:14 -06:00
2026-11-07 09:23:14 -06:00
2026-11-11 21:29:25 +00:00
2026-10-19 08:50:44 -05:00
2026-10-30 09:29:51 -07:00
2026-09-12 16:22:58 -05:00
2026-07-05 05:58:20 -05:00
2026-11-06 22:34:44 -06:00
2026-10-30 16:18:27 -05:00
2026-11-03 17:41:15 -06:00
2026-11-12 05:29:11 -06:00
2026-09-11 10:19:36 -05:00
2026-11-07 02:17:24 -06:00
2026-11-10 13:07:59 -06:00
2026-07-13 23:47:27 -07:00
2026-11-11 13:55:47 -06:00
2026-11-03 13:28:15 -06:00
2026-10-27 11:23:09 -05:00
2026-11-05 16:48:46 -08:00