You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/01/29 14:56:49 UTC

[GitHub] [dolphinscheduler] krystalics opened a new issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

krystalics opened a new issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   env:
   macos monterey 12.0.1
   java version 1.8.0_241
   ---
   when I add a method in org.apache.dolphinscheduler.rpc.IUserService and implement in UserService
   ```java
   public interface IUserService {
   
       @Rpc(async = true, serviceCallback = UserCallback.class)
       Boolean say(String s);
   
       Integer hi(int num);
   
       @Rpc(async = true)
       Boolean callBackIsFalse(String s);
   
       //the method i add
       @Rpc(async = true, serviceCallback = UserCallback.class)
       String returnType(String type);
   }
   ```
   in test, it happend a error
   ![image](https://user-images.githubusercontent.com/22393849/151664834-f44e96b8-b4f4-4736-b5e8-c0c868fe1903.png)
   
   
   
   ### What you expected to happen
   
   it should be success no matter what type the method return !
   the bug is because the dynamic proxy mechanism.When it calls a asynchronous rpc method,it should return a null value firstly,and wait for the really response to callback.
   in this module,it wirte the true to result,which only suitable for Boolean return type. 
   org.apache.dolphinscheduler.rpc.client.ConsumerInterceptor::intercept()
   ```java
   //...other code
   while (retries-- > 0) {
       RpcResponse rsp;
       rsp = nettyClient.sendMsg(host, protocol, async);
       //success
       if (null != rsp && rsp.getStatus() == 0) {
           return rsp.getResult();
       }
   }
   //...other code
   ```
   org.apache.dolphinscheduler.rpc.remote.NettyClient::sendMsg()
   ```java
   if (Boolean.TRUE.equals(async)) {
         result = new RpcResponse();
         result.setStatus((byte) 0);
         result.setResult(true);
         return result;
   }
   ```
   
   the intercept()'s result should be the type of method return. but the code is always 'true' , so it happens the error: string can't be cast to boolean 
   
   ### How to reproduce
   
   just add a test method which return type is not Boolean in IUserService.
   
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] ruanwenjun commented on issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262#issuecomment-1024927567


   Right now, the rpc module is not used, I not sure do we need to maintain this. @caishunfeng 


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262#issuecomment-1024926734


   Hi:
   * Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/en-us/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262#issuecomment-1056001959


   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] ruanwenjun commented on issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262#issuecomment-1025049459


   > > Right now, the rpc module is not used, I not sure do we need to maintain this. @caishunfeng
   > 
   > How do you think?
   
   It's good to introduce an RPC framework to replace the current communication mechanisms. But suggest using the existing RPC framework like GRPC or others, we would better not develop a new RPC framework, unless someone is willing to maintain this.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] caishunfeng commented on issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
caishunfeng commented on issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262#issuecomment-1025048931


   
   
   
   > Right now, the rpc module is not used, I not sure do we need to maintain this. @caishunfeng
   
   I think the RPC part can be used for lightweight protocols or cross-language support, so we should keep it although it is not yet perfect.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262#issuecomment-1063512764


   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] dailidong commented on issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
dailidong commented on issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262#issuecomment-1024932601


   > Right now, the rpc module is not used, I not sure do we need to maintain this. @caishunfeng
   
   How do you think?


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] github-actions[bot] closed issue #8262: [Bug] [remote-rpc] the asynchronous call's method can't use other return type except Boolean

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #8262:
URL: https://github.com/apache/dolphinscheduler/issues/8262


   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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