Skip to content

Commit e55e761

Browse files
committed
MDEV-31084 assert(waiting) failed in TP_connection_generic::wait_end
buf_flush_wait_flushed(): Correct the logic for registering a wait around buf_flush_wait() that commit a091d6a recently broke. This should be easily repeatable when using a non-default startup parameter: thread-handling=pool-of-threads
1 parent abe4c7b commit e55e761

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

storage/innobase/buf/buf0flu.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,9 +1905,13 @@ ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn)
19051905
}
19061906
else
19071907
#endif
1908+
{
1909+
thd_wait_begin(nullptr, THD_WAIT_DISKIO);
1910+
tpool::tpool_wait_begin();
19081911
buf_flush_wait(sync_lsn);
1909-
1910-
thd_wait_end(nullptr);
1912+
tpool::tpool_wait_end();
1913+
thd_wait_end(nullptr);
1914+
}
19111915
}
19121916

19131917
mysql_mutex_unlock(&buf_pool.flush_list_mutex);

0 commit comments

Comments
 (0)