Commit graph

9 commits

Author SHA1 Message Date
Joey Hess
e60766543f
add annex.dbdir (WIP)
WIP: This is mostly complete, but there is a problem: createDirectoryUnder
throws an error when annex.dbdir is set to outside the git repo.

annex.dbdir is a workaround for filesystems where sqlite does not work,
due to eg, the filesystem not properly supporting locking.

It's intended to be set before initializing the repository. Changing it
in an existing repository can be done, but would be the same as making a
new repository and moving all the annexed objects into it. While the
databases get recreated from the git-annex branch in that situation, any
information that is in the databases but not stored in the branch gets
lost. It may be that no information ever gets stored in the databases
that cannot be reconstructed from the branch, but I have not verified
that.

Sponsored-by: Dartmouth College's Datalad project
2022-08-11 16:58:53 -04:00
Joey Hess
0d2e3058ee
handle upgrading repositories initialized with --version=9
There is nothing in upgrade.log because it was never upgraded to version
9. Before, it would have never autoupgraded to 10, but it's entirely
safe to upgrade to 10 immediately.

Of course, annex.autoupgraderepository = false will prevent that
upgrade. So if someone for some reason really wants v9, they can set
that. I can't think of a reason someone would actually want v9 rather
than v10 though.

Sponsored-by: k0ld on Patreon
2022-07-25 16:23:09 -04:00
Joey Hess
61b55d62d7
fix logic errors in code that determines if it's time for v10 upgrade
This would have prevented old git-annex from ever upgrading from v9 to
v10. Note that a manual `git-annex upgrade` can never run while the
assistant is running, so not <$> assistantrunning was always True,
so no matter what the timestamp of the v9 upgrade in the log, it would
decide there was old process danger.

Sponsored-by: Jack Hill on Patreon
2022-07-25 15:56:33 -04:00
Joey Hess
cb9cf30c48
move several readonly values to AnnexRead
This improves performance to a small extent in several places.

Sponsored-by: Tobias Ammann on Patreon
2022-06-28 15:40:19 -04:00
Joey Hess
22d9b320b1
don't fail git-annex upgrade to v10
That left the repo in v8, but with filter.annex.process set. Instead,
only warn, and defer the v10 upgrade.

Sponsored-by: Dartmouth College's Datalad project
2022-01-21 13:15:32 -04:00
Joey Hess
90027f7158
prevent manual git-annex upgrade to v10 when unsafe
Allow --force

Sponsored-by: Dartmouth College's Datalad project
2022-01-20 11:55:00 -04:00
Joey Hess
cea6f6db92
v10 upgrade locking
The v10 upgrade should almost be safe now. What remains to be done is
notice when the v10 upgrade has occurred, while holding the shared lock,
and switch to using v10 lock files.

Sponsored-by: Dartmouth College's Datalad project
2022-01-20 11:33:14 -04:00
Joey Hess
9d5db6a09a
add upgrade.log
The upgrade from V9 uses this to avoid an automatic upgrade until 1 year
after the V9 update. It can also be used in future such situations.

Sponsored-by: Dartmouth College's Datalad project
2022-01-19 15:52:29 -04:00
Joey Hess
856ce5cf5f
split upgrade into v9 and v10
v10 will run 1 year after the upgrade to v9, to give time for any v8
processes to die. Until that point, the v10 upgrade will be tried by
every process but deferred, so added support for deferring upgrades.

The upgrade prevention lock file that will be used by v10 is not yet
implemented, so it does not yet defer.

Sponsored-by: Dartmouth College's Datalad project
2022-01-19 13:09:33 -04:00