Skip to content

Commit

Permalink
Read lock zone when create space. (#3693)
Browse files Browse the repository at this point in the history
Co-authored-by: yaphet <[email protected]>
Co-authored-by: Sophie <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2022
1 parent e14aba8 commit 49ee909
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/meta/processors/parts/CreateSpaceProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ void CreateSpaceProcessor::process(const cpp2::CreateSpaceReq& req) {
data.emplace_back(MetaKeyUtils::indexSpaceKey(spaceName),
std::string(reinterpret_cast<const char*>(&spaceId), sizeof(spaceId)));
data.emplace_back(MetaKeyUtils::spaceKey(spaceId), MetaKeyUtils::spaceVal(properties));
folly::SharedMutex::ReadHolder zHolder(LockUtils::zoneLock());
for (auto& zone : zones) {
auto zoneKey = MetaKeyUtils::zoneKey(zone);
auto ret = doGet(zoneKey);
Expand Down

0 comments on commit 49ee909

Please sign in to comment.