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

core: Implement parallel importing #1124

Closed
wants to merge 3 commits into from

Conversation

cgwalters
Copy link
Member

@cgwalters cgwalters commented Dec 1, 2017

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.

@rh-atomic-bot
Copy link

☔ 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.
GMainContext *mainctx = g_main_context_get_thread_default ();
while (self->async_running)
g_main_context_iteration (mainctx, TRUE);
if (self->async_error)
Copy link
Member

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?

if (!rev)
{
self->async_running = FALSE;
self->async_error_set = TRUE;
Copy link
Member

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?

@jlebon
Copy link
Member

jlebon commented Dec 5, 2017

Registry is probably still borked, though let's give it a try.
@rh-atomic-bot r+ d7a3f65

@rh-atomic-bot
Copy link

⌛ Testing commit d7a3f65 with merge 4729ba2...

rh-atomic-bot pushed a commit that referenced this pull request Dec 5, 2017
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
rh-atomic-bot pushed a commit that referenced this pull request Dec 5, 2017
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
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@cgwalters cgwalters mentioned this pull request Dec 7, 2017
@jlebon
Copy link
Member

jlebon commented Dec 7, 2017

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit d7a3f65 with merge 51c5591...

rh-atomic-bot pushed a commit that referenced this pull request Dec 7, 2017
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
@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing 51c5591 to master...

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

Successfully merging this pull request may close these issues.

3 participants