[
https://issues.apache.org/jira/browse/KAFKA-6412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307468#comment-16307468
]
ASF GitHub Bot commented on KAFKA-6412:
---------------------------------------
tedyu opened a new pull request #4372: KAFKA-6412 Improve synchronization in
CachingKeyValueStore methods
URL: https://github.com/apache/kafka/pull/4372
Currently CachingKeyValueStore methods are synchronized at method level.
It seems we can use read lock for getter and write lock for put / delete
methods.
For getInternal(), if the underlying thread is streamThread, the
getInternal() may trigger eviction. This can be handled by obtaining write lock
at the beginning of the method for streamThread.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Improve synchronization in CachingKeyValueStore methods
> -------------------------------------------------------
>
> Key: KAFKA-6412
> URL: https://issues.apache.org/jira/browse/KAFKA-6412
> Project: Kafka
> Issue Type: Improvement
> Components: streams
> Reporter: Ted Yu
> Attachments: k-6412.v1.txt
>
>
> Currently CachingKeyValueStore methods are synchronized at method level.
> It seems we can use read lock for getter and write lock for put / delete
> methods.
> For getInternal(), if the underlying thread is streamThread, the
> getInternal() may trigger eviction. This can be handled by obtaining write
> lock at the beginning of the method for streamThread.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)