Skip to content

Conversation

@morningman
Copy link
Contributor

  1. Use the data size save in tablet's header to calculate the disk used capacity.
  2. Decrease the default interval of disk and tablet report, from 10 min to 1 min.

ISSUE: #348

1. Use the data size save in tablet's header to calculate the disk used capacity.
2. Decrease the default interval of disk and tablet report, from 10 min to 1 min.
info.capacity = 1;
info.data_used_capacity = 0;
info.available = 0;
_get_path_available_capacity(info.path, &info.available);
Copy link
Contributor

Choose a reason for hiding this comment

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

If you get the value capacity, it may be better to get available by capacity minus data_used_capacity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, available capacity does not equal to the capacity - data_used_capacity;

Actually, capacity = data_used_capacity + available_capacity + other_used_capacity.

other_used_capacity includes logs/, trash/, mini_download/, meta/, etc, which are not included in data_used_capacity.

path_map.emplace(path, it.second->to_root_path_info());
// if this path is not used, init it's info
if (!path_map[path].is_used) {
path_map[path].capacity = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that value of capacity variable is not updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Capacity is set in Store.cpp. And I think the capacity will not change. If it changes, the Backend process must be restarted and the capacity is set when store is being initialized.

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.

4 participants