Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disk store: bundle activation fails if data.json exceeds what we can write in a single txn #4868

Closed
srenatus opened this issue Jul 11, 2022 · 2 comments

Comments

@srenatus
Copy link
Contributor

With a large data.json file, we'll never be able to truncate the disk store on bundle activation: the value we attempt to write is larger than what a single txn can hold; and the commit-and-retry logic will fail: the commit is empty (no problem) but the retry with just yield the same error.

What we could do here is to enhance the bundle iterator to split values according to their value size: if it's above X, we'll add iteratees for the substructures. For objects,

{ "a": ..., "b": ... , ... }

we'll parse that JSON blob, and add iteratees for each value, with path = old_path + "a", path = old_path + "b", etc.

Analogously for arrays.

@stale
Copy link

stale bot commented Aug 10, 2022

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.

@stale stale bot added the inactive label Aug 10, 2022
@ashutosh-narkar ashutosh-narkar added this to Backlog in Open Policy Agent via automation Jan 12, 2023
@ashutosh-narkar
Copy link
Member

Closing this in favor of #5721

Open Policy Agent automation moved this from Backlog to Done Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants