Expand description
Issue #582 — Analytics slice 4: BatchInsertEndpoint HTTP support.
Owns the config + durable idempotency receipts that the
POST /collections/:name/batch handler uses to:
- reject batches exceeding
red.batch.max_rowswith413 BatchTooLargebefore any storage work, - deduplicate requests carrying the same
Idempotency-Keywithinred.batch.idempotency_window_secs, returning the previously committed response body verbatim across process failover, - report row-level validation failures by index so the caller can pinpoint the row that broke the all-or-nothing commit.
The actual commit + AnalyticsSchemaRegistry validation runs in the
handler (server::handlers_entity::handle_batch_insert). This
module only owns the pieces that need to be unit-testable without
booting a full HTTP server.
Structs§
- Batch
Insert Config - Knobs for the batch endpoint. Read from
RED_BATCH_*env vars at process start; thered.batch.*config keys in the brief route to the same defaults until the broader config-overlay binding lands. - Durable
Receipt - A committed response for a
(collection, idempotency-key)pair.