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

Fix fulltext stopped #4757

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix fulltext stopped
  • Loading branch information
SuperYoko committed Oct 20, 2022
commit f67bbde0c61abe06e56aca1b41154b1ead1a1d21
4 changes: 4 additions & 0 deletions src/meta/processors/job/JobManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ nebula::cpp2::ErrorCode JobManager::jobFinished(
force = true;
}

auto rollbackStatus = optJobDesc.getStatus();
if (!optJobDesc.setStatus(jobStatus, force)) {
// job already been set as finished, failed or stopped
return nebula::cpp2::ErrorCode::E_JOB_ALREADY_FINISH;
Expand Down Expand Up @@ -396,6 +397,9 @@ nebula::cpp2::ErrorCode JobManager::jobFinished(
}
// job has been stopped successfully, so update the job status
return save(jobKey, jobVal);
} else if (code == nebula::cpp2::ErrorCode::E_JOB_NOT_STOPPABLE) {
// rollback the job status
optJobDesc.setStatus(rollbackStatus, true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

f***k there's risk stop block task report!

Copy link
Contributor

Choose a reason for hiding this comment

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

This optJobDesc is a temporary variable. Where to save it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed by #4742

}
// job could not be stopped, so do not update the job status
return code;
Expand Down