diff options
author | 2015-05-23 14:35:14 +0000 | |
---|---|---|
committer | 2015-05-23 14:35:14 +0000 | |
commit | 60ddc598cf5b1ff7f4cdf01cbf1891b0ada5f68a (patch) | |
tree | 77e99b9961abffcb4c827b3e5c28acb77ec61486 /doc/bugs | |
parent | fb33b28a65e02f2d2ddecf8d533a815a566dceb9 (diff) |
Diffstat (limited to 'doc/bugs')
-rw-r--r-- | doc/bugs/incremental_fsck-ing_a_remote_does_not_work_for_files_that_are_not_present_in_current_repository.mdwn | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/doc/bugs/incremental_fsck-ing_a_remote_does_not_work_for_files_that_are_not_present_in_current_repository.mdwn b/doc/bugs/incremental_fsck-ing_a_remote_does_not_work_for_files_that_are_not_present_in_current_repository.mdwn new file mode 100644 index 000000000..ffc3acb6b --- /dev/null +++ b/doc/bugs/incremental_fsck-ing_a_remote_does_not_work_for_files_that_are_not_present_in_current_repository.mdwn @@ -0,0 +1,103 @@ +### Please describe the problem. +Incremental fsck keeps information about which time a file was last fsck-ed by setting mtime of the file's parent directory in `.git/annex/objects/`. When we are doing incremental fsck from a remote, files that are not available locally are never marked as checked (since said directory does not exist), so they are checked at every invocation of `git annex fsck --more`. + +### What steps will reproduce the problem? +Create a git-annex repository with some random content. Then add any remote, copy files there, remove them locally and run an incremental fsck from the remote. Interrupt it and run again with `--more`. It will check again all the files, including those that have already been checked. + +### What version of git-annex are you using? On what operating system? +Debian official package, 5.20141125, on Debian sid (more or less up-to-date). + +### Please provide any additional information below. + +[[!format sh """ +# Create a test repository +giovanni@amalgama:~$ cd /tmp/ +giovanni@amalgama:/tmp$ mkdir test +giovanni@amalgama:/tmp$ cd test/ +giovanni@amalgama:/tmp/test$ git init +Inizializzato un repository Git in /tmp/test/.git/ +giovanni@amalgama:/tmp/test (master)$ git annex init +init ok +(Recording state in git...) +# Create random content +giovanni@amalgama:/tmp/test (master)$ dd if=/dev/urandom bs=1M count=20 of=test1 +20+0 record dentro +20+0 record fuori +20971520 byte (21 MB) copiati, 1,15928 s, 18,1 MB/s +giovanni@amalgama:/tmp/test (master)$ dd if=/dev/urandom bs=1M count=20 of=test2 +20+0 record dentro +20+0 record fuori +20971520 byte (21 MB) copiati, 1,12974 s, 18,6 MB/s +giovanni@amalgama:/tmp/test (master)$ dd if=/dev/urandom bs=1M count=20 of=test3 +20+0 record dentro +20+0 record fuori +20971520 byte (21 MB) copiati, 1,16881 s, 17,9 MB/s +giovanni@amalgama:/tmp/test (master)$ dd if=/dev/urandom bs=1M count=20 of=test4 +20+0 record dentro +20+0 record fuori +20971520 byte (21 MB) copiati, 1,14387 s, 18,3 MB/s +giovanni@amalgama:/tmp/test (master)$ git annex add . +add test1 ok +add test2 ok +add test3 ok +add test4 ok +(Recording state in git...) +# Create a remote of type directory and move content there +giovanni@amalgama:/tmp/test (master)$ mkdir /tmp/dir +giovanni@amalgama:/tmp/test (master)$ git annex initremote test type=directory encryption=none directory=/tmp/dir +initremote test ok +(Recording state in git...) +giovanni@amalgama:/tmp/test (master)$ git annex move --to test +move test1 (to test...) +ok +move test2 (to test...) +ok +move test3 (to test...) +ok +move test4 (to test...) +ok +(Recording state in git...) +# Launch a remote incremental fsck +giovanni@amalgama:/tmp/test (master)$ git annex fsck --from test --incremental +fsck test1 (checksum...) +ok +fsck test2 (checksum...) +ok +fsck test3 (checksum...) +ok +fsck test4 (checksum...) +ok +# Continue it; here I would expect nothing to happen, since all content has already been checked +giovanni@amalgama:/tmp/test (master)$ git annex fsck --from test --more +fsck test1 (checksum...) +ok +fsck test2 (checksum...) +ok +fsck test3 (checksum...) +ok +fsck test4 (checksum...) +ok +# Bring back content locally and launch again fsck +giovanni@amalgama:/tmp/test (master)$ git annex get +get test1 (from test...) +ok +get test2 (from test...) +ok +get test3 (from test...) +ok +get test4 (from test...) +ok +(Recording state in git...) +giovanni@amalgama:/tmp/test (master)$ git annex fsck --from test --incremental +fsck test1 (checksum...) +ok +fsck test2 (checksum...) +ok +fsck test3 (checksum...) +ok +fsck test4 (checksum...) +ok +# Now --more semantics is respected +giovanni@amalgama:/tmp/test (master)$ git annex fsck --from test --more +giovanni@amalgama:/tmp/test (master)$ +"""]] |