Commit ecd21692 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Merge branch 'jr/flashcrowd_bugfix' into 'master'

Bug fix flash crowd workload

This bug caused for very small FlashCrowdIntervals that, with a high probability, the target peer population (= maxPeersOnline * FlashCrowdMultiplier) is not reached or that the flash crowd is skipped completely.

The source branch can be deleted when merged.

See merge request !7
parents 5d633c12 9b26f2eb
......@@ -164,6 +164,7 @@ public class ConstantPeerCountChurnModel implements ChurnModel {
clientSessionInfos.put(host.getHostId(), info);
if (hasFlashcrowd && !flashCrowdFinished
&& currentJoin > flashcrowdStart) {
currentJoin = flashcrowdStart;
inFlashcrowd = true;
}
lastJoin = currentJoin;
......@@ -187,6 +188,7 @@ public class ConstantPeerCountChurnModel implements ChurnModel {
clientSessionInfos.put(host.getHostId(), info);
if (hasFlashcrowd && !flashCrowdFinished
&& currentJoin > flashcrowdStart) {
currentJoin = flashcrowdStart;
inFlashcrowd = true;
}
lastJoin = currentJoin;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment