RecoveryMonitor#lastSeenAccessTime should be volatile (#36781)

This local field is accessed on multiple threads and is nonvolatile so
theoretically could yield stale values. Not sure it does in practice.
This commit is contained in:
David Turner 2018-12-21 11:10:48 +00:00 committed by GitHub
parent 4ded4717fe
commit cfea2fd68c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -258,7 +258,7 @@ public class RecoveriesCollection {
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;