AndrewJSchofield commented on code in PR #20124: URL: https://github.com/apache/kafka/pull/20124#discussion_r2200429775
########## core/src/main/java/kafka/server/share/SharePartition.java: ########## @@ -2834,26 +2850,35 @@ final class AcquisitionLockTimerTask extends TimerTask { private final String memberId; private final long firstOffset; private final long lastOffset; + private boolean hasExpired; AcquisitionLockTimerTask(long delayMs, String memberId, long firstOffset, long lastOffset) { super(delayMs); this.expirationMs = time.hiResClockMs() + delayMs; this.memberId = memberId; this.firstOffset = firstOffset; this.lastOffset = lastOffset; + this.hasExpired = false; } long expirationMs() { return expirationMs; } + boolean hasExpired() { + return hasExpired; Review Comment: This seems to me to be accessed on multiple threads. It is checked underneath the share-partition write lock to determine whether to run the task following a write error, but it can also change if the timer task runs normally. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org