[ZBXNEXT-7553] Create user macro resolver to reduce configuration cache locks Created: 2020 Feb 01  Updated: 2025 Apr 23  Resolved: 2022 Jun 04

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 6.2.0beta3, 6.2 (plan)

Type: New Feature Request Priority: Major
Reporter: Andris Zeila Assignee: Andris Zeila
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File um_resolver3.diff     File zabbix_server.log    
Issue Links:
Causes
causes ZBX-26339 User macro conflict resolved differen... Closed
causes ZBX-26324 HTTP agent does not resolve secret ma... Closed
Team: Team A
Sprint: Sprint 86 (Mar 2022), Sprint 87 (Apr 2022), Sprint 88 (May 2022)
Story Points: 5

 Description   

Resolving user macro takes configuration cache read lock/unlock. For some performance critical locations user macros are already resolved during configuration cache synchronization. However with secret user macros this introduces another problem - secret macros can't be used in such locations.

This could be improved by allowing processes to obtain immutable macro data which could be used to resolve user macros without locking. The processing would be like:

  1. obtain macro data (configuration cache write lock/unlock)
  2. resolve macros
  3. release macro data (configuration cache write lock/unlock - could be avoided if atomic counters are used).

This should reduce configuration cache locking during batch processing.

During configuration cache synchronization syncer would make a new macro data set if the old one is being used by some other processes. To reduce memory overhead and improve synchronization speed the macro data would contain references to the macro containers/macros, which would be copied only when changed.

The old data sets would be freed by configuration syncer (use reference counting for macro data sets and free sets with 0 references after configuration sync).

 



 Comments   
Comment by Andris Zeila [ 2022 May 18 ]

Released ZBXNEXT-7553 in:

  • pre-6.2.0rc1 dc4bfa882aa

Documentation updated:

Generated at Sat Aug 02 10:01:44 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.