• Marko Mäkelä's avatar
    MDEV-19586: Restore pointer indirection for recv_t::data · 51fb39bf
    Marko Mäkelä authored
    Something was wrong with the removal of pointer indirection,
    because on 32-bit Windows we got crash recovery failures.
    Curiously, WITH_ASAN of a 32-bit debug build did not notice anything.
    
    This reverts a part of commit b7fc2c89.
    
    We have a 2MiB recv_sys.buf for the initial buffering. The minimum size
    of log_sys.buf would be 16MiB, and that buffer should be practically
    unused during recovery. If the buffer pool size is measured in gigabytes,
    it would indeed make sense to use the buffer pool for the recovered log
    records, perhaps after we have run out of log_sys.buf.
    
    FIXME: allow the entire buf_block_t::frame to be used for buffered
    log records, and remove MEM_HEAP_FOR_RECV_SYS. For example, use
    buf_page_t::list or buf_page_t::LRU for keeping track of memory that
    was allocated for recovery? Most members of buf_block_t
    (except buf_block_t::frame) are unused when
    block->page.state == BUF_BLOCK_MEMORY.
    51fb39bf
log0recv.cc 106 KB