automatically adjust stall detection period
authorJoey Hess <joeyh@joeyh.name>
Thu, 18 Jan 2024 21:11:56 +0000 (17:11 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 18 Jan 2024 21:12:10 +0000 (17:12 -0400)
commitc2634e7df29b8dd8d914bd1838e30626142025ac
tree9b9232ebe08e15d4a5c7bea62a618fd2ca718ff6
parent8f655f7953ca30a72abed21d3aa2bb45c306392e
automatically adjust stall detection period

Improve annex.stalldetection to handle remotes that update progress less
frequently than the configured time period.

In particular, this makes remotes that don't report progress but are
chunked work when transferring a single chunk takes longer than the
specified time period.

Any remotes that just have very low update granulatity would also be
handled by this.

The change to Remote.Helper.Chunked avoids an extra progress update when
resuming an interrupted upload. In that case, the code saw first Nothing
and then Just the already transferred number of bytes, which defeated this
new heuristic. This change will mean that, when resuming an interrupted
upload to a chunked remote that does not do its own progress reporting, the
progress display does not start out displaying the amount sent so far,
until after the first chunk is sent. This behavior change does not seem
like a major problem.

About the scalefudgefactor, it seems reasonable to expect subsequent chunks
to take no more than 1.5 times as long as the first chunk to transfer.
Could set it to 1, but then any chunk taking a little longer would be
treated as a stall. 2 also seems a likely value. Even 10 might be fine?

Sponsored-by: Dartmouth College's DANDI project
Annex/StallDetection.hs
CHANGELOG
Remote/Helper/Chunked.hs
doc/bugs/too_aggressive_in_claiming___34__Transfer_stalled__34____63__/comment_1_db83f6a38cae36da89f0ab4ef83021d8._comment [new file with mode: 0644]
doc/bugs/too_aggressive_in_claiming___34__Transfer_stalled__34____63__/comment_2_2aeb065a257729e852055533aff04650._comment [new file with mode: 0644]
doc/bugs/too_aggressive_in_claiming___34__Transfer_stalled__34____63__/comment_3_f8bd6a233d835bdc413bbf0127608431._comment [new file with mode: 0644]
doc/git-annex.mdwn