[BUG] ignore two delete case for seq set violation

This commit is contained in:
Handora
2023-01-11 02:38:34 +00:00
committed by ob-robot
parent da62af66ea
commit b79d70c78e

View File

@ -104,8 +104,18 @@ int check_sequence_set_violation(const concurrent_control::ObWriteFlag write_fla
// and so fail to pass the check. We must bypass the case. // and so fail to pass the check. We must bypass the case.
} else if (write_flag.is_table_api()) { } else if (write_flag.is_table_api()) {
// bypass the case // bypass the case
// Case 6: For the case of deleting rows during building the unique index
// concurrently, it may exist that two rows of the main table point to one
// row of the newly created index, which means the unique index will abort
// itself during consistency check. While because of the feature of the
// online ddl, the concurrent delete will start to operate on the newly
// created index, which causes these two delete operations and fail to pass
// the check. So we need bypass this case.
} else if (blocksstable::ObDmlFlag::DF_DELETE == writer_dml_flag
&& blocksstable::ObDmlFlag::DF_DELETE == locker_dml_flag) {
// bypass the case
} else { } else {
// Case 6: It will never happen that two operaions on the same row for the // Case 7: It will never happen that two operaions on the same row for the
// same txn except the above cases. So we should report unexpected error. // same txn except the above cases. So we should report unexpected error.
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
TRANS_LOG(ERROR, "multiple modification on one row found", K(reader_seq_no), TRANS_LOG(ERROR, "multiple modification on one row found", K(reader_seq_no),