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 ba7ecbc6a9
avoid flushing keys db queue after each Annex action
The flush was only done Annex.run' to make sure that the queue was flushed
before git-annex exits. But, doing it there means that as soon as one
change gets queued, it gets flushed soon after, which contributes to
excessive writes to the database, slowing git-annex down.
(This does not yet speed git-annex up, but it is a stepping stone to
doing so.)

Database queues do not autoflush when garbage collected, so have to
be flushed explicitly. I don't think it's possible to make them
autoflush (except perhaps if git-annex sqitched to using ResourceT..).
The comment in Database.Keys.closeDb used to be accurate, since the
automatic flushing did mean that all writes reached the database even
when closeDb was not called. But now, closeDb or flushDb needs to be
called before stopping using an Annex state. So, removed that comment.

In Remote.Git, change to using quiesce everywhere that it used to use
stopCoProcesses. This means that uses on onLocal in there are just as
slow as before. I considered only calling closeDb on the local git remotes
when git-annex exits. But, the reason that Remote.Git calls stopCoProcesses
in each onLocal is so as not to leave git processes running that have files
open on the remote repo, when it's on removable media. So, it seemed to make
sense to also closeDb after each one, since sqlite may also keep files
open. Although that has not seemed to cause problems with removable
media so far. It was also just easier to quiesce in each onLocal than
once at the end. This does likely leave performance on the floor, so
could be revisited.

In Annex.Content.saveState, there was no reason to close the db,
flushing it is enough.

The rest of the changes are from auditing for Annex.new, and making
sure that quiesce is called, after any action that might possibly need
it.

After that audit, I'm pretty sure that the change to Annex.run' is
safe. The only concern might be that this does let more changes get
queued for write to the db, and if git-annex is interrupted, those will be
lost. But interrupting git-annex can obviously already prevent it from
writing the most recent change to the db, so it must recover from such
lost data... right?

Sponsored-by: Dartmouth College's Datalad project
2022-10-12 14:12:23 -04:00
Annex avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
Assistant avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
Backend move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
Build avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
CmdLine avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
Command avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
Config improve createDirectoryUnder to allow alternate top directories 2022-08-12 12:52:37 -04:00
Database avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
debian change name of option 2022-10-03 13:02:11 -04:00
doc update 2022-10-11 15:07:52 -04:00
Git fix flush of a closed file handle 2022-09-30 14:02:31 -04:00
Limit new matching options --want-get-by and --want-drop-by 2022-07-28 13:26:03 -04:00
Logs take lock in checkLogFile and calcLogFile 2022-10-07 13:19:17 -04:00
Messages factor out Utility.Aeson.textKey 2022-03-02 18:24:06 -04:00
P2P fix handling of corrupted data received from git remote 2022-01-07 13:25:33 -04:00
Remote avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
RemoteDaemon remove support code for ancient git-annex-shell version 2021-10-11 16:07:08 -04:00
standalone move assistant and webapp build-depends into main build-depends 2022-08-29 15:23:49 -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 test: Added --test-with-git-config option 2022-09-22 15:58:45 -04:00
Types all keys are still present on versioned remote after import of a tree 2022-10-11 13:05:40 -04:00
Upgrade handle upgrading repositories initialized with --version=9 2022-09-26 12:59:51 -04:00
Utility fix breakage in wormhole's sendFile 2022-09-26 15:26:29 -04:00
.ghci turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore ignore more cabal.project backup files 2022-08-22 12:03:27 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -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 several readonly values to AnnexRead 2022-06-28 15:40:19 -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 show when build with Benchmark build flag 2022-08-29 14:55:58 -04:00
BuildInfo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CHANGELOG all keys are still present on versioned remote after import of a tree 2022-10-11 13:05:40 -04:00
CmdLine.hs avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
Command.hs avoid redundant prompt for http password in git-annex get that does autoinit 2022-09-09 14:43:43 -04:00
Common.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
Config.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
COPYRIGHT bump year for Utility/* 2022-05-04 11:40:25 -04:00
Creds.hs avoid getting creds from environment during autoenable 2021-03-17 09:41:12 -04:00
Crypto.hs avoid setEnv while testing gpg 2022-05-18 16:05:11 -04:00
git-annex.cabal releasing package git-annex version 10.20221003 2022-10-03 13:24:21 -04:00
git-annex.hs include git-annex-shell back in 2019-12-02 11:51:52 -04:00
git-union-merge.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Git.hs use getSymbolicLinkStatus not getFileStatus to avoid crash on broken symlink 2022-09-05 13:46:32 -04:00
Key.hs convert Key to ShortByteString 2021-10-05 20:20:08 -04:00
Limit.hs use getSymbolicLinkStatus not getFileStatus to avoid crash on broken symlink 2022-09-05 13:46:32 -04:00
Logs.hs filter-branch working aside from some edge cases 2021-05-17 13:24:58 -04:00
Makefile don't force debuglocks flag on in Makefile 2022-08-09 10:43:07 -04:00
Messages.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
NEWS complete annex.skipunknown transition 2022-02-18 13:18:05 -04:00
README improve description 2022-01-06 12:24:27 -04:00
Remote.hs improve wording 2022-10-03 13:32:55 -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 move assistant and webapp build-depends into main build-depends 2022-08-29 15:23:49 -04:00
Test.hs test: Added --test-with-git-config option 2022-09-22 15:58:45 -04:00
Types.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Upgrade.hs handle upgrading repositories initialized with --version=9 2022-09-26 12:59:51 -04:00

git-annex allows managing large files with git, without storing the file
contents in git. It can sync, backup, and archive your data, offline
and online. Checksums and encryption keep your data safe and secure. Bring
the power and distributed nature of git to bear on your large files with
git-annex.

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