Getting timeout #bs1

I have the same problem with this stage #bs1: locally, everything works correctly with the redis-cli, the test run goes into timeout even if you remove all the execution logic of the xread command and immediately return null
logs:

1 Like

Hi @4c656f, I moved your post to a standalone topic, since it seems to be a separate issue.

Could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

here is my code: GitHub - 4c656f/redis-go: A lightweight Redis implementation written in Go
running this commands:

./your_program.sh
redis-server --port 6380
redis-cli xread

getting me (nil) resp localy, but in tests i get timeout

Got it. I will take a look by the end of the week.

1 Like

Hi @4c656f, I added a few logs and found out that the stream responses were ill-formed:

*2\r\n$9\r\nraspberry\r\n*1\r\n*2\r\n$3\r\n0-2\r\n*2\r\n$11\r\ntemperature\r\n$2\r\n82\r\n

While it’s impossible to tell just by looking at it, you can try an incorrect but well-formed stream response like this:

func (this *MasterConnProcessor) Process(conn net.Conn) {
	...
		output := this.commandExecutor.ExecuteCmd(cmd, true)
		this.replicas_storage.PropagateCmd(cmd)

+		if string(output.Marshall())[0:2] == "*2" {
+			fmt.Println("⛳ writing bytes", "*1\r\n*2\r\n$5\r\ngrape\r\n*1\r\n*2\r\n$3\r\n0-2\r\n*2\r\n$11\r\ntemperature\r\n$2\r\n73\r\n")
+			conn.Write([]byte("*1\r\n*2\r\n$5\r\ngrape\r\n*1\r\n*2\r\n$3\r\n0-2\r\n*2\r\n$11\r\ntemperature\r\n$2\r\n73\r\n"))
+		} else {
			fmt.Println("⛳ writing bytes", strings.ReplaceAll(string(output.Marshall()), "\r\n", "\\r\\n"))
			conn.Write(output.Marshall())
+		}
	}
	defer conn.Close()
}

We’ll enhance our tester to provide more informative feedback when it encounters an ill-formed stream response.

Thank you for bringing this to our attention!

1 Like

oh, i see) Sorry for my inattention and thanks for the quick response!
upd: all tests are passing now, the problem resolved)

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