Caideyipi opened a new pull request, #18353:
URL: https://github.com/apache/iotdb/pull/18353

   ## Description
   
   ### Problem
   
   An owner-transfer request built its full updated `TopicMeta` before waiting 
for the previous owner's lease to expire. While that request was waiting, 
another `ALTER TOPIC` could update attributes such as `column-filter`. A 
delayed or retried owner-transfer request would then submit its pre-wait 
snapshot and restore the old attributes.
   
   ### Fix
   
   - Keep the pre-wait snapshots only for deciding whether an owner lease drain 
is required.
   - After the lease wait completes, rebuild the altered metadata from the 
latest `TopicMeta` and merge only the attributes from the owner-transfer 
request.
   - Extract the lease wait into a package-private method so the race can be 
reproduced deterministically without a real 60-second wait.
   
   ### Validation
   
   - `mvn spotless:apply -pl iotdb-core/confignode`
   - `mvn -pl iotdb-core/confignode -am -Dtest=SubscriptionCoordinatorTest 
-Dsurefire.failIfNoSpecifiedTests=false test`
     - Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
     - Reactor build, Checkstyle, and Spotless succeeded.
   - A local run of `IoTDBConsensusSubscriptionColumnFilterClusterIT` was 
skipped during cluster setup because the local template contained mixed 
DataNode classes (`NoSuchMethodError: IoTDBConfig.isEnableWhiteList()`), before 
the test body ran.
   
   This PR has:
   - [x] been self-reviewed.
       - [x] concurrent write
   - [x] added comments explaining the why and intent of the code.
   - [x] added unit tests covering the new code path.
   
   <hr>
   
   ##### Key changed/added classes
   
   - `SubscriptionCoordinator`
   - `SubscriptionCoordinatorTest`


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