Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-8193

support "select ... for update" to lock in mysql mode

    XMLWordPrintable

Details

    • New Feature Request
    • Status: Open
    • High
    • Resolution: Unresolved
    • 6.4.0beta5
    • None
    • Server (S)
    • centos

    Description

      need:

      When using zabbix, we found that some databases using mysql mode do not support "lock in share mode", but support "select for update". They are not compatible with zabbix, mainly because the zbx_db_lock_maintenanceids function uses shared locks. Oracle selectively uses "select for update" by defining the macro HAVE_ORACLE, but this approach is expensive. All we need is to be able to use "select for update" also in mysql mode.

      suggestion:

      1. Add a configuration item named "AllowLockForUpdate", with a value of 1 indicating that "select for update" can be used.

      2. Modify the zbx_db_lock_maintenanceids function. In mysql mode, if AllowSelectForUpdate = 1, use "select for update" instead of "lock in share mode".

      This change is small, but it can greatly improve the compatibility of zabbix. I think "select for update" semantics should be configurable, not just support oracle mode.

      Attachments

        Activity

          People

            wiper Andris Zeila
            dimstar dimstar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: