Repository navigation
MDEV-40545 mariadb-binlog --force-read loops on truncated events - #5784
GoldenEmperor1177 wants to merge 1 commit into
Conversation
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution! This is a preliminary review.
Please squash your two commits into one. And add a commit message that's compliant to the coding standards, in essence:
MDEV reference
- what was wrong
- how was it fixed
- how is the fix tested.
1e9c474 to
06dd0ec
Compare
ParadoxV5
left a comment
There was a problem hiding this comment.
Hello, thanks for your contribution and sorry that I took long to get here.
no isssues !! i will be working on the change reqests right away ! 👊 |
9d1ebf4 to
fb946f0
Compare
|
moved this to 11.4 too, since Khaled said thats the oldest branch for fixes now. same single commit, applied cleanly, and on 11.4 the test loops without the fix and passes with it, main, binlog and binlog_encryption suites all pass. |
ParadoxV5
left a comment
There was a problem hiding this comment.
Excellent. Some nits to pick, and we should be good to go.
|
|
||
| --echo # The event header is truncated | ||
| --error 1 | ||
| --exec $MYSQL_BINLOG --short-form --force-read $MYSQL_TEST_DIR/std_data/mdev-40545-binlog.000001 2>&1 > /dev/null |
There was a problem hiding this comment.
/dev/null might not work on Windoze, right? (MDEV-41085)
Error message tests like this were using --result-file=path/to/throwaway_file.
Though for this case, I suggest including STDOUT in the results. too.
There was a problem hiding this comment.
Please give these data files descriptive names, too, such as truncated_binlog.000001
Wait, what are these merge conflicts? |
What was wrong: With --force-read, Log_event::read_log_event() returned a synthetic "Encrypted event" (Unknown_log_event) for every read error. A truncated event is such an error, so mariadb-binlog printed a fake event instead of stopping, and on most truncated binlogs it then never stopped at all. How it is fixed: The synthetic event is meant for encrypted events that mariadb-binlog cannot decrypt (MDEV-11319). It is now returned only for a decryption failure. Other read errors, like a truncated event or an out of memory error, are critical: continuing after them cannot produce meaningful output, so they are reported and mariadb-binlog stops as it does without --force-read. How it is tested: main.mysqlbinlog_force_read_truncated reads two truncated binlogs from std_data, one with a truncated event header and one with a truncated event body. The test loops forever without the fix.
fb946f0 to
edb72e6
Compare
|
its fine 😊 i have no idea of ruby so will pass on the offer to join ruby server 😅 umm and i have re based it to 11.4 now, its now a single commit and aklso renamed the test, so i think that should rap it up ? did i miss somethin ? oh yes ! added ur point on critical faliures like out of memory to the commit message. the bin log encryption thing should pass on the rebased build now as well! it worked when i tested it ! 😊 and no, i do use bots, and ai agents time to time 😭 i just make sure that i have througly checked the code though, and make sure these are usually sub 100 lines which makes checking for both u and me easier 😭 tbh im still kinda new to how a db works inside, so the mistakes here are me learning it as i go, and when i dont get something i will just say it and ask 😊 also forgive the spellings !! i got a new keyboard, and trying to type on this is weird.. 😭 |
|
Hm, strange – there weren’t any sources of merge conflicts that your rebase needed to eliminate. Could it be GitHub’s outdated cache? Anyways, two last issues remaining: #5784 (comment), #5784 (comment). |
MDEV-40545 mariadb-binlog --force-read loops on truncated events
What was wrong:
With --force-read, Log_event::read_log_event() returned a synthetic
"Encrypted event" (Unknown_log_event) for every read error. A
truncated event is such an error, so mariadb-binlog printed a fake
event instead of stopping, and on most truncated binlogs it then never
stopped at all.
How it is fixed:
The synthetic event is meant for encrypted events that mariadb-binlog
cannot decrypt (MDEV-11319). It is now returned only for a decryption
failure. Other read errors, like a truncated event, are reported, and
mariadb-binlog stops as it does without --force-read.
How it is tested:
main.mysqlbinlog_force_read reads two truncated binlogs from std_data,
one with a truncated event header and one with a truncated event body.
The test loops forever without the fix.