summaryrefslogtreecommitdiff
path: root/storage/innobase/include/buf0dblwr.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
commit2543673dd22782f59299fd2e72179601892bd967 (patch)
treeb73641bd88c9d1572203c75da618fce1937518e8 /storage/innobase/include/buf0dblwr.h
parent4e5b771e980edfdad5c5414aa62c81d409d585a4 (diff)
parentef911553f442cbb1baaac2af44c38b54fd058c41 (diff)
downloadmariadb-git-2543673dd22782f59299fd2e72179601892bd967.tar.gz
Merge branch '11.0' into 11.1bb-11.1-release
Diffstat (limited to 'storage/innobase/include/buf0dblwr.h')
-rw-r--r--storage/innobase/include/buf0dblwr.h45
1 files changed, 1 insertions, 44 deletions
diff --git a/storage/innobase/include/buf0dblwr.h b/storage/innobase/include/buf0dblwr.h
index d9c9239c0b4..9932b0e521f 100644
--- a/storage/innobase/include/buf0dblwr.h
+++ b/storage/innobase/include/buf0dblwr.h
@@ -66,16 +66,10 @@ class buf_dblwr_t
bool batch_running;
/** number of expected flush_buffered_writes_completed() calls */
unsigned flushing_buffered_writes;
- /** pages submitted to flush_buffered_writes() */
- ulint pages_submitted;
/** number of flush_buffered_writes_completed() calls */
ulint writes_completed;
/** number of pages written by flush_buffered_writes_completed() */
ulint pages_written;
- /** condition variable for !writes_pending */
- pthread_cond_t write_cond;
- /** number of pending page writes */
- size_t writes_pending;
slot slots[2];
slot *active_slot;
@@ -98,9 +92,6 @@ public:
/** Acquire the mutex */
void lock() { mysql_mutex_lock(&mutex); }
- /** @return the number of submitted page writes */
- ulint submitted() const
- { mysql_mutex_assert_owner(&mutex); return pages_submitted; }
/** @return the number of completed batches */
ulint batches() const
{ mysql_mutex_assert_owner(&mutex); return writes_completed; }
@@ -124,7 +115,7 @@ public:
void recover();
/** Update the doublewrite buffer on data page write completion. */
- void write_completed(bool with_doublewrite);
+ void write_completed();
/** Flush possible buffered writes to persistent storage.
It is very important to call this function after a batch of writes has been
posted, and also when we may have to wait for a page latch!
@@ -167,40 +158,6 @@ public:
my_cond_wait(&cond, &mutex.m_mutex);
mysql_mutex_unlock(&mutex);
}
-
- /** Register an unbuffered page write */
- void add_unbuffered()
- {
- mysql_mutex_lock(&mutex);
- writes_pending++;
- mysql_mutex_unlock(&mutex);
- }
-
- size_t pending_writes()
- {
- mysql_mutex_lock(&mutex);
- const size_t pending{writes_pending};
- mysql_mutex_unlock(&mutex);
- return pending;
- }
-
- /** Wait for writes_pending to reach 0 */
- void wait_for_page_writes()
- {
- mysql_mutex_lock(&mutex);
- while (writes_pending)
- my_cond_wait(&write_cond, &mutex.m_mutex);
- mysql_mutex_unlock(&mutex);
- }
-
- /** Wait for writes_pending to reach 0 */
- void wait_for_page_writes(const timespec &abstime)
- {
- mysql_mutex_lock(&mutex);
- while (writes_pending)
- my_cond_timedwait(&write_cond, &mutex.m_mutex, &abstime);
- mysql_mutex_unlock(&mutex);
- }
};
/** The doublewrite buffer */