MDEV-31442 page_cleaner thread aborts while releasing the tablespace
After further I/O on a tablespace has been stopped (for example due to DROP TABLE or an operation that rebuilds a table), page cleaner thread tries to flush the pending writes for the tablespace and releases the tablespace reference even though it was not acquired. fil_space_t::flush(): Don't release the tablespace when it is being stopped and closed Thanks to Marko Mäkelä for suggesting this patch.
This commit is contained in:
parent
b3074128a6
commit
841e905f20
@ -1526,10 +1526,12 @@ template<bool have_reference> inline void fil_space_t::flush()
|
|||||||
flush_low();
|
flush_low();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(acquire_low() & (STOPPING | CLOSING)))
|
if (!(acquire_low(STOPPING & CLOSING) & (STOPPING | CLOSING)))
|
||||||
|
{
|
||||||
flush_low();
|
flush_low();
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the size in pages (0 if unreadable) */
|
/** @return the size in pages (0 if unreadable) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user