add condition for protection code

This commit is contained in:
Handora 2023-02-09 14:12:54 +00:00 committed by ob-robot
parent 079e8b9a01
commit 6d3dcc7c4c

View File

@ -2632,7 +2632,13 @@ int ObMemtable::mvcc_write_(storage::ObStoreCtx &ctx,
TRANS_LOG(ERROR, "double lock detected", K(*key), K(*value), K(ctx), K(res));
}
if (!res.has_insert()) {
TRANS_LOG(ERROR, "sstable conflict will occurred when already inserted", K(ctx), KPC(this));
if (blocksstable::ObDmlFlag::DF_LOCK != arg.data_->dml_flag_) {
TRANS_LOG(ERROR, "sstable conflict will occurred when already inserted",
K(ctx), KPC(this), K(arg));
} else {
TRANS_LOG(WARN, "sstable conflict will occurred when lock operation",
K(ctx), KPC(this), K(arg));
}
} else {
// Tip1: mvcc_write guarantee the tnode will not be inserted if error is reported
(void)mvcc_engine_.mvcc_undo(value);