-
Notifications
You must be signed in to change notification settings - Fork 140
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
Refactoring App registration #493
Conversation
dorjesinpo
commented
Oct 30, 2024
- Fix the race when reconfiguring domain in FSM
- Generate AppKey only once when reconfiguring domain.
7b9493f
to
b0f355e
Compare
b0f355e
to
d687443
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 356 of commit d687443 has completed with FAILURE
<< "never be called for a non-Fanout queue. Received " | ||
<< "call to register appId '" << appIdKeyPair.first | ||
<< "', appKey '" << appIdKeyPair.second << "'."; | ||
<< "never be called for a non-Fanout queue."; |
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.
Why did you remove printing of appId and appKey? They help with debugging.
In fact, it could help to also print the queue uri here.
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.
This is no longer singular. Not sure we want to print the entire collection. Note that this code never executes.
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.
Just printing the queue uri would be nice.
BALL_LOG_ERROR << "It should be not possible to unregister appId '" | ||
<< appIdKeyPair.first << "', appKey '" | ||
<< appIdKeyPair.second << "' for a non-Fanout queue."; | ||
BALL_LOG_ERROR << "Invalid queue type for unregistering appId."; |
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.
Printing queue uri, offending appId and appKey can be helpful
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.
Same 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.
Just printing the queue uri would be nice.
{ | ||
// NOTHING | ||
} | ||
|
||
void QueueEngine::afterAppIdUnregistered( | ||
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfo& appIdKeyPair) | ||
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfos& appIdKeyPairs) |
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.
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfos& appIdKeyPairs) | |
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfos& removedAppIds) |
to be consistent with RootQE
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.
Still needs to be changed in this .cpp
file.
Added thought, I think we should never generate appKey at blazingmq/src/groups/mqb/mqbc/mqbc_storageutil.cpp Lines 2444 to 2475 in 613c5ba
Our end goal is to only generate appKey at the CSL layer. Be courageous and not be afraid of changing existing code :) |
Signed-off-by: dorjesinpo <[email protected]>
d95d809
to
9a5a99a
Compare
|
9a5a99a
to
cdd9c32
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 366 of commit cdd9c32 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.
Minor comments
<< "never be called for a non-Fanout queue. Received " | ||
<< "call to register appId '" << appIdKeyPair.first | ||
<< "', appKey '" << appIdKeyPair.second << "'."; | ||
<< "never be called for a non-Fanout queue."; |
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.
Just printing the queue uri would be nice.
BALL_LOG_ERROR << "It should be not possible to unregister appId '" | ||
<< appIdKeyPair.first << "', appKey '" | ||
<< appIdKeyPair.second << "' for a non-Fanout queue."; | ||
BALL_LOG_ERROR << "Invalid queue type for unregistering appId."; |
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.
Just printing the queue uri would be nice.
{ | ||
// NOTHING | ||
} | ||
|
||
void QueueEngine::afterAppIdUnregistered( | ||
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfo& appIdKeyPair) | ||
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfos& appIdKeyPairs) |
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.
Still needs to be changed in this .cpp
file.
@@ -36,13 +36,13 @@ QueueEngine::~QueueEngine() | |||
} | |||
|
|||
void QueueEngine::afterAppIdRegistered( | |||
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfo& appIdKeyPair) | |||
BSLS_ANNOTATION_UNUSED const mqbi::Storage::AppInfos& appIdKeyPairs) |
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.
Still needs to be changed in this .cpp
file.
Signed-off-by: dorjesinpo <[email protected]>
cdd9c32
to
59c7e54
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.
lgtm