Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
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
elixxir
client
Commits
75615ac2
Commit
75615ac2
authored
4 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Use storage to make sure forced retry is not done
parent
8d4e1c09
No related branches found
No related tags found
1 merge request
!23
Release
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
network/rounds/manager.go
+0
-2
0 additions, 2 deletions
network/rounds/manager.go
network/rounds/retrieve.go
+20
-21
20 additions, 21 deletions
network/rounds/retrieve.go
with
20 additions
and
23 deletions
network/rounds/manager.go
+
0
−
2
View file @
75615ac2
...
...
@@ -14,7 +14,6 @@ import (
"gitlab.com/elixxir/client/network/internal"
"gitlab.com/elixxir/client/network/message"
"gitlab.com/elixxir/client/stoppable"
"sync"
)
type
Manager
struct
{
...
...
@@ -24,7 +23,6 @@ type Manager struct {
historicalRounds
chan
historicalRoundRequest
lookupRoundMessages
chan
roundLookup
lookupRetryTracker
sync
.
Map
messageBundles
chan
<-
message
.
Bundle
}
...
...
This diff is collapsed.
Click to expand it.
network/rounds/retrieve.go
+
20
−
21
View file @
75615ac2
...
...
@@ -83,16 +83,13 @@ func (m *Manager) processMessageRetrieval(comms messageRetrievalComms,
// randomly not picking up messages (FOR INTEGRATION TEST). Only done if
// round has not been ignored before
var
bundle
message
.
Bundle
_
,
ok
:=
m
.
lookupRetryTracker
.
Load
(
ri
.
ID
)
jww
.
INFO
.
Printf
(
"After adding round %d to tracker entry is %v"
,
ri
.
ID
,
ok
)
if
!
ok
&&
m
.
params
.
ForceMessagePickupRetry
{
if
m
.
params
.
ForceMessagePickupRetry
{
bundle
,
err
=
m
.
forceMessagePickupRetry
(
ri
,
rl
,
comms
,
gwIds
)
if
err
!=
nil
{
jww
.
ERROR
.
Printf
(
"Failed to get pickup round %d "
+
"from all gateways (%v): %s"
,
id
.
Round
(
ri
.
ID
),
gwIds
,
err
)
}
m
.
lookupRetryTracker
.
Store
(
ri
.
ID
,
struct
{}{})
}
else
{
// Attempt to request for this gateway
bundle
,
err
=
m
.
getMessagesFromGateway
(
id
.
Round
(
ri
.
ID
),
rl
.
identity
,
comms
,
gwIds
)
...
...
@@ -197,6 +194,8 @@ func (m *Manager) getMessagesFromGateway(roundID id.Round, identity reception.Id
// not looking up messages
func
(
m
*
Manager
)
forceMessagePickupRetry
(
ri
*
pb
.
RoundInfo
,
rl
roundLookup
,
comms
messageRetrievalComms
,
gwIds
[]
*
id
.
ID
)
(
bundle
message
.
Bundle
,
err
error
)
{
_
,
ok
:=
m
.
Session
.
UncheckedRounds
()
.
GetRound
(
id
.
Round
(
ri
.
ID
))
if
!
ok
{
// Flip a coin to determine whether to pick up message
stream
:=
m
.
Rng
.
GetStream
()
defer
stream
.
Close
()
...
...
@@ -214,7 +213,7 @@ func (m *Manager) forceMessagePickupRetry(ri *pb.RoundInfo, rl roundLookup,
return
}
}
// Attempt to request for this gateway
return
m
.
getMessagesFromGateway
(
id
.
Round
(
ri
.
ID
),
rl
.
identity
,
comms
,
gwIds
)
}
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