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

fixes bug with starting multiple group of scan servers #4445

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

keith-turner
Copy link
Contributor

When trying to start and stop multiple groups of scan servers using the accumulo-cluster script the groups would interfere with each other. This change fixes that by making the the scan servers use the group in the instance id like compactors do.

Ran into this while workiing on #4444 and pulled it out as a stand alone fix.

When trying to start and stop multiple groups of scan servers using the
accumulo-cluster script the groups would interfere with each other.
This change fixes that by making the the scan servers use the group in
the instance id like compactors do.

Ran into this while workiing on apache#4444 and pulled it out as a stand alone
fix.
@@ -141,7 +141,7 @@ function control_service() {
ACCUMULO_SERVICE_INSTANCE=""
[[ $service == "tserver" && ${NUM_TSERVERS:-1} -gt 1 ]] && ACCUMULO_SERVICE_INSTANCE=${inst_id}
[[ $service == "compactor" ]] && ACCUMULO_SERVICE_INSTANCE="${inst_id}_${5}"
[[ $service == "sserver" && ${NUM_SSERVERS:-1} -gt 1 ]] && ACCUMULO_SERVICE_INSTANCE=${inst_id}
[[ $service == "sserver" ]] && ACCUMULO_SERVICE_INSTANCE="${inst_id}_${5}"
Copy link
Contributor

Choose a reason for hiding this comment

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

We could simplify the code a bit more and only use the sserver1_<group> or compactor1_<queue> patterns when there's more than one of each type.

    ACCUMULO_SERVICE_INSTANCE=""
    # Only increment the service name when more than one service is desired.
    [[ last_instance_id -gt 1 ]] && ACCUMULO_SERVICE_INSTANCE="${inst_id}"
    [[ $service == "compactor" || $service == "sserver" ]] && ACCUMULO_SERVICE_INSTANCE="${ACCUMULO_SERVICE_INSTANCE}_${5}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could simplify the code a bit more and only use the sserver1_ or compactor1_ patterns when there's more than one of each type.

There is one thing I like about always adding the 1 even if there is only a single server and that is the log naming. If I start w/ a single server process then I will get a log file w/o the 1. If I change config to running 2 server process then I will get two logs files with numbers and the log file w/o a number is abandoned.

I will take a stab at simplification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ddanielr I decided to go ahead and merge this for now because we have both tested this change and did not want to test again after trying to make the code shorter.

Copy link
Contributor

@ddanielr ddanielr left a comment

Choose a reason for hiding this comment

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

Tested and it fixes the sserver collision.
Added a comment about a further improvement but it's not necessary to fix the bug.

@keith-turner keith-turner merged commit 7c6572c into apache:2.1 Apr 11, 2024
8 checks passed
@keith-turner keith-turner deleted the fix-scan-server-groups branch April 11, 2024 23:19
@keith-turner keith-turner added this to the 2.1.3 milestone Jul 12, 2024
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