Fail write_file if the content will cause carbonadod to go over system capacity

Open
#28 0 comments 0 reactions 1 assignee View on GitHub

@rustchain64 is already working on this.

Since Mar 16, 2023.

Assessment

This issue has not been assessed yet.

Description

As specified in the config.toml, check if the capacity specified will be exceeded when write_file is called. We can just check early on, the length of file_bytes, and do a worst-case heuristic of 2x on that size. Also keep in mind, that size is in bytes, but capacity is measured in gigabytes.

The size of only one volume needs to be checked, then it can be multiplied by FEC_M.

Dominant language
Rust
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bitmask-stack/carbonado-node

All issues in bitmask-stack/carbonado-node

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.