From a921a4f57973948db68e4bae9eee7e77a2ff0771 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 29 Nov 2021 15:05:04 +0200 Subject: [PATCH] Clean up last_committed_gtid() which is not used anywhere --- include/wsrep/server_state.hpp | 10 ---------- src/server_state.cpp | 15 --------------- src/transaction.cpp | 1 - 3 files changed, 26 deletions(-) diff --git a/include/wsrep/server_state.hpp b/include/wsrep/server_state.hpp index 4a6a344..d74e8eb 100644 --- a/include/wsrep/server_state.hpp +++ b/include/wsrep/server_state.hpp @@ -387,16 +387,6 @@ namespace wsrep */ const wsrep::view& current_view() const { return current_view_; } - /** - * Set last committed GTID. - */ - void last_committed_gtid(const wsrep::gtid&); - /** - * Return the last committed GTID known to be committed - * on server. - */ - wsrep::gtid last_committed_gtid() const; - /** * Wait until all the write sets up to given GTID have been * committed. diff --git a/src/server_state.cpp b/src/server_state.cpp index 63b7396..79d84f1 100644 --- a/src/server_state.cpp +++ b/src/server_state.cpp @@ -804,21 +804,6 @@ void wsrep::server_state::initialized() } } -void wsrep::server_state::last_committed_gtid(const wsrep::gtid& gtid) -{ - wsrep::unique_lock lock(mutex_); - assert(last_committed_gtid_.is_undefined() || - last_committed_gtid_.seqno() + 1 == gtid.seqno()); - last_committed_gtid_ = gtid; - cond_.notify_all(); -} - -wsrep::gtid wsrep::server_state::last_committed_gtid() const -{ - wsrep::unique_lock lock(mutex_); - return last_committed_gtid_; -} - enum wsrep::provider::status wsrep::server_state::wait_for_gtid(const wsrep::gtid& gtid, int timeout) const diff --git a/src/transaction.cpp b/src/transaction.cpp index 373452a..4c0dbff 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -647,7 +647,6 @@ int wsrep::transaction::after_commit() assert(ret == 0); state(lock, s_committed); - // client_state_.server_state().last_committed_gtid(ws_meta.gitd()); debug_log_state("after_commit_leave"); return ret; }