Commit graph

38469 commits

Author SHA1 Message Date
yarikoptic
9677814e5d Added a comment 2020-10-12 16:00:32 +00:00
Joey Hess
5157dd8370
comment 2020-10-12 11:41:58 -04:00
Joey Hess
842fc46ee2
Merge branch 'master' of ssh://git-annex.branchable.com into master 2020-10-12 11:35:40 -04:00
Lukey
308e5b3a81 Added a comment 2020-10-11 14:17:47 +00:00
Lukey
19be09d284 Added a comment 2020-10-11 14:08:27 +00:00
Lukey
6db0a18e6f Added a comment 2020-10-11 14:01:35 +00:00
yarikoptic
89396bb710 Added a comment 2020-10-11 13:51:28 +00:00
Joey Hess
a7a1fdc8cd
Merge branch 'master' of ssh://git-annex.branchable.com into master 2020-10-10 10:40:35 -04:00
Maximilian
c45260f843 2020-10-10 09:11:21 +00:00
Joey Hess
c1bfaf29e4
comment 2020-10-09 20:24:56 -04:00
Joey Hess
1be229c6ae
this was closed a long time ago, but a rename made it re-appear 2020-10-08 14:36:36 -04:00
Joey Hess
d54dd0ef9c
Fix build on Windows with network-3
inet_addr was removed, but all this needs is localhost, so hardcoding it
should work fine.

It may be that this windows ifdef is no longer needed. It was added in 2013
with a note that getAddrInfo didn't work on windows, but it seems likely
such a problem would have been fixed since.
2020-10-08 10:50:39 -04:00
Joey Hess
46bb8b90b3
Merge branch 'master' of ssh://git-annex.branchable.com into master 2020-10-08 10:38:15 -04:00
Joey Hess
fd81dd912b
change from deprecated and removed aNY_PORT to defaultPort
(Both are just 0 internally.)
2020-10-08 10:35:16 -04:00
Joey Hess
30e3a2e4c4
remove unused define 2020-10-08 10:31:03 -04:00
Joey Hess
46371797ec
design for finally slaying this beast
This commit was sponsored by Ethan Aubin.
2020-10-08 10:09:12 -04:00
jwodder
d4cb2e044b 2020-10-08 13:02:20 +00:00
jwodder
37f13dfd58 Added a comment 2020-10-08 12:44:52 +00:00
Joey Hess
7fcbb92dfe
add news item for git-annex 8.20201007 2020-10-07 14:18:57 -04:00
Joey Hess
cf33be21ac
releasing package git-annex version 8.20201007 2020-10-07 14:10:56 -04:00
Joey Hess
2d5036e440
renamed some filenames to not end with a period
Windows does not allow such filenames, which prevented cloning git-annex
on windows.
2020-10-07 12:12:53 -04:00
Joey Hess
20f86e43f7
Fix a build failure on Windows. 2020-10-07 12:04:54 -04:00
git-annex.branchable@f45632a8044327f7993eb5b462c37b76ae48cb10
8c6f21c348 2020-10-07 15:01:06 +00:00
git-annex.branchable@f45632a8044327f7993eb5b462c37b76ae48cb10
20c7e6cf94 2020-10-06 19:19:44 +00:00
Joey Hess
db7fb5b8cf
avoid depending on cmp
If it was not available, the caches would get deleted unncessarily.
This should be just as fast as using it.
2020-10-06 11:27:05 -04:00
Joey Hess
30677d5858
shorten buildid
No need to end it with " git-annex"
2020-10-06 11:23:55 -04:00
Joey Hess
995607b6db
response 2020-10-06 10:54:10 -04:00
Joey Hess
a10f2616c4
close 2020-10-06 10:24:09 -04:00
Joey Hess
10ec4aa7cb
Merge branch 'master' of ssh://git-annex.branchable.com into master 2020-10-06 10:07:48 -04:00
Joey Hess
4795bd7238
update 2020-10-06 10:07:27 -04:00
Joey Hess
d479a885de
move cache cleanup back to before cache creation
It was moved to avoid a race, but that's now avoided in another way.
I prefer having it here, because this way if it somehow fails and
deletes the locpath that is going to be used, at least it will get
re-created.
2020-10-06 08:46:35 -04:00
Joey Hess
224623e72e
fix another race
Use a different tmp directory so the cache cleanup won't delete the
locpath directory while it's being populated.

This does change the hash used for the locpath directory, but it already
changed in f0ec725234
2020-10-06 08:44:05 -04:00
yarikoptic
95d02d6e29 Added a comment 2020-10-06 01:27:01 +00:00
yarikoptic
b98d601bfb Added a comment: FTR 2020-10-06 00:04:38 +00:00
yarikoptic
8035e2073d Added a comment 2020-10-05 23:17:08 +00:00
yarikoptic
ed7a0c9956 Added a comment: just comments 2020-10-05 23:11:32 +00:00
Joey Hess
2daa28c05f
comment 2020-10-05 15:19:48 -04:00
Joey Hess
471bcfaf37
comment 2020-10-05 14:51:19 -04:00
Joey Hess
2c68c60961
comment 2020-10-05 14:38:29 -04:00
Joey Hess
8c9a38a91f
Merge branch 'master' of ssh://git-annex.branchable.com into master 2020-10-05 14:37:33 -04:00
Joey Hess
36ebcd94aa
fix confirmed 2020-10-05 14:36:36 -04:00
Joey Hess
d74d978968
fully atomic LOCPATH populating
This fixes a race between two runshells from two different
bundles. One could have run the cache cleanup code, seen the
LOCPATH the other one was in the process of populating, which didn't
have a base or a buildid file written yet, and so the cache cleanup code
would delete it out from under the other process.

Also, doing it fully atomically simplifies where the races between two
runshell processes from the same bundle. Now that needs to be
dealt with to only the mv that puts it in place.

Note that, if the same bundle has 2 runshells run first thing, they will
both generate locales, which is unncessary work, but that should be a
very unusual circumstance and after the LOCPATH is set up, it won't
happen again anyway.
2020-10-05 14:17:46 -04:00
kyle
a39f9e8c7f Added a comment 2020-10-05 18:09:07 +00:00
Joey Hess
12a248f823
move cache cleanup to avoid a race
This should fix doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs
where 2 runshells were running and the second one tried to clean up
LOCPATH while the first one was still populating it.

By moving the cleanup until after LOCPATH is populated, we guarantee
it's populated, so don't need to worry about such a race with another
process populating our same LOCPATH.
2020-10-05 14:07:27 -04:00
Joey Hess
f0ec725234
include buildid in LOCPATH
This avoids the possibility that the bundle could be updated in place,
leading to LOCPATH existing but containing locales for the old version,
which needed to be tested for with code that was not race-free.

LOCPATH/buildid is still written and checked when cleaning up stale caches.
That is not actually necessary, except old versions of the standalone
bundle expect to see it, and this prevents them cleaning up the locale
cache of a new version. And still checking it prevents the new version
cleaning up the locale cache of the old version while the old version is
still in use.

Added explicit tests before creating LOCPATH and the base and buildid files.

The buildid file no longer needs to be updated every time, because it's
stable for the given LOCPATH directory.

And the base file actually did not need to be updated every time,
because the LOCPATH is derived from base, so if the bundle is moved
elsewhere, a different LOCPATH will be used.

Transitioning to this will mean that two git-annex builds that otherwise
have the same buildid -- the same git-annex md5sum -- will use different
LOCPATH values, but that's handled fine by the cache cleanup code, so at
most it will mean one extra generation of the locale files.
2020-10-05 14:04:49 -04:00
yarikoptic
0bb7569e1c Added a comment 2020-10-05 18:02:51 +00:00
Joey Hess
cb487e7417
switch to md5sum for buildid
This does not need to be cryptogrphically secure, and a little shorter
will be better when using the buildid in a path in subsequent changes.
2020-10-05 13:45:27 -04:00
Joey Hess
5863d14fd2
runshell: fix some mess left in a race
This seems to be the best way to deal with the race; if the first and
second runshell are running very close together, the first will generate
the locale directory, and a second test -d would still leave a race
window.
2020-10-05 13:42:43 -04:00
kyle
64ca40e11c Added a comment 2020-10-05 17:42:26 +00:00
Joey Hess
e0ca1236ee
runshell: Update files atomically when preparing to run git-annex
This does not make it entirely idempotent, but it's a start.
2020-10-05 13:38:34 -04:00