Skip to content

Commit

Permalink
[FLINK-12527][runtime] Remove GLOBAL_VERSION_UPDATER in ExecutionGraph
Browse files Browse the repository at this point in the history
This closes apache#10058.
  • Loading branch information
yanghua authored and GJL committed Nov 4, 2019
1 parent f242298 commit 9241a44
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.stream.Collectors;

import static org.apache.flink.util.Preconditions.checkNotNull;
Expand Down Expand Up @@ -170,11 +169,6 @@
*/
public class ExecutionGraph implements AccessExecutionGraph {

/** In place updater for the execution graph's current global recovery version.
* Avoids having to use an AtomicLong and thus makes the frequent read access a bit faster */
private static final AtomicLongFieldUpdater<ExecutionGraph> GLOBAL_VERSION_UPDATER =
AtomicLongFieldUpdater.newUpdater(ExecutionGraph.class, "globalModVersion");

/** The log object used for debugging. */
static final Logger LOG = LoggerFactory.getLogger(ExecutionGraph.class);

Expand Down Expand Up @@ -1373,7 +1367,7 @@ private boolean transitionState(JobStatus current, JobStatus newState, Throwable

private long incrementGlobalModVersion() {
incrementRestarts();
return GLOBAL_VERSION_UPDATER.incrementAndGet(this);
return ++globalModVersion;
}

public void incrementRestarts() {
Expand Down

0 comments on commit 9241a44

Please sign in to comment.