Gazette

Vol. 57 Sunday, 22 February 2026
Vol. 57 22 Feb 2026

MongoDB’s WiredTiger uses lock-free algorithms in its B+tree to let many threads read and write without heavy locking. This uses hazard pointers for reads and lock-free skip lists for writes. The result is much higher throughput—about 50% faster reads and up to 4x faster updates in tests.

7 highlights

The storage engine provides durability (once a document is inserted, it remains available until it is removed by the user) and facilitates concurrent reads and writes.

BerkeleyDB attempted to address this by progressively reducing locking granularity, which increased the number of locks and made lock management a bottleneck.

describes how read operations use hazard pointers and write operations use lock-free skip lists to maximize the value our customers get from their hardware.

WiredTiger is a B+tree, which means that the root and internal pages only contain keys, and only leaf pages contain values. An interesting characteristic of the WiredTiger B+tree, which is relevant to our ability to implement lock-free algorithms, is that the on-disk and in-memory representations of the tree are different.

The goal of a hazard pointer is for it to be as cheap as possible for shared access, with the trade-off that it can be more expensive to acquire exclusive access.

The key to implementing a lock-free skip list is for any operation wanting to change the content on the page to construct the change to the data structure, and then atomic-compare-and-swap (CAS) the change in place. If the atomic CAS operation fails, discard the changes and try again. If it has succeeded, then the change has been made and is visible to other operations.

a skip list, which can be thought of as a search-optimized singly linked list.

  • System boundaries: the focus of design #
    , 3 highlights

    A big part of software design is the design of the abstractions themselves, of course. But equally important at a high-level are dependencies.

    The single most important thing about any module is what modules it does not depend upon. It’s one of the most effective decoupling tools possible, to not even allow one module to reference another.

    But then we see a response from overzealous use in the wild: “boolean parameters on functions are a code smell!”

  • The one ring problem: abstraction and our quest for power #
    , 2 highlights

    You cannot make an abstraction more powerful without sacrificing some properties that you used to know about it. Necessarily. You cannot require a new property be true about an abstraction without sacrificing some of its power and flexibility. Always.

    The most important point is simply to recognize properties as being a valid (and arguably most important) part of abstraction design.

  • Timing It Right #
    , 2 highlights

    Like a lot of people I know, I tend to cluster my work into three distinct sections, neatly organized around different cognitive enhancers: morning espresso, late afternoon tea, and a shorter session after dinner, usually with a glass of wine in hand. I generally organize my day so that I have nothing to do during the postprandial slump of the early afternoon; I’ll read a little, take a quick nap sometimes, work out. (Though I should admit my exercise regime is more cherry tomato than the full Pomodoro—I’m more of a seven-minute-abs kind of guy.) I also try to focus on different kinds of tasks, depending on the time of day. I save challenging creative work for the morning; busy work for the afternoon; and leave the evening free for more playful riffing.

    I suspect that most of us have distinct cognitive rhythms tied into the circadian cycle; the trick is figuring out what yours is, and organizing your workflow around its idiosyncracies.