Skip to content

Commit

Permalink
RecoveryMonitor#lastSeenAccessTime should be volatile (#36781)
Browse files Browse the repository at this point in the history
This local field is accessed on multiple threads and is nonvolatile so
theoretically could yield stale values. Not sure it does in practice.
  • Loading branch information
DaveCTurner committed Dec 21, 2018
1 parent 3888073 commit d622466
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private class RecoveryMonitor extends AbstractRunnable {
private final long recoveryId;
private final TimeValue checkInterval;

private long lastSeenAccessTime;
private volatile long lastSeenAccessTime;

private RecoveryMonitor(long recoveryId, long lastSeenAccessTime, TimeValue checkInterval) {
this.recoveryId = recoveryId;
Expand Down

0 comments on commit d622466

Please sign in to comment.