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

feat(server): support single computer do schedule task #2676

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shirleyStorage
Copy link
Contributor

@shirleyStorage shirleyStorage commented Oct 11, 2024

Purpose of the PR

Main Changes

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:

Does this PR potentially affect the following parts?

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

shirley118146 added 3 commits October 12, 2024 00:31
Signed-off-by: shirley118146 <shirley118146@gmail.com>
Signed-off-by: shirley118146 <shirley118146@gmail.com>
Signed-off-by: shirley118146 <shirley118146@gmail.com>
@shirleyStorage shirleyStorage changed the title [DNM] Support computer do schedule task Support computer do schedule task Oct 11, 2024
@shirleyStorage shirleyStorage marked this pull request as ready for review October 11, 2024 17:45
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. feature New feature labels Oct 11, 2024
@shirleyStorage
Copy link
Contributor Author

@imbajin PTAL~

@shirleyStorage shirleyStorage changed the title Support computer do schedule task Support single computer do schedule task Oct 12, 2024
@imbajin imbajin requested a review from zyxxoo October 12, 2024 08:43
@shirleyStorage
Copy link
Contributor Author

@imbajin I updated the test case to the PR description. PTAL ~~

@shirleyStorage
Copy link
Contributor Author

@dosu how to rerun "HugeGraph-Server CI / build-server (hbase, 11)"

@JackyYangPassion
Copy link
Contributor

@dosu how to rerun "HugeGraph-Server CI / build-server (hbase, 11)"

2024-10-22.22.40.08.mov

Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.
Can I know in what scenario you need to do this?


boolean singleNode = !hasWorkerNode||computerNodeCount==1;
if (singleNode != this.onlySingleNode) {
LOG.info("Switch only_single_node 02 to {}", singleNode);
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure 02 means what

}
if (server.role().master()) {
continue;
}else if (server.role().computer()){
Copy link
Contributor

Choose a reason for hiding this comment

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

add a space after '}', or remove 'else'

return this.selfNodeRole() != null && this.selfNodeRole().master();
public boolean selfIsMasterOrSingleComputer() {
boolean isMaster=this.selfNodeRole() != null && this.selfNodeRole().master();
boolean isSingleComputer=isStandAloneComputer();
Copy link
Contributor

Choose a reason for hiding this comment

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

expect spaces " = "

return this.selfNodeRole() != null && this.selfNodeRole().computer();
}

public boolean isStandAloneComputer(){
Copy link
Contributor

Choose a reason for hiding this comment

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

unused method?

@imbajin imbajin changed the title Support single computer do schedule task feat: support single computer do schedule task Oct 28, 2024
@imbajin imbajin changed the title feat: support single computer do schedule task feat(server): support single computer do schedule task Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Can not delete vertex labels when use standalone mode and set server.role=computer
3 participants