You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesatee.apache.org by GitBox <gi...@apache.org> on 2019/11/23 00:50:59 UTC

[GitHub] [incubator-mesatee] m4sterchain opened a new issue #85: Improve error handling logic in current RPC.

m4sterchain opened a new issue #85: Improve error handling logic in current RPC.
URL: https://github.com/apache/incubator-mesatee/issues/85
 
 
   In the existing RPC [serve loop](https://github.com/apache/incubator-mesatee/blob/008f6dd685c17a1280011a53442f04cc49feef30/mesatee_core/src/rpc/mod.rs#L57), we didn't handle the error in the following cases,
   1. receive_vec failed
   2. request serialization  failed
   3. handle_invoke returned an error
   4. response deserialization failed
   5. send_vec failed
   
   Case 1 and 5 are related to io error, under these circumstances, the communication channel is broken, we cannot inform the client about errors. We can wrap the internal error with MesaTEE::RPCError, and log the error on the server side in `handle_ecall` functions before discarding the error.
   
   Case 2 and 4 are related to request/response data format error, we can inform client the error info and exit the loop gracefully.
   
   Case 3 is related to "business logic error", we can introduce a new response type in the service proto file to represent this information, instead of treating it as an actual Err(). 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mesatee.apache.org
For additional commands, e-mail: dev-help@mesatee.apache.org