Skip to content

Conversation

@morningman
Copy link
Contributor

Set high watermark and flood stage of disk used capacity.
And forbid some operations if disk usage is too high.

ISSUE: #1701


Status DataDir::update_capacity() {
try {
boost::filesystem::path path_name(_path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::filesystem

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++14 not support std::filesystem

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++14 not support std::filesystem

}

OLAPStatus Compaction::check_disk_capacity() {
int64_t incoming_data_size = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only in SegmentWriter will be ok. All writers only go through the SegmentWriter.

: _path(path),
_capacity_bytes(capacity_bytes),
_available_bytes(0),
_disk_capacity_bytes(0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_capacity_bytes and _disk_capacity_bytes are redundant ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, _capacity_bytes is user specified disk capacity, but it currently not used.
_disk_capacity_bytes is the capacity of the disk


// check disk capacity
int64_t tablet_size = rs_reader->rowset()->index_disk_size() + rs_reader->rowset()->data_disk_size();
if (sc_params.new_tablet->data_dir()->reach_capacity_limit(tablet_size)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unify the entrance.

@morningman morningman merged commit 7e981b2 into apache:master Aug 27, 2019
@imay imay mentioned this pull request Sep 26, 2019
swjtu-zhanglei pushed a commit to swjtu-zhanglei/incubator-doris that referenced this pull request Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants