send_command uses two FFI paths today: Bindings.command for calls with no route, and Bindings.command_with_route_info only when an explicit route is given (lib/valkey.rb:458-483).
The plan was to unify on command_with_route_info (passing route_info = NULL for the no-route case) and drop the legacy command path. But during testing the two weren't equivalent in some cases, so we kept command for unrouted calls for now (see the note at lib/valkey.rb:473).
We suspect a bug in command_with_route_info, but they share the same code path on the FFI layer so unclear if this is an issue.
Goal
- Find a reproducible case where routing a command through
command_with_route_info (no route) behaves differently from command.
- Fix the issue if appropriate.
send_commanduses two FFI paths today:Bindings.commandfor calls with no route, andBindings.command_with_route_infoonly when an explicit route is given (lib/valkey.rb:458-483).The plan was to unify on
command_with_route_info(passingroute_info = NULLfor the no-route case) and drop the legacycommandpath. But during testing the two weren't equivalent in some cases, so we keptcommandfor unrouted calls for now (see the note atlib/valkey.rb:473).We suspect a bug in
command_with_route_info, but they share the same code path on the FFI layer so unclear if this is an issue.Goal
command_with_route_info(no route) behaves differently fromcommand.