mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Remove obsolete wsrep::server_state::last_committed_gtid() method
This commit is contained in:
@ -60,6 +60,17 @@ namespace wsrep
|
|||||||
{
|
{
|
||||||
return (seqno_ > other.seqno_);
|
return (seqno_ > other.seqno_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator<=(seqno other) const
|
||||||
|
{
|
||||||
|
return !(seqno_ > other.seqno_);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator>=(seqno other) const
|
||||||
|
{
|
||||||
|
return !(seqno_ < other.seqno_);
|
||||||
|
}
|
||||||
|
|
||||||
bool operator==(seqno other) const
|
bool operator==(seqno other) const
|
||||||
{
|
{
|
||||||
return (seqno_ == other.seqno_);
|
return (seqno_ == other.seqno_);
|
||||||
|
@ -387,16 +387,6 @@ namespace wsrep
|
|||||||
*/
|
*/
|
||||||
const wsrep::view& current_view() const { return current_view_; }
|
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
|
* Wait until all the write sets up to given GTID have been
|
||||||
* committed.
|
* committed.
|
||||||
@ -643,7 +633,6 @@ namespace wsrep
|
|||||||
, connected_gtid_()
|
, connected_gtid_()
|
||||||
, previous_primary_view_()
|
, previous_primary_view_()
|
||||||
, current_view_()
|
, current_view_()
|
||||||
, last_committed_gtid_()
|
|
||||||
, rollback_event_queue_()
|
, rollback_event_queue_()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@ -725,7 +714,6 @@ namespace wsrep
|
|||||||
wsrep::gtid connected_gtid_;
|
wsrep::gtid connected_gtid_;
|
||||||
wsrep::view previous_primary_view_;
|
wsrep::view previous_primary_view_;
|
||||||
wsrep::view current_view_;
|
wsrep::view current_view_;
|
||||||
wsrep::gtid last_committed_gtid_;
|
|
||||||
std::deque<wsrep::transaction_id> rollback_event_queue_;
|
std::deque<wsrep::transaction_id> rollback_event_queue_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -731,6 +731,16 @@ void wsrep::server_state::sst_received(wsrep::client_service& cs,
|
|||||||
|
|
||||||
gtid = server_service_.get_position(cs);
|
gtid = server_service_.get_position(cs);
|
||||||
wsrep::log_info() << "Recovered position from storage: " << gtid;
|
wsrep::log_info() << "Recovered position from storage: " << gtid;
|
||||||
|
|
||||||
|
lock.lock();
|
||||||
|
if (gtid.seqno() >= connected_gtid().seqno())
|
||||||
|
{
|
||||||
|
/* Now the node has all the data the cluster has: part in
|
||||||
|
* storage, part in replication event queue. */
|
||||||
|
state(lock, s_joined);
|
||||||
|
}
|
||||||
|
lock.unlock();
|
||||||
|
|
||||||
wsrep::view const v(server_service_.get_view(cs, id_));
|
wsrep::view const v(server_service_.get_view(cs, id_));
|
||||||
wsrep::log_info() << "Recovered view from SST:\n" << v;
|
wsrep::log_info() << "Recovered view from SST:\n" << v;
|
||||||
|
|
||||||
@ -804,21 +814,6 @@ void wsrep::server_state::initialized()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wsrep::server_state::last_committed_gtid(const wsrep::gtid& gtid)
|
|
||||||
{
|
|
||||||
wsrep::unique_lock<wsrep::mutex> 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<wsrep::mutex> lock(mutex_);
|
|
||||||
return last_committed_gtid_;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum wsrep::provider::status
|
enum wsrep::provider::status
|
||||||
wsrep::server_state::wait_for_gtid(const wsrep::gtid& gtid, int timeout)
|
wsrep::server_state::wait_for_gtid(const wsrep::gtid& gtid, int timeout)
|
||||||
const
|
const
|
||||||
|
@ -647,7 +647,6 @@ int wsrep::transaction::after_commit()
|
|||||||
assert(ret == 0);
|
assert(ret == 0);
|
||||||
state(lock, s_committed);
|
state(lock, s_committed);
|
||||||
|
|
||||||
// client_state_.server_state().last_committed_gtid(ws_meta.gitd());
|
|
||||||
debug_log_state("after_commit_leave");
|
debug_log_state("after_commit_leave");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user