Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tiering): add max file size limit #2344

Merged
merged 5 commits into from
Jan 2, 2024
Merged

feat(tiering): add max file size limit #2344

merged 5 commits into from
Jan 2, 2024

Conversation

adiholden
Copy link
Collaborator

fixes #2207

Signed-off-by: adi_holden <[email protected]>
Signed-off-by: adi_holden <[email protected]>
Signed-off-by: adi_holden <[email protected]>
Signed-off-by: adi_holden <[email protected]>
@adiholden adiholden changed the title feat(terring): add max file size limit feat(tiering): add max file size limit Dec 27, 2023
@@ -29,6 +33,11 @@ ABSL_FLAG(string, spill_file_prefix, "",
" associated with tiered storage. E.g,"
"spill_file_prefix=/path/to/file-prefix");

ABSL_FLAG(dfly::MemoryBytesFlag, max_file_size, dfly::MemoryBytesFlag{},
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest prefixing this flag with a feature name, aka tiered_file_max_size.
or spill_file_max_size for consistency though I think we won't use spill file externally so it probably not a good name,

@@ -787,14 +797,52 @@ auto EngineShard::AnalyzeTxQueue() -> TxQueueInfo {

*/

uint64_t GetDiskLimit() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

GetDiskLimit -> GetFsLimit

max_shard_file_size = max_file_size / shard_queue_.size();
if (max_shard_file_size < 256_MB) {
LOG(ERROR) << "Max tiering file size is too small. Setting: "
<< HumanReadableNumBytes(max_file_size) << " Requeried at least "
Copy link
Collaborator

Choose a reason for hiding this comment

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

Requeried -> Required

Signed-off-by: adi_holden <[email protected]>
@adiholden adiholden requested a review from romange December 28, 2023 10:56
@adiholden
Copy link
Collaborator Author

@romange ping

@adiholden adiholden merged commit c60e4ac into main Jan 2, 2024
10 checks passed
@adiholden adiholden deleted the issue_2207 branch January 2, 2024 10:07
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.

add max_file_size flag to limit the size of SSD writes
2 participants