-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Description
Describe the bug
When using the latest version of redis-cli available on homebrew (6.0.7) mass insertion of ~800k ZADD commands fails by apparently misreading (or misexecuting) commands. Likely mixing multiple commands together, resulting in random errors related to 'bad syntax' when no errors are actually present in the file. This same mass-insertion, with the same data, does not fail in redis-cli 6.0.5.
Command:
cat myFile.txt | redis-cli --pipeNote the non-existent command ZAADD instead of the actual written command ZADD:
ERR unknown command `ZAADD`, with args beginning with: `ac:ngram:wachovia `, `0`, `wachovia bank nj`To reproduce
Create a huge file executing multiple ZADD statements, and the occasional HMSET (around 800k should do it.)
.
.
ZADD "ac:ngram:weyerhaeuser co wa" 0 "weyerhaeuser co wa"
ZADD "ac:ngram:weyerhaeuser co wa" 0 "weyerhaeuser co wa"
ZADD "ac:ngram:weyerhaeuser co wa" 0 "weyerhaeuser co wa"
HMSET "ac:results:abmps wa" title "ABMPS, WA" zip "98667"
.
.Run the command to mass-insert this file using redis-cli (6.0.7)
cat my-800k-line-file.txt | redis-cli --pipeExpected behavior
Mass insertion should execute line-by-line and not accidentally mix any commands or lines together.
Additional information
It's worth noting that this was reproduced on two diff macbook pro's running hombrew installed redis, and executed from zshell.