Commit b3e87880 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent 592a925c
...@@ -837,14 +837,19 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p, ...@@ -837,14 +837,19 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p,
block->unfix(); block->unfix();
fil_node_t *node= UT_LIST_GET_FIRST(space->chain); fil_node_t *node= UT_LIST_GET_FIRST(space->chain);
node->deferred= true; 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()))
{ {
space->release();
goto fail;
}
node->deferred= false; node->deferred= false;
space->release(); space->release();
return false; return false;
} }
goto fail;
}
block->unfix(); block->unfix();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment