Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Initialize member cluster ID only on connection to cluster. #14

Merged
merged 2 commits into from
Nov 12, 2018
Merged

Conversation

ayurchen
Copy link
Member

@ayurchen ayurchen commented Nov 6, 2018

  • Don't rely on own index from the view because the view may come from
    another member, instead determine own index from own ID.

Refs #13

@ayurchen ayurchen self-assigned this Nov 6, 2018
@ayurchen ayurchen requested a review from temeo November 6, 2018 13:45
@@ -111,6 +111,12 @@ namespace wsrep
return (members_.empty() && own_index_ == -1);
}

void fix_own_index(ssize_t i)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should not be need to fix own index in view. If the provider passes a view with invalid own index, the provider should be fixed instead.

{
assert(id_.is_undefined());
id_ = view.members()[view.own_index()].id();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have some input validation for view.own_index(). Assert/throw if it is negative or >= view.members().size().

ayurchen and others added 2 commits November 9, 2018 00:42
   it on disconnect.
 - Don't rely on own index from the view because the view may come from
   another member (IST/SST), instead always determine own index from own ID.

Refs #13
Dbsim has internal map of server objects for SST simulation.
This was mapped using server_id, which is not available
anymore when server object is constructed. Changed the dbsim to
use server name instead for internal mapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants