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

Typo in lld_trigger.c

XMLWordPrintable

    • Sprint 85 (Feb 2022)
    • 0.1

      It looks like a typo in "src/libs/zbxdbcache/dbsync.c" file which causes to performance degradation in PgSQL queries.

      It was caused by code optimisation in commit "0e36dceb9857d2fdbca8a116b0ef1afbf6c80986"

      Line 2247 now contains:

      " where t.triggerid in (select distinct t.triggerid"

      but nested select should refer to tg.triggerid instead.

       

      Please find attached:

      1. top output showing postgres processes stuck in SELECT
      2. active queries containing aforementioned select with possible typo which causes server performance degradation
      3. explain analyze outputs with typo (original query) and without it (fixed query). The difference is 232588 ms vs 38 ms.
      4. screenshot of the commit

       

      Thanks!

       

       

        1. active_queries.png
          active_queries.png
          697 kB
        2. commit.png
          commit.png
          521 kB
        3. fixed_query.png
          fixed_query.png
          493 kB
        4. original_query.png
          original_query.png
          410 kB
        5. top.png
          top.png
          113 kB
        6. zabbix-lld-triggers.patch
          0.7 kB

            arimdjonoks Artjoms Rimdjonoks
            trooper Dmitry Sergienko
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: