Skip to content

Commit

Permalink
update time when alter space
Browse files Browse the repository at this point in the history
  • Loading branch information
liwenhui-soul committed Mar 14, 2022
1 parent cd38313 commit 931a5cd
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/meta/processors/parts/AlterSpaceProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,9 @@ nebula::cpp2::ErrorCode AlterSpaceProcessor::addZones(const std::string& spaceNa
properties.zone_names_ref() = newZones;
std::vector<kvstore::KV> data;
data.emplace_back(MetaKeyUtils::spaceKey(spaceId), MetaKeyUtils::spaceVal(properties));
folly::Baton<true, std::atomic> baton;
nebula::cpp2::ErrorCode ret = nebula::cpp2::ErrorCode::SUCCEEDED;
kvstore_->asyncMultiPut(kDefaultSpaceId,
kDefaultPartId,
std::move(data),
[&ret, &baton](nebula::cpp2::ErrorCode code) {
if (nebula::cpp2::ErrorCode::SUCCEEDED != code) {
ret = code;
LOG(INFO) << "Put data error on meta server";
}
baton.post();
});
baton.wait();
auto timeInMilliSec = time::WallClock::fastNowInMilliSec();
LastUpdateTimeMan::update(data, timeInMilliSec);
auto ret = doSyncPut(std::move(data));
return ret;
}

Expand Down

0 comments on commit 931a5cd

Please sign in to comment.