Skip to content
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

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

678098
Copy link
Collaborator

@678098 678098 commented Oct 8, 2024

  1. 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();

  2. This PR also restores missing checks for being in dispatcher thread.

  3. The only exception to (1) is void onRelayPutEvent(const mqbi::DispatcherEvent& event); which uses source() accessor

This is a preparation PR for #396

@678098 678098 requested a review from a team as a code owner October 8, 2024 21:16
@678098 678098 force-pushed the 241008_mqbblp_cluster_concrete_types branch 3 times, most recently from 698c5f6 to 5785ac4 Compare October 8, 2024 21:45
@@ -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);
Copy link
Collaborator Author

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

Copy link

@bmq-oss-ci bmq-oss-ci bot left a 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

@678098 678098 requested a review from hallfox October 9, 2024 14:59
@678098 678098 requested review from kaikulimu and removed request for hallfox October 15, 2024 15:41
@678098 678098 assigned kaikulimu and unassigned hallfox Oct 15, 2024
kaikulimu
kaikulimu previously approved these changes Oct 18, 2024
Copy link
Collaborator

@kaikulimu kaikulimu left a 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>
@678098 678098 force-pushed the 241008_mqbblp_cluster_concrete_types branch from 5785ac4 to d6836a2 Compare October 23, 2024 19:50
@678098 678098 requested a review from kaikulimu October 23, 2024 19:51
@678098
Copy link
Collaborator Author

678098 commented Oct 23, 2024

@kaikulimu rebased after MWC migration

Copy link

@bmq-oss-ci bmq-oss-ci bot left a 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

Copy link
Collaborator

@kaikulimu kaikulimu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@678098 678098 merged commit bb7d697 into bloomberg:main Oct 24, 2024
35 checks passed
@678098 678098 deleted the 241008_mqbblp_cluster_concrete_types branch October 24, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants