1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00
- fixed node ID assertion in on_connect() method,
   fixed "sanity checks" to allow reconnection to primary component
 - fixed code duplication in on_view() method
This commit is contained in:
Alexey Yurchenko
2018-11-23 16:46:38 +02:00
parent d95ec7ed99
commit 3950ea3027
3 changed files with 43 additions and 25 deletions

View File

@ -347,9 +347,12 @@ namespace
assert(app_ctx);
wsrep::server_state& server_state(
*reinterpret_cast<wsrep::server_state*>(app_ctx));
assert(server_state.id().is_undefined());
wsrep::view view(view_from_native(*view_info, server_state.id()));
assert(view.own_index() >= 0);
assert(// first connect
server_state.id().is_undefined() ||
// reconnect to primary component
server_state.id() == view.members()[view.own_index()].id());
try
{
server_state.on_connect(view);