You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "azexcy (via GitHub)" <gi...@apache.org> on 2023/12/19 11:54:17 UTC

[PR] Fix drop streaming failed and improve CDC inventory task thread wait intervals [shardingsphere]

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

   Fixes #29274.
   
   Changes proposed in this pull request:
     - Fix drop streaming failed
     - Adjust CDC thread wait intervals
     - Fixes needSort flag may not equals
   
   ---
   
   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.
   


-- 
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 drop streaming failed and improve CDC inventory task thread wait intervals [shardingsphere]

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on code in PR #29453:
URL: https://github.com/apache/shardingsphere/pull/29453#discussion_r1431352851


##########
proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java:
##########
@@ -218,7 +218,8 @@ private void processStopStreamingRequest(final ChannelHandlerContext ctx, final
     private void processDropStreamingRequest(final ChannelHandlerContext ctx, final CDCRequest request, final CDCConnectionContext connectionContext) {
         DropStreamingRequestBody requestBody = request.getDropStreamingRequestBody();
         checkPrivileges(request.getRequestId(), connectionContext.getCurrentUser().getGrantee(), backendHandler.getDatabaseNameByJobId(requestBody.getStreamingId()));
-        backendHandler.dropStreaming(connectionContext.getJobId());
+        String streamingId = request.getDropStreamingRequestBody().getStreamingId();
+        backendHandler.dropStreaming(streamingId);

Review Comment:
   1, `request.getDropStreamingRequestBody()` could be replace with `requestBody`
   
   2, Could we remove `jobId` in connectionContext?
   
   



-- 
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 drop streaming failed and improve CDC inventory task thread wait intervals [shardingsphere]

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


-- 
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 drop streaming failed and improve CDC inventory task thread wait intervals [shardingsphere]

Posted by "azexcy (via GitHub)" <gi...@apache.org>.
azexcy commented on code in PR #29453:
URL: https://github.com/apache/shardingsphere/pull/29453#discussion_r1431382137


##########
proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java:
##########
@@ -218,7 +218,8 @@ private void processStopStreamingRequest(final ChannelHandlerContext ctx, final
     private void processDropStreamingRequest(final ChannelHandlerContext ctx, final CDCRequest request, final CDCConnectionContext connectionContext) {
         DropStreamingRequestBody requestBody = request.getDropStreamingRequestBody();
         checkPrivileges(request.getRequestId(), connectionContext.getCurrentUser().getGrantee(), backendHandler.getDatabaseNameByJobId(requestBody.getStreamingId()));
-        backendHandler.dropStreaming(connectionContext.getJobId());
+        String streamingId = request.getDropStreamingRequestBody().getStreamingId();
+        backendHandler.dropStreaming(streamingId);

Review Comment:
   2. `jobId` will used at channal inactive, eg. client closed without execute `stop streaming`



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