Skip to content
Snippets Groups Projects
Commit 176b80ba authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Merge branch 'fastRegistration' into 'release'

disabled the system to slow down registration

See merge request !584
parents f2352c0c aab48b10
No related branches found
No related tags found
2 merge requests!584disabled the system to slow down registration,!515Release
......@@ -32,7 +32,7 @@ import (
// before an interruption and how many registration attempts have
// been attempted.
func registerNodes(r *registrar, s session, stop *stoppable.Single,
inProgress, attempts *sync.Map, index int) {
inProgress, attempts *sync.Map) {
atomic.AddInt64(r.numberRunning, 1)
for {
......@@ -144,13 +144,6 @@ func registerNodes(r *registrar, s session, stop *stoppable.Single,
}
rng.Close()
}
if index >= 2 {
if float64(r.NumRegisteredNodes()) > (float64(r.numnodesGetter()) * .7) {
<-stop.Quit()
stop.ToStopped()
return
}
}
}
}
......
......@@ -125,7 +125,7 @@ func (r *registrar) StartProcesses(numParallel uint) stoppable.Stoppable {
for i := uint(0); i < numParallel; i++ {
stop := stoppable.NewSingle("NodeRegistration " + strconv.Itoa(int(i)))
go registerNodes(r, r.session, stop, &r.inProgress, &r.attempts, int(i))
go registerNodes(r, r.session, stop, &r.inProgress, &r.attempts)
multi.Add(stop)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment