Details

    • Team:
      Team B
    • Sprint:
      Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 9, Sprint 10, Sprint 11, Sprint 12, Sprint 13, Sprint 14, Sprint 15
    • Story Points:
      3

      Description

      Importing new templates failed even after 30 min with "lock wait timeout" MySQL error. That takes minutes on 2.0, and become worst after upgrading on 3.0.
      One of a possible point is ids table and audit, noticed that during importing several times was blocked transactions with query DETETE from ids where table_name='auditlog', which must rise only when reached maximum ID.

      private static function refreshIds($table, $count) {
                      $tableSchema = self::getSchema($table);
                      $id_name = $tableSchema['key'];
      
                      // when we reach the maximum ID, we try to refresh them to check if any IDs have been freed
                      $sql = 'DELETE FROM ids WHERE table_name='.zbx_dbstr($table).' AND field_name='.zbx_dbstr($id_name);
      

        Attachments

        1. ids table.png
          ids table.png
          437 kB
        2. transaction locks.png
          transaction locks.png
          396 kB
        3. transaction locks more.png
          transaction locks more.png
          840 kB
        4. ZBX-11887.patch
          0.9 kB

          Activity

            People

            • Assignee:
              Miks.Kronkalns Miks Kronkalns
              Reporter:
              neogan Andrei Gushchin
            • Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: