Skip to content

Commit 7ead259

Browse files
Handoraob-robot
authored andcommitted
[BUG] remove the protection of replay transfer_out_v2 if mds txn aborted
1 parent 5de7a17 commit 7ead259

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/storage/tablet/ob_tablet_start_transfer_mds_helper.cpp

+14-5
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,20 @@ int ObTabletStartTransferOutReplayExecutor::check_src_transfer_tablet_(
198198
!is_committed)) {
199199
ret = OB_ERR_UNEXPECTED;
200200
LOG_WARN("tablet status is unexpected", K(ret), KPC(tablet), K(tablet_info_), K(user_data));
201-
} else if (mds_op_type_ == ObTxDataSourceType::START_TRANSFER_OUT_V2 && (
202-
ObTabletStatus::TRANSFER_OUT != user_data.tablet_status_ ||
203-
is_committed)) {
204-
ret = OB_ERR_UNEXPECTED;
205-
LOG_WARN("tablet status is unexpected", K(ret), KPC(tablet), K(tablet_info_), K(user_data));
201+
// In the case of MDS txn rollback, during its restart, there is a
202+
// possibility that replay may start directly from the middle (as committed
203+
// MDS txns can block rec_scn through the mds_node, while rollbacked txns
204+
// cannot do the same). Therefore, at this time, we are unable to verify the
205+
// tablet_status with transfer_out through replaying transfer_out_v2 log.
206+
//
207+
// TODO(handora.qc): open the case if the MDS node can remember the rec_scn
208+
// of rollbacked txns
209+
210+
// } else if (mds_op_type_ == ObTxDataSourceType::START_TRANSFER_OUT_V2 && (
211+
// ObTabletStatus::TRANSFER_OUT != user_data.tablet_status_ ||
212+
// is_committed)) {
213+
// ret = OB_ERR_UNEXPECTED;
214+
// LOG_WARN("tablet status is unexpected", K(ret), KPC(tablet), K(tablet_info_), K(user_data));
206215
} else if (tablet_info_.transfer_seq_ != tablet->get_tablet_meta().transfer_info_.transfer_seq_) {
207216
ret = OB_ERR_UNEXPECTED;
208217
LOG_WARN("tablet transfer seq is unexpected", K(ret), KPC(tablet), K(tablet_info_), K(user_data));

0 commit comments

Comments
 (0)