mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
tested fix for initializer race condition with multiple activities in sequence
This commit is contained in:
parent
8fc5115a0c
commit
d96df192b3
@ -109,7 +109,7 @@ public class SimpleActivity implements Activity, ProgressCapable, ActivityDefObs
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initActivity() {
|
public synchronized void initActivity() {
|
||||||
initOrUpdateRateLimiters(this.activityDef);
|
initOrUpdateRateLimiters(this.activityDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ public class SimpleActivity implements Activity, ProgressCapable, ActivityDefObs
|
|||||||
*
|
*
|
||||||
* @param seq - The {@link OpSequence} to derive the defaults from
|
* @param seq - The {@link OpSequence} to derive the defaults from
|
||||||
*/
|
*/
|
||||||
public void setDefaultsFromOpSequence(OpSequence<?> seq) {
|
public synchronized void setDefaultsFromOpSequence(OpSequence<?> seq) {
|
||||||
Optional<String> strideOpt = getParams().getOptionalString("stride");
|
Optional<String> strideOpt = getParams().getOptionalString("stride");
|
||||||
if (strideOpt.isEmpty()) {
|
if (strideOpt.isEmpty()) {
|
||||||
String stride = String.valueOf(seq.getSequence().length);
|
String stride = String.valueOf(seq.getSequence().length);
|
||||||
|
@ -417,7 +417,7 @@ public class ActivityExecutor implements ActivityController, ParameterMap.Listen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startActivity() {
|
public synchronized void startActivity() {
|
||||||
// we need an executor service to run motor threads on
|
// we need an executor service to run motor threads on
|
||||||
startMotorExecutorService();
|
startMotorExecutorService();
|
||||||
startRunningActivityThreads();
|
startRunningActivityThreads();
|
||||||
|
Loading…
Reference in New Issue
Block a user