#include "cynara_checker.hh"
#include "request_handler_factory.hh"
#include "server/database/db_handle_provider.hh"
+#include "server/database/remove_cache_db_handler.hh"
#include "utils/logging.hh"
#include "pkgmgrinfo_debug.h"
h->timer_ = 0;
}
- if (database::DBHandleProvider::IsCrashedWriteRequest())
- database::DBHandleProvider::GetInst(getuid()).UnsetMemoryMode(getpid());
+ auto crashed_writer_pids =
+ database::DBHandleProvider::CrashedWriteRequestPIDs();
+ if (!crashed_writer_pids.empty()) {
+ database::RemoveCacheDBHandler db(getuid(), std::move(crashed_writer_pids));
+ db.SetLocale(h->locale_.GetObject());
+ db.Execute();
+ }
sqlite3_release_memory(-1);
malloc_trim(0);