Low-Water Mark

An index in the write-ahead log showing which portion of the log can be discarded.


A write-ahead log maintains every update to the persistent store. It can grow indefinitely over time. Segmented Log ensures smaller files, but the total disk storage can grow indefinitely if not checked.


Have a mechanism to tell logging machinery which portion of the log can be safely discarded. The mechanism gives the lowest offset, or low-water mark, before which the logs can be discarded.

for more details go to Chapter 05 of the online ebook at oreilly.com

This pattern is part of Patterns of Distributed Systems

23 November 2023