diff --git a/src/graph/validator/AdminJobValidator.cpp b/src/graph/validator/AdminJobValidator.cpp index c2d9cfd7793..bb1d8f7e4a6 100644 --- a/src/graph/validator/AdminJobValidator.cpp +++ b/src/graph/validator/AdminJobValidator.cpp @@ -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); diff --git a/tests/tck/job/Job.feature b/tests/tck/job/Job.feature index bace1f4a71a..dd97302e875 100644 --- a/tests/tck/job/Job.feature +++ b/tests/tck/job/Job.feature @@ -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+/ |