Re: [PR] Move IoTConsensus multi-data-dir region migration ITs to commit suite [iotdb]

2026-07-06 Thread via GitHub


jt2594838 merged PR #18081:
URL: https://github.com/apache/iotdb/pull/18081


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] Move IoTConsensus multi-data-dir region migration ITs to commit suite [iotdb]

2026-07-05 Thread via GitHub


hongzhi-gao commented on code in PR #18081:
URL: https://github.com/apache/iotdb/pull/18081#discussion_r3526103711


##
integration-test/src/test/java/org/apache/iotdb/confignode/it/regionmigration/pass/commit/IoTDBMigrateMultiRegionForIoTV1IT.java:
##
@@ -170,6 +176,71 @@ public void multiRegionMigrateTest() throws Exception {
 }
   }
 
+  private Map> ensureDataNodeHostsMultipleRegions(
+  Statement statement,
+  SyncConfigNodeIServiceClient client,
+  Map> regionMap)
+  throws Exception {
+if (hasDataNodeHostingMultipleRegions(regionMap)) {
+  return regionMap;
+}
+List regionIds = new ArrayList<>(regionMap.keySet());
+Assert.assertTrue("Need at least two regions to colocate", 
regionIds.size() >= 2);
+
+int firstRegion = regionIds.get(0);
+int secondRegion = regionIds.get(1);
+int targetDataNode = regionMap.get(secondRegion).iterator().next();
+if (regionMap.get(firstRegion).contains(targetDataNode)) {
+  targetDataNode = regionMap.get(firstRegion).iterator().next();
+  regionGroupExpand(statement, client, secondRegion, targetDataNode);

Review Comment:
   We pick Region2's DataNode, then check if Region1 is already there. If not, 
extend Region1 to that node (the usual case); if yes, extend Region2 instead. 
With RF=1, the latter is defensive — colocated regions return early.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[PR] Move IoTConsensus multi-data-dir region migration ITs to commit suite [iotdb]

2026-07-01 Thread via GitHub


hongzhi-gao opened a new pull request, #18081:
URL: https://github.com/apache/iotdb/pull/18081

   ## Description
   
   ### Content1
   Move IoTConsensus multi-data-dir region migration ITs from 
`pass/daily/iotv1` to `pass/commit`, updating package names and static imports 
so they run in the commit CI suite instead of daily.
   
   
   
   This PR has:
   - [x] been self-reviewed.
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods.
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for code coverage.
   - [x] added integration tests.
   - [x] been tested in a test IoTDB cluster.
   
   
   
   # Key changed/added classes (or packages if there are too many classes) 
in this PR
   
   `org.apache.iotdb.confignode.it.regionmigration.pass.commit` (3 IT classes 
moved from `pass.daily.iotv1`)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]