Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 6779ba7

Browse files
committed
Fix RecordUpdate based on PR feedback.
1 parent 8afd1b7 commit 6779ba7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/concurrency/transaction_context.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ void TransactionContext::RecordUpdate(const ItemPointer &location) {
114114
PELOTON_ASSERT(rw_set_.count(location) == 0 ||
115115
(rw_set_[location] != RWType::DELETE &&
116116
rw_set_[location] != RWType::INS_DEL));
117-
rw_set_[location] = RWType::UPDATE;
117+
auto rw_set_it = rw_set_.find(location);
118+
if (rw_set_it != rw_set_.end() && (rw_set_it->second == RWType::READ || rw_set_it->second == RWType::READ_OWN)) {
119+
rw_set_it->second = RWType::UPDATE;
120+
}
118121
}
119122

120123
void TransactionContext::RecordInsert(const ItemPointer &location) {

0 commit comments

Comments
 (0)