mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
MDEV-25967: Correctly extend deferred-recovery files
recv_sys_t::recover_deferred(): Set the file size to match the number of pages. Mariabackup might copy the file while it was being extended.
This commit is contained in:
parent
592a925c0c
commit
b3e8788009
1 changed files with 9 additions and 4 deletions
|
@ -837,13 +837,18 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p,
|
|||
block->unfix();
|
||||
fil_node_t *node= UT_LIST_GET_FIRST(space->chain);
|
||||
node->deferred= true;
|
||||
if (space->acquire())
|
||||
if (!space->acquire())
|
||||
goto fail;
|
||||
if (!os_file_set_size(node->name, node->handle,
|
||||
size * fil_space_t::physical_size(flags),
|
||||
space->is_compressed()))
|
||||
{
|
||||
node->deferred= false;
|
||||
space->release();
|
||||
return false;
|
||||
goto fail;
|
||||
}
|
||||
goto fail;
|
||||
node->deferred= false;
|
||||
space->release();
|
||||
return false;
|
||||
}
|
||||
|
||||
block->unfix();
|
||||
|
|
Loading…
Reference in a new issue