aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/checkpresentkey_batch_stops_at_97_or_98_keys.mdwn
blob: ff761904db16a953e672f880814cdb3d6ffe7bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
### Please describe the problem.

**git annex checkpresentkey --batch $remote** doesn't check all the keys it is provided with.

Depending how this is run, given 8000 keys, it may return info only the first handful or ~97.

### What steps will reproduce the problem?

The directory contains 8000 symlinks whose filename is the same as their key. The content is not in 'spearmint' (or any other configured remotes, but is present 'here').

    $ find . -type l -printf "%f\n" | git annex checkpresentkey --batch | wc -l
    8000
    $ find . -type l -printf "%f\n" | git annex checkpresentkey --batch spearmint | wc -l
    97
    $ find . -type l -printf "%f\n" | git annex checkpresentkey --batch spearmint | wc -l
    97

Without a remote, all get checked..

    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch | wc -l
    8000
    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch | sort | uniq -c
       8000 0

Specifying a remote only checks a small handful of keys (count changes each time)..

    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
    6
    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
    14
    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
    7
    $ git annex find --format '${key}\n' . | git annex checkpresentkey --batch spearmint | wc -l
    8

Putting the keys into a file seems to make this more consistent (more in line with *find -type f*)

    $ git annex find --format '${key}\n' . > /tmp/keys.txt
    $ cat /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
    96
    $ cat /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
    96

Shuffling the key order doesn't matter much either..

    $ shuf /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
    97
    $ shuf /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
    96
    $ shuf /tmp/keys.txt | git annex checkpresentkey --batch spearmint | wc -l
    97


### What version of git-annex are you using? On what operating system?
git-annex version: 6.20161231-g8740cd971

Arch Linux (installed from 'community')

### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)

I only find (what I think are) bugs because I use it and I use it because I like it. I like it because it works (except for when I find actual bugs :]).

> [[fixed|done]] --[[Joey]]