Tags: dragonflydb/dragonfly
Tags
Add list compression tuning flags (#7762) Rename the ZSTD dictionary threshold flag to a non-experimental name and add a separate list compression level flag used when building QList dictionaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chore(server): migrate main_service handlers to CmdArgParser Migrate most main_service.cc command handlers from CmdArgList to CmdArgParser, following the same pattern as the recent set_family.cc and zset_family.cc migrations. - Update Quit, Multi, Watch, Unwatch, Discard, Exec, Publish, Subscribe, Unsubscribe, PSubscribe, PUnsubscribe, Function, Monitor, Pubsub, Command handlers - Propagate ParsedArgs through ChangeSubscription/ChangePSubscription in conn_context.h/.cc to avoid CmdArgList conversion - Update MFUNC macro to call MakeParserFromContext instead of passing CmdArgList; keep MFUNC_OLD for Eval* handlers (deferred) Signed-off-by: Roman Gershman <roman@dragonflydb.io>
fix(facade): retire experimental_io_loop_v2 flag (#7605) The experimental_io_loop_v2 flag was accidentally dropped. Using ABSL_RETIRED_FLAG instead of simply removing it preserves backward compatibility for deployments that reference it in configs or scripts. Signed-off-by: Gil Levkovich <69595609+glevkovich@users.noreply.github.com>
facade: Trim parsed args if capacity much higher than size (#7386) * facade: Trim parsed args if overallocated On parsing new command, if cap > 2* prev size needed, then trim command to avoid holding onto oversized capacity. Also do this only over 256 KiB to not churn on small commands and only correct large allocs Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io> (cherry picked from commit 0a369ac) * facade: Do not use clear to drop memory This API has changed in recent versions of absl and no longer deallocates Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io> (cherry picked from commit c062d40) --------- Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
fix: handle incompressible data in HuffmanCheckTask (#7251) HuffmanCheckTask crashes the process with SIGABRT when key data is incompressible (e.g. random hashes, UUIDs, encrypted blobs): F huff_coder.cc:108] Check failed: !HUF_isError(size) The task runs as an idle task on shard 0 once key memory exceeds 50 MB. It builds a Huffman frequency table from sampled key data, then unconditionally calls HuffmanEncoder::Export() to serialize the table for logging. When the data is high-entropy (compression ratio = 1.0), HUF_writeCTable_wksp returns an error for the degenerate table and the CHECK kills the process. Since the task re-triggers on every restart after snapshot recovery, this results in a crash loop. Note: --compression_mode does not prevent this. That flag controls snapshot serialization compression (LZ4/ZSTD), not the background HuffmanCheckTask. Fix: - Export() returns std::optional<std::string> instead of crashing via CHECK. Logs a warning on failure. - HuffmanCheckTask::Run() skips Export() when compression ratio >= 1.0, since there is no useful table to log. - All callers (debugcmd.cc, tests) updated to handle the optional.
test(connection): add a fix for FIN_WAIT_2 leak bug with BLPOP (#7224) * test(connection): add reproduction for FIN_WAIT_2 leak with BLPOP Closing a client socket while the connection's reader fiber is parked on a blocking command (BLPOP) does not always wake the fiber to observe EOF. Under sustained concurrent open+close churn, a fraction of FDs linger on the server in CLOSE_WAIT (client in FIN_WAIT_2) until the command times out or the client is CLIENT KILL'd, matching the reaper-driven leak reported in production. valkey closes its half immediately on FIN even mid-BLPOP. The bug is fixed in helio by romange/helio#580 --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Roman Gershman <roman@dragonflydb.io>
PreviousNext