﻿# Reconcile an etcd NOSPACE write before repeating the job transition

An etcd space error can coexist with an applied backend write; inspect quota state and the intended mutation before treating the operation as unexecuted.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/etcd-nospace-uncertain-write-outcome/
Language: en

## An explicit error can leave a real mutation

A coordinator changes a job record and receives `ErrGRPCNoSpace`. It queues the same business action again on the assumption that the record was not changed. That assumption is unsafe under the documented quota behavior. The [maintenance guide](https://etcd.io/docs/v3.6/op-guide/maintenance/) says a Put, transaction or lease grant can return that error while its backend operation succeeds, because quota checks occur at the API and internal application layers. The error identifies a space problem; it does not universally prove absence of the requested effect.

## Preserve the operation before investigating capacity

Retain the intended job identity, input revision, compared state and proposed mutation. Distinguish the external action the coordinator hoped to dispatch from its etcd control update. If the transaction already marked work accepted, repeating an unrelated downstream operation can create a duplicate even though the second control attempt fails or follows a different branch. [Logical operations and transport attempts](/journal/provider-post-retry-idempotency-ledger/) explains that separate identity requirement. A generic retry count cannot replace the record needed to understand what this particular failed-looking request may have changed.

## Inspect the resulting keyspace coherently

Use the [API's key and revision semantics](https://etcd.io/docs/v3.6/learning/api/) to inspect relevant control state through an appropriate current read. A matching value alone may be insufficient if another coordinator could have written the same bytes. An explicit operation receipt, where the application designed one into the same transaction, can improve attribution. Preserve the observed revision and current job owner. Do not manufacture a receipt after the fact or infer that an advanced global revision belongs to the attempted mutation. Keep genuinely unresolved attribution visible.

## Separate quota recovery from outcome recovery

The maintenance guide describes the quota alarm and its limited-operation state. Space reclamation, backend defragmentation and alarm clearance are distinct maintenance concerns, not proof that an earlier business operation failed. Follow an authorized, version-appropriate maintenance plan that preserves required data and recovery evidence. Clearing an alarm without resolving the storage condition is not acceptance. Conversely, restored write availability does not decide whether the old transition should be repeated. Reconcile those two state machines separately before resuming automated dispatch.

## Exercise the documented ambiguity in isolation

A representative test environment can approach a deliberately constrained quota using disposable records, then preserve an error response and inspect the targeted state. The acceptance protocol must handle either observed outcome rather than require every error to produce a write. Include a competing writer and a recovered cluster before retry. Verify that the application never converts unknown or already accepted work into an unconditional duplicate. The [guarantees guide](https://etcd.io/docs/v3.6/learning/api_guarantees/) supports keeping operation evidence explicit; no live quota exhaustion or benchmark is implied by this procedure.

## Retain the boundary after normal service returns

[Conditional publication](/journal/guide-http-precondition-publish/) can prevent an obsolete expectation from overwriting current state, but it cannot reconstruct missing operation identity. Record the quota condition, maintenance outcome, reconciled mutation and retry decision together. A useful incident conclusion distinguishes capacity exhaustion, client-visible error, backend effect and downstream work. That prevents restored health from erasing the uncertainty that created the original correctness risk and keeps the coordinator's accepted job history reproducible after cleanup, restart or handover.
