Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

fix use incorrect lock #500

Merged
merged 2 commits into from
Jun 23, 2021
Merged
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
4 changes: 2 additions & 2 deletions src/meta/processors/schemaMan/CreateEdgeProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ void CreateEdgeProcessor::process(const cpp2::CreateEdgeReq& req) {
{
// if there is an tag of the same name
// TODO: there exists race condition, we should address it in the future
folly::SharedMutex::ReadHolder rHolder(LockUtils::edgeLock());
folly::SharedMutex::ReadHolder rHolder(LockUtils::tagLock());
auto conflictRet = getTagId(spaceId, edgeName);
if (nebula::ok(conflictRet)) {
LOG(ERROR) << "Failed to create edge `" << edgeName
<< "': some edge with the same name already exists.";
<< "': some tag with the same name already exists.";
resp_.set_id(to(nebula::value(conflictRet), EntryType::EDGE));
handleErrorCode(nebula::cpp2::ErrorCode::E_CONFLICT);
onFinished();
Expand Down