You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Caideyipi (via GitHub)" <gi...@apache.org> on 2026/07/29 09:38:09 UTC

[PR] Subscription: preserve topic updates during owner transfer [iotdb]

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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Subscription: preserve topic updates during owner transfer [iotdb]

Posted by "Caideyipi (via GitHub)" <gi...@apache.org>.
Caideyipi commented on PR #18353:
URL: https://github.com/apache/iotdb/pull/18353#issuecomment-5128336670

   Checked the other same-topic concurrency paths. I found and fixed two related windows: concurrent partial ALTER TOPIC requests could both build from one stale snapshot and overwrite each other, and overlapping owner transfers could share the renewal-block entry and unblock it too early. Commit 22c743be85a now serializes client alterations per topic (different topics remain concurrent) and rebases the attribute delta after the procedure acquires the subscription lock. The new persisted procedure variant keeps the old embedded serialization format compatible. Added lock, rebase, and serialization coverage; the focused ConfigNode tests pass (11/11).


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Subscription: preserve topic updates during owner transfer [iotdb]

Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 merged PR #18353:
URL: https://github.com/apache/iotdb/pull/18353


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org