summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-01-17 16:56:07 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-01-18 12:57:15 +0200
commite44439ab7354c5dff20707325694839e9346fb27 (patch)
tree0403bb95dd752bdc4ee7be51c2b1414f856362f7
parent745aa8bee787f455b9d71f2cad59700c09ac8e92 (diff)
downloadmariadb-git-e44439ab7354c5dff20707325694839e9346fb27.tar.gz
MDEV-27499 Performance regression in log_checkpoint_margin()
In commit 4c3ad24413f234599eda27f4958dd3ff21df3203 (MDEV-27416) an unnecessarily strict wait condition was introduced in the function buf_flush_wait(). Most callers actually only care that the pages have been flushed, not that a checkpoint has completed. Only in the buf_flush_sync() call for log resizing, we might care about the log checkpoint. But, in fact, srv_prepare_to_delete_redo_log_file() is explicitly disabling checkpoints. So, we can simply remove the unnecessary wait loop. Thanks to Krunal Bauskar for reporting this performance regression that we failed to repeat in our testing.
-rw-r--r--storage/innobase/buf/buf0flu.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 4b3e6e6e77e..c14b274645d 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2021, MariaDB Corporation.
+Copyright (c) 2013, 2022, MariaDB Corporation.
Copyright (c) 2013, 2014, Fusion-io
This program is free software; you can redistribute it and/or modify it under
@@ -1850,11 +1850,6 @@ static void buf_flush_wait(lsn_t lsn)
my_cond_wait(&buf_pool.done_flush_list,
&buf_pool.flush_list_mutex.m_mutex);
}
-
- /* Wait for the checkpoint. */
- while (buf_flush_sync_lsn)
- my_cond_wait(&buf_pool.done_flush_list,
- &buf_pool.flush_list_mutex.m_mutex);
}
/** Wait until all persistent pages are flushed up to a limit.