Replication (#XV6) REDIS0011 command?

I’m stuck on 14. What is this thing being sent supposed to represent? It isn’t terminated by CRLF.

That’s the RDB file :slight_smile: the REDIS0011 is the “Header” section as described here.

The RDB file isn’t terminated with a CRLF, and after it’s sent the same connection will then start receiving propagated commands (the same as what you’ve implemented in the “Single-replica propagation” stage).

You can use the byte count at the start to identify how long the RDB file is going to be (88, in the example above).

Unfortunately this is only 84 bytes long

@goalie7960 shouldn’t be the case.

The value we’re sending in hexadecimal is: 524544495330303131fa0972656469732d76657205372e322e30fa0a72656469732d62697473c040fa056374696d65c26d08bc65fa08757365642d6d656dc2b0c41000fa08616f662d62617365c000fff06e3bfec0ff5aa2.

Here’s a verification of the byte length:

And here’s where it is used: redis-tester/internal/test_cases/receive_replication_handshake_test_case.go at 08f7f14b76f230f98cfdb968b5cd1febb8ab829f · codecrafters-io/redis-tester · GitHub

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

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