d-wang-commit opened a new pull request, #19172:
URL: https://github.com/apache/iotdb/pull/19172

   ## Description
   
   ### Wait for a consistent compression-ratio baseline
   
   Parallel `SHOW REGIONS` queries can observe different stages of heartbeat 
metrics updates after a flush. The pre-migration wait in 
`IoTDBRegionMigrateWithCompressionRatioIT` currently aborts on 
`InconsistentDataException`, such as `[0.05, NaN, NaN]`, before the migration 
is exercised.
   
   Retry this exception within the existing baseline wait, matching the 
handling already used after migration. Keep each poll's ratio local and save 
the baseline only after the result set closes successfully and the value is 
non-NaN. The existing deadline, multi-node comparison, and post-migration 
equality assertion remain unchanged.
   
   ### Tests
   
   - UT: no unit tests added; this change is confined to an existing 
integration test.
   - IT: updated 
`IoTDBRegionMigrateWithCompressionRatioIT#testWithCompressionRatio`. Targeted 
`DailyIT` verification passed with 1 test, 0 failures, 0 errors, and 0 skipped, 
using a 1-ConfigNode/3-DataNode cluster with replication factor 2 and 
IoTConsensus v1 on Windows/JDK 17. The full Linux DailyIT workload was not run 
locally.
   - Additional validation: Spotless passed. Six local scripted checks of the 
actual baseline-wait code passed, including an original-code failure control, 
convergence, persistent mismatch/NaN, SQL exception propagation, and 
stale-baseline rejection. These checks use JDBC test doubles and do not 
constitute additional server ITs.
   
   ### Side effects and risks
   
   This is a test-only change. Transient cross-node mismatches are retried 
within the existing 10-minute deadline; persistent inconsistencies or 
unavailable baseline values still fail the test. Production behavior and the 
migration's compression-ratio tolerance are unchanged.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] been tested in a test IoTDB cluster.
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) 
in this PR
   
   - `IoTDBRegionMigrateWithCompressionRatioIT`: retry transient baseline-query 
inconsistencies and save a baseline only after a successful poll.
   


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

Reply via email to