Offline ring buffer with reconnect drain¶
Keeps the producer hot path non-blocking regardless of daemon state: a bounded in-memory ring buffers records while the daemon is down and drains them FIFO on reconnect (a refinement of the DLT backend, taktora-log-dlt DLT-protoco... (FEAT_0072)). Overload manifests as the documented drop policy, never as a producer stall.
When the daemon socket is unavailable (early boot, daemon crash, daemon restart), the backend shall buffer records in a bounded in-memory ring and drain them on reconnect. The hot path stays non-blocking regardless of daemon state; overload manifests as the documented drop policy, never as a producer-thread stall. |
Emitting a log record via |
Emitting an |
When the daemon socket is unavailable, the DLT backend shall buffer records in a bounded in-memory ring (capacity configurable at init, with a documented safe default). On reconnect the backend shall flush the ring in FIFO order before resuming live emission. The ring’s storage shall be allocated once at init and shall not grow at runtime. |
When the in-memory ring is full and a new record arrives, the
backend shall drop the oldest record, increment an internal drop
counter, and continue. The backend shall not panic, shall not
spin, and shall not block. On the next successful reconnect the
backend shall emit exactly one summary record at the leading
position of the drain (DLT App ID = the emitter’s, Context ID =
reserved diagnostic context, message body =
|