This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 10053117836 [fix](partial update) duplicate key occur when BE restart after conflict concurrent partial update #35739 (#35765) 10053117836 is described below commit 1005311783625330523829598a142d7a2b56e66a Author: Kang <kxiao.ti...@gmail.com> AuthorDate: Sun Jun 2 09:37:20 2024 +0800 [fix](partial update) duplicate key occur when BE restart after conflict concurrent partial update #35739 (#35765) --- be/src/olap/tablet.cpp | 5 ++++- be/src/olap/tablet.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index b6fb72b434f..98998cd68da 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -3513,7 +3513,7 @@ Status Tablet::commit_phase_update_delete_bitmap( return Status::OK(); } -Status Tablet::update_delete_bitmap(const TabletTxnInfo* txn_info, int64_t txn_id) { +Status Tablet::update_delete_bitmap(TabletTxnInfo* txn_info, int64_t txn_id) { SCOPED_BVAR_LATENCY(g_tablet_update_delete_bitmap_latency); RowsetIdUnorderedSet cur_rowset_ids; RowsetIdUnorderedSet rowset_ids_to_add; @@ -3614,6 +3614,9 @@ Status Tablet::update_delete_bitmap(const TabletTxnInfo* txn_info, int64_t txn_i RETURN_IF_ERROR(rowset_writer->build(transient_rowset)); rowset->merge_rowset_meta(transient_rowset->rowset_meta()); + // update the shared_ptr to new bitmap, which is consistent with current rowset. + txn_info->delete_bitmap = delete_bitmap; + // erase segment cache cause we will add a segment to rowset SegmentLoader::instance()->erase_segments(rowset->rowset_id()); } diff --git a/be/src/olap/tablet.h b/be/src/olap/tablet.h index c790c3330bf..fe9f7cf4095 100644 --- a/be/src/olap/tablet.h +++ b/be/src/olap/tablet.h @@ -505,7 +505,7 @@ public: const std::vector<segment_v2::SegmentSharedPtr>& segments, int64_t txn_id, CalcDeleteBitmapToken* token, RowsetWriter* rowset_writer = nullptr); - Status update_delete_bitmap(const TabletTxnInfo* txn_info, int64_t txn_id); + Status update_delete_bitmap(TabletTxnInfo* txn_info, int64_t txn_id); void calc_compaction_output_rowset_delete_bitmap( const std::vector<RowsetSharedPtr>& input_rowsets, const RowIdConversion& rowid_conversion, uint64_t start_version, uint64_t end_version, --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org