Skip to content

Commit

Permalink
JTASK-1062: reduce wasteful logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nojima committed Jul 9, 2024
1 parent 96c581b commit 26d79d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ void server::serve() {
if( m_signaled ) return;

// disconnected from the master
cybozu::logger::info() << "Try to promote to master...";
for( int i = 0; i < MASTER_CHECKS; ++i ) {
if( yrmcds::is_master() )
goto MASTER_ENTRY;
cybozu::logger::info()
<< "The conditions for becoming master are not met. Sleep and retry... ("
<< i << "/" << MASTER_CHECKS << ")";
std::this_thread::sleep_for( std::chrono::milliseconds(100) );
}
cybozu::logger::warning() << "Could not promote to master. Join the cluster again as a slave.";
Expand Down

0 comments on commit 26d79d0

Please sign in to comment.