In redis 7: when a replica aborts in this line https://github.com/redis/redis/blob/unstable/src/debug.c#L2032 the process crashes and sends on the master's socket a tcp package with flags=RST tcpdump example:
13:00:56.340856 IP localhost.38934 > localhost.22420: Flags [R.], seq 1, ack 1276, win 512, options [nop,nop,TS val 2944223088 ecr 2944222992], length 0
whereas in redis 6.2: when the replica executes this line, the process crashes and sends on the master's socket a package with flags=FIN tcpdump example:
13:22:46.398775 IP localhost.38210 > localhost.20737: Flags [F.], seq 280, ack 585, win 512, options [nop,nop,TS val 2945533146 ecr 2945533127], length 0
Does someone know what causes a change in this behavior between redis 6.2 and redis 7?
Comment From: judeng
In my opinion, abort belongs to glibc, and it should have nothing to do with the version of redis, the RST packet is a reply by kernel when the Master continues to be sent on a port that has been closed, and in the first example you provided, the sequence number is 1, so I think the real order of sending RST is:
T1: Replica--->Master FIN packet
T1: Master--->Replica data packets
T2: Replica->Master RST RST packet
Comment From: yossigo
@4aalon Are you able to consistently reproduce this? If so, I suggest to run Redis with strace and look for differences.