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

objects.db: get rid of callbacks from internal _list_paths API #7486

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Mar 22, 2022

This removes callback from internal APIs: _list_paths, list_hashes,
and _hashes_with_limit. These are all iterators and hence can just be
replaced by wrapping a progress bar over those iterators on the caller
side.

We still have progress bars in hashes_exist, _estimate_remote_size,
_list_hashes_traverse and list_hashes_exists, which should gradually
be lifted up and replaced.

I came over to this refactoring when investigating webdav issue in #7288, and noticed that _list_paths could be simpler.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@skshetry skshetry added refactoring Factoring and re-factoring skip-changelog Skips changelog A: object-storage Related to the object/content-addressable storage labels Mar 22, 2022
@skshetry skshetry requested a review from a team as a code owner March 22, 2022 11:11
@skshetry skshetry requested a review from pared March 22, 2022 11:11
This removes callback from internal APIs: `_list_paths`, `list_hashes`,
and `_hashes_with_limit`. These are all iterators and hence can just be
replaced by wrapping a progressbar over those iterators in the caller
side.

We still have progressbars in `hashes_exist`, `_estimate_remote_size`,
`_list_hashes_traverse` and `list_hashes_exists`, which should gradually
lifted up and replaced.
@skshetry skshetry requested review from dtrifiro and pmrowla and removed request for pared March 23, 2022 02:12
@skshetry skshetry self-assigned this Mar 23, 2022
@efiop efiop merged commit d008054 into iterative:main Mar 25, 2022
@skshetry skshetry deleted the get-rid-of-callbacks branch March 25, 2022 12:14
@skshetry skshetry restored the get-rid-of-callbacks branch April 27, 2022 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: object-storage Related to the object/content-addressable storage refactoring Factoring and re-factoring skip-changelog Skips changelog
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants