mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
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.
This commit is contained in:
parent
a1b2336199
commit
f70a318576
1 changed files with 3 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue