You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/14 16:32:28 UTC

[GitHub] merlimat opened a new pull request #1259: Replaced synchronized with volatile read in BookieStatus

merlimat opened a new pull request #1259: Replaced synchronized with volatile read in BookieStatus
URL: https://github.com/apache/bookkeeper/pull/1259
 
 
   `BookieStatus.isInReadOnlyMode()` is being called from IO threads at each write request. 
   
   Having `synchronized` method is a major source of contention between all these threads and caps the throughput and increases the latency. 
   
   Replacing here with a `volatile` variable read. This will have the same exact behavior as today while removing the contention point. 
   
   I think we could eventually even do a "dirty" read of that variable to further reduce the overhead of the volatile read.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services