SIGN IN SIGN UP

plugins/logs: Make a local copy of plugin's status

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>
A
Ashutosh Narkar committed
ab817b215cc81e9380605dfa8eb09106cef31f5d
Parent: 143c5dc