Fix warning.

This commit is contained in:
levlam 2021-12-07 13:10:30 +03:00
parent 40e0e3e457
commit 42aadccc8b
1 changed files with 3 additions and 3 deletions

View File

@ -671,11 +671,11 @@ void Binlog::do_reindex() {
auto finish_time = Clocks::monotonic();
auto finish_size = fd_size_;
auto finish_events = fd_events_;
for (size_t i = 10; i > 0; i--) {
for (int left_tries = 10; left_tries > 0; left_tries--) {
auto r_stat = stat(path_);
if (r_stat.is_error()) {
if (i != 1) {
usleep_for(200000 / i);
if (left_tries != 1) {
usleep_for(200000 / left_tries);
continue;
}
LOG(FATAL) << "Failed to rename binlog of size " << fd_size_ << " to " << path_ << ": " << r_stat.error()