-
Notifications
You must be signed in to change notification settings - Fork 78
Add API to 'await joining cluster' #972
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
Conversation
| guard let foundMember = membership.uniqueMember(node) else { | ||
| throw Cluster.MembershipError.notFound(node, in: membership) | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry to bother you but I thought of another case...
If a node was removed BEFORE, we'll have a tombstone for it inside the private var _associationTombstones: [UniqueNode: Association.Tombstone] protected by _associationsLock. If it is in there, we should return that the member was .removed
You can "make up" a member for a removed node by creating a Member( from the unique node and put .unreachable and .removed in there 👍
This could be in a separate PR 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amended 5178fa4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
| \(lastErrorMessage) | ||
| """ | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but Perhaps must be wrapped in "MembershipError(\(self), details: <the nice strings>")? Otherwise might be weird not seeing what type the error was?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amended bce275d
ktoso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Minor potential addition to handle removed nodes better
|
Will amend the wording, look at the failure and merge, thank you! :) |
Resolves #948
Depends on #969. Please look at 8f46d04 only.