Skip to content

Commit

Permalink
[fix][coordinator] Allow executor to create region.
Browse files Browse the repository at this point in the history
Signed-off-by: Ketor <[email protected]>
  • Loading branch information
ketor committed Jun 20, 2024
1 parent b68a578 commit 778eb26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/coordinator_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1266,9 +1266,10 @@ void DoCreateRegion(google::protobuf::RpcController * /*controller*/,
return;
}

if (!Helper::IsClientRaw(range.start_key()) && !Helper::IsClientTxn(range.start_key())) {
if (!Helper::IsClientRaw(range.start_key()) && !Helper::IsClientTxn(range.start_key()) &&
!Helper::IsExecutorRaw(range.start_key()) && !Helper::IsExecutorTxn(range.start_key())) {
response->mutable_error()->set_errcode(static_cast<pb::error::Errno>(pb::error::Errno::EILLEGAL_PARAMTETERS));
response->mutable_error()->set_errmsg("This api can only create client raw/txn region");
response->mutable_error()->set_errmsg("This api can only create client or executor raw/txn region");
return;
}

Expand Down

0 comments on commit 778eb26

Please sign in to comment.