cmu-db / peloton

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

Abort transaction results in memory leaks #1291

Open pervazea opened 6 years ago

pervazea commented 6 years ago

From #1063 See the an extract of one of the tests added, below. In this version, the transaction is terminated with commit. This works fine. The original version terminated the transaction with abort. The result when running with the address sanitizer was a raft of memory leaks (there were quite a few tests added in that style).

My assumption is that abort transaction should not leak any memory.

From the insert_sql_test.cpp

 query = "INSERT INTO test VALUES(3, 4);";
 txn = txn_manager.BeginTransaction();
 EXPECT_THROW(TestingSQLUtil::GeneratePlanWithOptimizer(optimizer, query, txn),
             peloton::CatalogException);
txn_manager.CommitTransaction(txn);