mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
ab817b215c
Previously while passing the plugins's status to the Status API, the decision log plugin held the lock while a status upload was in process. So if a status upload took a while or the status plugin was blocked as it processed some other update, this would block policy evaluation requests received by the OPA server and increase client latency. This is because since the decision log plugin held the lock, new log events could be inserted into its buffer only after the lock was released. This change makes a copy of the decision log status so that the lock is not held during a status update. Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>