Skip to content
Merged
Changes from all commits
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
21 changes: 13 additions & 8 deletions be/src/service/backend_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,13 +1096,18 @@ void BackendService::ingest_binlog(TIngestBinlogResult& result,
PUniqueId p_load_id;
p_load_id.set_hi(load_id.hi);
p_load_id.set_lo(load_id.lo);
auto status = _engine.txn_manager()->prepare_txn(partition_id, *local_tablet, txn_id, p_load_id,
is_ingrest);
if (!status.ok()) {
LOG(WARNING) << "prepare txn failed. txn_id=" << txn_id
<< ", status=" << status.to_string();
status.to_thrift(&tstatus);
return;

{
// See RowsetBuilder::prepare_txn for details
std::shared_lock base_migration_lock(local_tablet->get_migration_lock());
auto status = _engine.txn_manager()->prepare_txn(partition_id, *local_tablet, txn_id,
p_load_id, is_ingrest);
if (!status.ok()) {
LOG(WARNING) << "prepare txn failed. txn_id=" << txn_id
<< ", status=" << status.to_string();
status.to_thrift(&tstatus);
return;
}
}

bool is_async = (_ingest_binlog_workers != nullptr);
Expand All @@ -1123,7 +1128,7 @@ void BackendService::ingest_binlog(TIngestBinlogResult& result,
};

if (is_async) {
status = _ingest_binlog_workers->submit_func(std::move(ingest_binlog_func));
auto status = _ingest_binlog_workers->submit_func(std::move(ingest_binlog_func));
if (!status.ok()) {
status.to_thrift(&tstatus);
return;
Expand Down
Loading