mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-08-05 04:01:12 +03:00
Fixes to local streaming replication processing.
This commit is contained in:
@@ -463,6 +463,20 @@ void wsrep::server_state::on_view(const wsrep::view& view)
|
||||
if (view.status() == wsrep::view::primary)
|
||||
{
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
if (view.own_index() >= 0)
|
||||
{
|
||||
if (id_.is_undefined())
|
||||
{
|
||||
// No identifier was passed during server state initialization
|
||||
// and the ID was generated by the provider.
|
||||
id_ = view.members()[view.own_index()].id();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Own identifier must not change between views.
|
||||
// assert(id_ == view.members()[view.own_index()].id());
|
||||
}
|
||||
}
|
||||
assert(view.final() == false);
|
||||
|
||||
//
|
||||
@@ -555,6 +569,7 @@ void wsrep::server_state::on_view(const wsrep::view& view)
|
||||
assert(view.final());
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
state(lock, s_disconnected);
|
||||
id_ = wsrep::id::undefined();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user