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

DM-47612: Refactoring and simplifications in the Qserv worker replication service #879

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

iagaponenko
Copy link
Contributor

No description provided.

Copy link
Contributor

@jgates108 jgates108 left a comment

Choose a reason for hiding this comment

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

Looks good, just minor comments. It does simplify the code significantly :)

@@ -86,55 +80,20 @@ class WorkerDeleteRequest : public WorkerRequest {
*/
void setInfo(ProtocolResponseDelete& response) const;

bool execute() override;
virtual bool execute() override;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should just be override without virtual as the base class WorkerRequest has virtual bool execute() defined.
C++ style guide 5-44

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

* @param response Protobuf response to be initialized
*/
void setInfo(ProtocolResponseDirectorIndex& response) const;

bool execute() override;
virtual bool execute();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be override instead of virtual as execute() is declared virtual in WorkerRequest?

@@ -83,27 +80,20 @@ class WorkerEchoRequest : public WorkerRequest {
*/
void setInfo(ProtocolResponseEcho& response) const;

bool execute() override;
virtual bool execute();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this should be override instead of virtual?

@@ -83,56 +78,20 @@ class WorkerFindAllRequest : public WorkerRequest {
*/
void setInfo(ProtocolResponseFindAll& response) const;

bool execute() override;
virtual bool execute();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be override?

@@ -91,59 +84,23 @@ class WorkerFindRequest : public WorkerRequest {
*/
void setInfo(ProtocolResponseFind& response) const;

bool execute() override;
virtual bool execute();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be override?

@@ -102,86 +98,13 @@ class WorkerReplicationRequest : public WorkerRequest {
*/
void setInfo(ProtocolResponseReplicate& response) const;

bool execute() override;
virtual bool execute();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be override?

@@ -92,7 +92,7 @@ class WorkerSqlRequest : public WorkerRequest {
*/
void setInfo(ProtocolResponseSql& response) const;

bool execute() override;
virtual bool execute();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be override?

The parameter is no longer needed after refacttoring and simplifying
a design and implementation of the worker service.

Also cleaned empty lines in the worker code
@iagaponenko iagaponenko merged commit 6e44e0d into main Nov 21, 2024
15 checks passed
@iagaponenko iagaponenko deleted the tickets/DM-47612 branch November 21, 2024 19:28
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.

2 participants