src/storage/v2/commit_log.hpp
Keeps track of the oldest active transaction by using the bitfield for timestamps where 1 means that the transaction with that commit timestamp is finished.
After a transaction or global operation finishes, its start and commit timestamp should be marked as finished in the commit log so that the oldest active timestamp can be updated.
src/storage/v2/storage.(cpp|hpp)
After a transaction finishes and it contains some deltas (database modifications), the Transaction object is placed in the committed_transactions list.
Each time an edge or vertex is deleted, the deleted flag is set for the corresponding object,
if a transaction if aborted the GID of that object is also added to the deleted_vertices_ or deleted_edges_ object.
src/storage/v2/storage.cpp::CollectGarbage()
Runs periodically
Only one instance of garbage collection can be active at the same time, i.e. if the garbage collection triggers again before the last one finished, the current garbage collections just returns.
Get the current list of deleted_vertices_ and deleted_edges_
We iterate each transaction by using the committed_transactions list and clean it IF it's commit timestamp is before the oldest active start timestamp
Clean the transaction's deltas from each object it modified.