[ 
https://issues.apache.org/jira/browse/KAFKA-13089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17380892#comment-17380892
 ] 

Ismael Juma commented on KAFKA-13089:
-------------------------------------

The BufferSupplier implementations we have are not thread-safe and work best in 
a thread-confined way. Can each listener hold a thread confined buffer supplier?

> Revisit the usage of BufferSuppliers in Kraft
> ---------------------------------------------
>
>                 Key: KAFKA-13089
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13089
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: kraft
>            Reporter: Jose Armando Garcia Sancio
>            Assignee: Jose Armando Garcia Sancio
>            Priority: Major
>              Labels: kip-500
>
> The latest KafkaRaftClient creates a new BufferSupplier every time it is 
> needed. A buffer supplier is needed when reading from the log and when 
> reading from a snapshot.
> It would be good to investigate if there is a performance and memory usage 
> advantage of sharing the buffer supplier between those use cases and every 
> time the log or snapshot are read.
> If BufferSupplier is share, it is very likely that the implementation will 
> have to be thread-safe because we need support multiple Listeners and each 
> Listener would be using a different thread.



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

Reply via email to