alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: 
Backup page store manager, initial
URL: https://github.com/apache/ignite/pull/6554#discussion_r341199246
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java
 ##########
 @@ -885,6 +925,23 @@ else if (lockF.exists()) {
         return store.pages();
     }
 
+    /**
+     * @param ccfg Cache configuration to find an approriate stored 
configuration file.
+     * @return File of stored cache configuration or {@code null} if doesn't 
exists.
+     */
+    public File cacheConfiguration(CacheConfiguration ccfg) {
+        File cacheDir = new File(storeWorkDir, cacheDirName(ccfg));
+
+        if (!cacheDir.exists())
+            return null;
+
+        File[] ccfgFile = cacheDir.listFiles((dir, name) -> 
CACHE_DATA_FILENAME.equals(name));
 
 Review comment:
   It's redundant to use `listFiles` here, use `new File(cacheDir, 
CACHE_DATA_FILENAME)`
   There is another algorithm for the cache configuration file name used if the 
cache belongs to a cache group. See `removeCacheData` for right algorithm.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to