mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-18 17:27:11 +00:00
GC improvements
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#include "RelayServer.h"
|
||||
|
||||
#include "gc.h"
|
||||
|
||||
|
||||
void RelayServer::cleanupOldEvents() {
|
||||
std::vector<uint64_t> expiredLevIds;
|
||||
@ -63,3 +65,14 @@ void RelayServer::cleanupOldEvents() {
|
||||
if (numDeleted) LI << "Deleted " << numDeleted << " ephemeral events";
|
||||
}
|
||||
}
|
||||
|
||||
void RelayServer::garbageCollect() {
|
||||
quadrable::Quadrable qdb;
|
||||
{
|
||||
auto txn = env.txn_ro();
|
||||
qdb.init(txn);
|
||||
}
|
||||
qdb.checkout("events");
|
||||
|
||||
quadrableGarbageCollect(qdb, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user