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

A0-4155: Unit saving pipeline #432

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

timorleph
Copy link
Contributor

Make the unit saving into a pipeline, to simplify the semantics of units being officially added to the Dag.

Copy link

github-actions bot commented Apr 9, 2024

Please make sure the following happened

  • Appropriate tests created
  • Infrastructure updated accordingly
  • Updated existing documentation
  • New documentation created
  • Version bumped if breaking changes

Copy link
Contributor

@woocash2 woocash2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including backup save in the pipeline is overall a good idea, although I don't support the idea of saving (unit, parents) in the backup. If you want the DagUnit to go through the backup, no problem with that, just when doing backup save, only save the inner unit, and pass the whole DagUnit further in the pipeline.

If there's some hidden idea behind saving the whole DagUnit, please explain.

In particular this means that this doesn't change the API, so only patch
version bump needed.
Copy link
Contributor

@kostekIV kostekIV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, nice change in the add_unit function but a little risky :P

@balqaasem
Copy link

lgtm, nice change in the add_unit function but a little risky :P

What makes it a little risky?

@timorleph
Copy link
Contributor Author

What makes it a little risky?

I think @kostekIV means that it will no longer remove the units from the cache immediately after they are being processed by the dag component, which was a nice property to have (no need to remember to call finished_processing outside of dag). It's not really that risky, since the cache cannot create different outputs if it's not cleaned, worst case scenario it would use a tad more memory.

@timorleph timorleph merged commit 3a2bafc into Cardinal-Cryptography:main Apr 12, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

4 participants