Company
Date Published
Author
MongoDB
Word count
1706
Language
English
Hacker News points
None

Summary

The WiredTiger logjam was resolved by Bruce Lucas's wait-free solution, which eliminates the need for threads to wait before copying their payloads. This is achieved by using a single register to multiplex a slot's state along with bookkeeping about joined and released bytes, allowing threads to write into the slot as soon as they receive their write offset from their join operation. The new implementation uses masking and bit-shifting to perform joins and releases atomically, without compromising any other workloads or introducing a "leader" thread. This solution has been successfully integrated into the WiredTiger storage engine in MongoDB, resulting in nearly tripled performance of the journal algorithm and almost entirely eliminated negative scaling at high thread counts.