Skip to content

[V2] Double-buffering for concurrent flush #3

@bravo1goingdark

Description

@bravo1goingdark

Summary

Implement double-buffering to allow concurrent memtable flush while writers continue to a new active memtable.

Motivation

Currently, seal() blocks all writes during the flush phase. Double-buffering would allow writers to continue to a new arena while the frozen memtable is being iterated/flushed.

Implementation Notes (from design doc)

If you wanted to support concurrent memtable flush while writers continue (double-buffering), you would need:

  1. Two arenas: active (writers) and frozen (being flushed)
  2. Writers atomically switch to the new arena
  3. The frozen arena is immutable — safe to iterate without synchronization

From design doc

See LOCKFREE_SKIPLIST_DESIGN.md lines 592-595

Priority: low

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions