Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jarl
tor
Commits
5385a023
Commit
5385a023
authored
8 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Do not apply 'max_failures' to random-exponential schedules.
Fixes bug 20536; bugfix on 0.2.9.1-alpha.
parent
e9ce1819
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug20536
+6
-0
6 additions, 0 deletions
changes/bug20536
src/or/directory.h
+9
-3
9 additions, 3 deletions
src/or/directory.h
with
15 additions
and
3 deletions
changes/bug20536
0 → 100644
+
6
−
0
View file @
5385a023
o Major bugfixes (download scheduling):
- When using an exponential backoff schedule, do not give up on
dowloading just because we have failed a bunch of times. Since
each delay is longer than the last, retrying indefinitely won't
hurt. Fixes bug 20536; bugfix on 0.2.9.1-alpha.
This diff is collapsed.
Click to expand it.
src/or/directory.h
+
9
−
3
View file @
5385a023
...
@@ -114,9 +114,15 @@ static inline int
...
@@ -114,9 +114,15 @@ static inline int
download_status_is_ready
(
download_status_t
*
dls
,
time_t
now
,
download_status_is_ready
(
download_status_t
*
dls
,
time_t
now
,
int
max_failures
)
int
max_failures
)
{
{
int
under_failure_limit
=
(
dls
->
n_download_failures
<=
max_failures
if
(
dls
->
backoff
==
DL_SCHED_DETERMINISTIC
)
{
&&
dls
->
n_download_attempts
<=
max_failures
);
/* Deterministic schedules can hit an endpoint; exponential backoff
return
(
under_failure_limit
&&
dls
->
next_attempt_at
<=
now
);
* schedules just wait longer and longer. */
int
under_failure_limit
=
(
dls
->
n_download_failures
<=
max_failures
&&
dls
->
n_download_attempts
<=
max_failures
);
if
(
!
under_failure_limit
)
return
0
;
}
return
dls
->
next_attempt_at
<=
now
;
}
}
static
void
download_status_mark_impossible
(
download_status_t
*
dl
);
static
void
download_status_mark_impossible
(
download_status_t
*
dl
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment