Binlog: avoid sync on Binlog creation.
This commit is contained in:
parent
852a1640b0
commit
1c9efb4283
|
@ -650,8 +650,11 @@ void Binlog::do_reindex() {
|
||||||
});
|
});
|
||||||
{
|
{
|
||||||
flush();
|
flush();
|
||||||
auto status = fd_.sync_barrier();
|
if (start_size != 0) { // must sync creation of the file if it is non-empty
|
||||||
LOG_IF(FATAL, status.is_error()) << "Failed to sync binlog: " << status;
|
auto status = fd_.sync_barrier();
|
||||||
|
LOG_IF(FATAL, status.is_error()) << "Failed to sync binlog: " << status;
|
||||||
|
}
|
||||||
|
need_sync_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// finish_reindex
|
// finish_reindex
|
||||||
|
|
Loading…
Reference in New Issue
Block a user