Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
danet
quant
Commits
c0cb9c1c
Verified
Commit
c0cb9c1c
authored
8 months ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
KeyFetching does not stop after set amount of failed retries
parent
fbcd842a
No related branches found
No related tags found
1 merge request
!200
Resolve "Trying to access QM / Syncing Keys with Peer should not fully timeout after x attempts"
Pipeline
#222207
passed
8 months ago
Stage: build
Stage: build-integration-test
Stage: test
Stage: analyze
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
goKMS/kms/peers/etsi14Quantummodule.go
+2
-11
2 additions, 11 deletions
goKMS/kms/peers/etsi14Quantummodule.go
with
2 additions
and
11 deletions
goKMS/kms/peers/etsi14Quantummodule.go
+
2
−
11
View file @
c0cb9c1c
...
...
@@ -113,17 +113,9 @@ func (qm *ETSI014HTTPQuantumModule) Initialize() error {
ticker
:=
time
.
NewTicker
(
restartWaitingTime
)
defer
ticker
.
Stop
()
restartedAfterWaitingTime
:=
new
(
int
)
// immediately start with the ticker instead of waiting the defined amount
for
;
true
;
<-
ticker
.
C
{
if
*
restartedAfterWaitingTime
==
5
{
log
.
Fatalf
(
"Stopped retrying to fetch keys after %d attempts waiting %v each time in between."
,
restartedAfterWaitingTime
,
restartWaitingTime
)
break
}
qm
.
doKeyFetching
(
restartedAfterWaitingTime
)
*
restartedAfterWaitingTime
++
qm
.
doKeyFetching
()
}
}()
}
...
...
@@ -184,7 +176,7 @@ func (qm *ETSI014HTTPQuantumModule) GetKeyWithIds(keyIds []etsi14ClientGenerated
return
container
,
nil
}
func
(
qm
*
ETSI014HTTPQuantumModule
)
doKeyFetching
(
restartedAfterWaitingTime
*
int
)
{
func
(
qm
*
ETSI014HTTPQuantumModule
)
doKeyFetching
()
{
ticker
:=
time
.
NewTicker
(
time
.
Duration
(
qm
.
keyFetchInterval
)
*
time
.
Second
)
defer
ticker
.
Stop
()
...
...
@@ -230,7 +222,6 @@ func (qm *ETSI014HTTPQuantumModule) doKeyFetching(restartedAfterWaitingTime *int
}
failedAttemps
=
0
*
restartedAfterWaitingTime
=
0
}
}
}
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