Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21869

Consecutive DB Update fails in systems with strict primary keys requirements

XMLWordPrintable

    • Team A
    • Sprint 94 (Nov 2022)
    • 0.125

      Steps to reproduce:

      1. Run automatical DB upgrade in a system with strict primary keys requirement (InnoDB Cluster/Galera Cluster, etc) via Zabbix-server service new binary run (6.2.4)
      2.  Check the upgrade process

      Result:
      DB schema upgrade fails because the application trying to create a table without primary keys (see the screenshot)

      Expected:
      We've upgraded to the 6.2 version, table in the 6.2 version schema has a primary key - the table should be updated to the latest version directly without consecutive changes

      trigger_queue table creation statement example from MySQL schema file (Zabbix 6.2.4) 

      CREATE TABLE `trigger_queue` (
          ->         `trigger_queueid`        bigint unsigned                           NOT NULL,
          ->         `objectid`               bigint unsigned                           NOT NULL,
          ->         `type`                   integer         DEFAULT '0'               NOT NULL,
          ->         `clock`                  integer         DEFAULT '0'               NOT NULL,
          ->         `ns`                     integer         DEFAULT '0'               NOT NULL,
          ->         PRIMARY KEY (trigger_queueid)
          -> ) ENGINE=InnoDB;

      The table creation patch is defined in

      https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/libs/zbxdbupgrade/dbupgrade_5010.c#329

      Workaround:

      innodb_force_primary_key=0 

      into MariaDB configuration - restart required (downtime for the whole DB cluster during the restart)

            wiper Andris Zeila
            igorbach Igor Gorbach
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: