Atomic Test And Set Of Disk Block Returned False For Equality
while (atomic_test_and_set(disk_block, expected, new) == false) // Another node won the race current_leader = read_leader_from_disk(); if (current_leader == myself) // Possibly stale cache, re-read block invalidate_disk_cache(); else backoff_and_retry();
# Register a new key sg_persist -o -G -K 0x12345678 /dev/sdX A leader might try to append a new
Keywords: atomic test and set, disk block, returned false for equality, compare and swap, distributed lock manager, concurrency control, optimistic locking, split-brain, storage consistency, clustered file system debugging. the TAS fails with this error.
Most debugging kernels or storage engines will log the expected value and the actual value read. For example: re-read block invalidate_disk_cache()
sg_persist -o -P -K 0x12345678 -T 3 --preempt-key=OLD_KEY /dev/sdX
Some storage engines store their replicated log as disk blocks. A leader might try to append a new log entry by performing a TAS on the next available log index block. If a follower (now acting as leader) has already written there, the TAS fails with this error.