Skip to content

wip: durable execution, new schema#2914

Draft
abelanger5 wants to merge 6 commits intomainfrom
belanger/durable-event-log-refactor
Draft

wip: durable execution, new schema#2914
abelanger5 wants to merge 6 commits intomainfrom
belanger/durable-event-log-refactor

Conversation

@abelanger5
Copy link
Contributor

Description

(currently a WIP)

Type of change

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

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Feb 4, 2026 7:45pm

Request Review

-- TODO: we can add CHECK CONSTRAINT for event types that require data_hash to be non-null.
data_hash BYTEA,
-- Can discuss: adds some flexibility for future hash algorithms
data_hash_alg TEXT,
Copy link
Member

Choose a reason for hiding this comment

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

Can this be an enum instead of TEXT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I think this is something we need to discuss - I'm not convinced that this hashing approach is the correct one to detect non-determinism, it's purely an idea right now. I agree that if we decide to take this approach we should use an enum

-- Important: writers to v1_durable_event_log_entry should lock this row to increment the sequence value.
CREATE TABLE v1_durable_event_log_file (
-- The id and inserted_at of the durable task which created this entry
durable_task_id BIGINT NOT NULL,
Copy link
Member

Choose a reason for hiding this comment

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

Are we thinking of having a separate v1_durable_task table given the naming used here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, this was just to make it more clear that this is the durable task and doesn't refer to any child tasks which may have been triggered in the event history

DURABLE_TASK_TRIGGER_KIND_MEMO = 3;
}

message DurableTaskRequestTrigger {
Copy link
Contributor

Choose a reason for hiding this comment

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

is the idea here that triggering children out of a durable task will be entirely separate from the normal trigger path?

optional DurableEventListenerConditions wait_for_conditions = 5;
}

message DurableTaskResponseTriggerAck {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this name is a little confusing 😅 maybe I'm just not following, but I don't really get what it's supposed to represent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants