• Binbin's avatar
    errno cleanup around rdbLoad (#11042) · 4505eb18
    Binbin authored
    This is an addition to #11039, which cleans up rdbLoad* related errno. Remove the
    errno print from the outer message (may be invalid since errno may have been overwritten).
    
    Our aim should be the code that detects the error and knows which system call
    triggered it, is the one to print errno, and not the code way up above (in some cases
    a result of a logical error and not a system one).
    
    Remove the code to update errno in rdbLoadRioWithLoadingCtx, signature check
    and the rdb version check, in these cases, we do print the error message.
    The caller dose not have the specific logic for handling EINVAL.
    
    Small fix around rdb-preamble AOF: A truncated RDB is considered a failure,
    not handled the same as a truncated AOF file.
    4505eb18
aof.c 99.8 KB