Skip to content

feat(engine): add triggered_at to durable event log and and write to it - #4698

Merged
mrkaye97 merged 3 commits into
mainfrom
mk/durable-triggered-at-column
Aug 17, 2026
Merged

feat(engine): add triggered_at to durable event log and and write to it#4698
mrkaye97 merged 3 commits into
mainfrom
mk/durable-triggered-at-column

Conversation

@mrkaye97

Copy link
Copy Markdown
Contributor

Description

Adds a new triggered_at column to the durable event log (for run / wait entries) which basically lets this work as an outbox, where the trigger logic can stamp it with a timestamp on the (future) second tx

Will follow this up in a second PR which splits up the writes into two txns

Type of change

  • New feature (non-breaking change which adds functionality)

What's Changed

  • Add a list of tasks or features here...

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted
  • Documented (where applicable)
  • Added to CHANGELOG (where applicable) -- see Keep a Changelog

🤖 AI Disclosure

No AI

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview Aug 14, 2026 5:42pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The load-online-migrate job failed on this PR. This check is non-mandatory and does not block merging, but may be worth investigating. View logs

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

goos: linux
goarch: amd64
pkg: github.com/hatchet-dev/hatchet/pkg/scheduling/v1
cpu: AMD Ryzen 9 7950X3D 16-Core Processor          
                                                                    │ /tmp/old.txt  │            /tmp/new.txt             │
                                                                    │    sec/op     │    sec/op     vs base               │
BatchSchedulerWorstCaseMemory-8                                         1.770 ±  1%    2.069 ±  6%  +16.93% (p=0.002 n=6)
RateLimiter-8                                                          64.48µ ± 13%   72.99µ ± 18%  +13.19% (p=0.004 n=6)
Scheduler_ConcurrentAssignReplenishSnapshot-8                          445.1µ ±  2%   400.5µ ±  5%  -10.04% (p=0.002 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8           6.925m ±  3%   7.568m ±  4%   +9.29% (p=0.002 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8           7.902m ±  4%   8.777m ±  4%  +11.08% (p=0.002 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8           16.91m ±  7%   18.86m ±  4%  +11.51% (p=0.002 n=6)
Scheduler_InventoryShape_ReplenishMust/small_dense-8                   61.04µ ±  3%   68.46µ ± 10%  +12.17% (p=0.002 n=6)
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8      11.06m ±  8%   11.51m ±  8%        ~ (p=0.485 n=6)
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8      2.028m ±  7%   2.132m ±  4%   +5.16% (p=0.041 n=6)
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8             549.4µ ±  3%   623.4µ ±  5%  +13.48% (p=0.002 n=6)
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                2.877m ±  6%   3.187m ±  8%  +10.77% (p=0.004 n=6)
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                 13.53µ ± 10%   13.02µ ± 10%        ~ (p=0.699 n=6)
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8    4.272m ± 10%   4.222m ± 11%        ~ (p=0.699 n=6)
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8    65.05µ ± 10%   63.33µ ±  5%        ~ (p=0.589 n=6)
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8           73.77µ ±  8%   75.79µ ±  3%        ~ (p=0.394 n=6)
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8              1.154m ± 11%   1.127m ±  5%        ~ (p=0.699 n=6)
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                  68.34µ ±  6%   42.97µ ± 52%  -37.13% (p=0.002 n=6)
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8    197.63µ ±  6%   63.01µ ±  6%  -68.12% (p=0.002 n=6)
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8    163.07µ ±  7%   61.75µ ±  4%  -62.13% (p=0.002 n=6)
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8            34.49µ ±  3%   24.14µ ±  4%  -30.02% (p=0.002 n=6)
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8               71.81µ ±  5%   41.29µ ± 34%  -42.50% (p=0.002 n=6)
Scheduler_Replenish_DenseSharedActions-8                               6.403m ± 16%   6.752m ±  7%        ~ (p=0.240 n=6)
geomean                                                                734.8µ         653.0µ        -11.14%

                                │ /tmp/old.txt │         /tmp/new.txt          │
                                │  bytes/item  │ bytes/item  vs base           │
BatchSchedulerWorstCaseMemory-8     70.17 ± 0%   70.17 ± 0%  ~ (p=1.000 n=6) ¹
¹ all samples are equal

                                │ /tmp/old.txt  │           /tmp/new.txt           │
                                │ worst_case_MB │ worst_case_MB  vs base           │
BatchSchedulerWorstCaseMemory-8     1.403k ± 0%     1.403k ± 0%  ~ (p=1.000 n=6) ¹
¹ all samples are equal

                                │   /tmp/old.txt   │           /tmp/new.txt            │
                                │ worst_case_bytes │ worst_case_bytes  vs base         │
BatchSchedulerWorstCaseMemory-8        1.403G ± 0%        1.403G ± 0%  ~ (p=0.619 n=6)

                                                                    │ /tmp/old.txt │             /tmp/new.txt             │
                                                                    │     B/op     │     B/op      vs base                │
BatchSchedulerWorstCaseMemory-8                                       6.400Gi ± 0%   6.400Gi ± 0%       ~ (p=0.699 n=6)
RateLimiter-8                                                         137.7Ki ± 0%   137.7Ki ± 0%       ~ (p=0.855 n=6)
Scheduler_ConcurrentAssignReplenishSnapshot-8                         255.9Ki ± 0%   258.4Ki ± 0%  +0.96% (p=0.002 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8          2.263Mi ± 0%   2.263Mi ± 0%       ~ (p=0.366 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8          2.663Mi ± 0%   2.663Mi ± 0%       ~ (p=0.589 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8          4.426Mi ± 0%   4.426Mi ± 0%       ~ (p=0.937 n=6)
Scheduler_InventoryShape_ReplenishMust/small_dense-8                  28.03Ki ± 0%   28.03Ki ± 0%       ~ (p=0.528 n=6)
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8     3.731Mi ± 0%   3.731Mi ± 0%       ~ (p=0.937 n=6)
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8     3.132Mi ± 0%   3.132Mi ± 0%       ~ (p=0.286 n=6)
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8            665.1Ki ± 0%   665.1Ki ± 0%       ~ (p=0.076 n=6)
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8               1.872Mi ± 0%   1.872Mi ± 0%       ~ (p=0.870 n=6)
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                  168.0 ± 0%     168.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8     168.0 ± 0%     168.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8     168.0 ± 0%     168.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8            168.0 ± 0%     168.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8               168.0 ± 0%     168.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                 39.31Ki ± 0%   39.31Ki ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8    151.6Ki ± 0%   151.6Ki ± 0%       ~ (p=0.076 n=6)
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8    119.6Ki ± 0%   119.6Ki ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8           13.72Ki ± 0%   13.72Ki ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8              40.61Ki ± 0%   40.61Ki ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_Replenish_DenseSharedActions-8                              2.166Mi ± 0%   2.166Mi ± 0%  +0.00% (p=0.026 n=6)
geomean                                                               105.3Ki        105.3Ki       +0.04%
¹ all samples are equal

                                                                    │ /tmp/old.txt │            /tmp/new.txt             │
                                                                    │  allocs/op   │  allocs/op   vs base                │
BatchSchedulerWorstCaseMemory-8                                        3.717k ± 0%   3.717k ± 0%       ~ (p=0.615 n=6)
RateLimiter-8                                                          1.022k ± 0%   1.022k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_ConcurrentAssignReplenishSnapshot-8                          1.061k ± 0%   1.058k ± 1%       ~ (p=0.080 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8           6.684k ± 0%   6.684k ± 0%       ~ (p=0.545 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8           13.58k ± 0%   13.58k ± 0%       ~ (p=1.000 n=6)
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8           41.70k ± 0%   41.70k ± 0%       ~ (p=1.000 n=6)
Scheduler_InventoryShape_ReplenishMust/small_dense-8                    333.0 ± 0%    333.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8      13.51k ± 0%   13.51k ± 0%       ~ (p=1.000 n=6)
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8      56.57k ± 0%   56.57k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8             6.196k ± 0%   6.196k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                15.21k ± 0%   15.21k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                  4.000 ± 0%    4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8     4.000 ± 0%    4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8     4.000 ± 0%    4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8            4.000 ± 0%    4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8               4.000 ± 0%    4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                   382.0 ± 0%    382.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8      430.0 ± 0%    430.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8      430.0 ± 0%    430.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8             277.0 ± 0%    277.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8                430.0 ± 0%    430.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_Replenish_DenseSharedActions-8                               4.891k ± 0%   4.892k ± 0%       ~ (p=0.545 n=6)
geomean                                                                 604.3         604.3       -0.01%
¹ all samples are equal

                                                                    │ /tmp/old.txt │            /tmp/new.txt             │
                                                                    │ action_rows  │ action_rows  vs base                │
Scheduler_ConcurrentAssignReplenishSnapshot-8                          10.00k ± 0%   10.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8           50.00k ± 0%   50.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8           50.00k ± 0%   50.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8           50.00k ± 0%   50.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/small_dense-8                    200.0 ± 0%    200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8      86.20k ± 0%   86.20k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8      1.200k ± 0%   1.200k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8             1.000k ± 0%   1.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                20.00k ± 0%   20.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                  200.0 ± 0%    200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8    86.20k ± 0%   86.20k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8    1.200k ± 0%   1.200k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8           1.000k ± 0%   1.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8              20.00k ± 0%   20.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                   200.0 ± 0%    200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8     86.20k ± 0%   86.20k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8     1.200k ± 0%   1.200k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8            1.000k ± 0%   1.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8               20.00k ± 0%   20.00k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                                5.421k        5.421k       +0.00%
¹ all samples are equal

                                                                    │ /tmp/old.txt │            /tmp/new.txt             │
                                                                    │   actions    │   actions    vs base                │
Scheduler_ConcurrentAssignReplenishSnapshot-8                           200.0 ± 0%    200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8            500.0 ± 0%    500.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8            500.0 ± 0%    500.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8            500.0 ± 0%    500.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/small_dense-8                    20.00 ± 0%    20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8      1.724k ± 0%   1.724k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8       30.00 ± 0%    30.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8             2.000k ± 0%   2.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                2.000k ± 0%   2.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                  20.00 ± 0%    20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8    1.724k ± 0%   1.724k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8     30.00 ± 0%    30.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8           2.000k ± 0%   2.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8              2.000k ± 0%   2.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                   20.00 ± 0%    20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8     1.724k ± 0%   1.724k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8      30.00 ± 0%    30.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8            2.000k ± 0%   2.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8               2.000k ± 0%   2.000k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                                 346.2         346.2       +0.00%
¹ all samples are equal

                                                                   │ /tmp/old.txt │            /tmp/new.txt            │
                                                                   │  batch_size  │ batch_size  vs base                │
Scheduler_ConcurrentAssignReplenishSnapshot-8                          64.00 ± 0%   64.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                  64.00 ± 0%   64.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8     64.00 ± 0%   64.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8     64.00 ± 0%   64.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8            64.00 ± 0%   64.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8               64.00 ± 0%   64.00 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                                64.00        64.00       +0.00%
¹ all samples are equal

                                                                    │ /tmp/old.txt │            /tmp/new.txt            │
                                                                    │  slot_types  │ slot_types  vs base                │
Scheduler_ConcurrentAssignReplenishSnapshot-8                           1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8            1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8            4.000 ± 0%   4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8            16.00 ± 0%   16.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/small_dense-8                    1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8       1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8       1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8              1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                 1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                  1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8     1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8     1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8            1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8               1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                   1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8      1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8      1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8             1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8                1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                                 1.245        1.245       +0.00%
¹ all samples are equal

                                                                    │   /tmp/old.txt   │               /tmp/new.txt               │
                                                                    │ slots_per_worker │ slots_per_worker  vs base                │
Scheduler_ConcurrentAssignReplenishSnapshot-8                               20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8                20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8                20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8                20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/small_dense-8                        4.000 ± 0%         4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8           20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8          1.400k ± 0%        1.400k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8                  20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                     20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                      4.000 ± 0%         4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8         20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8        1.400k ± 0%        1.400k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8                20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8                   20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                       4.000 ± 0%         4.000 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8          20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8         1.400k ± 0%        1.400k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8                 20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8                    20.00 ± 0%         20.00 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                                     30.34              30.34       +0.00%
¹ all samples are equal

                                                                    │ /tmp/old.txt │             /tmp/new.txt             │
                                                                    │ unique_slots │ unique_slots  vs base                │
Scheduler_ConcurrentAssignReplenishSnapshot-8                          1.000k ± 0%    1.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8           2.000k ± 0%    2.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8           8.000k ± 0%    8.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8           32.00k ± 0%    32.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/small_dense-8                    40.00 ± 0%     40.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8      1.000k ± 0%    1.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8      56.00k ± 0%    56.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8             4.000k ± 0%    4.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                4.000k ± 0%    4.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                  40.00 ± 0%     40.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8    1.000k ± 0%    1.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8    56.00k ± 0%    56.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8           4.000k ± 0%    4.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8              4.000k ± 0%    4.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                   40.00 ± 0%     40.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8     1.000k ± 0%    1.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8     56.00k ± 0%    56.00k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8            4.000k ± 0%    4.000k ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8               4.000k ± 0%    4.000k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                                2.444k         2.444k       +0.00%
¹ all samples are equal

                                                                    │ /tmp/old.txt │            /tmp/new.txt            │
                                                                    │   workers    │  workers    vs base                │
Scheduler_ConcurrentAssignReplenishSnapshot-8                           50.00 ± 0%   50.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_01-8            100.0 ± 0%   100.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_04-8            100.0 ± 0%   100.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_SlotTypeCardinality/slot_types_16-8            100.0 ± 0%   100.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/small_dense-8                    10.00 ± 0%   10.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_action_fanout-8       50.00 ± 0%   50.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/dense_high_slot_capacity-8       40.00 ± 0%   40.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/sparse_low_fanout-8              200.0 ± 0%   200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ReplenishMust/partitioned_20-8                 200.0 ± 0%   200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/small_dense-8                  10.00 ± 0%   10.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_action_fanout-8     50.00 ± 0%   50.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/dense_high_slot_capacity-8     40.00 ± 0%   40.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/sparse_low_fanout-8            200.0 ± 0%   200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_ActiveCountScan/partitioned_20-8               200.0 ± 0%   200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/small_dense-8                   10.00 ± 0%   10.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_action_fanout-8      50.00 ± 0%   50.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/dense_high_slot_capacity-8      40.00 ± 0%   40.00 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/sparse_low_fanout-8             200.0 ± 0%   200.0 ± 0%       ~ (p=1.000 n=6) ¹
Scheduler_InventoryShape_TryAssignBatch/partitioned_20-8                200.0 ± 0%   200.0 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                                 64.71        64.71       +0.00%
¹ all samples are equal

Compared against main (ca5bb59)

@mrkaye97
mrkaye97 marked this pull request as ready for review August 14, 2026 16:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a triggered_at timestamp to the v1 durable event log entries so the log can act as an outbox, recording when the trigger-side effects have committed, and stamps the field on insert in the current single-transaction write path.

Changes:

  • Added triggered_at TIMESTAMPTZ to v1_durable_event_log_entry (schema + migration).
  • Updated sqlc models/query outputs to include the new field.
  • Updated durable event log bulk insert to write triggered_at at insert time (NOW()).

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sql/schema/v1-core.sql Adds triggered_at column to the durable event log entry table (with explanatory comment).
pkg/repository/sqlcv1/models.go Extends V1DurableEventLogEntry model with TriggeredAt.
pkg/repository/sqlcv1/durable_event_log.sql.go Regenerated sqlc output to select/scan triggered_at across relevant queries and return types.
pkg/repository/sqlcv1/durable_event_log.sql Updates bulk insert to include and stamp triggered_at.
cmd/hatchet-migrate/migrate/migrations/20260814121436_v1_0_141.sql Adds goose migration to add/drop the new column.
Files not reviewed (2)
  • pkg/repository/sqlcv1/durable_event_log.sql.go: Generated file
  • pkg/repository/sqlcv1/models.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sql/schema/v1-core.sql
@mrkaye97
mrkaye97 merged commit 01aa5d5 into main Aug 17, 2026
61 checks passed
@mrkaye97
mrkaye97 deleted the mk/durable-triggered-at-column branch August 17, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine Related to the core Hatchet engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants