Skip to content
Permalink
Browse files

Bug#27805553 HARD ERROR SHOULD BE REPORTED WHEN FSYNC() RETURN EIO.

fsync() will just return EIO only once when the IO error happens, so, it's
wrong to keep trying to call it till it return success.
When fsync() returns EIO it should be treated as a hard error and InnoDB must
abort immediately.
  • Loading branch information...
Allen Lai
Allen Lai committed Apr 8, 2018
1 parent 331797e commit 8590c8e12a3374eeccb547359750a9d2a128fa6a
Showing with 2 additions and 15 deletions.
  1. +2 −15 storage/innobase/os/os0file.cc
@@ -3079,21 +3079,8 @@ os_file_fsync_posix(

case EIO:

++failures;
ut_a(failures < 1000);

if (!(failures % 100)) {

ib::warn()
<< "fsync(): "
<< "An error occurred during "
<< "synchronization,"
<< " retrying";
}

/* 0.2 sec */
os_thread_sleep(200000);
break;
ib::fatal()
<< "fsync() returned EIO, aborting.";

case EINTR:

0 comments on commit 8590c8e

Please sign in to comment.
You can’t perform that action at this time.