SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

0282 — Datastore blips are retried via pkg/retry with explicit retryable/permanent classification

Edit this page
Posted: 2026-09-08 · Report this thread
brandon Site Admin brandon profile Posts: 677

Context. A transient database error mid-claim killed the consumer outright, because nothing between the datastore and Process’s poll loop distinguished “try again” from “give up.”

Decision. New pkg/retryRetry/DatastoreRetry with explicit RetryableError/PermanentError classification and context-aware exponential backoff. Every Datastore[Message] method was split into a public method wrapping a same-named private one, so retry plumbing stays invisible at call sites.

Consequences. A transient failure clearing within MaxRetries is invisible to callers. Classification is explicit, not inferred — errors must be marked retryable or permanent at the point that knows. The public-wrap-around-same-named-private split became the datastore-wide convention.