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

[Bug] Incorrect code comment #267

Closed
1 task done
diaohancai opened this issue Sep 17, 2023 · 0 comments · Fixed by #268
Closed
1 task done

[Bug] Incorrect code comment #267

diaohancai opened this issue Sep 17, 2023 · 0 comments · Fixed by #268
Labels
bug Something isn't working

Comments

@diaohancai
Copy link
Contributor

diaohancai commented Sep 17, 2023

Bug Type (问题类型)

None

Before submit

Environment (环境信息)

  • Server Version: v1.0.x
  • Computer Version: v1.0.x
  • Scheduler: K8s V1.xx

Expected & Actual behavior (期望与实际表现)

org.apache.hugegraph.computer.core.common.ContainerInfo found incorrect comment.

Incorrect comment:

/*
 * There is only 1 master, and the id of master is -1.
 * The id of workers start from 0. The id is used to identify a worker.
 */
private int id;

Actual code:

this.masterInfo = new ContainerInfo(ContainerInfo.MASTER_ID,
                                        TransportUtil.host(rpcAddress),
                                        rpcAddress.getPort());
int ContainerInfo.MASTER_ID = 0;
private void assignIdForWorkers(List<ContainerInfo> containers) {
    // Assign worker id from 1.
    for (int i = 0; i < containers.size(); i++) {
        containers.get(i).id(i + 1);
    }
}

So:

  • The id of master is 0.
  • The id of workers start from 1.
@diaohancai diaohancai added the bug Something isn't working label Sep 17, 2023
diaohancai added a commit to diaohancai/incubator-hugegraph-computer that referenced this issue Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant