add transfer_seq check when merge

This commit is contained in:
a1iive
2023-11-10 08:09:13 +00:00
committed by ob-robot
parent d49d442c2f
commit 4d7029aa80
8 changed files with 46 additions and 13 deletions

View File

@ -6496,13 +6496,15 @@ int ObTablet::check_snapshot_readable(int64_t snapshot_version)
return ret;
}
int ObTablet::check_transfer_seq_equal(const ObTablet &old_tablet, const int64_t transfer_seq)
int ObTablet::check_transfer_seq_equal(const ObTablet &tablet, const int64_t transfer_seq)
{
int ret = OB_SUCCESS;
if (old_tablet.get_tablet_meta().transfer_info_.transfer_seq_ != transfer_seq) {
ret = OB_TABLET_TRANSFER_SEQ_NOT_MATCH;
LOG_WARN("old tablet transfer seq not eq with new transfer seq",
"old_tablet_meta", old_tablet.get_tablet_meta(), K(transfer_seq));
if (0 <= transfer_seq) {
if (tablet.get_tablet_meta().transfer_info_.transfer_seq_ != transfer_seq) {
ret = OB_TABLET_TRANSFER_SEQ_NOT_MATCH;
LOG_WARN("tablet transfer seq not eq with transfer seq",
"tablet_meta", tablet.get_tablet_meta(), K(transfer_seq));
}
}
return ret;
}