Summary: Adds a commit log garbage collector, which clears old transactions from the commit log Reviewers: florijan Reviewed By: florijan Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1310
16 lines
407 B
C++
16 lines
407 B
C++
#pragma once
|
|
|
|
#include "database/storage_gc.hpp"
|
|
|
|
namespace database {
|
|
class StorageGcSingleNode : public StorageGc {
|
|
public:
|
|
using StorageGc::StorageGc;
|
|
|
|
void CollectCommitLogGarbage(tx::transaction_id_t oldest_active) final {
|
|
auto safe_to_delete = GetClogSafeTransaction(oldest_active);
|
|
if (safe_to_delete) tx_engine_.GarbageCollectCommitLog(*safe_to_delete);
|
|
}
|
|
};
|
|
} // namespace database
|