Index

public.suotar_circuit_breakers

Description

The last state each worker process’s in-memory circuit breakers reported, so the dashboard in another process can show them. Written by the worker, never read back by it, and overwritten in place, so there is no deleted_at.

Columns

Name Type Default Nullable Children Parents Comment
consecutive_failures integer false Failed iterations in a row that counted against the breaker; it opens at five.
created_at timestamp with time zone now() false Timestamp when the record was created.
open_until timestamp with time zone true When the cooldown of an open breaker ends, after which one probe request may go out. NULL for a breaker that has not opened since its last success.
process_name varchar(64) false The worker process the breaker belongs to, as in credit_registration_phase_state.process_name: each process keeps its own.
target suotar_circuit_breaker_target false Which phases the breaker pauses.
trip_count integer false How many times in a row the breaker has opened without a success between; the cooldown grows with it.
updated_at timestamp with time zone now() false Timestamp when the record was last updated, which is when the worker last reported this state. The field is updated automatically by the set_timestamp trigger.

Constraints

Name Type Definition
suotar_circuit_breakers_consecutive_failures_not_null n NOT NULL consecutive_failures
suotar_circuit_breakers_created_at_not_null n NOT NULL created_at
suotar_circuit_breakers_pkey PRIMARY KEY PRIMARY KEY (process_name, target)
suotar_circuit_breakers_process_name_not_null n NOT NULL process_name
suotar_circuit_breakers_target_not_null n NOT NULL target
suotar_circuit_breakers_trip_count_not_null n NOT NULL trip_count
suotar_circuit_breakers_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
suotar_circuit_breakers_pkey CREATE UNIQUE INDEX suotar_circuit_breakers_pkey ON public.suotar_circuit_breakers USING btree (process_name, target)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.suotar_circuit_breakers FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls