kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanislav Kozlovski (Jira)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-10302) Ensure thread-safe access to Partition#remoteReplicasMap
Date Thu, 23 Jul 2020 15:09:00 GMT
Stanislav Kozlovski created KAFKA-10302:
-------------------------------------------

             Summary: Ensure thread-safe access to Partition#remoteReplicasMap
                 Key: KAFKA-10302
                 URL: https://issues.apache.org/jira/browse/KAFKA-10302
             Project: Kafka
          Issue Type: Bug
            Reporter: Stanislav Kozlovski


A recent Jira (https://issues.apache.org/jira/browse/KAFKA-10301) exposed how easy it is
to introduce nasty race conditions with the Partition#remoteReplicasMap data structure. It
is a concurrent map which is modified inside a write lock but it is not always accessed through
that lock.

Therefore it's possible for callers to access an intermediate state of the map, for instance
in between updating the replica assignment for a given partition.



It would be good to ensure thread-safe access to the data structure in a way which makes it
harder to introduce such regressions in the future



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message