MDEV-38195: Fix flaky events_restart test#4753
MDEV-38195: Fix flaky events_restart test#4753varundeepsaini wants to merge 1 commit intoMariaDB:11.8from
Conversation
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution! This is a preliminary review.
Please re-base on 11.4 since this is the first reported version and this is a bug fix.
| connection c1; | ||
| --disable_query_log | ||
| let $tmp_usage2=`select tmp_space_used from information_schema.processlist where id=$id`; | ||
| if ($tmp_usage1 == $tmp_usage2) |
There was a problem hiding this comment.
This is IMHO just killing the messenger. What this variable tracks is the actual temp space used by the server. Not the space occupied by files in the tmp directory for example.
So, nobody external to the server is just going to add "small differences" to the count between two statements.
This means that, instead of basically turning the test off, you need to find out who's writing.
And the test is designed to prove that the statement from the other thread is not adding temp space usage before commit. So if the statement is not using temp space you need to find who is.
I have a theory: mtr runs tests with the same startup options on the same server instance without restarting the server. This is done to avoid having to restart the server too many times. Note also that the client will get an OK as soon as the transaction is reliably written to disk. So the client will happily continue with the next statement while the previous statement is still cleaning up. So what you might be seeing is after effects of the CREATE TABLE or some such.
Of course, this needs better analysis and confirmation. But, even if not correct, this should give you some idea of what does it mean to fix a "flaky" test failure.
There was a problem hiding this comment.
I think the root cause is that information_schema.session_status is being queried while tmp_memory_table_size=0, which forces the query's own internal temp table to disk — so it ends up changing tmp_space_used as a side effect of reading it. By the time c1 reads processlist, it sees the inflated value (the diff was exactly 16KB, one page from the temp table allocation).
I fixed it by temporarily setting tmp_memory_table_size high before the session_status read (like lines 72 - 77)
There was a problem hiding this comment.
this particular test was added sometime later than 11.4
i've removed the fix for this test, i see there is no ticket created for this i'll create one and raise another pr with this fix
There was a problem hiding this comment.
11.4 is EOLed. Please re-base on 11.8 and fix the test as you did in the other PR. And: good catch!
There was a problem hiding this comment.
@gkodinov Thankss, have rebased both the prs
8278edc to
da46bba
Compare
da46bba to
dd99b69
Compare
gkodinov
left a comment
There was a problem hiding this comment.
LGTM. Please rebase on 11.8 (and sorry for asking for 11.4 initially: I should have known better).
Please stand by for the final review.
|
@gkodinov No worries, Thanks a lot for your quick reviews |
Add missing error log suppressions for "error during compilation" and "Query was empty" that occur when the event scheduler processes events from a corrupted mysql.event table (body column altered to longtext during the test). Signed-off-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com>
dd99b69 to
ad28d27
Compare
Summary
mtr.add_suppressionfor "error during compilation" and "Query was empty" errors that occur when the event scheduler processes events from a corruptedmysql.eventtable (body column altered to longtext during the test).Test plan
events.events_restartpasses locally