-
Notifications
You must be signed in to change notification settings - Fork 714
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
add parameter for limiting maximum AOF files size on disk #1425
Closed
Closed
Changes from 2 commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
91cf42d
added aof-max-size parameter with tests; fixes #540
kronwerk b57409c
tuned tests
kronwerk 089015b
defrag: allow defrag to start during AOF loading (#1420)
JimB123 2a2900f
Send MEET packet to node if there is no inbound link to fix inconsist…
pieturin f5793d8
Avoid defragging scripts during EVAL command execution (#1414)
ranshid e407ced
Use `configure-aws-credentials` workflow instead of passing `secret_a…
vudiep411 fa97d89
Fix Valkey binary build workflow, version support changes. (#1429)
roshkhatri efa90ff
defrag: eliminate persistent kvstore pointer and edge case fixes (#1430)
JimB123 c962a3e
Check length before reading in `stringmatchlen` (#1431)
thaliaarchi 2b73371
Skip build-release-packages CI job in forks (#1438)
enjoy-binbin 630327c
Fix wrong file name in build-release-packages.yml (#1437)
enjoy-binbin 5bf8a6b
Avoid importing memory aligned malloc (#1442)
madolson 8faf3c3
Synchronously delete data during defrag tests (#1443)
madolson 3931ee4
Replace dict with new hashtable for sets datatype (#1176)
SoftlyRaining aa35b89
Automatic failover vote is not limited by two times the node timeout …
enjoy-binbin 4b7e07f
Drop the MEET packet if the link node is in handshake state (#1436)
enjoy-binbin d76ca02
Fix the secrete for test bucket. (#1447)
roshkhatri bc4f865
Fix test_reclaimFilePageCache to avoid tmpfs (#1379)
xbasel 5c414bf
Introduce FORCE_DEFRAG compilation option to allow activedefrag run w…
ranshid 1e20853
Discover and fix new typos (#1446)
szepeviktor cbe08dd
Fix undefined behavior defined by ASAN (#1451)
madolson c720899
Offload TLS negotiation to I/O threads (#1338)
uriyage bfad110
Attempt to read secondary error from info test (#1452)
madolson 84c1a44
Add a hint about the current file for TCL debugging (#1459)
madolson fff1573
Minor log fixes when failover auth denied due to slot epoch (#1341)
enjoy-binbin 4aa656f
Support for reading from replicas in valkey-benchmark (#1392)
bluayer 7f0cc83
Workflow changes to fix old release binaries (#1461)
roshkhatri cfa292a
Clear outdated failure reports more accurately (#1184)
enjoy-binbin 13419cb
Fix storing the wrong PID in active servers (#1464)
madolson b3daabe
Update info.tcl test to revert client output limits sooner (#1462)
madolson beb95d3
Resolve bounds checks on cluster_legacy.c (#1463)
madolson 32b09c6
Adds support for scripting engines as Valkey modules (#1277)
rjd15372 65d054b
Fix switch case compilation error in the new helloscripting (#1472)
enjoy-binbin 070ad88
Remove readability refactor for failover auth to fix clang warning (#…
madolson c8e5fc9
Reduce dual channel testing time (#1477)
naglera da15cee
Add scoped RDB loading context and immediate abort flag (#1173)
naglera ff39427
Document all command flags near serverCommand (#1474)
enjoy-binbin 3d5acdd
Fix restore replica output bytes stat update (#1486)
uriyage 2f07b66
Fix JSON description of SET command (#1473)
gmbnomis 810a437
Immediately restart the defrag cycle if we still need to defrag (#1492)
madolson 4f59458
Only (re-)send MEET packet once every handshake timeout period (#1441)
pieturin 68f5058
Make global configs as static (#1159)
pizhenwei 399fb08
Align rejected unblocked commands to update the correct error statist…
ranshid 471ecf4
Fix unreliable dual channel Valgrind tests (#1500)
naglera 15189c9
replication: fix io-threads possible race by moving waitForClientIO (…
uriyage f7ac777
Offload reading the replication stream to IO threads (#1449)
uriyage 245f51d
Remove releasetools folder (#1496)
hwware cb7f275
Refactor: move all valkey modules related declarations to `module.h` …
rjd15372 4dcb2b7
Update Redis legacy keyword and link in utils/whatisdoing.sh (#1495)
hwware 890bb71
Use the correct command proc for the LOOKUP_NOTOUCH exception in look…
gmbnomis 888ea5a
Move coverity back to ubuntu 22 until test failures are fixed (#1504)
madolson 3b08507
CMake: fail on warnings (#1503)
eifrah-aws b95ad54
Explicitly check C_ERR condition to improve readability in clusterSav…
enjoy-binbin 3072443
Check whether to switch to fail when setting the node to pfail in cro…
enjoy-binbin bbd22ea
Fix Read/Write key pattern selector (CVE-2024-51741) (#1514)
madolson 38910e2
Fix LUA garbage collector (CVE-2024-46981) (#1513)
madolson 990782e
Add tests for acl selectors with no permissions or patterns (#1515)
madolson 794567f
Add `availability_zone` to the HELLO response (#1487)
rueian 50487cc
Actually run code coverage on ubuntu 22 (#1522)
madolson 1987c36
Add `availability_zone` to the HELLO command history (#1524)
rueian ac096a1
client struct: lazy init components and optimize struct layout (#1405)
uriyage bd18b28
Add build folder to gitignore. (#1488)
lipzhu 0d3118a
Replace dict with new hashtable: sorted set datatype (#1427)
SoftlyRaining aa3f256
Skip logreqres on tests for the HELLO command (#1528)
rueian 984cb0a
valkey-cli auto-exit from subscribed mode (#1432)
Nikhil-Manglore 35c87a6
Improve Typos configuration (#1456)
szepeviktor b4de750
Accelerate hash table iterator with prefetching (#1501)
NadavGigi 80f11be
Remove legacy SERVER_TEST compiler flag from cmake. (#1530)
karthyuom cae899a
Fix new cli subscribed mode test in cluster mode (#1533)
enjoy-binbin 04bdeea
Free the passed in lua context instead of the global (#1536)
madolson 974c3eb
Update upload artifacts to v4 (#1539)
hpatro 113abc9
Fix crash when freeing newly created node when nodeIp2String fail (#1…
enjoy-binbin 4346daf
Fix module LatencyAddSample still work when latency-monitor-threshold…
enjoy-binbin 9c58fb5
Do election in order based on failed primary rank to avoid voting con…
enjoy-binbin 7fdd0e6
Mark the node as FAIL when the node is marked as NOADDR and broadcast…
enjoy-binbin 52357ed
Add latency stats around cluster config file operations (#1534)
enjoy-binbin 2b73a9f
Skip CLI tests with reply schema validation (#1545)
zuiderkwast df879e3
Test coverage for ECHO for reply schema validation (#1549)
zuiderkwast 36707d5
Replace dict with new hashtable: hash datatype (#1502)
SoftlyRaining 703fffa
Escape unix socket group in unit tests (#1554)
secwall 6281761
Fix valgrind test (#1555)
naglera a06e4f0
Introduce const_sds for const-content sds (#1553)
zuiderkwast af8927a
add paused_actions for INFO Clients (#1519)
soloestoy 4b1b8e3
Adding Missing filters to CLIENT LIST and Dedup Parsing (#1401)
sarthakaggarwal97 858d91a
Allow clang-format to be triggered in push events (#1565)
enjoy-binbin 87fe817
Incr expired_keys if the unix-time is already expired for EXPIREAT an…
RayaCoo d3d6736
Extract the scripting engine code from the functions unit (#1312)
rjd15372 b023e3b
Fix cluster info sent stats for message with light header (#1563)
hpatro 91a0918
Fix memory leak in forgotten node ping ext code path (#1574)
pieturin 6de3fd5
Update comments and log message in cluster_legacy.c (#1561)
pieturin f619314
Lower latenct-monitor-threashold in expire-cycle test case (#1584)
zuiderkwast fc20f29
Change the shared format for dual channel replication logs (#1586)
ranshid 4b1c861
Fix Protocol desync regression test (#1590)
ranshid d68667d
fix test Protocol desync regression test with TLS (#1593)
ranshid 7ea9b04
Add cross-version test framework (and a simple test) (#1371)
zuiderkwast 9df9d61
Accelerate hash table iterator with value prefetching (#1568)
NadavGigi ca68e8a
Feature COMMANDLOG to record slow execution and large request/reply (…
soloestoy 58482ff
Set GH actions job timeout to a day (#1540)
hpatro 5924f05
Test coverage for COMMANDLOG HELP (#1617)
zuiderkwast 9436734
Deflake hashtable random fairness test (#1618)
zuiderkwast 1f3dd5c
change error message for aox-max-size exceeding
kronwerk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
proc setup {{size 1}} { | ||
r set k v | ||
r config set aof-max-size $size | ||
r set k2 v2 | ||
} | ||
|
||
proc cleanup {} { | ||
r config set aof-max-size 0 | ||
r flushall | ||
} | ||
|
||
start_server {tags {"external:skip"}} { | ||
r config set auto-aof-rewrite-percentage 0 ; # disable auto-rewrite | ||
r config set appendonly yes ; # enable AOF | ||
|
||
set master_host [srv 0 host] | ||
set master_port [srv 0 port] | ||
|
||
test "Low aof-max-size stops writing AOF with ENOSPC" { | ||
setup | ||
wait_for_log_messages 0 {"*Error writing to the AOF file: No space left on device*"} 0 100 10 | ||
cleanup | ||
} | ||
|
||
test "New write attempts when limited with aof-max-size fail and doesn't insrease AOF buffer anymore" { | ||
setup | ||
set info1 [r info] | ||
set buf1 [getInfoProperty $info1 mem_aof_buffer] | ||
set len1 [getInfoProperty $info1 aof_buffer_length] | ||
|
||
catch {r set somelongerkey somelongrvalue} err | ||
assert {$err eq "MISCONF Errors writing to the AOF file: No space left on device"} | ||
assert_equal [r get somelongerkey] "" | ||
|
||
set info2 [r info] | ||
set buf2 [getInfoProperty $info2 mem_aof_buffer] | ||
set len2 [getInfoProperty $info2 aof_buffer_length] | ||
assert_equal $buf1 $buf2 | ||
assert_equal $len1 $len2 | ||
cleanup | ||
} | ||
|
||
test "Increasing aof-max-size fixes AOF write error" { | ||
setup | ||
set loglines [count_log_lines 0] ; # want to check new line, not from previous test | ||
r config set aof-max-size 1000 | ||
wait_for_log_messages 0 {"*AOF write error looks solved. The server can write again.*"} $loglines 100 10 | ||
|
||
assert_equal [r set k3 v3] "OK" | ||
assert_equal [r get k3] "v3" | ||
cleanup | ||
} | ||
|
||
test "Meeting aof-max-size does not prevent AOF rewrite" { | ||
setup 200 | ||
set loglines [count_log_lines 0] ; # want to check new line, not from previous test | ||
|
||
waitForBgrewriteaof r | ||
r bgrewriteaof | ||
wait_for_log_messages 0 {"*Background AOF rewrite finished successfully*"} $loglines 100 10 | ||
wait_for_log_messages 0 {"*AOF write error looks solved. The server can write again.*"} $loglines 100 10 | ||
cleanup | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message:
Error writing to the AOF file: <ENOSPC>
is misleading if the issue is not actual disk space but hitting the configured max file size. Consider logging a more explicit message, and using
EFBIG
instead ofENOSPC
for clarity.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about smth like that, but haven't found a better error code than ENOSPC. the one you offered is (https://man7.org/linux/man-pages/man2/open.2.html):
EOVERFLOW pathname refers to a regular file that is too large to be opened. The usual scenario here is that an application compiled on a 32-bit platform without -D_FILE_OFFSET_BITS=64 tried to open a file whose size exceeds (1<<31)-1 bytes; see also O_LARGEFILE above. This is the error specified by POSIX.1; before Linux 2.6.24, Linux gave the error EFBIG for this case.
seems that it's more misleading (imho) - we're not opening a file, we're writing to it, and we're exactly out of space (though the limit is not a real disk limit).
we can try to define our own errno type, a new one, to differ it from the real disk limit and form a more descriptive message based on that upper in code stack - but shouldn't that be an overkill for such an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POSIX error codes aren't tied to specific system/library calls and can be applied broadly. In the example above, it was in the context of
open
. Applications can use their own interpretations, this is an example:https://github.com/valkey-io/valkey/blob/unstable/src/module.c#L5427
I'm fine with using either error codes, but there should be a custom error message to avoid misleading users into thinking it's a real disk space issue if ENOSPC is used.