Skip to content

Commit

Permalink
Fix iterator with snapshot(parameter position) (#3785)
Browse files Browse the repository at this point in the history
Co-authored-by: Harris.Chu <[email protected]>
Co-authored-by: Sophie <[email protected]>
  • Loading branch information
3 people authored Jan 24, 2022
1 parent 4808e5b commit be4b679
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/kvstore/NebulaStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ void NebulaStore::ReleaseSnapshot(GraphSpaceID spaceId, PartitionID partId, cons
if (!ok(ret)) {
LOG(INFO) << "Failed to release snapshot for GraphSpaceID " << spaceId << " PartitionID"
<< partId;
return;
}
auto part = nebula::value(ret);
return part->engine()->ReleaseSnapshot(snapshot);
Expand Down
10 changes: 5 additions & 5 deletions src/tools/db-upgrade/DbUpgrader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void UpgraderSpace::runPartV1() {
<< partId;
const auto& prefix = NebulaKeyUtilsV1::prefix(partId);
std::unique_ptr<kvstore::KVIterator> iter;
auto retCode = readEngine_->prefix(prefix, nullptr, &iter);
auto retCode = readEngine_->prefix(prefix, &iter);
if (retCode != nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(ERROR) << "Space id " << spaceId_ << " part " << partId << " no found!";
LOG(ERROR) << "Handle vertex/edge/index data in space id " << spaceId_ << " part id "
Expand Down Expand Up @@ -393,7 +393,7 @@ void UpgraderSpace::doProcessV1() {
LOG(INFO) << "Start to handle system data in space id " << spaceId_;
auto prefix = NebulaKeyUtilsV1::systemPrefix();
std::unique_ptr<kvstore::KVIterator> iter;
auto retCode = readEngine_->prefix(prefix, nullptr, &iter);
auto retCode = readEngine_->prefix(prefix, &iter);
if (retCode != nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(ERROR) << "Space id " << spaceId_ << " get system data failed";
LOG(ERROR) << "Handle system data in space id " << spaceId_ << " failed";
Expand Down Expand Up @@ -433,7 +433,7 @@ void UpgraderSpace::runPartV2() {
<< partId;
auto prefix = NebulaKeyUtilsV2::partPrefix(partId);
std::unique_ptr<kvstore::KVIterator> iter;
auto retCode = readEngine_->prefix(prefix, nullptr, &iter);
auto retCode = readEngine_->prefix(prefix, &iter);
if (retCode != nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(ERROR) << "Space id " << spaceId_ << " part " << partId << " no found!";
LOG(ERROR) << "Handle vertex/edge/index data in space id " << spaceId_ << " part id "
Expand Down Expand Up @@ -601,7 +601,7 @@ void UpgraderSpace::doProcessV2() {
LOG(INFO) << "Start to handle system data in space id " << spaceId_;
auto prefix = NebulaKeyUtilsV2::systemPrefix();
std::unique_ptr<kvstore::KVIterator> iter;
auto retCode = readEngine_->prefix(prefix, nullptr, &iter);
auto retCode = readEngine_->prefix(prefix, &iter);
if (retCode != nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(ERROR) << "Space id " << spaceId_ << " get system data failed.";
LOG(ERROR) << "Handle system data in space id " << spaceId_ << " failed.";
Expand Down Expand Up @@ -894,7 +894,7 @@ void UpgraderSpace::runPartV3() {
<< partId;
auto prefix = NebulaKeyUtilsV3::partTagPrefix(partId);
std::unique_ptr<kvstore::KVIterator> iter;
auto retCode = readEngine_->prefix(prefix, nullptr, &iter);
auto retCode = readEngine_->prefix(prefix, &iter);
if (retCode != nebula::cpp2::ErrorCode::SUCCEEDED) {
LOG(ERROR) << "Space id " << spaceId_ << " part " << partId << " no found!";
LOG(ERROR) << "Handle vertex/edge/index data in space id " << spaceId_ << " part id "
Expand Down

0 comments on commit be4b679

Please sign in to comment.