Bug #104787 | need wait buf_fix_count =0 in buf_read_page_handle_error | ||
---|---|---|---|
Submitted: | 1 Sep 2021 8:57 | Modified: | 3 Sep 2021 11:45 |
Reporter: | alex xing (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[1 Sep 2021 8:57]
alex xing
[1 Sep 2021 8:58]
alex xing
a simple patch based on 8.0.19. The same may be true for the latest version of the code. (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: bug_fix.patch (text/plain), 2.50 KiB.
[1 Sep 2021 9:42]
alex xing
new patch
Attachment: bug_fix.patch (text/plain), 2.48 KiB.
[2 Sep 2021 11:51]
MySQL Verification Team
Hi Mr. xing, Thank you for your bug report. Thank you, also, for your analysis and even more for your patch. However, we have a small problem with your idea. Since server had to assert immediately, since it has hit upon a page corruption. If it does not assert, your data on the permanent storage could be corrupted. Under these conditions, what does it matter whether another thread is waiting on the page or not ??? Assertion leads to the instant crash, so why all the hussle ?????
[2 Sep 2021 14:33]
alex xing
Hi MySQL Verification Team, Thank you for your response. Is there a scenario when innodb_force_recovery=0 with only one page corrupted, but the user doesn't want mysql to be cored due to the corrupted page? User just want to get an error message from mysqld when accesses the corrupted page, and the error message recorded in err-log as well. If not, why not just die when find a corrupted page , instead of releasing the Pgae by buf_read_page_handle_error -->buf_LRU_free_one_page
[3 Sep 2021 11:45]
MySQL Verification Team
Hi Mr. xing, No, there is no scenario that is feasible in the case that you have described. It is impossible just to return the error, because InnoDB is an ACID storage angine and all buffer pages that are changed have to be flushed to the tablespace(s). That is one of the essential and basic of premises that are defined by the ACID standard and InnoDB SE adheres to it fully. Not a bug.