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
Automate
Agent sessions
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
80d6fb9f
Commit
80d6fb9f
authored
Feb 22, 2022
by
Jake Taylor
Browse files
Options
Downloads
Plain Diff
Merge branch 'hotfix/RenableHistorical' into 'release'
Hotfix/renable historical See merge request
!169
parents
91a75f0b
f8266026
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!231
Revert "Update store to print changes to the partners list"
,
!169
Hotfix/renable historical
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
network/gateway/hostPool.go
+1
-1
1 addition, 1 deletion
network/gateway/hostPool.go
network/gateway/sender.go
+40
-31
40 additions, 31 deletions
network/gateway/sender.go
network/rounds/check.go
+0
-5
0 additions, 5 deletions
network/rounds/check.go
single/reception.go
+2
-3
2 additions, 3 deletions
single/reception.go
with
43 additions
and
40 deletions
network/gateway/hostPool.go
+
1
−
1
View file @
80d6fb9f
...
...
@@ -462,7 +462,7 @@ func (h *HostPool) checkReplace(hostId *id.ID, hostErr error) (bool, error) {
}
h
.
hostMux
.
Unlock
()
}
return
doReplace
,
err
return
doReplace
&&
err
==
nil
,
err
}
// Select a viable HostPool candidate from the NDF
...
...
This diff is collapsed.
Click to expand it.
network/gateway/sender.go
+
40
−
31
View file @
80d6fb9f
...
...
@@ -55,6 +55,7 @@ func (s *Sender) SendToAny(sendFunc func(host *connect.Host) (interface{}, error
// Retry of the proxy could not communicate
jww
.
INFO
.
Printf
(
"Unable to SendToAny via %s: non-fatal error received, retrying: %s"
,
proxies
[
proxy
]
.
GetId
()
.
String
(),
err
)
continue
}
else
if
strings
.
Contains
(
err
.
Error
(),
"unable to connect to target host"
)
||
strings
.
Contains
(
err
.
Error
(),
"unable to find target host"
)
{
// Retry of the proxy could not communicate
...
...
@@ -62,15 +63,21 @@ func (s *Sender) SendToAny(sendFunc func(host *connect.Host) (interface{}, error
" proxy could not contact requested host"
,
proxies
[
proxy
]
.
GetId
(),
err
)
continue
}
else
if
replaced
,
checkReplaceErr
:=
s
.
checkReplace
(
proxies
[
proxy
]
.
GetId
(),
err
);
replaced
{
if
checkReplaceErr
!=
nil
{
}
// Not retryable, now we must check whether the Host should be replaced
replaced
,
checkReplaceErr
:=
s
.
checkReplace
(
proxies
[
proxy
]
.
GetId
(),
err
)
if
replaced
{
jww
.
WARN
.
Printf
(
"Unable to SendToAny, replaced a proxy %s with error %s"
,
proxies
[
proxy
]
.
GetId
()
.
String
(),
checkReplaceErr
)
proxies
[
proxy
]
.
GetId
()
.
String
(),
err
.
Error
()
)
}
else
{
jww
.
WARN
.
Printf
(
"Unable to SendToAny, replaced a proxy %s"
,
proxies
[
proxy
]
.
GetId
()
.
String
())
}
if
checkReplaceErr
!=
nil
{
jww
.
WARN
.
Printf
(
"Unable to SendToAny via %s: %s. Unable to replace host: %+v"
,
proxies
[
proxy
]
.
GetId
()
.
String
(),
err
.
Error
(),
checkReplaceErr
)
}
else
{
jww
.
WARN
.
Printf
(
"Unable to SendToAny via %s: %s. Did not replace host."
,
proxies
[
proxy
]
.
GetId
()
.
String
(),
err
.
Error
())
}
return
nil
,
errors
.
WithMessage
(
err
,
"Received error with SendToAny"
)
}
}
...
...
@@ -111,6 +118,7 @@ func (s *Sender) SendToPreferred(targets []*id.ID, sendFunc sendToPreferredFunc,
// Retry of the proxy could not communicate
jww
.
INFO
.
Printf
(
"Unable to to SendToPreferred first pass %s via %s: non-fatal error received, retrying: %s"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
err
)
continue
}
else
if
strings
.
Contains
(
err
.
Error
(),
"unable to connect to target host"
)
||
strings
.
Contains
(
err
.
Error
(),
"unable to find target host"
)
{
// Retry of the proxy could not communicate
...
...
@@ -118,22 +126,21 @@ func (s *Sender) SendToPreferred(targets []*id.ID, sendFunc sendToPreferredFunc,
"proxy could not contact requested host"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
err
)
continue
}
else
if
replaced
,
checkReplaceErr
:=
s
.
checkReplace
(
targetHosts
[
i
]
.
GetId
(),
err
);
replaced
{
}
// Not retryable, now we must check whether the Host should be replaced
replaced
,
checkReplaceErr
:=
s
.
checkReplace
(
targetHosts
[
i
]
.
GetId
(),
err
)
if
replaced
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred first pass via %s, replaced a proxy %s with error %s"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
err
.
Error
())
}
else
{
if
checkReplaceErr
!=
nil
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred first pass %s via %s, "
+
"proxy failed, was replaced with error: %s"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
checkReplaceErr
)
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred first pass %s via %s: %s. Unable to replace host: %+v"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
err
.
Error
(),
checkReplaceErr
)
}
else
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred first pass %s via %s, "
+
"proxy failed, was replaced"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
())
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred first pass %s via %s: %s. Did not replace host."
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
err
.
Error
())
}
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred first pass %s via %s: %s, proxy failed, was replaced"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
checkReplaceErr
)
continue
}
else
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred first pass %s via %s: %s, comm returned an error"
,
targets
[
i
],
targetHosts
[
i
]
.
GetId
(),
err
)
return
result
,
err
}
}
...
...
@@ -182,6 +189,7 @@ func (s *Sender) SendToPreferred(targets []*id.ID, sendFunc sendToPreferredFunc,
// Retry of the proxy could not communicate
jww
.
INFO
.
Printf
(
"Unable to SendToPreferred second pass %s via %s: non-fatal error received, retrying: %s"
,
target
,
proxy
,
err
)
continue
}
else
if
strings
.
Contains
(
err
.
Error
(),
"unable to connect to target host"
)
||
strings
.
Contains
(
err
.
Error
(),
"unable to find target host"
)
{
// Retry of the proxy could not communicate
...
...
@@ -189,21 +197,22 @@ func (s *Sender) SendToPreferred(targets []*id.ID, sendFunc sendToPreferredFunc,
" proxy could not contact requested host"
,
target
,
proxy
,
err
)
continue
}
else
if
replaced
,
checkReplaceErr
:=
s
.
checkReplace
(
proxy
.
GetId
(),
err
);
replaced
{
if
checkReplaceErr
!=
nil
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred second pass %s via %s,"
+
"proxy failed, was replaced with error: %s"
,
target
,
proxy
.
GetId
(),
checkReplaceErr
)
}
else
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred second pass %s via %s, "
+
"proxy failed, was replaced"
,
target
,
proxy
.
GetId
())
}
// Not retryable, now we must check whether the Host should be replaced
replaced
,
checkReplaceErr
:=
s
.
checkReplace
(
proxy
.
GetId
(),
err
)
badProxies
[
proxy
.
String
()]
=
nil
continue
if
replaced
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred second pass via %s, replaced a proxy %s with error %s"
,
target
,
proxy
.
GetId
(),
err
.
Error
())
}
else
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred second pass %s via %s: %s, comm returned an error"
,
target
,
proxy
.
GetId
(),
err
)
if
checkReplaceErr
!=
nil
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred second pass %s via %s: %s. Unable to replace host: %+v"
,
target
,
proxy
.
GetId
(),
err
.
Error
(),
checkReplaceErr
)
}
else
{
jww
.
WARN
.
Printf
(
"Unable to SendToPreferred second pass %s via %s: %s. Did not replace host."
,
target
,
proxy
.
GetId
(),
err
.
Error
())
}
return
result
,
err
}
}
...
...
This diff is collapsed.
Click to expand it.
network/rounds/check.go
+
0
−
5
View file @
80d6fb9f
...
...
@@ -56,11 +56,6 @@ func serializeRound(roundId id.Round) []byte {
func
(
m
*
Manager
)
GetMessagesFromRound
(
roundID
id
.
Round
,
identity
reception
.
IdentityUse
)
{
ri
,
err
:=
m
.
Instance
.
GetRound
(
roundID
)
if
err
!=
nil
||
m
.
params
.
ForceHistoricalRounds
{
if
m
.
params
.
RealtimeOnly
{
jww
.
WARN
.
Printf
(
"Skipping round %d because it is not in ram and we are realtime only mode"
,
roundID
)
return
}
if
m
.
params
.
ForceHistoricalRounds
{
jww
.
WARN
.
Printf
(
"Forcing use of historical rounds for round ID %d."
,
roundID
)
...
...
This diff is collapsed.
Click to expand it.
single/reception.go
+
2
−
3
View file @
80d6fb9f
...
...
@@ -114,9 +114,8 @@ func (m *Manager) processTransmission(msg format.Message,
c
:=
NewContact
(
payload
.
GetRID
(
transmitMsg
.
GetPubKey
(
grp
)),
transmitMsg
.
GetPubKey
(
grp
),
dhKey
,
payload
.
GetTagFP
(),
payload
.
GetMaxParts
())
jww
.
INFO
.
Printf
(
"Generated by singe use receiver reception id for single use: %s, "
+
"ephId: %v, pubkey: %x"
,
c
.
partner
,
"unknown:"
,
transmitMsg
.
GetPubKey
(
grp
)
.
Bytes
())
jww
.
INFO
.
Printf
(
"Generated by singe use receiver reception id for single use. EphId %s, PubKey: %x"
,
c
.
partner
,
transmitMsg
.
GetPubKey
(
grp
)
.
Bytes
())
return
payload
.
GetContents
(),
c
,
nil
}
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
sign in
to comment