Rust Reids Replication (#NA2) Connection reset by peer (os error 104)

I’m stuck on Replication-18.

I’ve tried

I have the same issue with:

Here are my logs:

[replication-18] client: $ redis-cli WAIT 4 2000
[replication-18] client: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n4\r\n$4\r\n2000\r\n"
[replication-18] Testing Replica : 1
[replication-18] replica-1: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n"
[replication-18] replica-1: Received RESP value: ["SET", "baz", "789"]
[replication-18] Received ["SET", "baz", "789"]
[your_program] client 5: Array([BulkString("WAIT"), BulkString("4"), BulkString("2000")])

[replication-18] replica-1: Received bytes: "*3\r\n$8\r\nreplconf\r\n$6\r\nGETACK\r\n$1\r\n*\r\n"
[replication-18] replica-1: Received RESP value: ["replconf", "GETACK", "*"]
[replication-18] Received ["replconf", "GETACK", "*"]
[replication-18] replica-1: $ redis-cli REPLCONF ACK 99
[replication-18] replica-1: Sent bytes: "*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n$2\r\n99\r\n"
[replication-18] Testing Replica : 2
[your_program] time
[your_program] client 5
[your_program] send ok :1
[your_program]
[your_program] my: invalid resp: Connection reset by peer (os error 104)
[your_program] my: client: 5 conn reset: Connection reset by peer (os error 104)

[replication-18] Received: "" (no content received)
[replication-18]            ^ error
[replication-18] Error: Expected start of a new RESP value (either +, -, :, $ or *)
[replication-18] Test failed
[replication-18] Terminating program

as in the log. I gave every connected stream a client number. client 5 is the test program send the wait command. It seem my program send the reply back, but the test program did not receive and terminated directly.

i figured this out.
there are two tests in this stage. In the first test some of the replicas did not reply the ack command. and in the second test, these replicas skip the reply for the first test and try to receive ack command of the second test. But my program still wait for the first ack reply. so my program and the tester are in an dead lock state.

1 Like

Note: I’ve updated the title of this post to include the stage ID (#NA2). You can learn about the stages rename here: Upcoming change: Stages overhaul.