You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "anton-vinogradov (via GitHub)" <gi...@apache.org> on 2025/10/20 15:55:18 UTC

[PR] IGNITE-26334 Implement a TopologyValidator based on DataCenterId [ignite]

anton-vinogradov opened a new pull request, #12442:
URL: https://github.com/apache/ignite/pull/12442

   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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3422867250

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3444155550

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3456072059

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3462098874

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3451561849

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3451824809

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3433277949

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3436606463

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3437481952

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sergey-chugunov-1985 (via GitHub)" <gi...@apache.org>.
sergey-chugunov-1985 commented on code in PR #12442:
URL: https://github.com/apache/ignite/pull/12442#discussion_r2465854263


##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter topology validator.
+ * Performs data protection in case of DC failure.
+ * Covered DCs MUST be specified via {@link MdcTopologyValidator#setDatacenters}
+ * and main DC MAY be specified via {@link MdcTopologyValidator#setMainDatacenter} in case of even DC count.
+ * When main datacenter is specified Topology Validator keeps cluster write accessed while main DC is visible,
+ * otherwise DC majority check is used.
+ * For example, when you have 2N+1 DCs (3, 5 ,...) topology validator will keep cluster write accessed while 2N/2+1 (2, 3, ...)
+ * DCs are visible. In case you have 2N DCs (2, 4, ...) it's impossible to use majority pattern, so topology validator
+ * will keep cluster write accessed while the main DC is visible.
+ * */

Review Comment:
   ```suggestion
   /**
    * Multi-Datacenter Topology Validator.
    *
    * <p>This class is used to validate the cluster topology in a multi-datacenter (MDC) environment 
    * by enforcing rules based on the visibility of datacenters.
    * It provides protection against split-brain scenarios during datacenter failures or unavailability due to network issues.</p>
    *
    * <p>The validator supports two modes of operation:</p>
    * <ul>
    *     <li><strong>Majority-based validation:</strong> When an odd number of datacenters are defined, the validator enables 
    *         data modification operations in the cluster segment that contain a majority of datacenters. 
    *         Any segment containing a minority of datacenters is considered as invalid with only read operations available.</li>
    *     <li><strong>Main Datacenter validation:</strong> When an even number of datacenters are defined, a main datacenter
    *         should be specified. The cluster segment remains write-accessible as long as the main datacenter is visible from all nodes of that segment.</li>
    * </ul>
    *
    * <p><strong>Usage Requirements:</strong></p>
    * <ul>
    *     <li>If number of datacenters is even, specify a main datacenter via {@link #setMainDatacenter(String)}. Set of datacenters could be left null.</li>	
    *     <li>If number of datacenters is odd, set of datacenter IDs must be specified via {@link #setDatacenters(Set)}. Main datacenter setting is ignored and could be left null.</li>
    *     
    * </ul>
    *
    * <p><strong>Example:</strong></p>
    * <pre>
    * MdcTopologyValidator mdcValidator = new MdcTopologyValidator();
    * mdcValidator.setDatacenters(Set.of("DC1", "DC2", "DC3"));
    * 
    * CacheConfiguration cacheCfg = new CacheConfiguration("example-cache")
    *     .setTopologyValidator(mdcValidator)
    *	   // other cache properties.
    * </pre>
    *
    * <p><strong>Note:</strong> This class is marked with the {@link IgniteExperimental} annotation and may change in future releases.</p>
    *
    * @see TopologyValidator
    * @since Apache Ignite 2.18
    */
   ```



-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3442905610

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3433026739

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3422751260

   ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate failed**  
   Failed conditions  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) (required ≤ 1)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   ##   
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3452795942

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3438603601

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sergey-chugunov-1985 (via GitHub)" <gi...@apache.org>.
sergey-chugunov-1985 commented on code in PR #12442:
URL: https://github.com/apache/ignite/pull/12442#discussion_r2473274767


##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter Topology Validator.
+ *
+ * <p>This class is used to validate the cluster topology in a multi-datacenter (MDC) environment 
+ * by enforcing rules based on the visibility of datacenters.
+ * It provides protection against split-brain scenarios during datacenter failures or unavailability due to network issues.</p>
+ *
+ * <p>The validator supports two modes of operation:</p>
+ * <ul>
+ *     <li><strong>Majority-based validation:</strong> When an odd number of datacenters are defined, the validator enables 
+ *         data modification operations in the cluster segment that contain a majority of datacenters. 
+ *         Any segment containing a minority of datacenters is considered as invalid with only read operations available.</li>
+ *     <li><strong>Main Datacenter validation:</strong> When an even number of datacenters are defined, a main datacenter
+ *         should be specified. The cluster segment remains write-accessible as long as the main datacenter is visible from
+ *         all nodes of that segment.</li>
+ * </ul>
+ *
+ * <p><strong>Usage Requirements:</strong></p>
+ * <ul>
+ *     <li>If number of datacenters is even, specify a main datacenter via {@link #setMainDatacenter(String)}.
+ *     Set of datacenters could be left null.</li>
+ *     <li>If number of datacenters is odd, set of datacenter IDs must be specified via {@link #setDatacenters(Set)}.
+ *     Main datacenter setting is ignored and could be left null.</li>
+ *     
+ * </ul>
+ *
+ * <p><strong>Example:</strong></p>
+ * <pre>
+ * MdcTopologyValidator mdcValidator = new MdcTopologyValidator();
+ * mdcValidator.setDatacenters(Set.of("DC1", "DC2", "DC3"));
+ * 
+ * CacheConfiguration cacheCfg = new CacheConfiguration("example-cache")
+ *     .setTopologyValidator(mdcValidator)
+ *     // other cache properties.
+ * </pre>
+ *
+ * <p><strong>Note:</strong> This class is marked with the {@link IgniteExperimental} annotation and may change in future releases.</p>
+ *
+ * @see TopologyValidator
+ * @since Apache Ignite 2.18
+ */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private Set<String> dcs;
+
+    /** */
+    private String mainDc;
+
+    /** @param datacenters Datacenters.*/
+    public void setDatacenters(Set<String> datacenters) {
+        dcs = datacenters;
+    }
+
+    /** @param mainDatacenter Main datacenter.*/
+    public void setMainDatacenter(String mainDatacenter) {
+        mainDc = mainDatacenter;
+    }
+
+    /** */
+    public void checkConfiguration() {
+        if (dcs == null && mainDc == null)
+            throw new IllegalStateException("Missing datacenters or main datacenter.");
+
+        if (dcs != null && dcs.isEmpty())
+            throw new IllegalStateException("Missing datacenters.");
+
+        if (mainDc != null && dcs != null && dcs.size() % 2 == 1)
+            throw new IllegalStateException("Datacenters count must be even when main datacenter is set.");

Review Comment:
   ```suggestion
               throw new IllegalStateException("Uneven number of datacenters cannot be used along with main datacenter. Please remove main datacenter setting or specify even number of datacenters.");
   ```



##########
modules/core/src/test/java/org/apache/ignite/spi/failover/topology/validator/MdcTopologyValidatorTest.java:
##########
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.failover.topology.validator;
+
+import java.util.Set;
+import java.util.concurrent.ThreadLocalRandom;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.topology.MdcTopologyValidator;
+import org.junit.Test;
+
+/** */
+public class MdcTopologyValidatorTest extends GridCommonAbstractTest {
+    /** */
+    private static final String DC_ID_0 = "DC0";
+
+    /** */
+    private static final String DC_ID_1 = "DC1";
+
+    /** */
+    private static final String DC_ID_2 = "DC2";
+
+    /** */
+    private static final String KEY = "key";
+
+    /** */
+    private static final String VAL = "val";
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+
+        cleanPersistenceDir();
+
+        System.clearProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        return super.getConfiguration(igniteInstanceName)
+            .setDataStorageConfiguration(
+                new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(
+                        new DataRegionConfiguration()
+                            .setPersistenceEnabled(true)
+                    )
+            )
+            .setConsistentId(igniteInstanceName);
+    }
+
+    /** */
+    @Test
+    public void testEmptyConfig() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters or main datacenter");
+    }
+
+    /** */
+    @Test
+    public void testOddDcsWithMain() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Datacenters count must be even when main datacenter is set.");
+    }
+
+    /** Checks 1DC case with MdcTopologyValidator usage.*/
+    @Test
+    public void testEmptyDc() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of());
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMajority() throws Exception {

Review Comment:
   ```suggestion
       public void testNodeWithoutDcSpecifiedWithMajorityBasedValidator() throws Exception {
   ```



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter Topology Validator.
+ *
+ * <p>This class is used to validate the cluster topology in a multi-datacenter (MDC) environment 
+ * by enforcing rules based on the visibility of datacenters.
+ * It provides protection against split-brain scenarios during datacenter failures or unavailability due to network issues.</p>
+ *

Review Comment:
   ```suggestion
    *
    * <p>
    * In order to use MdcTopologyValidator one has to specify datacenter ID attribute on each server node.
    * Datacenter ID is an arbitrary string that can be set with {@link IgniteSystemProperties#IGNITE_DATA_CENTER_ID} system property on the node startup.
    * All server nodes belonging to the same datacenter should specify the same datacenter ID, and nodes in different datacenters should have different datacenter IDs.
    * </p>
   ```



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Stream;

Review Comment:
   ```suggestion
   import java.util.stream.Stream;
   import org.apache.ignite.IgniteSystemProperties;
   ```



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter Topology Validator.
+ *
+ * <p>This class is used to validate the cluster topology in a multi-datacenter (MDC) environment 
+ * by enforcing rules based on the visibility of datacenters.
+ * It provides protection against split-brain scenarios during datacenter failures or unavailability due to network issues.</p>
+ *
+ * <p>The validator supports two modes of operation:</p>
+ * <ul>
+ *     <li><strong>Majority-based validation:</strong> When an odd number of datacenters are defined, the validator enables 
+ *         data modification operations in the cluster segment that contain a majority of datacenters. 
+ *         Any segment containing a minority of datacenters is considered as invalid with only read operations available.</li>
+ *     <li><strong>Main Datacenter validation:</strong> When an even number of datacenters are defined, a main datacenter
+ *         should be specified. The cluster segment remains write-accessible as long as the main datacenter is visible from
+ *         all nodes of that segment.</li>
+ * </ul>
+ *
+ * <p><strong>Usage Requirements:</strong></p>
+ * <ul>
+ *     <li>If number of datacenters is even, specify a main datacenter via {@link #setMainDatacenter(String)}.
+ *     Set of datacenters could be left null.</li>
+ *     <li>If number of datacenters is odd, set of datacenter IDs must be specified via {@link #setDatacenters(Set)}.
+ *     Main datacenter setting is ignored and could be left null.</li>
+ *     
+ * </ul>
+ *
+ * <p><strong>Example:</strong></p>
+ * <pre>
+ * MdcTopologyValidator mdcValidator = new MdcTopologyValidator();
+ * mdcValidator.setDatacenters(Set.of("DC1", "DC2", "DC3"));
+ * 
+ * CacheConfiguration cacheCfg = new CacheConfiguration("example-cache")
+ *     .setTopologyValidator(mdcValidator)
+ *     // other cache properties.
+ * </pre>
+ *
+ * <p><strong>Note:</strong> This class is marked with the {@link IgniteExperimental} annotation and may change in future releases.</p>
+ *
+ * @see TopologyValidator
+ * @since Apache Ignite 2.18
+ */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private Set<String> dcs;
+
+    /** */
+    private String mainDc;
+
+    /** @param datacenters Datacenters.*/
+    public void setDatacenters(Set<String> datacenters) {
+        dcs = datacenters;
+    }
+
+    /** @param mainDatacenter Main datacenter.*/
+    public void setMainDatacenter(String mainDatacenter) {
+        mainDc = mainDatacenter;
+    }
+
+    /** */
+    public void checkConfiguration() {
+        if (dcs == null && mainDc == null)
+            throw new IllegalStateException("Missing datacenters or main datacenter.");

Review Comment:
   ```suggestion
               throw new IllegalStateException("Either set of datacenters or main datacenter should be specified.");
   ```



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter Topology Validator.
+ *
+ * <p>This class is used to validate the cluster topology in a multi-datacenter (MDC) environment 
+ * by enforcing rules based on the visibility of datacenters.
+ * It provides protection against split-brain scenarios during datacenter failures or unavailability due to network issues.</p>
+ *
+ * <p>The validator supports two modes of operation:</p>
+ * <ul>
+ *     <li><strong>Majority-based validation:</strong> When an odd number of datacenters are defined, the validator enables 
+ *         data modification operations in the cluster segment that contain a majority of datacenters. 
+ *         Any segment containing a minority of datacenters is considered as invalid with only read operations available.</li>
+ *     <li><strong>Main Datacenter validation:</strong> When an even number of datacenters are defined, a main datacenter
+ *         should be specified. The cluster segment remains write-accessible as long as the main datacenter is visible from
+ *         all nodes of that segment.</li>
+ * </ul>
+ *
+ * <p><strong>Usage Requirements:</strong></p>
+ * <ul>
+ *     <li>If number of datacenters is even, specify a main datacenter via {@link #setMainDatacenter(String)}.
+ *     Set of datacenters could be left null.</li>
+ *     <li>If number of datacenters is odd, set of datacenter IDs must be specified via {@link #setDatacenters(Set)}.
+ *     Main datacenter setting is ignored and could be left null.</li>
+ *     
+ * </ul>
+ *
+ * <p><strong>Example:</strong></p>
+ * <pre>
+ * MdcTopologyValidator mdcValidator = new MdcTopologyValidator();
+ * mdcValidator.setDatacenters(Set.of("DC1", "DC2", "DC3"));
+ * 
+ * CacheConfiguration cacheCfg = new CacheConfiguration("example-cache")
+ *     .setTopologyValidator(mdcValidator)
+ *     // other cache properties.
+ * </pre>
+ *
+ * <p><strong>Note:</strong> This class is marked with the {@link IgniteExperimental} annotation and may change in future releases.</p>
+ *
+ * @see TopologyValidator
+ * @since Apache Ignite 2.18
+ */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private Set<String> dcs;
+
+    /** */
+    private String mainDc;
+
+    /** @param datacenters Datacenters.*/
+    public void setDatacenters(Set<String> datacenters) {
+        dcs = datacenters;
+    }
+
+    /** @param mainDatacenter Main datacenter.*/
+    public void setMainDatacenter(String mainDatacenter) {
+        mainDc = mainDatacenter;
+    }
+
+    /** */
+    public void checkConfiguration() {
+        if (dcs == null && mainDc == null)
+            throw new IllegalStateException("Missing datacenters or main datacenter.");
+
+        if (dcs != null && dcs.isEmpty())
+            throw new IllegalStateException("Missing datacenters.");

Review Comment:
   ```suggestion
               throw new IllegalStateException("Please provide a non-empty set of datacenters.");
   ```



##########
modules/core/src/test/java/org/apache/ignite/spi/failover/topology/validator/MdcTopologyValidatorTest.java:
##########
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.failover.topology.validator;
+
+import java.util.Set;
+import java.util.concurrent.ThreadLocalRandom;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.topology.MdcTopologyValidator;
+import org.junit.Test;
+
+/** */
+public class MdcTopologyValidatorTest extends GridCommonAbstractTest {
+    /** */
+    private static final String DC_ID_0 = "DC0";
+
+    /** */
+    private static final String DC_ID_1 = "DC1";
+
+    /** */
+    private static final String DC_ID_2 = "DC2";
+
+    /** */
+    private static final String KEY = "key";
+
+    /** */
+    private static final String VAL = "val";
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+
+        cleanPersistenceDir();
+
+        System.clearProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        return super.getConfiguration(igniteInstanceName)
+            .setDataStorageConfiguration(
+                new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(
+                        new DataRegionConfiguration()
+                            .setPersistenceEnabled(true)
+                    )
+            )
+            .setConsistentId(igniteInstanceName);
+    }
+
+    /** */
+    @Test
+    public void testEmptyConfig() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters or main datacenter");
+    }
+
+    /** */
+    @Test
+    public void testOddDcsWithMain() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Datacenters count must be even when main datacenter is set.");
+    }
+
+    /** Checks 1DC case with MdcTopologyValidator usage.*/
+    @Test
+    public void testEmptyDc() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of());
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMajority() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+
+        IgniteEx srv = startGrid(0);
+
+        waitForTopology(1);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache cache = srv.createCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMain() throws Exception {

Review Comment:
   ```suggestion
       public void testNodeWithoutDcSpecifiedWithMainBasedValidator() throws Exception {
   ```



##########
modules/core/src/test/java/org/apache/ignite/spi/failover/topology/validator/MdcTopologyValidatorTest.java:
##########
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.failover.topology.validator;
+
+import java.util.Set;
+import java.util.concurrent.ThreadLocalRandom;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.topology.MdcTopologyValidator;
+import org.junit.Test;
+
+/** */
+public class MdcTopologyValidatorTest extends GridCommonAbstractTest {
+    /** */
+    private static final String DC_ID_0 = "DC0";
+
+    /** */
+    private static final String DC_ID_1 = "DC1";
+
+    /** */
+    private static final String DC_ID_2 = "DC2";
+
+    /** */
+    private static final String KEY = "key";
+
+    /** */
+    private static final String VAL = "val";
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+
+        cleanPersistenceDir();
+
+        System.clearProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        return super.getConfiguration(igniteInstanceName)
+            .setDataStorageConfiguration(
+                new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(
+                        new DataRegionConfiguration()
+                            .setPersistenceEnabled(true)
+                    )
+            )
+            .setConsistentId(igniteInstanceName);
+    }
+
+    /** */
+    @Test
+    public void testEmptyConfig() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters or main datacenter");
+    }
+
+    /** */
+    @Test
+    public void testOddDcsWithMain() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Datacenters count must be even when main datacenter is set.");
+    }
+
+    /** Checks 1DC case with MdcTopologyValidator usage.*/
+    @Test
+    public void testEmptyDc() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of());
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMajority() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+
+        IgniteEx srv = startGrid(0);
+
+        waitForTopology(1);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache cache = srv.createCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMain() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        IgniteEx srv = startGrid(0);
+
+        waitForTopology(1);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache cache = srv.createCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testClientDoesNotAffectValidation() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1));
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_0);
+        startGrid(0);
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_1);
+        IgniteEx client = startClientGrid("client");
+
+        waitForTopology(2);
+
+        client.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache<Object, Object> cache = client.getOrCreateCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testTopologyValidatorEqualityCheck() throws Exception {
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_1);
+        IgniteEx srv0 = startGrid(0);
+
+        startGrid(1);
+
+        waitForTopology(2);
+
+        srv0.cluster().state(ClusterState.ACTIVE);
+
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1));
+
+        CacheConfiguration<Object, Object> cfgCache1 = new CacheConfiguration<>(DEFAULT_CACHE_NAME).setTopologyValidator(topValidator);
+
+        srv0.getOrCreateCache(cfgCache1);
+
+        stopGrid(1);
+
+        srv0.destroyCache(cfgCache1.getName());
+
+        topValidator.setMainDatacenter(DC_ID_0); // Changed
+
+        CacheConfiguration<Object, Object> cfgCache2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME).setTopologyValidator(topValidator);
+
+        srv0.getOrCreateCache(cfgCache2);
+
+        startGrid(2);
+
+        waitForTopology(2);
+
+        GridTestUtils.assertThrows(log, () -> startGrid(1), IgniteCheckedException.class, "Cache topology validator mismatch");
+    }
+
+    /** */
+    @Test
+    public void testMainDc() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2, "DC4"));
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        IgniteCache<Object, Object> cache = createClusterWithCache(topValidator, true);
+
+        cache.put(KEY, VAL);
+        assertEquals(VAL, cache.get(KEY));
+
+        stopGrid(2);
+
+        cache.put(KEY, VAL + 1);
+        assertEquals(VAL + 1, cache.get(KEY));
+
+        stopGrid(1);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL + 2), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testMajority() throws Exception {

Review Comment:
   ```suggestion
       public void testMajorityBasedValidator() throws Exception {
   ```



##########
modules/core/src/test/java/org/apache/ignite/spi/failover/topology/validator/MdcTopologyValidatorTest.java:
##########
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.failover.topology.validator;
+
+import java.util.Set;
+import java.util.concurrent.ThreadLocalRandom;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.topology.MdcTopologyValidator;
+import org.junit.Test;
+
+/** */
+public class MdcTopologyValidatorTest extends GridCommonAbstractTest {
+    /** */
+    private static final String DC_ID_0 = "DC0";
+
+    /** */
+    private static final String DC_ID_1 = "DC1";
+
+    /** */
+    private static final String DC_ID_2 = "DC2";
+
+    /** */
+    private static final String KEY = "key";
+
+    /** */
+    private static final String VAL = "val";
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+
+        cleanPersistenceDir();
+
+        System.clearProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        return super.getConfiguration(igniteInstanceName)
+            .setDataStorageConfiguration(
+                new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(
+                        new DataRegionConfiguration()
+                            .setPersistenceEnabled(true)
+                    )
+            )
+            .setConsistentId(igniteInstanceName);
+    }
+
+    /** */
+    @Test
+    public void testEmptyConfig() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters or main datacenter");
+    }
+
+    /** */
+    @Test
+    public void testOddDcsWithMain() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Datacenters count must be even when main datacenter is set.");
+    }
+
+    /** Checks 1DC case with MdcTopologyValidator usage.*/
+    @Test
+    public void testEmptyDc() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of());
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMajority() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+
+        IgniteEx srv = startGrid(0);
+
+        waitForTopology(1);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache cache = srv.createCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMain() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        IgniteEx srv = startGrid(0);
+
+        waitForTopology(1);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache cache = srv.createCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testClientDoesNotAffectValidation() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1));
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_0);
+        startGrid(0);
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_1);
+        IgniteEx client = startClientGrid("client");
+
+        waitForTopology(2);
+
+        client.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache<Object, Object> cache = client.getOrCreateCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testTopologyValidatorEqualityCheck() throws Exception {
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_1);
+        IgniteEx srv0 = startGrid(0);
+
+        startGrid(1);
+
+        waitForTopology(2);
+
+        srv0.cluster().state(ClusterState.ACTIVE);
+
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1));
+
+        CacheConfiguration<Object, Object> cfgCache1 = new CacheConfiguration<>(DEFAULT_CACHE_NAME).setTopologyValidator(topValidator);
+
+        srv0.getOrCreateCache(cfgCache1);
+
+        stopGrid(1);
+
+        srv0.destroyCache(cfgCache1.getName());
+
+        topValidator.setMainDatacenter(DC_ID_0); // Changed
+
+        CacheConfiguration<Object, Object> cfgCache2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME).setTopologyValidator(topValidator);
+
+        srv0.getOrCreateCache(cfgCache2);
+
+        startGrid(2);
+
+        waitForTopology(2);
+
+        GridTestUtils.assertThrows(log, () -> startGrid(1), IgniteCheckedException.class, "Cache topology validator mismatch");
+    }
+
+    /** */
+    @Test
+    public void testMainDc() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2, "DC4"));
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        IgniteCache<Object, Object> cache = createClusterWithCache(topValidator, true);
+
+        cache.put(KEY, VAL);
+        assertEquals(VAL, cache.get(KEY));
+
+        stopGrid(2);
+
+        cache.put(KEY, VAL + 1);
+        assertEquals(VAL + 1, cache.get(KEY));
+
+        stopGrid(1);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL + 2), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testMajority() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+
+        IgniteCache<Object, Object> cache = createClusterWithCache(topValidator, true);
+
+        cache.put(KEY, VAL);
+        assertEquals(VAL, cache.get(KEY));
+
+        int randomNode = ThreadLocalRandom.current().nextInt(1, 3);
+
+        stopGrid(randomNode);
+
+        cache.put(KEY, VAL + 1);
+        assertEquals(VAL + 1, cache.get(KEY));
+
+        stopGrid(randomNode == 1 ? 2 : 1);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL + 2), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testBigCluster() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_0);
+
+        startGrid(0);
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_1);
+
+        IgniteEx srv = startGrid(1);
+        startGrid(10);
+        startGrid(11);
+        startGrid(12);
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_2);
+
+        startGrid(2);
+
+        waitForTopology(6);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache<Object, Object> cache = srv.createCache(cfgCache);
+
+        cache.put(KEY, VAL);
+        assertEquals(VAL, cache.get(KEY));
+
+        stopGrid(0);
+        stopGrid(2);
+
+        // Checking case when 4 nodes are alive, but only at single DC

Review Comment:
   ```suggestion
           // Checking case when 4 nodes are alive, but only in single DC
   ```



##########
modules/core/src/test/java/org/apache/ignite/spi/failover/topology/validator/MdcTopologyValidatorTest.java:
##########
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.failover.topology.validator;
+
+import java.util.Set;
+import java.util.concurrent.ThreadLocalRandom;
+import javax.cache.CacheException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.topology.MdcTopologyValidator;
+import org.junit.Test;
+
+/** */
+public class MdcTopologyValidatorTest extends GridCommonAbstractTest {
+    /** */
+    private static final String DC_ID_0 = "DC0";
+
+    /** */
+    private static final String DC_ID_1 = "DC1";
+
+    /** */
+    private static final String DC_ID_2 = "DC2";
+
+    /** */
+    private static final String KEY = "key";
+
+    /** */
+    private static final String VAL = "val";
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+
+        cleanPersistenceDir();
+
+        System.clearProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        return super.getConfiguration(igniteInstanceName)
+            .setDataStorageConfiguration(
+                new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(
+                        new DataRegionConfiguration()
+                            .setPersistenceEnabled(true)
+                    )
+            )
+            .setConsistentId(igniteInstanceName);
+    }
+
+    /** */
+    @Test
+    public void testEmptyConfig() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters or main datacenter");
+    }
+
+    /** */
+    @Test
+    public void testOddDcsWithMain() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Datacenters count must be even when main datacenter is set.");
+    }
+
+    /** Checks 1DC case with MdcTopologyValidator usage.*/
+    @Test
+    public void testEmptyDc() {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of());
+
+        GridTestUtils.assertThrows(log,
+            () -> createClusterWithCache(topValidator, false),
+            CacheException.class,
+            "Missing datacenters");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMajority() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1, DC_ID_2));
+
+        IgniteEx srv = startGrid(0);
+
+        waitForTopology(1);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache cache = srv.createCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testNodeWitoutDCWithMain() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+
+        IgniteEx srv = startGrid(0);
+
+        waitForTopology(1);
+
+        srv.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache cache = srv.createCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testClientDoesNotAffectValidation() throws Exception {
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1));
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_0);
+        startGrid(0);
+
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_1);
+        IgniteEx client = startClientGrid("client");
+
+        waitForTopology(2);
+
+        client.cluster().state(ClusterState.ACTIVE);
+
+        CacheConfiguration<Object, Object> cfgCache = new CacheConfiguration<>("cache").setTopologyValidator(topValidator);
+
+        IgniteCache<Object, Object> cache = client.getOrCreateCache(cfgCache);
+
+        GridTestUtils.assertThrows(log, () -> cache.put(KEY, VAL), IgniteException.class, "cache topology is not valid");
+    }
+
+    /** */
+    @Test
+    public void testTopologyValidatorEqualityCheck() throws Exception {
+        System.setProperty(IgniteSystemProperties.IGNITE_DATA_CENTER_ID, DC_ID_1);
+        IgniteEx srv0 = startGrid(0);
+
+        startGrid(1);
+
+        waitForTopology(2);
+
+        srv0.cluster().state(ClusterState.ACTIVE);
+
+        MdcTopologyValidator topValidator = new MdcTopologyValidator();
+
+        topValidator.setMainDatacenter(DC_ID_1);
+        topValidator.setDatacenters(Set.of(DC_ID_0, DC_ID_1));
+
+        CacheConfiguration<Object, Object> cfgCache1 = new CacheConfiguration<>(DEFAULT_CACHE_NAME).setTopologyValidator(topValidator);
+
+        srv0.getOrCreateCache(cfgCache1);
+
+        stopGrid(1);
+
+        srv0.destroyCache(cfgCache1.getName());
+
+        topValidator.setMainDatacenter(DC_ID_0); // Changed
+
+        CacheConfiguration<Object, Object> cfgCache2 = new CacheConfiguration<>(DEFAULT_CACHE_NAME).setTopologyValidator(topValidator);
+
+        srv0.getOrCreateCache(cfgCache2);
+
+        startGrid(2);
+
+        waitForTopology(2);
+
+        GridTestUtils.assertThrows(log, () -> startGrid(1), IgniteCheckedException.class, "Cache topology validator mismatch");
+    }
+
+    /** */
+    @Test
+    public void testMainDc() throws Exception {

Review Comment:
   ```suggestion
       public void testMainDcBasedValidator() throws Exception {
   ```



-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sergey-chugunov-1985 (via GitHub)" <gi...@apache.org>.
sergey-chugunov-1985 commented on code in PR #12442:
URL: https://github.com/apache/ignite/pull/12442#discussion_r2460621699


##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter topology validator.

Review Comment:
   Documentation is not sufficient.
   
   Please describe in more details use cases - how this TopologyValidator is supposed to be used in 2DC and 3DC deployments. It worth mentioning that in (2 * N) DC, N > 1 deployment (4DC, 6DC etc) majority doesn't work at all and in case of mainDc going unreachable all other DCs switch to read-only mode even if they clearly have a majority (3 vs 1 for 4DC, 5 vs 1 for 6DC).



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter topology validator.
+ * Performs data protection in case of DC failure.
+ * Covered DCs MUST be specified via {@link MdcTopologyValidator#setDatacenters}
+ * and primary DC MUST be specified via {@link MdcTopologyValidator#setPrimaryDatacenter} in case of even DC count.
+ * When primary datacenter is specified Topology Validator keeps cluster write accessed while primary DC is visible,
+ * otherwise DC majority check is used.
+ * */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private List<String> dcs;
+
+    /** */
+    private String primDc;
+
+    /** @param datacenters Datacenters.*/
+    public void setDatacenters(List<String> datacenters) {
+        if (primDc != null && datacenters.size() % 2 == 1)
+            throw new IllegalArgumentException("Datacenters count must be even when primary datacenter is set.");
+
+        dcs = datacenters;
+    }
+
+    /** @param primaryDatacenter Primary datacenter.*/
+    public void setPrimaryDatacenter(String primaryDatacenter) {
+        if (primaryDatacenter != null && dcs != null && dcs.size() % 2 == 1)
+            throw new IllegalArgumentException("Datacenters count must be even when primary datacenter is set.");
+
+        primDc = primaryDatacenter;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean validate(Collection<ClusterNode> nodes) {
+        Stream<ClusterNode> servers = nodes.stream().filter(node -> !node.isClient());
+
+        if (primDc != null) {

Review Comment:
   Curly braces are not neccesary for this block.



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter topology validator.
+ * Performs data protection in case of DC failure.
+ * Covered DCs MUST be specified via {@link MdcTopologyValidator#setDatacenters}
+ * and primary DC MUST be specified via {@link MdcTopologyValidator#setPrimaryDatacenter} in case of even DC count.
+ * When primary datacenter is specified Topology Validator keeps cluster write accessed while primary DC is visible,
+ * otherwise DC majority check is used.
+ * */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private List<String> dcs;
+
+    /** */
+    private String primDc;
+
+    /** @param datacenters Datacenters.*/
+    public void setDatacenters(List<String> datacenters) {
+        if (primDc != null && datacenters.size() % 2 == 1)
+            throw new IllegalArgumentException("Datacenters count must be even when primary datacenter is set.");
+
+        dcs = datacenters;
+    }
+
+    /** @param primaryDatacenter Primary datacenter.*/
+    public void setPrimaryDatacenter(String primaryDatacenter) {
+        if (primaryDatacenter != null && dcs != null && dcs.size() % 2 == 1)
+            throw new IllegalArgumentException("Datacenters count must be even when primary datacenter is set.");
+
+        primDc = primaryDatacenter;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean validate(Collection<ClusterNode> nodes) {
+        Stream<ClusterNode> servers = nodes.stream().filter(node -> !node.isClient());
+
+        if (primDc != null) {
+            return servers.anyMatch(n -> n.dataCenterId() != null && n.dataCenterId().equals(primDc));
+        }
+
+        long visible = servers.map(ClusterNode::dataCenterId).count();

Review Comment:
   We could have duplicates in dataCenterIds among cluster nodes. I believe we should add `distinct` to this chain and write a test for it.



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter topology validator.
+ * Performs data protection in case of DC failure.
+ * Covered DCs MUST be specified via {@link MdcTopologyValidator#setDatacenters}
+ * and primary DC MUST be specified via {@link MdcTopologyValidator#setPrimaryDatacenter} in case of even DC count.
+ * When primary datacenter is specified Topology Validator keeps cluster write accessed while primary DC is visible,
+ * otherwise DC majority check is used.
+ * */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private List<String> dcs;
+
+    /** */
+    private String primDc;
+
+    /** @param datacenters Datacenters.*/
+    public void setDatacenters(List<String> datacenters) {
+        if (primDc != null && datacenters.size() % 2 == 1)
+            throw new IllegalArgumentException("Datacenters count must be even when primary datacenter is set.");
+
+        dcs = datacenters;
+    }
+
+    /** @param primaryDatacenter Primary datacenter.*/
+    public void setPrimaryDatacenter(String primaryDatacenter) {
+        if (primaryDatacenter != null && dcs != null && dcs.size() % 2 == 1)
+            throw new IllegalArgumentException("Datacenters count must be even when primary datacenter is set.");
+
+        primDc = primaryDatacenter;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean validate(Collection<ClusterNode> nodes) {
+        Stream<ClusterNode> servers = nodes.stream().filter(node -> !node.isClient());
+
+        if (primDc != null) {
+            return servers.anyMatch(n -> n.dataCenterId() != null && n.dataCenterId().equals(primDc));
+        }
+
+        long visible = servers.map(ClusterNode::dataCenterId).count();
+        int half = dcs.size() / 2;
+
+        return visible > half;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (o == null || getClass() != o.getClass())
+            return false;
+
+        MdcTopologyValidator validator = (MdcTopologyValidator)o;
+
+        return Objects.equals(dcs, validator.dcs) && Objects.equals(primDc, validator.primDc);

Review Comment:
   As `dcs` field is declared as `List` it is possible that two instances of this class differs only by order of dc ids stored inside them.
   But semantically order of dcs doesn't matter, so we could use a `Set` interface instead of a `List` for this field.



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter topology validator.
+ * Performs data protection in case of DC failure.
+ * Covered DCs MUST be specified via {@link MdcTopologyValidator#setDatacenters}
+ * and primary DC MUST be specified via {@link MdcTopologyValidator#setPrimaryDatacenter} in case of even DC count.
+ * When primary datacenter is specified Topology Validator keeps cluster write accessed while primary DC is visible,
+ * otherwise DC majority check is used.
+ * */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {

Review Comment:
   I suggest to initialize validator in constructor instead of providing setters.
   
   With setters user is able to create an empty validator, start cluster and get NPE on `validate` call because all fields are just nulls.
   
   I think we should protect users from such configuration errors.
   
   Does it make sense to you?



##########
modules/core/src/main/java/org/apache/ignite/topology/MdcTopologyValidator.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.topology;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.TopologyValidator;
+import org.apache.ignite.lang.IgniteExperimental;
+
+/**
+ * Multi-Datacenter topology validator.
+ * Performs data protection in case of DC failure.
+ * Covered DCs MUST be specified via {@link MdcTopologyValidator#setDatacenters}
+ * and primary DC MUST be specified via {@link MdcTopologyValidator#setPrimaryDatacenter} in case of even DC count.
+ * When primary datacenter is specified Topology Validator keeps cluster write accessed while primary DC is visible,
+ * otherwise DC majority check is used.
+ * */
+@IgniteExperimental
+public class MdcTopologyValidator implements TopologyValidator {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** */
+    private List<String> dcs;
+
+    /** */
+    private String primDc;
+
+    /** @param datacenters Datacenters.*/
+    public void setDatacenters(List<String> datacenters) {
+        if (primDc != null && datacenters.size() % 2 == 1)
+            throw new IllegalArgumentException("Datacenters count must be even when primary datacenter is set.");
+
+        dcs = datacenters;
+    }
+
+    /** @param primaryDatacenter Primary datacenter.*/
+    public void setPrimaryDatacenter(String primaryDatacenter) {

Review Comment:
   Lets rename `primaryDatacenter` to `mainDatacenter` to not overload term `primary`.



-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3451066076

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3455633464

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3443881127

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3472025478

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "anton-vinogradov (via GitHub)" <gi...@apache.org>.
anton-vinogradov merged PR #12442:
URL: https://github.com/apache/ignite/pull/12442


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3461227399

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3422988544

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3437639292

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3462198606

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3450944591

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3436742522

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3437716194

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


-- 
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-26334 Implement a TopologyValidator based on DataCenterId [ignite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12442:
URL: https://github.com/apache/ignite/pull/12442#issuecomment-3442945363

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_ignite&pullRequest=12442&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_ignite&pullRequest=12442&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_ignite&pullRequest=12442&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12442)
   
   


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