# Replication (#XV6) REDIS0011 command?

**URL:** <https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137>\
**Category:** Challenges\
**Tags:** challenge:redis\
**Created:** [April 17, 2024, 1:58am UTC](https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137 "2024-04-17T01:58:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![goalie7960](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/goalie7960/32/120_2.png) [@goalie7960](https://forum.codecrafters.io/u/goalie7960)\
**Post date:** [April 17, 2024, 1:58am UTC](https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137/1 "2024-04-17T01:58:59Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/1X/c704d068bd352d589bc7bef94448f216fd96802d.png)

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [April 17, 2024, 9:00am UTC](https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137/2 "2024-04-17T09:00:37Z")

</div>

That’s the RDB file 🙂 the `REDIS0011` is the “Header” section as described [here](https://rdb.fnordig.de/file_format.html#:~:text=Redis).

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).

---

<div class="post-metadata">

**Author:** ![goalie7960](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/goalie7960/32/120_2.png) [@goalie7960](https://forum.codecrafters.io/u/goalie7960)\
**Post date:** [April 19, 2024, 1:24am UTC](https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137/3 "2024-04-19T01:24:27Z")

</div>

Unfortunately this is only 84 bytes long

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [April 19, 2024, 8:24am UTC](https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137/4 "2024-04-19T08:24:50Z")

</div>

@goalie7960 shouldn’t be the case.

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

Here’s a verification of the byte length:

 ![Screenshot 2024-04-19 at 09.24.13](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/1X/14a74c5b9f1137d89adc780137ed32d9c22b1dde.png)

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](https://github.com/codecrafters-io/redis-tester/blob/08f7f14b76f230f98cfdb968b5cd1febb8ab829f/internal/test_cases/receive_replication_handshake_test_case.go#L122C13-L122C189)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [April 24, 2024, 8:24am UTC](https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137/5 "2024-04-24T08:24:52Z")

</div>

Closed on April 24, 2024, 8:24am UTC

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [June 4, 2024, 5:47am UTC](https://forum.codecrafters.io/t/replication-xv6-redis0011-command/137/6 "2024-06-04T05:47:26Z")

</div>

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](https://forum.codecrafters.io/t/upcoming-change-stages-overhaul/375)
