mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
f60dfafa1b
Currently bundles are loaded into memory entirely even when disk storage is used. Then the parsed content is written to the store. Deserializing data into Go structs is memory consuming and even if user has configured disk storage, OPA is still bound by the amount of memory assigned to it. This change adds a new lazy loading mode wherein the entire data is not deserialized while bundle reading and hence if the bundle contains large data files and the user has enabled disk storage, OPA should be able to handle this scenario w/o running OOM. Fixes: #4539 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>