• Mikhail Fesenko's avatar
    Direct redis-cli repl prints to stderr, because --rdb can print to stdout.... · 1eb4baa5
    Mikhail Fesenko authored
    
    Direct redis-cli repl prints to stderr, because --rdb can print to stdout. fflush stdout after responses  (#9136)
    
    1. redis-cli can output --rdb data to stdout
       but redis-cli also write some messages to stdout which will mess up the rdb.
    
    2. Make redis-cli flush stdout when printing a reply
      This was needed in order to fix a hung in redis-cli test that uses
      --replica.
       Note that printf does flush when there's a newline, but fwrite does not.
    
    3. fix the redis-cli --replica test which used to pass previously
       because it didn't really care what it read, and because redis-cli
       used printf to print these other things to stdout.
    
    4. improve redis-cli --replica test to run with both diskless and disk-based.
    Co-authored-by: default avatarOran Agra <oran@redislabs.com>
    Co-authored-by: default avatarViktor Söderqvist <viktor@zuiderkwast.se>
    1eb4baa5
redis-cli.tcl 10.3 KB