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

rollback! is inefficient #5

Open
julik opened this issue Mar 5, 2024 · 0 comments
Open

rollback! is inefficient #5

julik opened this issue Mar 5, 2024 · 0 comments

Comments

@julik
Copy link
Owner

julik commented Mar 5, 2024

At the moment when we rollback we need to rebuild the PathSet from the start (because we do not know which entry contributed which paths). In a degenerative case where entry 900 gets retried over and over it will re-build the path set with 900 paths, on every retry. Ideally this could be done better with a dependency graph. The @files and the PathSet could then be combined into something like EntrySet in rubyzip which would take care of this. We could also add the last element as a "rollbackable" - because once the Streamer moves past it is not necessary to roll it back. That way the checks would be against previous_to_last_state + last_item_state_change, not just against last_state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant