Caideyipi opened a new pull request, #19135: URL: https://github.com/apache/iotdb/pull/19135
## Description During region migration, the replica set can be updated before the cached leader changes. If the cached leader is no longer a replica, getLeaderDataNodeRegionGroupMap() leaves the selected location null and sends schema procedure work through an invalid destination. Default to the first current replica, then prefer the cached leader when it belongs to the replica set. The existing fallback for an unknown leader remains unchanged. Add a deterministic unit test covering missing, unknown, removed, and valid leaders. Add a table metadata integration test that migrates a single-replica Ratis SchemaRegion after appending a TAG column, then verifies NULL, empty, and nonempty device keys, long-lived sessions, updates, deletion, and retained rows. ## Validation - Clean source build of affected modules and the integration-test dependency closure with JDK 17. - DataNodeRegionGroupUtilTest: 1 test passed; the removed-leader case fails on the unmodified base because its destination is null. - IoTDBTableTagSchemaMigrationIT: 1 test passed in a 1-ConfigNode, 2-DataNode cluster. The unmodified-base IT also passed in this run; the unit test deterministically covers the stale-leader window. - Spotless and Checkstyle passed. Initial independent review is pending; this PR is intentionally a draft. -- 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]
