Bug #91587 recent_written/recent_closed buffer check free space with start_lsn
Submitted: 10 Jul 2018 5:41 Modified: 10 Jul 2018 12:50
Reporter: s a Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[10 Jul 2018 5:41] s a
Description:
recent_written/recent_closed buffer check free space with start_lsn, but notes is end_lsn。

recent_written/recent_closed buffer add link with one slot, value  is end_lsn -start-lsn. if  redo log  that end_lsn > log.buf_ready_for_write_lsn+S,start_lsn <= log.buf_ready_for_write_lsn+S,this redo log will allow to add recent_written/recent_closed buffer, where _S_ is a number of slots in the log recent_written/recent_closed buffer.

log/log0buf.cc codes:
    while (!log.recent_written.has_space(start_lsn)) {
    ++wait_loops;
    os_thread_sleep(20);
  }

log/log0buf.cc  notes:
  -# User thread waits for free space in the recent written buffer, until:

         tmp_end_lsn - log.buf_ready_for_write_lsn <= S

How to repeat:
Code:
log/log0buf.cc file:
  log_buffer_write_completed() function:
       
    while (!log.recent_written.has_space(start_lsn)) {
    ++wait_loops;
    os_thread_sleep(20);
       }

Notes:
 log/log0buf.cc file:
      -# User thread waits for free space in the recent written buffer, until:

         tmp_end_lsn - log.buf_ready_for_write_lsn <= S

Suggested fix:
modification notes:
      -# User thread waits for free space in the recent written buffer, until:

         tmp_start_lsn - log.buf_ready_for_write_lsn <= S
[10 Jul 2018 12:50] MySQL Verification Team
Hi,

Thank you for your bug report.

I have studied very carefully what you wrote and I must agree that notes are in disagreement with the code itself.

Verified as a documentation bug.
[23 Jul 2018 16:41] Paul DuBois
Posted by developer:
 
The "documentation" referred to by Sinisa is comments in the source code. As such, this means the Doxygen in the source needs updating by the appropriate developers. The docs team doesn't edit comments in source code.