Skip to content

Commit

Permalink
[fix](cloud-schema-change) Write schema change job to a deserialized …
Browse files Browse the repository at this point in the history
…pb buffer rather than a new one
  • Loading branch information
TangSiyang2001 committed Jul 22, 2024
1 parent e4ed733 commit 2606648
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloud/src/meta-service/meta_service_job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ void start_schema_change_job(MetaServiceCode& code, std::string& msg, std::strin
code = cast_as<ErrCategory::READ>(err);
return;
}
if (!job_pb.ParseFromString(job_val)) {
code = MetaServiceCode::PROTOBUF_PARSE_ERR;
msg = "pb deserialization failed";
return;
}
job_pb.mutable_idx()->CopyFrom(request->job().idx());
// FE can ensure that a tablet does not have more than one schema_change job at the same time,
// so we can directly preempt previous schema_change job.
Expand Down

0 comments on commit 2606648

Please sign in to comment.