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 space not right when submit job after use. #3010

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/graph/validator/AdminJobValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Status AdminJobValidator::validateImpl() {
if (sentence_->getOp() == meta::cpp2::AdminJobOp::ADD) {
auto cmd = sentence_->getCmd();
if (requireSpace()) {
const auto &spaceInfo = qctx()->rctx()->session()->space();
const auto &spaceInfo = vctx_->whichSpace();
auto spaceId = spaceInfo.id;
const auto &spaceName = spaceInfo.name;
sentence_->addPara(spaceName);
Expand Down
21 changes: 15 additions & 6 deletions tests/tck/job/Job.feature
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,18 @@ Feature: Submit job space requirements
"""
Then an ExecutionError should be raised at runtime:Job not in chosen space!

# This is skipped becuase it is hard to simulate the situation
# When executing query:
# """
# RECOVER JOB;
# """
# Then the result should be successful
# This is skipped becuase it is hard to simulate the situation
# When executing query:
# """
# RECOVER JOB;
# """
# Then the result should be successful
Scenario: rebuild index after use, fix #2806
When executing query:
"""
USE nba;
REBUILD TAG INDEX;
"""
Then the result should be, in any order:
| New Job Id |
| /\d+/ |