Skip to content

Commit 3b06daf

Browse files
author
Hendrik Muhs
committed
add back synchronized to setShouldStopAtCheckpoint to avoid problems
if start runs in parralel
1 parent 4eb2b53 commit 3b06daf

File tree

1 file changed

+4
-1
lines changed
  • x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms

1 file changed

+4
-1
lines changed

x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformTask.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ synchronized void start(Long startingCheckpoint, ActionListener<StartTransformAc
292292
* @param shouldStopAtCheckpoint whether or not we should stop at the next checkpoint or not
293293
* @param shouldStopAtCheckpointListener the listener to return to when we have persisted the updated value to the state index.
294294
*/
295-
public void setShouldStopAtCheckpoint(boolean shouldStopAtCheckpoint, ActionListener<Void> shouldStopAtCheckpointListener) {
295+
public synchronized void setShouldStopAtCheckpoint(
296+
boolean shouldStopAtCheckpoint,
297+
ActionListener<Void> shouldStopAtCheckpointListener
298+
) {
296299
logger.debug(
297300
"[{}] attempted to set task to stop at checkpoint [{}] with state [{}]",
298301
getTransformId(),

0 commit comments

Comments
 (0)