Skip to content
Permalink
Browse files
MDEV-30227 [ERROR] [FATAL] InnoDB: fdatasync() returned 9
fil_space_t::flush<false>(): If the CLOSING flag is set,
the file may already have been closed, resulting in EBADF
being returned by fdatasync(). In any case, the
thread that had set the flag should take care of invoking
os_file_flush_func().

The crash occurred during the execution of FLUSH TABLES...FOR EXPORT.

Tested by: Matthias Leich
  • Loading branch information
dr-m committed Dec 15, 2022
1 parent 03fee58 commit 92ff7bb
Showing 1 changed file with 3 additions and 2 deletions.
@@ -1469,9 +1469,10 @@ template<bool have_reference> inline void fil_space_t::flush()
}
else if (have_reference)
flush_low();
else if (!(acquire_low() & STOPPING))
else
{
flush_low();
if (!(acquire_low() & (STOPPING | CLOSING)))
flush_low();
release();
}
}

0 comments on commit 92ff7bb

Please sign in to comment.