Commit f70a3185 authored by Allen Lai's avatar Allen Lai Committed by Marko Mäkelä

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.
parent a1b23361
......@@ -2493,30 +2493,15 @@ os_file_fsync_posix(
os_thread_sleep(200000);
break;
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;
case EINTR:
++failures;
ut_a(failures < 2000);
break;
case EIO:
ib::error() << "fsync() returned EIO, aborting";
/* fall through */
default:
ut_error;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment