jchen21 commented on a change in pull request #5014: URL: https://github.com/apache/geode/pull/5014#discussion_r419578480
########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java ########## @@ -1086,6 +1088,27 @@ public static GemFireCacheImpl getForPdx(String reason) { clientMetadataService = clientMetadataServiceFactory.apply(this); } + @Override + public void lockDiskStore(String diskStoreName) { + CountDownLatch countDownLatch = + diskStoreLatches.putIfAbsent(diskStoreName, new CountDownLatch(1)); + if (countDownLatch != null) { + try { + countDownLatch.await(); Review comment: It will `await()` on the old latch. More specifically, the first thread will put a new `CountDownLatch` in the map. The other threads will `await()` on the latch that the first thread put in the map. ---------------------------------------------------------------- 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