fix(server): do not print warning on replica stop/ takeover (#2560)

* fix(server): do not print warning on replica stop/ takeover

---------

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-02-09 08:10:41 +02:00 committed by GitHub
parent 4860c8eac2
commit c2ee348d2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -234,9 +234,11 @@ void Replica::MainReplicationFb() {
else else
ec = ConsumeRedisStream(); ec = ConsumeRedisStream();
LOG(WARNING) << "Error stable sync with " << server().Description() << " " << ec << " " auto state = state_mask_.fetch_and(R_ENABLED);
<< ec.message(); if (state & R_ENABLED) { // replication was not stopped.
state_mask_.fetch_and(R_ENABLED); LOG(WARNING) << "Error stable sync with " << server().Description() << " " << ec << " "
<< ec.message();
}
} }
// Wait for unblocking cleanup to finish. // Wait for unblocking cleanup to finish.