Add more aggressive retry schedule for failed bridges
2 unresolved threads
2 unresolved threads
In an effort to address better handling of gone
resources for Lox's purposes, this commit introduces a more aggressive retry schedule for bridges that fail bridgestrap's test. For now, the error timeout can be set so bridges that fail a test are only cached for x (default 1) hour(s). Follow up work on rdsys (and adding similar functionality for onbasca tests) to follow. This also addresses #29 (closed)
Merge request reports
Activity
added Anti-Censorship Sponsor 96 labels
requested review from @meskio
assigned to @onyinyang
mentioned in merge request rdsys!107 (merged)
124 125 now := time.Now().UTC() 125 126 tc.l.Lock() 126 127 for index, entry := range (*tc).Entries { 127 if entry.Time.Before(now.Add(-(*tc).entryTimeout)) { 128 // If the test returned an error, shorten the time it is cached 129 // to 1 hour so it can be tested again more quickly. 130 // This aims to prevent bridges that are temporarily down 131 // due to unfortunate test timing from being marked as `gone` 132 // by rdsys 133 if entry.Error != "" && entry.Time.Before(now.Add(-(*tc).errorEntryTimeout)) { 134 log.Printf("Deleting cache entry: %s", index) 135 delete((*tc).Entries, index) 136 } else if entry.Time.Before(now.Add(-(*tc).entryTimeout)) { changed this line in version 2 of the diff
124 125 now := time.Now().UTC() 125 126 tc.l.Lock() 126 127 for index, entry := range (*tc).Entries { 127 if entry.Time.Before(now.Add(-(*tc).entryTimeout)) { 128 // If the test returned an error, shorten the time it is cached 129 // to 1 hour so it can be tested again more quickly. changed this line in version 2 of the diff
added 1 commit
- 9dc0cb39 - Add more aggressive retry schedule for failed bridges
mentioned in commit b3a7eb40
Closes #29 (closed)
Please register or sign in to reply