Skip to content

Commit

Permalink
[fix](txn) persist txn record of single replica load and ccr ingestion
Browse files Browse the repository at this point in the history
Otherwise txn would be dropped when a be reboots.
  • Loading branch information
dataroaring committed Sep 18, 2023
1 parent 96f1971 commit d07e87b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion be/src/service/backend_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ void BackendService::ingest_binlog(TIngestBinlogResult& result,
Status commit_txn_status = StorageEngine::instance()->txn_manager()->commit_txn(
local_tablet->data_dir()->get_meta(), rowset_meta->partition_id(),
rowset_meta->txn_id(), rowset_meta->tablet_id(), local_tablet->tablet_uid(),
rowset_meta->load_id(), rowset, true);
rowset_meta->load_id(), rowset, false);
if (!commit_txn_status && !commit_txn_status.is<ErrorCode::PUSH_TRANSACTION_ALREADY_EXIST>()) {
auto err_msg = fmt::format(
"failed to commit txn for remote tablet. rowset_id: {}, remote_tablet_id={}, "
Expand Down
2 changes: 1 addition & 1 deletion be/src/service/internal_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ void PInternalServiceImpl::request_slave_tablet_pull_rowset(
Status commit_txn_status = StorageEngine::instance()->txn_manager()->commit_txn(
tablet->data_dir()->get_meta(), rowset_meta->partition_id(), rowset_meta->txn_id(),
rowset_meta->tablet_id(), tablet->tablet_uid(), rowset_meta->load_id(), rowset,
true);
false);
if (!commit_txn_status && !commit_txn_status.is<PUSH_TRANSACTION_ALREADY_EXIST>()) {
LOG(WARNING) << "failed to add committed rowset for slave replica. rowset_id="
<< rowset_meta->rowset_id() << ", tablet_id=" << rowset_meta->tablet_id()
Expand Down

0 comments on commit d07e87b

Please sign in to comment.