Update of Dashboard metrics slow - error in logs "Failed to acquire lock for metric"
book
Article ID: KB0089402
calendar_today
Updated On:
Products
Versions
TIBCO BusinessEvents Enterprise Edition
-
Not Applicable
-
Description
Resolution: Description: =========== Update of Dashboard metrics are slow - Error in logs read, "Failed to acquire lock for metric".
Environment: =========== BusinessEvents 4.0.1 All Operating Systems
Symptoms: ========= Update of Dashboard metrics are slow - Error in logs read, "Failed to acquire lock for metric".
Warning [$default.be.mt$.Thread.3] - [metric.runtime.codegen] [inference-class] Failed to acquire lock for metric : Dashboards.RequestStatus^... Warning [$default.be.mt$.Thread.3] - [metric.runtime.codegen] [inference-class] Failed to acquire lock for metric : Dashboards.RequestStatus^...
Cause: ====== The exception "failure to acquire lock" could be thrown when the same metric instance will be updated twice in the same RTC, or same rule. The compute() function internally acquires a lock using extId.
Resolution: ======== To fix the issue use explicit locking in your project. To use explicit locking, set the property be.engine.metric.lock.enable to "false" in your CDD file (cluster area).
An additional function, getMetricExtId(), is available at the individual metric type level. It takes the group-by fields as input and returns the generated extId that corresponds to the provided group-by field values which is used by the metric instance. Use this extId value to do individual metric instance locking. (see ReleaseNotes 4.0.1 BE-8580)
Issue/Introduction
Update of Dashboard metrics slow - error in logs "Failed to acquire lock for metric"