← Back to all sparks
D

Dragonfly

INFRA · APIS
Velocity5.0

In-memory datastore compatible with Redis and Memcached

Dragonfly is paying down its Redis fork debt and chasing correctness in the new IO loop.

in-memory-datastoreredis-compatibleupstream-syncio-looppub-sub-correctnesssimd
Current state
Releases land every few days as incremental i1.39.x tags, and the work splits three ways. First, resyncing forked Redis code with upstream Valkey — the hyperloglog resync pulled in a CVE fix for run-length overflow in sparse opcodes plus AVX2 and ARM NEON merge kernels, and exposed three Dragonfly-local bugs in the process. Second, correctness in the v1 and v2 IO loops: a pub/sub ordering defect where anti-starvation quota logic could run a pipelined UNSUBSCRIBE ahead of queued messages and silently drop them. Third, ongoing internal migration of command handlers to a new argument parser.
Where it's heading
The fork-maintenance thread is the structural one — Dragonfly carries Valkey-derived code that drifts, and resyncing is how it inherits both security fixes and SIMD performance work it did not write. Running two IO loop generations at once is the current source of risk, visible in tests that had to be skipped on the v1 leg and in an ordering bug that only appeared after v1.38 changed the dispatch quota. Neither thread is adding user-facing capability; this is a window of consolidation.
Prediction
Expect the v2 IO loop to move toward default as the ordering and pause-semantics gaps close, and further upstream resyncs of forked Redis files now that the hyperloglog sync established a formatting convention to keep them cheap.

Recent moves

  1. 5d ago

    i1.39.11: chore(hll): sync hyperloglog.c with valkey upstream (#7961)

    Resyncs the forked hyperloglog implementation with upstream Valkey after two years of drift, inheriting a CVE fix for sparse-opcode run-length overflow that could write through a wild pointer, plus AVX2 and ARM NEON merge kernels now used by PFMERGE and multi-key PFCOUNT. The sync also surfaced three Dragonfly-local bugs — the clearest illustration of what carrying forked code costs.

    View source ↗
  2. 11d ago

    Fix mutable cross-thread access on shared reply builder

    A single fix removing mutable cross-thread access to a shared reply builder in the squash path. Internal concurrency correctness with no user-visible surface.

    View source ↗
  3. 13d ago

    i1.39.9: fix(facade): preserve pub/sub order on unsubscribe (v1 IO loop) (#7909)

    Fixes a message-loss bug introduced in v1.38: anti-starvation quota logic could run a pipelined UNSUBSCRIBE ahead of pub/sub messages queued before it, setting subscriptions to zero and discarding them. The fix gates pipeline preference on FIFO order. Silent data loss in pub/sub is the kind of defect that erodes trust in a Redis replacement.

    View source ↗
  4. 26d ago

    i1.39.6: test: skip V2-only pause tests under V1 (#7822)

    Replaces a failing assertion with a clean skip so two V2-only CLIENT PAUSE tests do not fail on the V1 leg of the regression matrix. Test hygiene, and incidental evidence that both IO loop generations are still being exercised.

    View source ↗
  5. 1mo ago

    i1.39.4: Add list compression tuning flags (#7762)

    Promotes the ZSTD dictionary threshold flag out of experimental naming and adds a separate compression level flag for QList dictionary building. Small, but it gives operators a memory-versus-CPU dial that was previously not meant to be tuned.

    View source ↗
  6. 1mo ago

    i1.39.3: chore(server): migrate main_service handlers to CmdArgParser

    Migrates most main_service command handlers from CmdArgList to CmdArgParser, following the same pattern applied earlier to the set and zset families. Pure internal refactoring with Eval handlers deliberately deferred.

    View source ↗