[ https://issues.apache.org/jira/browse/KAFKA-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15225957#comment-15225957 ]
ASF GitHub Bot commented on KAFKA-3510: --------------------------------------- GitHub user ijuma opened a pull request: https://github.com/apache/kafka/pull/1188 KAFKA-3510; OffsetIndex thread safety * Make all fields accessed outside of a lock `volatile` * Only allow mutation within the class * Remove unnecessary `AtomicInteger` since mutation always happens inside a lock You can merge this pull request into a Git repository by running: $ git pull https://github.com/ijuma/kafka kafka-3510-offset-index-thread-safety Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1188.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1188 ---- commit 0f570b0c620df9f1145ed8c3e31363560f3835e1 Author: Ismael Juma <ism...@juma.me.uk> Date: 2016-04-05T09:07:56Z KAFKA-3510; OffsetIndex thread safety * Make all fields accessed outside of a lock volatile * Only allow mutation within the class * Remove unnecessary `AtomicInteger` since mutation always happens inside a lock ---- > OffsetIndex thread safety > ------------------------- > > Key: KAFKA-3510 > URL: https://issues.apache.org/jira/browse/KAFKA-3510 > Project: Kafka > Issue Type: Bug > Reporter: Ismael Juma > Assignee: Ismael Juma > Fix For: 0.10.0.0 > > > We expose non-volatile variables without a lock and outside the class. We > also use an `AtomicInteger` unnecessarily since it's always modified within a > lock. -- This message was sent by Atlassian JIRA (v6.3.4#6332)