replication: fix recoverable error reporting
First, we print "will retry every XX second" to the log after an error message only for socket and system errors although we keep trying to establish a replication connection after configuration errors as well. Let's print this message for those errors too to avoid confusion. Second, in case we receive an error in reply to SUBSCRIBE command, we log "can't read row" instead of "can't join/subscribe". This happens, because we switch an applier to SYNC/FOLLOW state before receiving a reply to SUBSCRIBE command. Fix this by updating an applier state only after successfully subscribing. Third, we detect duplicate connections coming from the same replica on the master only after sending a reply to SUBSCRIBE command, that is in relay_subscribe rather than in box_process_subscribe. This results in "can't read row" being printed to the replica's log even though it's actually a SUBSCRIBE error. Fix this by moving the check where it actually belongs.
Loading
Please register or sign in to comment