When a txn is aborted and the compaction threshold for number of aborted txns is not reached then the aborted transaction can remain forever in the RDBMS database. This could result in several serious performance degradations:
- getOpenTxns has to list this aborted txn forever
- TXN_TO_WRITE_ID table is not cleaned
We should add a threshold, so after a given time the compaction is started anyway.