box: fix schema downgrade replication
Some downgrade operations are performed with disabled system space triggers because they were prohibited recently (creation of SQL built-in functions) or never allowed (dropping a system space). This works fine on the instance running downgrade but apparently fails on replicas. To fix this issue, let's disable the checks the operations that prevent downgrade in the following scenarios: - in the fiber that is currently running a schema upgrade or downgrade; - in the applier fiber so that it can replicate changes done by upgrade or downgrade on the master; - during recovery so that DDL records written to the WAL can be replayed. We already have all the necessary infrastructure in-place - we use it for allowing DDL operations with an old schema for upgrade. Closes #9049 NO_DOC=bug fix
Showing
- changelogs/unreleased/gh-9049-schema-downgrade-replication.md 4 additions, 0 deletions...gelogs/unreleased/gh-9049-schema-downgrade-replication.md
- src/box/alter.cc 6 additions, 5 deletionssrc/box/alter.cc
- src/box/lua/upgrade.lua 15 additions, 23 deletionssrc/box/lua/upgrade.lua
- src/box/schema.cc 20 additions, 11 deletionssrc/box/schema.cc
- src/box/schema.h 9 additions, 0 deletionssrc/box/schema.h
- test/replication-luatest/gh_9049_schema_downgrade_test.lua 41 additions, 0 deletionstest/replication-luatest/gh_9049_schema_downgrade_test.lua
Loading
Please register or sign in to comment