mirror of https://github.com/apache/kafka.git
In FETCH requests and TXN_OFFSET_COMMIT requests, on current trunk we run into a race condition inside UnifiedLog, causing a `NoSuchElementException` in `UnifiedLog.fetchLastStableOffsetMetadata(UnifiedLog.java:651)`. The cause is that the line a performing an `isPresent` check on a volatile Optional before accessing it in `get`, leaving the door open to a race condition when the optional changes between `isPresent` and `get`. This change takes a copy of the volatile variable first. |
||
---|---|---|
.. | ||
api/src | ||
src |