Skip to content

redis: gate the socket keep-alive adopt and defer destruction to finalize - #34874

Closed
robobun wants to merge 7 commits into
mainfrom
farm/ebcf39b0/valkey-socket-ref-gate
Closed

redis: gate the socket keep-alive adopt and defer destruction to finalize#34874
robobun wants to merge 7 commits into
mainfrom
farm/ebcf39b0/valkey-socket-ref-gate

redis: drop the destructor guard and debug_assert; gate is the fix

e29310e
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 29, 2026 in 20m 57s

Code review found 1 important issue

Found 2 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important test/js/valkey/valkey-gc.test.ts:184-191 New malformed-RESP test likely passes on parent commit (no fail-before evidence)

Annotations

Check failure on line 191 in test/js/valkey/valkey-gc.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

New malformed-RESP test likely passes on parent commit (no fail-before evidence)

The new "malformed RESP reply" test almost certainly passes on the parent commit — its described mechanism (a second `on_valkey_close` entry via re-entrant `close()`) is blocked by `valkey.rs:642`'s `if socket.is_closed() { return; }`, so on parent there is exactly one `socket_ref.forget()` and one unconditional adopt: balanced. The PR's own mechgate output shows "ASAN without fix: all passed" (and lists a test that no longer exists, so it's stale for this test too), and the 2026-07-29 follow-up