diff options
author | https://www.google.com/accounts/o8/id?id=AItOawnBJ6Dv1glxzzi4qIzGFNa6F-mfHIvv9Ck <Jim@web> | 2011-11-17 21:51:55 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2011-11-17 21:51:55 +0000 |
commit | abd4e1192f675de8d8afeec7af467069443d6e40 (patch) | |
tree | cfdf85bad6da17c565c52b2e4c21a610ba134ed8 | |
parent | 6d9f525f647fb24f4955e4a51156741f216d3931 (diff) |
-rw-r--r-- | doc/bugs/interrupting_migration_causes_problems.mdwn | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/bugs/interrupting_migration_causes_problems.mdwn b/doc/bugs/interrupting_migration_causes_problems.mdwn new file mode 100644 index 000000000..3298a1fa6 --- /dev/null +++ b/doc/bugs/interrupting_migration_causes_problems.mdwn @@ -0,0 +1,50 @@ +Killing a migration from WORM to SHA256 with ^C breaks things; future attempts to do the migration fail: + + #!/bin/bash + + BASE=/tmp/migrate-bug + + set -x + + chmod -R +w $BASE + rm -rf $BASE + mkdir -p $BASE + cd $BASE + + # create annex + git init . + git annex init + + # make a big (sparse) file and add it + dd if=/dev/zero of=bigfile bs=1 count=0 seek=1G + git annex add --backend WORM bigfile + git commit -m 'added bigfile' + + # look at status + git annex status + + # now migrate it, but kill migration during checksum + # Simulate ^C by making a new process group and sending SIGINT + setsid git annex migrate --backend SHA256 bigfile & + PID=$! + sleep 1 + kill -INT -$PID + wait + + # look at status + git annex status + + # this migration fails + git annex migrate --backend SHA256 bigfile + + # but fsck says everything's OK + git annex fsck + +The error: + + migrate bigfile + git-annex: /tmp/migrate-bug/.git/annex/objects/K9/V1/WORM-s1073741824-m1321566308--bigfile/WORM-s1073741824-m1321566308--bigfile: createLink: already exists (File exists) + failed + git-annex: migrate: 1 failed + + |