memgraph/src/database/storage_gc_single_node.hpp
Dominik Gleich eb30ecb6a0 Commit log gc
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
2018-04-04 10:25:25 +02:00

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