Skip to content
Snippets Groups Projects
  • Vladimir Davydov's avatar
    b24eade3
    box: fix schema downgrade replication · b24eade3
    Vladimir Davydov authored
    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
    
    (cherry picked from commit 71de4b2c)
    
    NOTE: We don't have the commit that disables DDL operations with an old
    schema in 2.11 so we have to backport bits of it from 3.0, see commit
    97c2c9a4 ("box: disable DDL with old schema").
    b24eade3
    History
    box: fix schema downgrade replication
    Vladimir Davydov authored
    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
    
    (cherry picked from commit 71de4b2c)
    
    NOTE: We don't have the commit that disables DDL operations with an old
    schema in 2.11 so we have to backport bits of it from 3.0, see commit
    97c2c9a4 ("box: disable DDL with old schema").
gh-9049-schema-downgrade-replication.md 112 B

bugfix/core

  • Fixed a bug that caused a replication error after calling box.schema.downgrade (gh-9049).