jchen21 commented on a change in pull request #5014:
URL: https://github.com/apache/geode/pull/5014#discussion_r419018112



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java
##########
@@ -141,10 +141,9 @@ DiskStoreImpl createOwnedByRegion(String name, boolean 
isOwnedByPR,
   @Override
   public DiskStore create(String name) {
     this.attrs.name = name;
-    // As a simple fix for 41290, only allow one DiskStore to be created
-    // at a time per cache by syncing on the cache.
     DiskStore result;
-    synchronized (this.cache) {
+    try {

Review comment:
       Before I created this pull request, I actually looked into 41290, which 
was created more than 10 years ago. It was a totally different implementation. 
41290 is no longer a concern.
   
   We do need to remove the synchronization, in order to make the disk store 
recovery parallel. This synchronized block not only adds disk stores into the 
map, but also reads the disks, please see `initializeDiskStore(dsi);` in line 
157. `initializeDiskStore()` eventually invokes `Oplog.recoverCrf()` and 
`Oplog.readKrf()`. Without removing the synchronization, the disk store can 
only be recovered one at a time.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Reply via email to