Skip to content

Commit

Permalink
fix fix 0 file error (#3920)
Browse files Browse the repository at this point in the history
  • Loading branch information
panda-sheep authored Feb 22, 2022
1 parent 7c0d0da commit 7764aed
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tools/db-upgrade/DbUpgrader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,9 +991,12 @@ void UpgraderSpace::doProcessV3() {
while (unFinishedPart_ != 0) {
sleep(10);
}
auto code = readEngine_->ingest(ingest_sst_file_, true);
if (code != ::nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(FATAL) << "Faild upgrade 2:3 when ingest sst file:" << static_cast<int>(code);

if (ingest_sst_file_.size() != 0) {
auto code = readEngine_->ingest(ingest_sst_file_, true);
if (code != ::nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(FATAL) << "Faild upgrade 2:3 when ingest sst file:" << static_cast<int>(code);
}
}
readEngine_->put(NebulaKeyUtils::dataVersionKey(), NebulaKeyUtilsV3::dataVersionValue());
}
Expand Down

0 comments on commit 7764aed

Please sign in to comment.