valkey
valkey copied to clipboard
add parameter for limiting maximum AOF files size on disk
[duplicate of this]
one can optionally want to limit AOF disk usage not with disk real size, but with some tailored value. this PR makes it possible. possible use cases:
- filling disk up with AOF to the real limit may break something in user's environment (logs, watchdogs, anything) - setting lower value prevents that completely;
- setting this new limit to some low value may allow automatic solving of filling disk problem for those users who don't care too much about disk cost:
- intense writes may overcome automatic AOF rewrite with some user's settings at some moment;
- AOF reach lower than full disk limit (e.g. 50-60% of disk);
- eventually automatic AOF rewrite comes in once more and finally fixes that. while on 100% filled disk (like nowadays) that automatic solution is impossible due to insufficient space for tmp AOF rewrite files (0 space, actually) - one should size up disk under running database which makes some people a bit nervous, as I noticed, and in some cases that's not always convenient or even possible.
Fixes #540
Codecov Report
Attention: Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.
Project coverage is 71.44%. Comparing base (
663dac9) to head (274cba6).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/aof.c | 70.00% | 3 Missing :warning: |
| src/server.c | 90.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## unstable #1630 +/- ##
============================================
+ Coverage 71.30% 71.44% +0.14%
============================================
Files 123 123
Lines 67122 67135 +13
============================================
+ Hits 47859 47966 +107
+ Misses 19263 19169 -94
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/config.c | 78.47% <ø> (ø) |
|
| src/server.h | 100.00% <ø> (ø) |
|
| src/server.c | 88.09% <90.00%> (-0.01%) |
:arrow_down: |
| src/aof.c | 80.38% <70.00%> (-0.15%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@xbasel @soloestoy pls take a look, I've dumped my previous similar PR where you were reviewers