Commit graph

28 commits

Author SHA1 Message Date
Joey Hess
cde2e61105
improve sqlite retrying behavior
Avoid hanging when a suspended git-annex process is keeping a sqlite
database locked.

Sponsored-by: Dartmouth College's Datalad project
2022-10-18 15:47:20 -04:00
Joey Hess
3149a1e2fe
More robust handling of ErrorBusy when writing to sqlite databases
While ErrorBusy and other exceptions were caught and the write retried for
up to 10 seconds, it was still possible for git-annex to eventually
give up and error out without writing to the database. Now it will retry
as long as necessary.

This does mean that, if one git-annex process is suspended just as sqlite
has locked the database for writing, another git-annex that tries to write
it it might get stuck retrying forever. But, that could already happen when
opening the sqlite database, which retries forever on ErrorBusy. This is an
area where git-annex is known to not behave well, there's a todo about the
general case of it.

Sponsored-by: Dartmouth College's Datalad project
2022-10-17 15:56:19 -04:00
Joey Hess
d5cd1de280
update and open a todo about something I'm pondering 2022-10-12 15:53:56 -04:00
Joey Hess
b312b2a30b
update 2022-10-11 15:07:52 -04:00
Joey Hess
676d46032a
comment 2022-06-08 12:54:28 -04:00
Atemu
9cf6feb46d Added a comment 2022-06-07 12:07:30 +00:00
yarikoptic
e796080f32 Added a comment 2022-06-06 17:22:41 +00:00
Joey Hess
21cf33a881
comment 2022-06-06 12:37:40 -04:00
Joey Hess
a57ad1e226
comment 2022-06-06 12:19:28 -04:00
Joey Hess
331c97df88
fix MVar deadlock when sqlite commit fails
The database queue was left empty, which caused subsequent calls to
flushDbQueue to deadlock.

Sponsored-by: Dartmouth College's Datalad project
2022-06-06 12:16:55 -04:00
yarikoptic
79446f47c5 Added a comment 2022-06-06 14:50:16 +00:00
yarikoptic
89034adc44 Added a comment 2022-06-06 14:00:05 +00:00
Atemu
4bf7962259 Added a comment 2022-06-05 12:55:04 +00:00
Joey Hess
09edb07ac5
add debugLocks around database operations
to track down a blocked indefinitely on MVar that seems to occur after
sqlite throws ErrorBusy but that I have not been able to reproduce when
I made commits synthetically throw ErrorBusy.

Sponsored-by: Dartmouth College's Datalad project
2022-06-03 14:16:28 -04:00
yarikoptic
cbd82f768e Added a comment 2022-06-03 16:42:39 +00:00
yarikoptic
5f0df3de7e Added a comment: defending BTRFS 2022-06-02 18:43:02 +00:00
Joey Hess
cac752d720
comment 2022-06-01 13:16:56 -04:00
yarikoptic
6eda6ef042 Added a comment 2022-06-01 13:49:05 +00:00
Lukey
f0dcf17989 Added a comment 2022-06-01 05:27:22 +00:00
yarikoptic
75fec2433e Added a comment 2022-05-31 19:17:05 +00:00
yarikoptic
ffa1e0246d Added a comment 2022-05-31 19:07:59 +00:00
Joey Hess
b44b1b4288
comment 2022-05-31 13:32:27 -04:00
yarikoptic
f69c6a3606 Added a comment: another/different? stall 2022-05-26 14:31:33 +00:00
yarikoptic
94be47ca46 Added a comment: What filesystem is this happening on? 2022-05-25 21:09:38 +00:00
Joey Hess
d072d9cec2
followup 2022-05-25 13:43:33 -04:00
yarikoptic
63b65d25b5 Added a comment 2022-05-24 21:05:03 +00:00
yarikoptic
2ad21be338 Added a comment 2022-05-24 20:35:58 +00:00
Joey Hess
70f25ad757
comment 2022-05-18 17:01:33 -04:00