CI to automate build of cargo lockfiles on different Alpine releases for git-annex aports https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/git-annex
Find a file
Joey Hess 1acdd18ea8
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
2021-08-04 12:33:46 -04:00
Annex deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Assistant work around strange auto-init bug 2021-07-30 18:36:03 -04:00
Backend add: When adding a dotfile, avoid treating its name as an extension. 2021-08-03 12:22:58 -04:00
Build update for OSX catalina build 2021-07-14 12:22:34 -04:00
CmdLine whereused implemented 2021-07-14 14:27:21 -04:00
Command deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Config add: Significantly speed up adding lots of non-large files to git 2021-01-04 13:12:28 -04:00
Database remove unused code 2021-07-30 18:01:36 -04:00
debian Enable building with git-annex benchmark by default 2020-10-02 13:57:10 -04:00
doc deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Git sync --quiet 2021-07-19 11:28:47 -04:00
Limit fix longstanding indeterminite preferred content for duplicated file problem 2021-05-24 14:07:05 -04:00
Logs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Messages avoid using temp file size when deciding whether to retry failed transfer 2021-06-25 12:04:23 -04:00
P2P move verifyKeyContent to Annex.Verify 2021-07-27 14:07:23 -04:00
Remote move verifyKeyContent to Annex.Verify 2021-07-27 14:07:23 -04:00
RemoteDaemon switch from hslogger to purpose-built Utility.Debug 2021-04-05 13:40:31 -04:00
standalone bump filepath-bytestring dep 2020-11-11 11:49:19 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates cache the serialization of a Key 2019-11-22 17:49:16 -04:00
Test whitespace 2021-08-03 12:18:10 -04:00
Types deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Upgrade remove second pass in scanAnnexedFiles 2021-07-30 17:46:11 -04:00
Utility fix missing new lines in processTranscript 2021-08-02 13:42:27 -04:00
.ghci avoid ghci warning on tabs 2019-01-21 12:35:44 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore stack.yaml: Updated to lts-16.10 2020-08-24 14:11:37 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Assistant.hs assistant: Fix a crash on startup by avoiding using forkProcess 2021-05-12 15:08:03 -04:00
Backend.hs move verifyKeyContent to Annex.Verify 2021-07-27 14:07:23 -04:00
bash-completion.bash bash completion fix 2018-11-12 13:23:05 -04:00
Benchmark.hs --size-limit exit 101 2021-06-04 16:43:47 -04:00
BuildFlags.hs Removed the S3 and WebDAV build flags 2020-09-08 12:42:59 -04:00
BuildInfo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CHANGELOG deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
CmdLine.hs --size-limit exit 101 2021-06-04 16:43:47 -04:00
Command.hs addon commands 2021-02-02 16:32:49 -04:00
Common.hs finish fixing removeLink on windows 2020-11-24 13:20:44 -04:00
Config.hs more RawFilePath conversion 2020-10-29 10:50:29 -04:00
COPYRIGHT update year 2021-01-04 12:45:19 -04:00
Creds.hs avoid getting creds from environment during autoenable 2021-03-17 09:41:12 -04:00
Crypto.hs fix strictness issue 2020-06-16 17:09:34 -04:00
git-annex.cabal releasing package git-annex version 8.20210803 2021-08-03 12:20:45 -04:00
git-annex.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
git-union-merge.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Git.hs avoid crashing when there are remotes using unparseable urls 2021-01-18 14:59:08 -04:00
Key.hs use GIT keys for export of non-annexed files 2021-03-05 14:12:11 -04:00
Limit.hs New matching options --excludesamecontent and --includesamecontent 2021-05-25 13:08:18 -04:00
Logs.hs filter-branch working aside from some edge cases 2021-05-17 13:24:58 -04:00
Makefile remove TAGS target 2021-07-02 14:38:28 -04:00
Messages.hs sync --quiet 2021-07-19 11:28:47 -04:00
NEWS fix dist in latest NEWS entry 2020-09-14 12:05:12 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs Behavior change: --trust option no longer overrides trust 2021-01-07 10:34:57 -04:00
Setup.hs Added git-remote-tor-annex, which allows git pull and push to the tor hidden service. 2016-11-21 17:27:38 -04:00
stack.yaml update to lts-16.27 2020-12-29 13:51:08 -04:00
Test.hs sync, merge: Added --allow-unrelated-histories option 2021-07-19 12:14:26 -04:00
Types.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Upgrade.hs propagate git-annex -c on to transferrer child process 2020-12-15 11:36:25 -04:00

git-annex allows managing files with git, without checking the file
contents into git. While that may seem paradoxical, it is useful when
dealing with files larger than git can currently easily handle, whether due
to limitations in memory, checksumming time, or disk space.

For documentation, see doc/ or <https://git-annex.branchable.com/>