cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.04k stars 622 forks source link

Assertion fail when insert and delete in the same transaction #1336

Closed nwang57 closed 6 years ago

nwang57 commented 6 years ago
create table foo(id integer);

begin;
insert into foo values(5);
delete from foo where id = 5;

The assertion failed at line 618 in src/concurrency/timestamp_ordering_transaction_manager.cpp. It seems that if the txn owns the tuple, it will not update the tuple's last reader id. So the commitId is 0 during the assertion.

apavlo commented 6 years ago

Thank you for reporting this. We are having a lot of problems with our concurrency control scheme. Is this a blocker for your project?

nwang57 commented 6 years ago

Yeah, we passed all the make check tests except the functions_test which is related to this problem. We will talk with @pmenon on Friday about this issue.

BTW, we just merged with catalog refactoring commit in the master with our changes. So far it doesn't break any test except the above one.

pmenon commented 6 years ago

Fixed in #1337