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

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

XMLWordPrintable

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

      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.

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

              Created:
              Updated: