From 36ab75a49884d89fe733014826b5adf3e07ca9cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 27 Aug 2024 07:27:24 +0300 Subject: [PATCH] MDEV-34515: Fix a bogus debug assertion purge_sys_t::stop_FTS(): Fix an incorrect debug assertion that commit d58734d7812f7fccbb1a2cd802f8ce9cd0c693ba added. The assertion would fail if there had been prior invocations of purge_sys.stop_SYS() without purge_sys.resume_SYS(). The intention of the assertion is to check that number of pending stop_FTS() stays below 65536. --- storage/innobase/srv/srv0srv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 1cea2d9ffe8..c24be1a141e 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -1299,7 +1299,7 @@ bool purge_sys_t::running() void purge_sys_t::stop_FTS() { ut_d(const auto paused=) m_FTS_paused.fetch_add(1); - ut_ad(paused < PAUSED_SYS); + ut_ad((paused + 1) & ~PAUSED_SYS); while (m_active.load(std::memory_order_acquire)) std::this_thread::sleep_for(std::chrono::seconds(1)); }