12.2 Status codes

Every response carries exactly one of these statuses. The kernel translates a non-OK status into the errno the registry client sees, so send the code that matches what actually happened:

CodeWhen to send it
RSI_OKThe operation succeeded. Status-only ops report it via rsi_respond_status; the five payload-bearing ops must use their own helper.
RSI_NOT_FOUNDThe requested key, entry, value, or layer does not exist in your store (client sees ENOENT).
RSI_ALREADY_EXISTSA create collided with something that already exists (client sees EEXIST).
RSI_STORAGE_ERRORYour backing store failed — I/O error, corruption, anything the client can't fix (client sees EIO).
RSI_NOT_EMPTYThe operation needs the key to have no children, and it has some (client sees ENOTEMPTY).
RSI_TOO_LARGEThe data exceeds what the source is willing or able to store (client sees ENOSPC).
RSI_TXN_BUSYA transaction can't proceed right now — e.g. write-lock contention; the operation may be retried (client sees EBUSY).
RSI_INVALIDThe request is well-formed RSI but violates the source's rules or refers to something malformed (client sees EINVAL).
RSI_CAS_FAILEDA sequence-guarded write's expected_sequence did not match the current entry — the compare-and-swap lost (client sees EAGAIN and retries).
RSI_TXN_NOT_SUPPORTEDReply to BEGIN_TRANSACTION from a source that does not implement transactions (client sees ENOTSUP).

Edit this page