Merge pull request #965 from nosqlbench/nosqlbench-964-synchro

fix for #964
merging this one as it is simple and needed for pre-release testing.
This commit is contained in:
Jonathan Shook 2023-01-31 21:16:05 -06:00 committed by GitHub
commit b68aa0eb7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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();