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

Add option -skip-existing-packages to mirror update to speed up download queue setup #520

Merged

Conversation

seeraven
Copy link
Contributor

When updating a mirror, all package files are downloaded and a list of downloads is generated by checking which files are already on disc and have the right size. This can take some time, especially on storage systems like NAS or external hard drives when mirroring large repositories.

Requirements

All new code should be covered with tests, documentation should be updated. CI should pass.

Description of the Change

To speed up the download queue setup, the internal database for the mirror can be used. It is only updated after a successful mirror update and contains the list of packages of the mirror. Assuming nobody interfered and deleted files manually, we can use this database to check what packages need to be downloaded. This new functionality is enabled only when using the command line option -skip-existing-packages, otherwise the behavior is unchanged.

Checklist

  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • author name in AUTHORS

Copy link
Contributor

@smira smira left a comment

Choose a reason for hiding this comment

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

👍 awesome work, thanks!

just one minor comment on ronn and man page

also it would be awesome to add new option to the web docs: https://github.com/aptly-dev/aptly-dev.github.io

man/aptly.1 Outdated
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "APTLY" "1" "March 2017" "" ""
.TH "APTLY" "1" "2017-03-23" "" ""
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to be generated with broken ronn, make man should install correct ronn fork for you and run man page generation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Took a while to get ronn up and running. Apparently using mustache in version 1.0.4 caused errors, so I had to revert that to 1.0.3. Nevertheless, it now seems to work and I've fixed the man page in 4ddf85b.

@seeraven
Copy link
Contributor Author

I've opened the pull request aptly-dev/www.aptly.info#38 for the web docs.

Copy link
Contributor

@smira smira left a comment

Choose a reason for hiding this comment

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

👍

@smira smira added the 1.1.0 label Mar 27, 2017
@smira smira merged commit ca16841 into aptly-dev:master Mar 28, 2017
@smira
Copy link
Contributor

smira commented Mar 28, 2017

aptly_1.0.0+8+g47b5cc2_i386 nightly got released which includes this feature

@seeraven seeraven deleted the feature_skip_existing_packages_latest branch August 15, 2017 15:12
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.

2 participants