-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Merge core CoordinatorClient with MSQ CoordinatorServiceClient. #14652
Conversation
Continuing the work from apache#12696, this patch merges the MSQ CoordinatorServiceClient into the core CoordinatorClient, yielding a single interface that serves both needs and is based on the ServiceClient RPC system rather than DruidLeaderClient. Also removes the backwards-compatibility code for the handoff API in CoordinatorBasedSegmentHandoffNotifier, because the new API was added in 0.14.0. That's long enough ago that we don't need backwards compatibility for rolling updates.
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, minor queries.
@@ -123,7 +107,7 @@ void checkForSegmentHandoffs() | |||
} | |||
} | |||
if (!handOffCallbacks.isEmpty()) { | |||
log.warn("Still waiting for Handoff for [%d] Segments", handOffCallbacks.size()); | |||
log.info("Still waiting for handoff for [%d] segments", handOffCallbacks.size()); |
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.
Nit: "handoff of x segments"?
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.
Should we raise an alert if handoff wait time exceeds a threshold?
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.
Nit: "handoff of x segments"?
Sure, that sounds nicer to me as well. I will change it if there is some other reason to make changes (like if the CI fails).
Should we raise an alert if handoff wait time exceeds a threshold?
There's already an alert raised if the handoffConditionTimeout
is exceeded, which post #14539 would default to 15 mins.
Collections.singletonList(interval) | ||
usedSegments = FutureUtils.getUnchecked( | ||
coordinatorClient.fetchUsedSegments(dataSource, Collections.singletonList(interval)), | ||
true |
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.
I wonder if we still need the retry logic in the catch block below. It would be handled by the new CoordinatorClient
itself.
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.
Good point, I'll remove this part.
* Retry policy that uses up to about an hour of total wait time. Note that this is just the total waiting time | ||
* between attempts. It does not include the time that each attempt takes to execute. | ||
*/ | ||
public static StandardRetryPolicy aboutAnHour() |
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.
Nit: Would StandardRetryPolicy.retryUptoAnHour()
or StandardRetryPolicy.retryForAnHour()
communicate the intent better?
The "about" part could be left out as the approximate nature of the backoffs is probably a given. Although, I don't feel strongly about it.
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.
Hmm, to me they seem similar, so I'm inclined to merge the patch rather than have CI run again 🙂
Saving the planet by doing fewer CI runs!
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.
Haha, works for me. 🌲
Continuing the work from #12696, this patch merges the MSQ CoordinatorServiceClient into the core CoordinatorClient, yielding a single interface that serves both needs and is based on the ServiceClient RPC system rather than DruidLeaderClient.
Release notes: Also removes the backwards-compatibility code for the handoff API in CoordinatorBasedSegmentHandoffNotifier, because the new API was added in 0.14.0. That's long enough ago that we don't need backwards compatibility for rolling updates.