-
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
Refactor[mqbblp::Cluster]: use concrete event types #448
Refactor[mqbblp::Cluster]: use concrete event types #448
Conversation
698c5f6
to
5785ac4
Compare
@@ -443,25 +443,25 @@ class Cluster : public mqbi::Cluster, | |||
void processClusterSyncRequest(const bmqp_ctrlmsg::ControlMessage& request, | |||
mqbnet::ClusterNode* requester); | |||
|
|||
void onPutEvent(const mqbi::DispatcherEvent& event); | |||
void onPutEvent(const mqbi::DispatcherPutEvent& event); | |||
|
|||
void onRelayPutEvent(const mqbi::DispatcherEvent& event); |
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 method is the only exception for this refactor
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 296 of commit 5785ac4 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.
lgtm
Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
5785ac4
to
d6836a2
Compare
@kaikulimu rebased after MWC migration |
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 328 of commit d6836a2 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.
lgtm
This PR updates interfaces for
mqbblp::Cluster::on[...]Event
, by putting concrete event types in the args.It allows to get rid of excessive assert check within these methods like
BSLS_ASSERT_SAFE(mqbi::DispatcherEventType::e_CONFIRM == event.type());
It also allows to get rid of accessing for a concrete event type the second time like
const mqbi::DispatcherPushEvent* realEvent = event.asPushEvent();
This PR also restores missing checks for being in dispatcher thread.
The only exception to (1) is
void onRelayPutEvent(const mqbi::DispatcherEvent& event);
which usessource()
accessorThis is a preparation PR for #396