summaryrefslogtreecommitdiff
path: root/storage/innobase/os
diff options
context:
space:
mode:
authorAllen Lai <zheng.lai@oracle.com>2018-04-08 09:16:56 +0800
committerMarko Mäkelä <marko.makela@mariadb.com>2018-08-03 08:32:17 +0300
commitf70a3185765fb623668e927122484da24341a85f (patch)
tree2a5ec1f6fd4595ffb614010c8ae955ef06ff3967 /storage/innobase/os
parenta1b23361990487c9f125e4f922331f01605ca9ec (diff)
downloadmariadb-git-f70a3185765fb623668e927122484da24341a85f.tar.gz
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.
Diffstat (limited to 'storage/innobase/os')
-rw-r--r--storage/innobase/os/os0file.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 9853263600e..ad8a76c5280 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -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;