feat: stateful polling intervals (#2417)

* initial pass on stateful intervals

* pr review comments + add evict expired idempotency keys

* fix: goroutine leak and name vars better

* fix some cleanup logic
This commit is contained in:
abelanger5
2025-10-15 11:40:22 -04:00
committed by GitHub
parent 5b5adcb8ed
commit b16be655be
23 changed files with 1338 additions and 219 deletions
+10
View File
@@ -1756,3 +1756,13 @@ CREATE TABLE v1_idempotency_key (
);
CREATE UNIQUE INDEX v1_idempotency_key_unique_tenant_key ON v1_idempotency_key (tenant_id, key);
-- v1_operation_interval_settings represents the interval settings for a specific tenant. "Operation" means
-- any sort of tenant-specific polling-based operation on the engine, like timeouts, reassigns, etc.
CREATE TABLE v1_operation_interval_settings (
tenant_id UUID NOT NULL,
operation_id TEXT NOT NULL,
-- The interval represents a Go time.Duration, hence the nanoseconds
interval_nanoseconds BIGINT NOT NULL,
PRIMARY KEY (tenant_id, operation_id)
);