Can't understand why tests are falling

My program makes exactly what task describes.
But tests still failing

Can you enable debug in codecrafters.yml using debug=true and provide more information about your code.

Here is debug log

The commands are from different clients. The initial MULTI, SET, and INCR commands are from client-1, and thus the response to them should be OK, QUEUED and QUEUED as they amidst a transaction, which your server does correctly.

On the other hand, when the tester connects as client-2 and executes a GET command for the same key, the response should be a NIL response and not a key value, as the previous commands have not been executed yet. This is where your implementation goes wrong and returns a BULK STRING of the value of the key or the string QUEUED (most probably). It is probably executing the commands as it receives them and is not waiting for the EXEC call or maintaining a different QUEUE for each connection/client.

Though maintaining a different QUEUE for each connection is the last stage in this extension, you would need at least a part of that implementation to pass this stage as well.

thanks, that helped a lot

1 Like

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