[ https://issues.apache.org/jira/browse/GEODE-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098133#comment-17098133 ]
ASF GitHub Bot commented on GEODE-8035: --------------------------------------- jchen21 commented on a change in pull request #5014: URL: https://github.com/apache/geode/pull/5014#discussion_r419020229 ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java ########## @@ -521,12 +521,12 @@ void create(InternalCache cache) cache.initializePdxRegistry(); - for (DiskStore diskStore : diskStores.values()) { + diskStores.values().parallelStream().forEach(diskStore -> { DiskStoreAttributesCreation creation = (DiskStoreAttributesCreation) diskStore; if (creation != pdxRegDSC) { createDiskStore(creation, cache); } - } + }); Review comment: I am not sure which exception you are talking about. I don't see `parallelStream()` and `forEach()` introduce new exception, based on the Javadoc. For test coverage, there are quite a few existing tests that already cover the single thread or multiple disk stores cases. We don't have to add new tests for that. For multi-thread test, it is a very tricky one. The purpose of this pull request is to introduce parallel disk recovery and improve the performance. We can assert that the stream should be parallel using `isParallel()`. Or we can scan the logs and make sure there are multiple thread IDs that recover the disk stores. But it doesn't serve the purpose of testing performance improvement. It doesn't guarantee that disk recovery is parallel, even if we can assert that the stream is parallel or there are multiple threads that recover the disk store. For example, if we keep the synchronized block in `DiskStoreFactoryImple` line 147, the disk stores recovery will be sequential, even though there are multiple threads recovering the disk stores. ---------------------------------------------------------------- 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 > Parallel Disk Store Recovery when Cluster Restarts > -------------------------------------------------- > > Key: GEODE-8035 > URL: https://issues.apache.org/jira/browse/GEODE-8035 > Project: Geode > Issue Type: Improvement > Reporter: Jianxia Chen > Assignee: Jianxia Chen > Priority: Major > Labels: GeodeCommons > > Currently, when Geode cluster restarts, the disk store recovery is > serialized. When all regions share the same disk store, the restart process > is time consuming. To improve the performance, different regions can use > different disk stores with different disk controllers. And adding parallel > disk store recovery. This is expected to significantly reduce the time to > restart Geode cluster. -- This message was sent by Atlassian Jira (v8.3.4#803005)