Skip to content

Commit

Permalink
[fix][store] Fix pessimistic rollback's for_update_ts check.
Browse files Browse the repository at this point in the history
Signed-off-by: Ketor <d.ketor@gmail.com>
  • Loading branch information
ketor authored and astor-oss committed Mar 8, 2024
1 parent 50135f2 commit 7c7a8bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/txn_engine_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ butil::Status TxnEngineHelper::PessimisticRollback(RawEnginePtr raw_engine, std:
*response->add_txn_result()->mutable_locked() = lock_info;
continue;
} else if (lock_info.lock_ts() == start_ts) {
if (lock_info.for_update_ts() == for_update_ts) {
if (lock_info.for_update_ts() <= for_update_ts) {
// this is same pessimistic lock request, just do rollback.
DINGO_LOG_IF(INFO, FLAGS_dingo_log_switch_txn_detail)
<< fmt::format("[txn][region({})] PessimisticRollback,", region->Id())
Expand Down

0 comments on commit 7c7a8bc

Please sign in to comment.