You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "AsyncKurisu (via GitHub)" <gi...@apache.org> on 2026/03/26 09:09:16 UTC

[PR] Fix: modify the logic error of EventChangedType in EtcdRepository.java [shardingsphere]

AsyncKurisu opened a new pull request, #38561:
URL: https://github.com/apache/shardingsphere/pull/38561

   Fixes #33134 
   
   Problem Description:
   The incorrect event type determined in getEventChangedType() is propagated into the DataChangedEvent object. Since subsequent metadata refresh logic relies entirely on event.getType(), the misclassified type leads to incorrect execution paths in both onChange() and handle(). As a result, a DELETE event may be processed as an ADD event, preventing the expected metadata removal and causing metadata refresh inconsistencies.
   
   Changes proposed in this pull request:
     - modify the logic for checking when version=1 in getEventChangedType in EtcdRepository.java
     - add test functions for verifying the correctness of the WatchEvent.EventType
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   - [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [PR] Fix: modify the logic error of EventChangedType in EtcdRepository.java [shardingsphere]

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


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


Re: [PR] Fix: modify the logic error of EventChangedType in EtcdRepository.java [shardingsphere]

Posted by "AsyncKurisu (via GitHub)" <gi...@apache.org>.
AsyncKurisu commented on PR #38561:
URL: https://github.com/apache/shardingsphere/pull/38561#issuecomment-4140399812

   @terrymanu Can you please review this pr?
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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