You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "nizhikov (via GitHub)" <gi...@apache.org> on 2025/05/20 09:38:06 UTC
[PR] IGNITE-25388 Several storage pathes per cache [ignite]
nizhikov opened a new pull request, #12081:
URL: https://github.com/apache/ignite/pull/12081
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2920374687
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2898375139
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [10 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2913993956
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [4 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114579035
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -549,7 +549,16 @@ private CacheStoreHolder initDir(
DataRegion dataRegion
) throws IgniteCheckedException {
try {
- boolean dirExisted = checkAndInitCacheWorkDir(cft);
+ boolean dirExisted = false;
+
+ for (File storage : cft.storages()) {
+ if (storage.exists()) {
+ dirExisted = true;
+ break;
Review Comment:
> Also, could be relocated to the checkAndInitCacheWorkDir() ?
OK, returned existing flow.
> Looks, like we're checking only first one, instead of all.
We checking if *any* of cache directories existed.
`dirExisted` required for two things:
1. perform post-defragmentation logic.
2. regenerate `index.bin` if it not exists for existing cache group. The edge case when `index.bin` removed by the administrator while node was down.
So, current logic seems OK to me.
Note, we want to allow to the user start with the existing PDS and new `CacheConfiguration#storagePath` values.
See - https://issues.apache.org/jira/browse/IGNITE-25411
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2955564896
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [3 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikovprivate (via GitHub)" <gi...@apache.org>.
nizhikovprivate commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135460819
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -298,7 +299,7 @@ public FilePageStoreManager(GridKernalContext ctx) {
new MaintenanceTask(CORRUPTED_DATA_FILES_MNTC_TASK_NAME,
"Corrupted cache groups found",
cacheCfgs.stream()
- .map(ccfg -> ft.cacheStorage(ccfg).getName())
+ .map(ccfg -> ft.cacheStorages(ccfg)[0].getName())
Review Comment:
Done.
`NodeFileTree#defaultCacheStorage` introduced
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2893687486
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [14 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2915385100
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate passed**
Issues
 [2 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sergey-chugunov-1985 (via GitHub)" <gi...@apache.org>.
sergey-chugunov-1985 commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2137140680
##########
modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java:
##########
Review Comment:
UPD: after some digging we found that changes in static configuration are overridden if there is existing configuration was already written to disk.
So right now no need to add more protection against unintentional change of storagePath configuration.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov merged PR #12081:
URL: https://github.com/apache/ignite/pull/12081
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2955452051
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [3 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikovprivate (via GitHub)" <gi...@apache.org>.
nizhikovprivate commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135455309
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -627,47 +628,47 @@ private CacheStoreHolder initDir(
* @param cft Cache file tree.
*/
public static boolean checkAndInitCacheWorkDir(CacheFileTree cft) throws IgniteCheckedException {
- File cacheWorkDir = cft.storage();
-
boolean dirExisted = false;
- ReadWriteLock lock = initDirLock.getLock(cacheWorkDir.getName().hashCode());
+ for (File cacheWorkDir : cft.storages()) {
+ ReadWriteLock lock = initDirLock.getLock(cacheWorkDir.getName().hashCode());
- lock.writeLock().lock();
+ lock.writeLock().lock();
- try {
- if (!Files.exists(cacheWorkDir.toPath())) {
- try {
- Files.createDirectory(cacheWorkDir.toPath());
- }
- catch (IOException e) {
- throw new IgniteCheckedException("Failed to initialize cache working directory " +
- "(failed to create, make sure the work folder has correct permissions): " +
- cacheWorkDir.getAbsolutePath(), e);
+ try {
+ if (!Files.exists(cacheWorkDir.toPath())) {
+ try {
+ Files.createDirectory(cacheWorkDir.toPath());
+ }
+ catch (IOException e) {
+ throw new IgniteCheckedException("Failed to initialize cache working directory " +
+ "(failed to create, make sure the work folder has correct permissions): " +
+ cacheWorkDir.getAbsolutePath(), e);
+ }
}
- }
- else {
- if (cacheWorkDir.isFile())
- throw new IgniteCheckedException("Failed to initialize cache working directory " +
- "(a file with the same name already exists): " + cacheWorkDir.getAbsolutePath());
+ else {
+ if (cacheWorkDir.isFile())
+ throw new IgniteCheckedException("Failed to initialize cache working directory " +
+ "(a file with the same name already exists): " + cacheWorkDir.getAbsolutePath());
- Path cacheWorkDirPath = cacheWorkDir.toPath();
+ Path cacheWorkDirPath = cacheWorkDir.toPath();
- Path tmp = cacheWorkDirPath.getParent().resolve(cacheWorkDir.getName() + TMP_SUFFIX);
+ Path tmp = cacheWorkDirPath.getParent().resolve(cacheWorkDir.getName() + TMP_SUFFIX);
- dirExisted = true;
+ dirExisted = true;
Review Comment:
> I suspect this flag is excessive ... From what I see the method either checks/creates necessary directory or throws an exception if something goes wrong.
In case all directories from `cft.storages()` was created in `checkAndInitCacheWorkDir` method will return `false`.
If some directory was created earlier then method will return `true`.
So, it seems to me flag required.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2935934044
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114591713
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/FileTreeUtils.java:
##########
@@ -100,4 +116,13 @@ private static void createAndCheck(File dir, String desc, IgniteLogger log) thro
"Current persistence store directory is: [" + dir.getAbsolutePath() + "]");
}
}
+
+ /**
+ * @param storages Storages to select from.
+ * @param part Partition.
+ * @return Storage for partition.
+ */
+ static <T> T oneOf(T[] storages, int part) {
Review Comment:
renamed.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2939340573
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2912900255
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate passed**
Issues
 [2 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2919076445
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "anton-vinogradov (via GitHub)" <gi...@apache.org>.
anton-vinogradov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2116110607
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -549,7 +549,16 @@ private CacheStoreHolder initDir(
DataRegion dataRegion
) throws IgniteCheckedException {
try {
- boolean dirExisted = checkAndInitCacheWorkDir(cft);
+ boolean dirExisted = false;
+
+ for (File storage : cft.storages()) {
+ if (storage.exists()) {
+ dirExisted = true;
+ break;
Review Comment:
Please rename to `anyDirExisted` or similar
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikovprivate (via GitHub)" <gi...@apache.org>.
nizhikovprivate commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135449991
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -192,19 +192,20 @@ public FilePageStoreManager(GridKernalContext ctx) {
/** {@inheritDoc} */
@Override public void cleanupPersistentSpace(CacheConfiguration cacheConfiguration) throws IgniteCheckedException {
try {
- File cacheWorkDir = ft.cacheStorage(cacheConfiguration);
-
- if (!cacheWorkDir.exists())
- return;
-
- try (DirectoryStream<Path> files = newDirectoryStream(cacheWorkDir.toPath(),
- new DirectoryStream.Filter<Path>() {
- @Override public boolean accept(Path entry) throws IOException {
- return NodeFileTree.binFile(entry.toFile());
+ for (File cacheWorkDir : ft.cacheStorages(cacheConfiguration)) {
Review Comment:
done
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2939962953
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114579035
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -549,7 +549,16 @@ private CacheStoreHolder initDir(
DataRegion dataRegion
) throws IgniteCheckedException {
try {
- boolean dirExisted = checkAndInitCacheWorkDir(cft);
+ boolean dirExisted = false;
+
+ for (File storage : cft.storages()) {
+ if (storage.exists()) {
+ dirExisted = true;
+ break;
Review Comment:
> Also, could be relocated to the checkAndInitCacheWorkDir() ?
OK, returned existing flow.
> Looks, like we're checking only first one, instead of all.
We checking if *any* of cache directories existed.
`dirExisted` required for two things:
1. perform post-defragmentation logic.
2. regenerate `index.bin` if it not exists for existing cache group.
So, current logic seems OK to me.
Note, we want to allow to the user start with the existing PDS and new `CacheConfiguration#storagePath` values.
See - https://issues.apache.org/jira/browse/IGNITE-25411
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114579035
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -549,7 +549,16 @@ private CacheStoreHolder initDir(
DataRegion dataRegion
) throws IgniteCheckedException {
try {
- boolean dirExisted = checkAndInitCacheWorkDir(cft);
+ boolean dirExisted = false;
+
+ for (File storage : cft.storages()) {
+ if (storage.exists()) {
+ dirExisted = true;
+ break;
Review Comment:
> Also, could be relocated to the checkAndInitCacheWorkDir() ?
OK, returned existing flow.
> Looks, like we're checking only first one, instead of all.
We checking if *any* of cache directories existed.
`dirExisted` required for two things:
1. perform post-defragmentation logic.
2. regenerate `index.bin` if it not exists for existing cache group.
So, current logic seems OK to me.
Note, we want to allow to the user start with the existing PDS and new `CacheConfiguration#storagePath` values.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114580341
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/CacheFileTree.java:
##########
@@ -156,7 +157,7 @@ public File defragmentedIndexTmpFile() {
* @see #defragmentedIndexTmpFile()
*/
public File defragmentedIndexFile() {
- return new File(storage(), DFRG_INDEX_FILE_NAME);
+ return new File(partitionRoot(INDEX_PARTITION), DFRG_INDEX_FILE_NAME);
Review Comment:
Yes, `index.bin` is the only index file we have.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2936218445
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2897044530
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [11 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2919131391
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2915486951
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate passed**
Issues
 [2 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114562047
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -549,7 +549,16 @@ private CacheStoreHolder initDir(
DataRegion dataRegion
) throws IgniteCheckedException {
try {
- boolean dirExisted = checkAndInitCacheWorkDir(cft);
+ boolean dirExisted = false;
Review Comment:
`checkAndInitCacheWorkDir` will create cache dirs.
So, we must calculate `dirExisted` before `checkAndInitCacheWorkDir`.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2912040132
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate passed**
Issues
 [2 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135479276
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java:
##########
@@ -2769,36 +2781,36 @@ private void checkIncrementalCanBeCreated(
"Encrypted cache groups not supported [groupId=" + grpId + ']');
}
- File snpCacheDir = sft.cacheStorage(gctx.config());
-
- if (!snpCacheDir.exists()) {
- throw new IgniteCheckedException("Create incremental snapshot request has been rejected. " +
- "Cache group directory not found [groupId=" + grpId + ']');
- }
+ for (File snpCacheDir : sft.cacheStorages(gctx.config())) {
+ if (!snpCacheDir.exists()) {
+ throw new IgniteCheckedException("Create incremental snapshot request has been rejected. " +
+ "Cache group directory not found [groupId=" + grpId + ']');
Review Comment:
Done
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikovprivate (via GitHub)" <gi...@apache.org>.
nizhikovprivate commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135477630
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/CacheFileTree.java:
##########
@@ -209,7 +210,17 @@ public File defragmentedPartMappingFile(int partId) {
* @see DefragmentationFileUtils#batchRenameDefragmentedCacheGroupPartitions(CacheFileTree)
*/
public File defragmentationCompletionMarkerFile() {
- return new File(storage(), DFRG_COMPLETION_MARKER_FILE_NAME);
+ return new File(storages()[0], DFRG_COMPLETION_MARKER_FILE_NAME);
+ }
+
+ /**
+ * @param part Partition index.
+ * @return Root directory. for partition file.
Review Comment:
Fixed.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2919674227
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2919200156
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [3 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sergey-chugunov-1985 (via GitHub)" <gi...@apache.org>.
sergey-chugunov-1985 commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2137140680
##########
modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java:
##########
Review Comment:
UPD: after some digging we found out that changes in static configuration are overridden if there is existing configuration from disk.
So right now no need to add more protection against unintentional change of storagePath configuration.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2943730623
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sergey-chugunov-1985 (via GitHub)" <gi...@apache.org>.
sergey-chugunov-1985 commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135190452
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -192,19 +192,20 @@ public FilePageStoreManager(GridKernalContext ctx) {
/** {@inheritDoc} */
@Override public void cleanupPersistentSpace(CacheConfiguration cacheConfiguration) throws IgniteCheckedException {
try {
- File cacheWorkDir = ft.cacheStorage(cacheConfiguration);
-
- if (!cacheWorkDir.exists())
- return;
-
- try (DirectoryStream<Path> files = newDirectoryStream(cacheWorkDir.toPath(),
- new DirectoryStream.Filter<Path>() {
- @Override public boolean accept(Path entry) throws IOException {
- return NodeFileTree.binFile(entry.toFile());
+ for (File cacheWorkDir : ft.cacheStorages(cacheConfiguration)) {
Review Comment:
I suggest to move try-catch block inside the for loop, this will allow us to throw more precise exception if cleanup of a specific directory fails.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -627,47 +628,47 @@ private CacheStoreHolder initDir(
* @param cft Cache file tree.
*/
public static boolean checkAndInitCacheWorkDir(CacheFileTree cft) throws IgniteCheckedException {
- File cacheWorkDir = cft.storage();
-
boolean dirExisted = false;
- ReadWriteLock lock = initDirLock.getLock(cacheWorkDir.getName().hashCode());
+ for (File cacheWorkDir : cft.storages()) {
+ ReadWriteLock lock = initDirLock.getLock(cacheWorkDir.getName().hashCode());
- lock.writeLock().lock();
+ lock.writeLock().lock();
- try {
- if (!Files.exists(cacheWorkDir.toPath())) {
- try {
- Files.createDirectory(cacheWorkDir.toPath());
- }
- catch (IOException e) {
- throw new IgniteCheckedException("Failed to initialize cache working directory " +
- "(failed to create, make sure the work folder has correct permissions): " +
- cacheWorkDir.getAbsolutePath(), e);
+ try {
+ if (!Files.exists(cacheWorkDir.toPath())) {
+ try {
+ Files.createDirectory(cacheWorkDir.toPath());
+ }
+ catch (IOException e) {
+ throw new IgniteCheckedException("Failed to initialize cache working directory " +
+ "(failed to create, make sure the work folder has correct permissions): " +
+ cacheWorkDir.getAbsolutePath(), e);
+ }
}
- }
- else {
- if (cacheWorkDir.isFile())
- throw new IgniteCheckedException("Failed to initialize cache working directory " +
- "(a file with the same name already exists): " + cacheWorkDir.getAbsolutePath());
+ else {
+ if (cacheWorkDir.isFile())
+ throw new IgniteCheckedException("Failed to initialize cache working directory " +
+ "(a file with the same name already exists): " + cacheWorkDir.getAbsolutePath());
- Path cacheWorkDirPath = cacheWorkDir.toPath();
+ Path cacheWorkDirPath = cacheWorkDir.toPath();
- Path tmp = cacheWorkDirPath.getParent().resolve(cacheWorkDir.getName() + TMP_SUFFIX);
+ Path tmp = cacheWorkDirPath.getParent().resolve(cacheWorkDir.getName() + TMP_SUFFIX);
- dirExisted = true;
+ dirExisted = true;
Review Comment:
I suspect this flag is excessive and only confuses logic of the method. From what I see the method either checks/creates necessary directory or throws an exception if something goes wrong. If this is true we can safely remove the flag and replace it with `return true` at the end.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/CacheFileTree.java:
##########
@@ -156,7 +157,7 @@ public File defragmentedIndexTmpFile() {
* @see #defragmentedIndexTmpFile()
*/
public File defragmentedIndexFile() {
- return new File(storage(), DFRG_INDEX_FILE_NAME);
+ return new File(partitionRoot(INDEX_PARTITION), DFRG_INDEX_FILE_NAME);
Review Comment:
What do you think about an idea to allow user to explicitly specify a separate storage path for `index.bin`? If `index.bin` doesn't share a storage device with regular partition files, performance of index operations won't be affected by rw operations on partitions.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/FileTreeUtils.java:
##########
@@ -61,6 +63,20 @@ public static void removeTmpSnapshotFiles(SnapshotFileTree sft, boolean err, Ign
removeTmpDir(tmpDrStorage.getParentFile(), err, log);
}
+ /**
+ * @param ccfg Cache configuration.
+ * @param part Partition.
+ * @return Storage path from config for partition.
+ */
+ public static @Nullable String partitionStorage(CacheConfiguration<?, ?> ccfg, int part) {
+ String[] csp = ccfg.getStoragePaths();
+
+ if (csp == null)
Review Comment:
I would add an array empty check to make sure we won't perform division by zero down the code flow.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -298,7 +299,7 @@ public FilePageStoreManager(GridKernalContext ctx) {
new MaintenanceTask(CORRUPTED_DATA_FILES_MNTC_TASK_NAME,
"Corrupted cache groups found",
cacheCfgs.stream()
- .map(ccfg -> ft.cacheStorage(ccfg).getName())
+ .map(ccfg -> ft.cacheStorages(ccfg)[0].getName())
Review Comment:
I don't like this magic number: it forces a person reading the code to remember (or keep in mind) why the first element of the array is special.
What do you think about introducing a separate method in `NodeFileTree` to hide this detail? We could name the method like `cacheInternalConfigStorage` or other name capturing semantics of a directory that contains configuration and management files related to this cache or cache group. This method could be reused to construct path to cache.dat file with serialized cache configuration.
You can consider this idea as an improvement for future, no need to implement it right now.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/FileTreeUtils.java:
##########
@@ -100,4 +116,13 @@ private static void createAndCheck(File dir, String desc, IgniteLogger log) thro
"Current persistence store directory is: [" + dir.getAbsolutePath() + "]");
}
}
+
+ /**
+ * @param storages Storages to select from.
+ * @param part Partition.
+ * @return Storage for partition.
+ */
+ static <T> T resolveStorage(T[] storages, int part) {
+ return storages[(part + 1) % storages.length];
Review Comment:
Could you please clarify to me why do we additionally increment `part` here? Most likely I don't undestand some details, but if part starts from 0, plain formula `part % storages.length` would work.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/NodeFileTree.java:
##########
Review Comment:
I suspect an update for javadoc here is also needed.
##########
modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java:
##########
Review Comment:
As far as I remember there is a feature that allows user to override cache configuration and start a node with a config that differs from what is stored on disk.
Are you aware of such feature? If the feature indeed exists, do we have protection against user just reshuffling storage directories without renaming it or changing their number?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/CacheFileTree.java:
##########
@@ -209,7 +210,17 @@ public File defragmentedPartMappingFile(int partId) {
* @see DefragmentationFileUtils#batchRenameDefragmentedCacheGroupPartitions(CacheFileTree)
*/
public File defragmentationCompletionMarkerFile() {
- return new File(storage(), DFRG_COMPLETION_MARKER_FILE_NAME);
+ return new File(storages()[0], DFRG_COMPLETION_MARKER_FILE_NAME);
+ }
+
+ /**
+ * @param part Partition index.
+ * @return Root directory. for partition file.
Review Comment:
Excessive period after `directory`
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java:
##########
@@ -2769,36 +2781,36 @@ private void checkIncrementalCanBeCreated(
"Encrypted cache groups not supported [groupId=" + grpId + ']');
}
- File snpCacheDir = sft.cacheStorage(gctx.config());
-
- if (!snpCacheDir.exists()) {
- throw new IgniteCheckedException("Create incremental snapshot request has been rejected. " +
- "Cache group directory not found [groupId=" + grpId + ']');
- }
+ for (File snpCacheDir : sft.cacheStorages(gctx.config())) {
+ if (!snpCacheDir.exists()) {
+ throw new IgniteCheckedException("Create incremental snapshot request has been rejected. " +
+ "Cache group directory not found [groupId=" + grpId + ']');
Review Comment:
Please add a dir name to exception message, otherwise we won't know what directory hasn't been found exactly.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2910550941
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [6 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2919161243
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2915733714
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate passed**
Issues
 [2 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12081&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12081&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12081&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2919546215
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [3 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "anton-vinogradov (via GitHub)" <gi...@apache.org>.
anton-vinogradov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114351908
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -549,7 +549,16 @@ private CacheStoreHolder initDir(
DataRegion dataRegion
) throws IgniteCheckedException {
try {
- boolean dirExisted = checkAndInitCacheWorkDir(cft);
+ boolean dirExisted = false;
Review Comment:
Could be relocated close to the usage.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/NodeFileTree.java:
##########
@@ -560,7 +573,7 @@ public List<File> existingTmpCacheStorages() {
* @return Cache configuration file with respect to {@link CacheConfiguration#getGroupName} value.
*/
public File cacheConfigurationFile(CacheConfiguration<?, ?> ccfg) {
- return new File(cacheStorage(ccfg), ccfg.getGroupName() == null
+ return new File(cacheStorages(ccfg)[0], ccfg.getGroupName() == null
Review Comment:
How about to use node storage instead?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/CacheFileTree.java:
##########
@@ -156,7 +157,7 @@ public File defragmentedIndexTmpFile() {
* @see #defragmentedIndexTmpFile()
*/
public File defragmentedIndexFile() {
- return new File(storage(), DFRG_INDEX_FILE_NAME);
+ return new File(partitionRoot(INDEX_PARTITION), DFRG_INDEX_FILE_NAME);
Review Comment:
Do we have single index file? If no, should we make same spreading for indices?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/FileTreeUtils.java:
##########
@@ -100,4 +116,13 @@ private static void createAndCheck(File dir, String desc, IgniteLogger log) thro
"Current persistence store directory is: [" + dir.getAbsolutePath() + "]");
}
}
+
+ /**
+ * @param storages Storages to select from.
+ * @param part Partition.
+ * @return Storage for partition.
+ */
+ static <T> T oneOf(T[] storages, int part) {
Review Comment:
resolveStorage?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java:
##########
@@ -549,7 +549,16 @@ private CacheStoreHolder initDir(
DataRegion dataRegion
) throws IgniteCheckedException {
try {
- boolean dirExisted = checkAndInitCacheWorkDir(cft);
+ boolean dirExisted = false;
+
+ for (File storage : cft.storages()) {
+ if (storage.exists()) {
+ dirExisted = true;
+ break;
Review Comment:
Looks, like we're checking only first one, instead of all.
Also, could be relocated to the checkAndInitCacheWorkDir() ?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/NodeFileTree.java:
##########
@@ -570,7 +583,7 @@ public File cacheConfigurationFile(CacheConfiguration<?, ?> ccfg) {
* @return Cache configuration file with respect to {@link CacheConfiguration#getGroupName} value.
*/
public File tmpCacheConfigurationFile(CacheConfiguration<?, ?> ccfg) {
- return new File(cacheStorage(ccfg), ccfg.getGroupName() == null
+ return new File(cacheStorages(ccfg)[0], ccfg.getGroupName() == null
Review Comment:
How about to use node storage instead?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135561050
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/NodeFileTree.java:
##########
Review Comment:
Done.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/FileTreeUtils.java:
##########
@@ -61,6 +63,20 @@ public static void removeTmpSnapshotFiles(SnapshotFileTree sft, boolean err, Ign
removeTmpDir(tmpDrStorage.getParentFile(), err, log);
}
+ /**
+ * @param ccfg Cache configuration.
+ * @param part Partition.
+ * @return Storage path from config for partition.
+ */
+ public static @Nullable String partitionStorage(CacheConfiguration<?, ?> ccfg, int part) {
+ String[] csp = ccfg.getStoragePaths();
+
+ if (csp == null)
Review Comment:
Done
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135570304
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/FileTreeUtils.java:
##########
@@ -100,4 +116,13 @@ private static void createAndCheck(File dir, String desc, IgniteLogger log) thro
"Current persistence store directory is: [" + dir.getAbsolutePath() + "]");
}
}
+
+ /**
+ * @param storages Storages to select from.
+ * @param part Partition.
+ * @return Storage for partition.
+ */
+ static <T> T resolveStorage(T[] storages, int part) {
+ return storages[(part + 1) % storages.length];
Review Comment:
You are correct. We can safely remove + 1.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114589561
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/NodeFileTree.java:
##########
@@ -560,7 +573,7 @@ public List<File> existingTmpCacheStorages() {
* @return Cache configuration file with respect to {@link CacheConfiguration#getGroupName} value.
*/
public File cacheConfigurationFile(CacheConfiguration<?, ?> ccfg) {
- return new File(cacheStorage(ccfg), ccfg.getGroupName() == null
+ return new File(cacheStorages(ccfg)[0], ccfg.getGroupName() == null
Review Comment:
Can you, please, be more specific.
`nodeStorage` is root for node-specific files.
cache configuration file must be stored inside `cacheStorage` like we do now.
First directory will point to the current cache directory for the case when `CacheConfiguration#storagePath == null`. Looks like we don't want to change this.
Please, take a look at `NodeFileTree` javadoc explaining all variables.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2114591021
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/NodeFileTree.java:
##########
@@ -570,7 +583,7 @@ public File cacheConfigurationFile(CacheConfiguration<?, ?> ccfg) {
* @return Cache configuration file with respect to {@link CacheConfiguration#getGroupName} value.
*/
public File tmpCacheConfigurationFile(CacheConfiguration<?, ?> ccfg) {
- return new File(cacheStorage(ccfg), ccfg.getGroupName() == null
+ return new File(cacheStorages(ccfg)[0], ccfg.getGroupName() == null
Review Comment:
Temp cache configuration file must be in the same directory as `cacheConfiguration` file.
Please, take a loo int previous comment https://github.com/apache/ignite/pull/12081#discussion_r211458956
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2931354054
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2936107252
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2939649096
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2956346140
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [3 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage paths per cache [ignite]
Posted by "nizhikovprivate (via GitHub)" <gi...@apache.org>.
nizhikovprivate commented on code in PR #12081:
URL: https://github.com/apache/ignite/pull/12081#discussion_r2135469785
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/CacheFileTree.java:
##########
@@ -156,7 +157,7 @@ public File defragmentedIndexTmpFile() {
* @see #defragmentedIndexTmpFile()
*/
public File defragmentedIndexFile() {
- return new File(storage(), DFRG_INDEX_FILE_NAME);
+ return new File(partitionRoot(INDEX_PARTITION), DFRG_INDEX_FILE_NAME);
Review Comment:
https://issues.apache.org/jira/browse/IGNITE-25389
Yes. I will implement it in separate ticket.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-25388 Several storage pathes per cache [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12081:
URL: https://github.com/apache/ignite/pull/12081#issuecomment-2912017093
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) **Quality Gate failed**
Failed conditions
 [7 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12081)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org