summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2022-02-14 16:24:55 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2022-02-14 16:24:55 +0100
commit972b45642afee364cd140f17ae46c00cd0af6e11 (patch)
tree8b37f032e88c80fc1f6648ff589ba06fcc35750a
parent63b9d6e7ea77e26b666bc86e8f7aaafba9b40846 (diff)
downloadmariadb-git-972b45642afee364cd140f17ae46c00cd0af6e11.tar.gz
fixup 63b9d6e7ea77e26b666 , log_sys.write_buf can't run in a loop
The write_lock is released after the first time already. This leaves the hole in the log_write_and_flush logic, some flush_lock/write_lock waiters could be hanging, until the background redo log flush comes. The possibility of that is relatively tiny though.
-rw-r--r--storage/innobase/log/log0log.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index bcf0421e4b6..bf1cdb7347a 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -705,12 +705,8 @@ ATTRIBUTE_COLD void log_write_and_flush()
ut_ad(!srv_read_only_mode);
if (!log_sys.is_pmem())
{
- while (log_sys.write_buf<false>())
- {
- }
- while (log_flush(write_lock.value()))
- {
- }
+ log_sys.write_buf<false>();
+ log_flush(write_lock.value());
}
#ifdef HAVE_PMEM
else