← centrs docs

cdb/conflict

The CDB changed after it was loaded; the stale write was refused so no change is lost.

Typical trigger

Two writers loaded the same CDB, and the other one saved first. Every centrs mutation (devices add/set/remove/encrypt, discover --save, the MCP centrs_devices add/set/remove ops) records the revision of the file it loaded. Under the CDB lock it re-reads the file and refuses to replace it when the revision no longer matches. Without that check the second writer would silently drop the first writer's change.

devices add/set/remove, the MCP centrs_devices add/set/remove ops, and discover --save reload and replay the request (up to 5 attempts) on a conflict. You normally see this error from them only when the CDB is changing continuously. devices encrypt and direct library mutations do not replay automatically; they receive cdb/conflict on the first stale write.

Fix