The only thing I could think of (without using out...
# spicedb
The only thing I could think of (without using outside locks) would be to have both an owner, and a temp_owner relation. Then, to transfer ownership you could write relationship(temp_owner, precondition temp_owner does not exist) Followed by a second writeRelationships([create new owner, delete old owner, delete temp owner], precondition temp_owner == the new owner) It's suboptimal because 1) you need these tmep edges and 2) it only detects the race. The loser will fail the first write and then have to retry, rather than it just being atomic. It's basically a long winded way of acquiring a lock and it's probably better to do that outside Spicedb at that point