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 iterator with snapshot(parameter position) #3785

Merged
merged 4 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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