Joey Hess [Thu, 12 Aug 2021 18:50:12 +0000 (14:50 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 12 Aug 2021 18:49:48 +0000 (14:49 -0400)]
comment
Joey Hess [Thu, 12 Aug 2021 18:36:56 +0000 (14:36 -0400)]
add tailVerify
Not yet used, but this will let all remotes verify incrementally if it's
acceptable to pay the performance price. See comment for details of when
it will perform badly. I anticipate using this for all special remotes
that use fileRetriever. Except perhaps for a few like GitLFS that could
feed the incremental verifier themselves despite using that.
Sponsored-by: Dartmouth College's DANDI project
yarikoptic [Wed, 11 Aug 2021 20:25:51 +0000 (20:25 +0000)]
a report on the flood of failing tests on discovery
Joey Hess [Wed, 11 Aug 2021 18:51:05 +0000 (14:51 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
jasonb@ab4484d9961a46440958fa1a528e0fc435599057 [Wed, 11 Aug 2021 18:49:41 +0000 (18:49 +0000)]
Added a comment: I have this behavior consistently on the 2 repos I use
Joey Hess [Wed, 11 Aug 2021 18:42:49 +0000 (14:42 -0400)]
incremental verify for chunked remotes
Simply feed each chunk in turn to the incremental verifier.
When resuming an interrupted retrieve, it does not do incremental
verification. That would need to read the file, up to the resume point,
and feed it to the incremental verifier. That seems easy to get wrong.
Also it would mean extra work done before the transfer can start. Which
would complicate displaying progress, and would perhaps not appear to the
user as if it was resuming from where it left off. Instead, in that
situation, return UnVerified, and let the verification be done in a
separate pass.
Granted, Annex.CopyFile does manage all that, but it's not complicated
by dealing with chunks too.
Sponsored-by: Dartmouth College's DANDI project
Lukey [Wed, 11 Aug 2021 18:25:51 +0000 (18:25 +0000)]
Added a comment
Joey Hess [Wed, 11 Aug 2021 17:43:30 +0000 (13:43 -0400)]
incremental verify for byteRetriever special remotes
Several special remotes verify content while it is being retrieved,
avoiding a separate checksum pass. They are: S3, bup, ddar, and
gcrypt (with a local repository).
Not done when using chunking, yet.
Complicated by Retriever needing to change to be polymorphic. Which in turn
meant RankNTypes is needed, and also needed some code changes. The
change in Remote.External does not change behavior at all but avoids
the type checking failing because of a "rigid, skolem type" which
"would escape its scope". So I refactored slightly to make the type
checker's job easier there.
Unfortunately, directory uses fileRetriever (except when chunked),
so it is not amoung the improved ones. Fixing that would need a way for
FileRetriever to return a Verification. But, since the file retrieved
may be encrypted or chunked, it would be extra work to always
incrementally checksum the file while retrieving it. Hm.
Some other special remotes use fileRetriever, and so don't get incremental
verification, but could be converted to byteRetriever later. One is
GitLFS, which uses downloadConduit, which writes to the file, so could
verify as it goes. Other special remotes like web could too, but don't
use Remote.Helper.Special and so will need to be addressed separately.
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Wed, 11 Aug 2021 16:16:49 +0000 (12:16 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 11 Aug 2021 00:45:02 +0000 (20:45 -0400)]
simplify and speed up Utility.FileSystemEncoding
This eliminates the distinction between decodeBS and decodeBS', encodeBS
and encodeBS', etc. The old implementation truncated at NUL, and the
primed versions had to do extra work to avoid that problem. The new
implementation does not truncate at NUL, and is also a lot faster.
(Benchmarked at 2x faster for decodeBS and 3x for encodeBS; more for the
primed versions.)
Note that filepath-bytestring 1.4.2.1.8 contains the same optimisation,
and upgrading to it will speed up to/fromRawFilePath.
AFAIK, nothing relied on the old behavior of truncating at NUL. Some
code used the faster versions in places where I was sure there would not
be a NUL. So this change is unlikely to break anything.
Also, moved s2w8 and w82s out of the module, as they do not involve
filesystem encoding really.
Sponsored-by: Shae Erisson on Patreon
Joey Hess [Wed, 11 Aug 2021 00:04:17 +0000 (20:04 -0400)]
remove unused function
Ilya_Shlyakhter [Tue, 10 Aug 2021 16:28:33 +0000 (16:28 +0000)]
Added a comment: sorry
Joey Hess [Mon, 9 Aug 2021 20:00:57 +0000 (16:00 -0400)]
comment
Joey Hess [Mon, 9 Aug 2021 19:33:59 +0000 (15:33 -0400)]
sheeeeeeeeesh
Joey Hess [Mon, 9 Aug 2021 19:20:19 +0000 (15:20 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 9 Aug 2021 19:17:48 +0000 (15:17 -0400)]
simplify
yarikoptic [Mon, 9 Aug 2021 17:58:55 +0000 (17:58 +0000)]
Added a comment
yarikoptic [Mon, 9 Aug 2021 17:34:39 +0000 (17:34 +0000)]
Added a comment
Ilya_Shlyakhter [Mon, 9 Aug 2021 17:28:31 +0000 (17:28 +0000)]
Added a comment: standalone build version vs standard release version
Joey Hess [Mon, 9 Aug 2021 17:03:19 +0000 (13:03 -0400)]
comment
Joey Hess [Mon, 9 Aug 2021 16:46:10 +0000 (12:46 -0400)]
response
Joey Hess [Mon, 9 Aug 2021 16:44:20 +0000 (12:44 -0400)]
typo
Joey Hess [Mon, 9 Aug 2021 16:31:48 +0000 (12:31 -0400)]
don't use changelog version in commit message
changelog may have a new unreleased version open already
Joey Hess [Mon, 9 Aug 2021 16:31:36 +0000 (12:31 -0400)]
close
Joey Hess [Mon, 9 Aug 2021 16:11:47 +0000 (12:11 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 9 Aug 2021 16:06:10 +0000 (12:06 -0400)]
rsync special remote: Stop displaying rsync progress, and use git-annex's own progress display
Reasons are same as in commit
cee14f147ac229c99f001b3a0aaaefb4cb6f7785.
(It was already done when using -J.)
Sponsored-by: Mark Reidenbach on Patreon
alex [Mon, 9 Aug 2021 04:21:11 +0000 (04:21 +0000)]
Added a comment: Automatic watch for the heuristic
yarikoptic [Fri, 6 Aug 2021 22:11:46 +0000 (22:11 +0000)]
get failing to get if with --debug
yarikoptic [Fri, 6 Aug 2021 21:53:42 +0000 (21:53 +0000)]
reporting on odds in downloads.
Lukey [Fri, 6 Aug 2021 06:02:38 +0000 (06:02 +0000)]
Added a comment
Rob [Thu, 5 Aug 2021 18:13:36 +0000 (18:13 +0000)]
Added a comment: creating directory special remote "in-place"
Joey Hess [Wed, 4 Aug 2021 16:40:56 +0000 (12:40 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 4 Aug 2021 16:40:25 +0000 (12:40 -0400)]
done!
Joey Hess [Wed, 4 Aug 2021 16:39:54 +0000 (12:39 -0400)]
Merge branch 'vectorclock'
Joey Hess [Tue, 3 Aug 2021 20:45:20 +0000 (16:45 -0400)]
deal better with clock skew situations, using vector clocks
* Deal with clock skew, both forwards and backwards, when logging
information to the git-annex branch.
* GIT_ANNEX_VECTOR_CLOCK can now be set to a fixed value (eg 1)
rather than needing to be advanced each time a new change is made.
* Misuse of GIT_ANNEX_VECTOR_CLOCK will no longer confuse git-annex.
When changing a file in the git-annex branch, the vector clock to use is now
determined by first looking at the current time (or GIT_ANNEX_VECTOR_CLOCK
when set), and comparing it to the newest vector clock already in use in
that file. If a newer time stamp was already in use, advance it forward by
a second instead.
When the clock is set to a time in the past, this avoids logging with
an old timestamp, which would risk that log line later being ignored in favor
of "newer" line that is really not newer.
When a log entry has been made with a clock that was set far ahead in the
future, this avoids newer information being logged with an older timestamp
and so being ignored in favor of that future-timestamped information.
Once all clocks get fixed, this will result in the vector clocks being
incremented, until finally enough time has passed that time gets back ahead
of the vector clock value, and then it will return to usual operation.
(This latter situation is not ideal, but it seems the best that can be done.
The issue with it is, since all writers will be incrementing the last
vector clock they saw, there's no way to tell when one writer made a write
significantly later in time than another, so the earlier write might
arbitrarily be picked when merging. This problem is why git-annex uses
timestamps in the first place, rather than pure vector clocks.)
Advancing forward by 1 second is somewhat arbitrary. setDead
advances a timestamp by just 1 picosecond, and the vector clock could
too. But then it would interfere with setDead, which wants to be
overrulled by any change. So it could use 2 picoseconds or something,
but that seems weird. It could just as well advance it forward by a
minute or whatever, but then it would be harder for real time to catch
up with the vector clock when forward clock slew had happened.
A complication is that many log files contain several different peices of
information, and it may be best to only use vector clocks for the same peice
of information. For example, a key's location log file contains
InfoPresent/InfoMissing for each UUID, and it only looks at the vector
clocks for the UUID that is being changed, and not other UUIDs.
Although exactly where the dividing line is can be hard to determine.
Consider metadata logs, where a field "tag" can have multiple values set
at different times. Should it advance forward past the last tag?
Probably. What about when a different field is set, should it look at
the clocks of other fields? Perhaps not, but currently it does, and
this does not seems like it will cause any problems.
Another one I'm not entirely sure about is the export log, which is
keyed by (fromuuid, touuid). So if multiple repos are exporting to the
same remote, different vector clocks can be used for that remote.
It looks like that's probably ok, because it does not try to determine
what order things occurred when there was an export conflict.
Sponsored-by: Jochen Bartl on Patreon
Ilya_Shlyakhter [Wed, 4 Aug 2021 15:47:12 +0000 (15:47 +0000)]
Added a comment: downloading torrent files to annex
Joey Hess [Tue, 3 Aug 2021 21:14:06 +0000 (17:14 -0400)]
devblog
Joey Hess [Tue, 3 Aug 2021 21:06:27 +0000 (17:06 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 3 Aug 2021 21:05:50 +0000 (17:05 -0400)]
branch
spwhitton [Tue, 3 Aug 2021 19:10:10 +0000 (19:10 +0000)]
Added a comment
Joey Hess [Tue, 3 Aug 2021 18:03:25 +0000 (14:03 -0400)]
update
Joey Hess [Tue, 3 Aug 2021 17:48:03 +0000 (13:48 -0400)]
new todo.. I seem to have cracked a longstanding problem
Sponsored-by: Jochen Bartl on Patreon
jwrauch [Tue, 3 Aug 2021 16:36:21 +0000 (16:36 +0000)]
Added a comment
Joey Hess [Tue, 3 Aug 2021 16:22:58 +0000 (12:22 -0400)]
add: When adding a dotfile, avoid treating its name as an extension.
Joey Hess [Tue, 3 Aug 2021 16:21:10 +0000 (12:21 -0400)]
add news item for git-annex 8.
20210803
Joey Hess [Tue, 3 Aug 2021 16:20:45 +0000 (12:20 -0400)]
releasing package git-annex version 8.
20210803
Joey Hess [Tue, 3 Aug 2021 16:18:10 +0000 (12:18 -0400)]
whitespace
Ilya_Shlyakhter [Tue, 3 Aug 2021 15:14:53 +0000 (15:14 +0000)]
Added a comment
Ilya_Shlyakhter [Tue, 3 Aug 2021 15:06:35 +0000 (15:06 +0000)]
Added a comment: don't give up ;)
Lukey [Tue, 3 Aug 2021 07:54:13 +0000 (07:54 +0000)]
Added a comment
Joey Hess [Mon, 2 Aug 2021 18:11:36 +0000 (14:11 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 2 Aug 2021 17:59:23 +0000 (13:59 -0400)]
fix test suite
14683da9ebd629c3f77405b646d3f5661874f9d6 caused a test suite failure.
When the content of a key is not present, a LinkAnnexFailed is returned,
but replaceFile then tried to move the file into place, and since it was
not written, that crashed.
Sponsored-by: Boyd Stephen Smith Jr. on Patreon
Joey Hess [Mon, 2 Aug 2021 17:42:27 +0000 (13:42 -0400)]
fix missing new lines in processTranscript
jwrauch [Mon, 2 Aug 2021 17:03:23 +0000 (17:03 +0000)]
yarikoptic [Mon, 2 Aug 2021 16:56:19 +0000 (16:56 +0000)]
initial observation of .dot filename to consider having .dot extension
Added a comment: Also seeing this behaviour
Added a comment
Joey Hess [Fri, 30 Jul 2021 22:36:03 +0000 (18:36 -0400)]
work around strange auto-init bug
git-annex get when run as the first git-annex command in a new repo did not
populate unlocked files. (Reversion in version 8.
20210621)
I am not entirely happy with this, because I don't understand how
428c91606b434512d1986622e751c795edf4df44 caused the problem in the first
place, and I don't fully understand how skipping calling scanAnnexedFiles
during autoinit avoids the problem.
Kept the explicit call to scanAnnexedFiles during git-annex init,
so that when reconcileStaged is expensive, it can be made to run then,
rather than at some later point when the information is needed.
Sponsored-by: Brock Spratlen on Patreon
Joey Hess [Fri, 30 Jul 2021 22:01:36 +0000 (18:01 -0400)]
remove unused code
Joey Hess [Fri, 30 Jul 2021 21:46:11 +0000 (17:46 -0400)]
remove second pass in scanAnnexedFiles
The pass was needed to populate files when annex.thin was set,
but in commit
73e0cbbb19703f08daf783d8788370726f852162,
reconcileStaged started to do that. So, this second pass is not needed
any longer.
Joey Hess [Fri, 30 Jul 2021 19:39:47 +0000 (15:39 -0400)]
bug
Joey Hess [Fri, 30 Jul 2021 19:20:05 +0000 (15:20 -0400)]
close
I'm now reasonably sure I've identified both cases where this can
happen. v8 upgrades and certian filesystems eg NFS. Both are handled as
well as can be, though it may involve some extra checksumming work.
Joey Hess [Fri, 30 Jul 2021 13:56:04 +0000 (09:56 -0400)]
Fix a rounding bug in display of data sizes
Eg, showImprecise 1 1.99 returned "1.1" rather than "2". The 9 rounded
upward to 10, and that was wrongly used as the decimal, rather than
carrying the 1.
Sponsored-by: Jack Hill on Patreon
uli@8484a70fbfd489faef5f72c230d340b01e2676ca [Fri, 30 Jul 2021 07:24:53 +0000 (07:24 +0000)]
bugreport: git-annex info . formats 2 TB as 1.1 TB
Joey Hess [Thu, 29 Jul 2021 18:06:13 +0000 (14:06 -0400)]
fsck: Detect and correct stale or missing inode caches for object files
An easy way to see this in action is to have an unlocked file, and touch the
object file.
While all code that compares inode caches for object files needs to be
prepared for this kind of problem and fall back to verification, having
fsck notice it and correct it is cheap (as long as fsck is being run
anyway) and ensures that if it happens for some unusual reason, there's a
way for the user to notice that it's happening.
Not that, when annex.thin is in use, the earlier call to isUnmodified
(and also potentially earlier calls to inAnnex in eg, verifyLocationLog)
will fix up the same problem silently. That might prevent the warning
being displayed, although probably it still will be, because the
Database.Keys write of the InodeCache will be queued but will not have
happened yet. I can't see a way to improve this, but it's not great.
Sponsored-by: Dartmouth College's Datalad project
Joey Hess [Thu, 29 Jul 2021 17:36:19 +0000 (13:36 -0400)]
split verifyKeyContent
This avoids it calling enteringStage VerifyStage when it's used in
places that only fall back to verification rarely, and which might be
called while in TransferStage and be going to perform a transfer after
the verification.
Joey Hess [Thu, 29 Jul 2021 17:33:11 +0000 (13:33 -0400)]
comment
Joey Hess [Thu, 29 Jul 2021 17:21:23 +0000 (13:21 -0400)]
improve comment wording
Joey Hess [Thu, 29 Jul 2021 17:14:03 +0000 (13:14 -0400)]
add note
Joey Hess [Thu, 29 Jul 2021 17:12:11 +0000 (13:12 -0400)]
remove unused parameter
Joey Hess [Thu, 29 Jul 2021 16:30:39 +0000 (12:30 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 29 Jul 2021 16:28:13 +0000 (12:28 -0400)]
simplify code
Joey Hess [Thu, 29 Jul 2021 16:18:31 +0000 (12:18 -0400)]
remove unncessary debugs
Keeping the ones in Annex.InodeSentinal
mih [Thu, 29 Jul 2021 05:40:36 +0000 (05:40 +0000)]
Added a comment: Cause cannot (only) be a v7->v8 upgrade
Joey Hess [Tue, 27 Jul 2021 21:34:56 +0000 (17:34 -0400)]
use SQL.addInodeCaches
This avoids deadlock when opening the database handle calls
reconcileStaged.
Joey Hess [Tue, 27 Jul 2021 18:21:09 +0000 (14:21 -0400)]
fix problem populating pointer files
This is a result of an audit of every use of getInodeCaches,
to find places that misbehave when the annex object is not in the inode
cache, despite pointer files for the same key being in the inode cache.
Unfortunately, that is the case for objects that were in v7 repos that
upgraded to v8. Added a note about this gotcha to getInodeCaches.
Database.Keys.reconcileStaged, then annex.thin is set, would fail to
populate pointer files in this situation. Changed it to check if the
annex object is unmodified the same way inAnnex does, falling back to a
checksum if the inode cache is not recorded.
Sponsored-by: Dartmouth College's Datalad project
Joey Hess [Tue, 27 Jul 2021 18:07:23 +0000 (14:07 -0400)]
move verifyKeyContent to Annex.Verify
The goal is that Database.Keys be able to use it; it can't use
Annex.Content.Presence due to an import loop.
Several other things also needed to be moved to Annex.Verify as a
conseqence.
Joey Hess [Tue, 27 Jul 2021 17:45:33 +0000 (13:45 -0400)]
comment
Joey Hess [Tue, 27 Jul 2021 17:16:22 +0000 (13:16 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 27 Jul 2021 17:01:30 +0000 (13:01 -0400)]
fix potential race in updating inode cache
Some uses of linkFromAnnex are inside replaceWorkTreeFile, which was
already safe, but others use it directly on the work tree file, which
was race-prone. Eg, if the work tree file was first removed, then
linkFromAnnex called to populate it, the user could have re-written it in
the interim.
This came to light during an audit of all calls of addInodeCaches,
looking for such races. All the other uses of it seem ok.
Sponsored-by: Brett Eisenberg on Patreon
Joey Hess [Tue, 27 Jul 2021 16:29:10 +0000 (12:29 -0400)]
fix potential race in updating inode cache
In Annex.Content, the object file was statted after pointer files were
populated. But if annex.thin is set, once the pointer files are
populated, the object file can potentially be modified via the hard
link. So, it was possible, though seemingly very unlikely, for the inode
of the modified object file to be cached.
Command.Fix and Command.Fsck had similar problems, statting the work
tree files after they were in place. Changed them to stat the temp file
that gets moved into place. This does rely on .git/annex being on the
same filesystem. If it's not, the cached inode will not be the same as
the one that the temp file gets moved to. Result will be that git-annex
will later need to do an expensive verification of the content of the
worktree files. Note that the cross-filesystem move of the temp file
already is a larger amount of extra work, so this seems acceptable.
Sponsored-by: Luke Shumaker on Patreon
mih [Tue, 27 Jul 2021 12:00:35 +0000 (12:00 +0000)]
Added a comment: Fixed in
8.20210715-g3b5a3e168
Joey Hess [Mon, 26 Jul 2021 21:33:49 +0000 (17:33 -0400)]
check if object is modified before starting to send it
Fix bug that caused some transfers to incorrectly fail with "content
changed while it was being sent", when the content was not changed.
While I don't know how to reproduce the problem that several people
reported, it is presumably due to the inode cache somehow being stale.
So check isUnmodified', and if it's not modified, include the file's
current inode cache in the set to accept, when checking for modification
after the transfer.
That seems like the right thing to do for another reason: The failure
says the file changed while it was being sent, but if the object file was
changed before the transfer started, that's wrong. So it needs to check
before allowing the transfer at all if the file is modified.
(Other calls to sameInodeCache or elemInodeCaches, when operating on inode
caches from the database, could also be problimatic if the inode cache is
somehow getting stale. This does not address such problems.)
Sponsored-by: Dartmouth College's Datalad project
Joey Hess [Mon, 26 Jul 2021 21:09:14 +0000 (17:09 -0400)]
comment
Joey Hess [Mon, 26 Jul 2021 18:12:58 +0000 (14:12 -0400)]
fix a place where the inode cache could potentially have gotten stale
When git-annex lock repopulates the object file by copying an associated
file that still has its content, it negected to update the inode cache.
I was not able to actually get this code to successfully repopulate the
object file; the associated file gets replaced with a dangling pointer
before unlock is able to do that. (By what I'm not sure..
reconcileStaged?) Which might be itself a bug, but
anyway this makes me doubtful that this was really leading to a stale
inode cache. Still, in case there is some situation in which it does
work, fixed it to update the inode cache.
Joey Hess [Mon, 26 Jul 2021 17:59:07 +0000 (13:59 -0400)]
comment
Joey Hess [Mon, 26 Jul 2021 16:57:35 +0000 (12:57 -0400)]
more inode cache debugging
Joey Hess [Mon, 26 Jul 2021 15:39:57 +0000 (11:39 -0400)]
propagate debugging into remote's Annex monad
This is needed to make the debugging added in
00733848509940d81026c24919a909acc6dfa21e actually be displayed when
running git-annex get from a local remote.
Joey Hess [Mon, 26 Jul 2021 15:16:58 +0000 (11:16 -0400)]
close this frustrating todo due to lack of followup and/or being fixed
Joey Hess [Mon, 26 Jul 2021 15:13:12 +0000 (11:13 -0400)]
comment
Joey Hess [Mon, 26 Jul 2021 14:48:28 +0000 (10:48 -0400)]
add debugging in sameInodeCache
mih [Mon, 26 Jul 2021 07:10:22 +0000 (07:10 +0000)]
Added a comment: strace logs
Joey Hess [Thu, 22 Jul 2021 18:14:25 +0000 (14:14 -0400)]
comment
Joey Hess [Thu, 22 Jul 2021 18:01:12 +0000 (14:01 -0400)]
comment
Joey Hess [Thu, 22 Jul 2021 17:34:27 +0000 (13:34 -0400)]
comment
Joey Hess [Thu, 22 Jul 2021 17:28:23 +0000 (13:28 -0400)]
comment
mih [Thu, 22 Jul 2021 14:59:23 +0000 (14:59 +0000)]
Added a comment: Carification