-
Notifications
You must be signed in to change notification settings - Fork 197
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
core: Implement parallel importing #1124
Conversation
☔ The latest upstream changes (presumably 694b798) made this pull request unmergeable. Please resolve the merge conflicts. |
Now that the importer *only* imports into OSTree repos, let's clean up the API so that the `OstreeRepo` and `OstreeSePolicy` are passed as constructor args. Also rework things so there's only one constructor API that steals the fd. This is prep for adding another async import API.
Depends: ostreedev/ostree#1358 For jigdo ♲📦 in order to get true image speed like libostree has we need to interleave and parallelize downloading and importing. The messy part about this is having sync API do the "invoke and wait on various async tasks" pattern. It's the same thing in `ostree_repo_pull_with_options()`. Importing is pretty dramatically faster with this, I can only imagine the speed win if we actually interleaved with downloads. However doing that requires libdnf/librepo work.
ab7012f
to
2b979f6
Compare
src/libpriv/rpmostree-core.c
Outdated
GMainContext *mainctx = g_main_context_get_thread_default (); | ||
while (self->async_running) | ||
g_main_context_iteration (mainctx, TRUE); | ||
if (self->async_error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to propagate the error here, right?
src/libpriv/rpmostree-core.c
Outdated
if (!rev) | ||
{ | ||
self->async_running = FALSE; | ||
self->async_error_set = TRUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's g_assert (self->async_error)
here?
Registry is probably still borked, though let's give it a try. |
Now that the importer *only* imports into OSTree repos, let's clean up the API so that the `OstreeRepo` and `OstreeSePolicy` are passed as constructor args. Also rework things so there's only one constructor API that steals the fd. This is prep for adding another async import API. Closes: #1124 Approved by: jlebon
Depends: ostreedev/ostree#1358 For jigdo ♲📦 in order to get true image speed like libostree has we need to interleave and parallelize downloading and importing. The messy part about this is having sync API do the "invoke and wait on various async tasks" pattern. It's the same thing in `ostree_repo_pull_with_options()`. Importing is pretty dramatically faster with this, I can only imagine the speed win if we actually interleaved with downloads. However doing that requires libdnf/librepo work. Closes: #1124 Approved by: jlebon
💔 Test failed - status-atomicjenkins |
@rh-atomic-bot retry |
Depends: ostreedev/ostree#1358 For jigdo ♲📦 in order to get true image speed like libostree has we need to interleave and parallelize downloading and importing. The messy part about this is having sync API do the "invoke and wait on various async tasks" pattern. It's the same thing in `ostree_repo_pull_with_options()`. Importing is pretty dramatically faster with this, I can only imagine the speed win if we actually interleaved with downloads. However doing that requires libdnf/librepo work. Closes: #1124 Approved by: jlebon
☀️ Test successful - status-atomicjenkins |
Note this PR is on top of jigdo since otherwise it'd conflict.
Depends: ostreedev/ostree#1358
For jigdo ♲📦 in order to get true image speed like libostree has we need to
interleave and parallelize downloading and importing.
The messy part about this is having sync API do the "invoke and wait on various
async tasks" pattern. It's the same thing in
ostree_repo_pull_with_options()
.Importing is pretty dramatically faster with this, I can only imagine the speed
win if we actually interleaved with downloads. However doing that requires
libdnf/librepo work.