-
Notifications
You must be signed in to change notification settings - Fork 138
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
Feat[BMQ, MQB]: shutdown v2, optimizing shutdown logic #399
Conversation
d7971bb
to
72d2c6a
Compare
1ddba9d
to
e81caf3
Compare
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.
Build 180 of commit e81caf3 has completed with FAILURE
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.
Nothing big. A few questions inline, a pervasive typo, and some comment/docs changes.
Overall comments
-
Once we remove the v1 shutdown code, this will be a bit simpler. I think then it might be worth taking a little time to look at simplifying the structure of some of the parts that we've touched here (the separation of labor between
initializeShutdown
vsstop
inmqba_application
won't really make sense at that stage). -
Now that we're open-source, I think we need be a bit more careful about what versions of brokers users may try to run. I noted that already we might want to turn off support for ungraceful shutdown, since all OSS brokers support it. But I think we should be intentional about turning off graceful shutdown v1, document when we do it, and provide an upgrade process for this (in the manner of https://kafka.apache.org/documentation/#upgrade).
-
I found this comment in
mqbblp_clusterproxy
'sClusterProxy::stopDispatched
:// TBD: In the future, we should review the entire shutdown logic, and // eventually implement a request/response based mechanism in // order to provide true graceful shutdown.
A search revealed that this indeed was from before graceful shutdown logic v1, and from what I understand about this part of the code, this comment can safely be removed. I think changing some of the
// temporary
comments to something greppable as I noted below will mitigate things like this being left behind from this PR.
Merging
I think we'll need to unrevert Luke's admin API changes before we merge this in. So either: you can make the changes I suggest here and I'll approve before we unrevert the changes, and I can approve again after you rebase, or you can hold off on making the changes until after we unvert those changes and I'll approve then.
{ | ||
for (Apps::iterator it = d_apps.begin(); it != d_apps.end(); ++it) { | ||
it->value()->reset(); |
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.
The post-conditions of QueueEngineUtil::AppState::reset
are a little too intricate for my tastes; reset
doesn't actually reset everything about the AppState
... These two lines look like they should be reversed based on their names, but no, they are correct. I skimmed through the uses of reset
and it's almost always followed by modifying d_routing_sp
in some way.
Nothing to change in your PR about this, but I've written this down as something to revisit.
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 change it? How about undoRouting
?
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.
undoRouting
is a good name for this. If you want to make that change in this PR or later, either way is okay by me. Low priority.
EDIT I see you made the change, looks good.
1312b28
to
711cad0
Compare
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.
Build 230 of commit 711cad0 has completed with FAILURE
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.
👍🏻
Let me know if you need a re-approval after fixing merge conflicts for getting this into main
.
711cad0
to
b28cb4f
Compare
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.
Reapproving after rebase to fix merge conflicts. Spot checked that no accidental changes were made.
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.
Build 247 of commit b28cb4f has completed with FAILURE
f231cdc
to
c5b7c31
Compare
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.
Build 260 of commit c5b7c31 has completed with FAILURE
Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com>
Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com>
c5b7c31
to
670dde5
Compare
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.
Build 267 of commit 670dde5 has completed with FAILURE
* Shutdown V2 Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> * cleaning Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> * Addressing review Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> --------- Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com>
* Shutdown V2 Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> * cleaning Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> * Addressing review Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> --------- Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com>
* Shutdown V2 Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> * cleaning Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> * Addressing review Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com> --------- Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com>
Changing shutdown logic to minimize control plane traffic.