sijie commented on issue #1284: Improve FileInfoBackingCache
URL: https://github.com/apache/bookkeeper/pull/1284#issuecomment-375420639
 
 
   > Could you give a sequence of events for how the other race occurs?
   
   I am using your diagram and using the existing logic
   
   ```
     | Read Fi CacheLoader                               | Write Fi CacheLoader 
                               |
     | ====================================== | 
====================================== |
     | calls loadFileInfo                     |                                 
       |
     | - checks fileInfos under read lock     |                                 
       |
     |                                        |                                 
       |
     |                                        | calls loadFileInfo              
       |
     |                                        | - checks fileInfos under read 
lock     |
     |                                        | - create a file info and put 
into fileInfos under write lock |
     | - create another file     |                                        |
     |    info and put it into    |                                        |
     |  fileInfos under write lock |                                        |
   ```
   
   
   > Has the locking shown to be a problem in benching?
   
   it is a giant write lock. so every thread is blocking waiting for file 
lookup (which is done by the file loader).
   

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


With regards,
Apache Git Services

Reply via email to