[FEAT MERGE] data disk write limit

This commit is contained in:
obdev
2024-04-02 04:29:10 +00:00
committed by ob-robot
parent 46511938dc
commit 08453955ce
14 changed files with 255 additions and 18 deletions

View File

@ -176,11 +176,15 @@ public:
virtual int64_t get_max_block_count(int64_t reserved_size) const override;
virtual int64_t get_reserved_block_count() const override;
virtual int check_space_full(const int64_t required_size) const override;
virtual int check_write_limited() const override;
public:
static const int64_t RESERVED_BLOCK_INDEX = 2; // the first 2 blocks is used for super block
private:
int get_data_disk_used_percentage_(
const int64_t required_size,
int64_t &percent) const;
int get_block_file_size(
const char *sstable_dir,
const int64_t reserved_size,