mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
5322282aef
Currently a write transaction on the store is opened inside the query API handler (ie. v1DataPost). What this means is if the user wants to evaluate a policy while OPA is activating a bundle, the api request would block trying to open a write txn on the store till the bundle was activated. If OPA is activating a large bundle, the write lock is held longer and hence the client would notice the latency in OPA's API response. This change updates the query handler to open a read txn on the store which was the case pre-v0.39.0. Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>