Skip to content

Unfair pthread reader writer locks cause hot index starvation in TokuDB and TokuMX

RIch Prohaska edited this page Apr 7, 2014 · 1 revision

Pthread reader writer locks are not fair to multiple writers since it is possible for one writer to monopolize the reader writer lock and starve another writer. Index creation in TokuDB and TokuMX could be starved out by continuous checkpointing. We implemented a fair reader writer lock inside of Tokutek's fractal tree library to provide fair access to the checkpoint lock and avoid starvation when TokuDB and TokuMX are under heavy load.