Skip to content
Snippets Groups Projects
Commit 5269f2ea authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

space_upgrade: pass format to space_upgrade_new

We need the new format to apply the upgrade function to a tuple.

Follow-up commit 38b25832 ("box: add space upgrade stubs").

NO_DOC=internal
NO_TEST=internal
NO_CHANGELOG=internal
parent 764d18ab
No related branches found
No related tags found
No related merge requests found
......@@ -234,7 +234,7 @@ space_create(struct space *space, struct engine *engine,
if (space->def->opts.upgrade_def != NULL) {
space->upgrade = space_upgrade_new(
space->def->opts.upgrade_def);
space->def->opts.upgrade_def, format);
if (space->upgrade == NULL)
goto fail;
}
......
......@@ -25,6 +25,7 @@ struct space_def;
struct space_upgrade;
struct space_upgrade_def;
struct tuple;
struct tuple_format;
/**
* Decodes space upgrade definition from MsgPack data.
......@@ -59,14 +60,16 @@ space_upgrade_def_delete(struct space_upgrade_def *def)
}
/**
* Creates a space upgrade state from a definition.
* Creates a space upgrade state from a definition and the new space format.
* Returns NULL and sets diag on error.
* The reference count of the new state is set to 1.
*/
static inline struct space_upgrade *
space_upgrade_new(const struct space_upgrade_def *def)
space_upgrade_new(const struct space_upgrade_def *def,
struct tuple_format *format)
{
(void)def;
(void)format;
unreachable();
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment