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 and Sophie-Xie committed Mar 10, 2022
1 parent 02b2091 commit dc5ba2b
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 dc5ba2b

Please sign in to comment.