#pragma once
#include <utility>
#include <vector>
#include "tasks/write_task.h"
namespace eloqstore
{
class BackgroundWrite : public WriteTask
{
public:
TaskType Type() const override
{
return TaskType::BackgroundWrite;
}
KvError CompactDataFile();
KvError CreateArchive(std::string_view tag = {});
KvError RunLocalFileGc();
KvError CreateBranch(std::string_view branch_name);
KvError DeleteBranch(std::string_view branch_name);
private:
void HeapSortFpIdsWithYield(
std::vector<std::pair<FilePageId, PageId>> &fp_ids);
};
}