diff options
author | Colin Walters <walters@verbum.org> | 2020-07-16 21:13:36 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2020-07-18 14:59:01 +0000 |
commit | a615d35762be74b6407bfcbdde5387f84dd151cf (patch) | |
tree | 8f9ab26b0be8d7c50446c1501b932065be01242a /tests/pull-test.sh | |
parent | 4752dd02cfddd3f7c102e7fdd4dcca9a1aeee1a1 (diff) | |
download | ostree-a615d35762be74b6407bfcbdde5387f84dd151cf.tar.gz |
pull: Add --per-object-fsync
This is the opposite of
https://github.com/ostreedev/ostree/issues/1184
Motivated by OpenShift seeing etcd performance issues during
OS updates: https://github.com/openshift/machine-config-operator/issues/1897
Basically, if we switch to invoking `fsync()` as we go, it makes
ostree performance worse (in my tests, 31s to write 2G versus 7s if we
delay sync) but it avoids *huge* outliers in `fsync()` time for etcd.
Diffstat (limited to 'tests/pull-test.sh')
-rw-r--r-- | tests/pull-test.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/pull-test.sh b/tests/pull-test.sh index 92bcf112..615786e6 100644 --- a/tests/pull-test.sh +++ b/tests/pull-test.sh @@ -55,10 +55,10 @@ function verify_initial_contents() { } if has_gpgme; then - echo "1..34" + echo "1..35" else # 3 tests needs GPG support - echo "1..31" + echo "1..32" fi # Try both syntaxes @@ -74,6 +74,16 @@ cd ${test_tmpdir} verify_initial_contents echo "ok pull contents" +# And a test with incremental fsync +repo_init --no-sign-verify +${CMD_PREFIX} ostree --repo=repo pull --per-object-fsync origin main >out.txt +assert_file_has_content out.txt "[1-9][0-9]* metadata, [1-9][0-9]* content objects fetched" +${CMD_PREFIX} ostree --repo=repo pull --per-object-fsync origin:main > out.txt +assert_not_file_has_content out.txt "[1-9][0-9]* content objects fetched" +${CMD_PREFIX} ostree --repo=repo fsck +verify_initial_contents +echo "ok pull --per-object-fsync" + cd ${test_tmpdir} mkdir mirrorrepo ostree_repo_init mirrorrepo --mode=archive |