Skip to content
Snippets Groups Projects
Commit f5dfde5c authored by Sergey Bronnikov's avatar Sergey Bronnikov Committed by Kirill Yukhin
Browse files

Add new error injection constant ERRINJ_AUTO_UPGRADE

In upgrade testing we need an ability to control running of upgrade.lua
script execution. When constant ERRINJ_AUTO_UPGRADE is set to true
tarantool will skip upgrade.lua script execution.

Part of #4801
parent e215737a
No related branches found
No related tags found
No related merge requests found
...@@ -588,7 +588,8 @@ local function load_cfg(cfg) ...@@ -588,7 +588,8 @@ local function load_cfg(cfg)
end end
end end
end end
if not box.cfg.read_only and not box.cfg.replication then if not box.cfg.read_only and not box.cfg.replication and
not box.error.injection.get('ERRINJ_AUTO_UPGRADE') then
box.schema.upgrade{auto = true} box.schema.upgrade{auto = true}
end end
end end
......
...@@ -144,6 +144,7 @@ struct errinj { ...@@ -144,6 +144,7 @@ struct errinj {
_(ERRINJ_VY_READ_VIEW_MERGE_FAIL, ERRINJ_BOOL, {.bparam = false})\ _(ERRINJ_VY_READ_VIEW_MERGE_FAIL, ERRINJ_BOOL, {.bparam = false})\
_(ERRINJ_VY_WRITE_ITERATOR_START_FAIL, ERRINJ_BOOL, {.bparam = false})\ _(ERRINJ_VY_WRITE_ITERATOR_START_FAIL, ERRINJ_BOOL, {.bparam = false})\
_(ERRINJ_VY_RUN_OPEN, ERRINJ_INT, {.iparam = -1})\ _(ERRINJ_VY_RUN_OPEN, ERRINJ_INT, {.iparam = -1})\
_(ERRINJ_AUTO_UPGRADE, ERRINJ_BOOL, {.bparam = false})\
ENUM0(errinj_id, ERRINJ_LIST); ENUM0(errinj_id, ERRINJ_LIST);
extern struct errinj errinjs[]; extern struct errinj errinjs[];
......
...@@ -43,7 +43,8 @@ end ...@@ -43,7 +43,8 @@ end
... ...
evals evals
--- ---
- - ERRINJ_BUILD_INDEX: -1 - - ERRINJ_AUTO_UPGRADE: false
- ERRINJ_BUILD_INDEX: -1
- ERRINJ_BUILD_INDEX_DELAY: false - ERRINJ_BUILD_INDEX_DELAY: false
- ERRINJ_CHECK_FORMAT_DELAY: false - ERRINJ_CHECK_FORMAT_DELAY: false
- ERRINJ_COIO_SENDFILE_CHUNK: -1 - ERRINJ_COIO_SENDFILE_CHUNK: -1
......
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