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

Typo in lld_trigger.c

    XMLWordPrintable

Details

    • Team C
    • Sprint 85 (Feb 2022)
    • 0.1

    Description

      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!

       

       

      Attachments

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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: