Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix WAL race condition between zookeeper and metadata table #539
I noticed this race condition while looking in to #535. This seems like a very low probability event because multiple conditions would need to be met in a small time window for data loss to occur as a result of this race.
This change acquires a lock so that the call to markUnusedWALs() will block until the file is added to metadata table. This lock prevents zookeeper updates from happening before metadata table updates.
This bug only affects Accumulo 1.8.0 and later.