-
Notifications
You must be signed in to change notification settings - Fork 61
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
ClusterControl.joined should cause joining; fix waiting issues #1122
Conversation
/// - within: Duration to wait for. | ||
/// | ||
/// - Returns `Cluster.Member` for the joined node. | ||
@discardableResult | ||
public func joined(endpoint: Cluster.Endpoint, within: Duration) async throws -> Cluster.Member? { | ||
try await self.waitFor(self.node, .up, within: within) |
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.
actual bug here, we must wait for endpoint
not self.node
;)
@@ -314,7 +347,7 @@ public struct ClusterControl { | |||
throw Cluster.MembershipError(.notFound(node, in: membership)) | |||
} | |||
|
|||
if atLeastStatus <= foundMember.status { |
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.
another mini bug; we should error out if the expected status is lower than the current one.
if they are the same, don't error -- we succeeded; the test covers this now
The failure is Unrelated to the PR though. |
Failed: #1124 needs investigation |
This improves things but we definitely still have some issues to look into here, I'll schedule time to work on those consistently now. |
bug: We wrongly waited on the
self.node
to become up but should wait for the other node injoined(node:)
improvement: We should initiate joining when not already trying to and someone asks
try await joined(node:)
since the equivalentjoin()
makes it seem like joined would do this as well