mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-05-04 08:39:36 -05:00
Feat durable olap refactor (#3115)
* chore: lint * feat: counting and partitioning * feat: add reason field to DurableTaskEvictInvocationRequest and update eviction handling * fix: eviction durable execution race * chore: generate * refactor: simplified migration * refactor: address review * refactor: analyze parent tables in migraiton * fix: migration * fix: remove no txn * fix: one statement * fix: we do infact need no transaction * add down/up/down to the online migration test * fix: or multiple statements * fix: two migrations... * chore: rm old migraiton * chore: generate * chore: feedback * fix: idempotent migration * refactor: update assertions in durable tests and clean up imports in cache.py * revert: migraiton * chore: wrap down
This commit is contained in:
@@ -5,7 +5,8 @@ CREATE TYPE v1_readable_status_olap AS ENUM (
|
||||
'RUNNING',
|
||||
'CANCELLED',
|
||||
'FAILED',
|
||||
'COMPLETED'
|
||||
'COMPLETED',
|
||||
'EVICTED'
|
||||
);
|
||||
|
||||
-- HELPER FUNCTIONS FOR PARTITIONED TABLES --
|
||||
@@ -84,6 +85,7 @@ BEGIN
|
||||
PERFORM create_v1_partition_with_status(newTableName, 'COMPLETED');
|
||||
PERFORM create_v1_partition_with_status(newTableName, 'CANCELLED');
|
||||
PERFORM create_v1_partition_with_status(newTableName, 'FAILED');
|
||||
PERFORM create_v1_partition_with_status(newTableName, 'EVICTED');
|
||||
|
||||
-- If it's not already attached, attach the partition
|
||||
IF NOT EXISTS (SELECT 1 FROM pg_inherits WHERE inhrelid = newTableName::regclass) THEN
|
||||
@@ -335,6 +337,7 @@ CREATE TABLE v1_task_events_olap (
|
||||
worker_id UUID,
|
||||
additional__event_data TEXT,
|
||||
additional__event_message TEXT,
|
||||
durable_invocation_count INT NOT NULL DEFAULT 0,
|
||||
|
||||
PRIMARY KEY (task_id, task_inserted_at, id)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user