Jibing-Li opened a new pull request #8557:
URL: https://github.com/apache/incubator-doris/pull/8557


   Replace null with empty String in master proxy result set. This is to fix 
NPE when the master proxy result set contains a null item. The NPE could cause 
the thrift server crash and fail to send the result back to the client which is 
a follower or an observer fe.
   
   ## Problem Summary:
   
   Suppose we have 3 follower FEs, say A, B and C and A is currently the 
master. If B becomes the master after A crashes, we will get error:
   ERROR 1105 (HY000): TTransportException, msg: Socket is closed by peer.
   which is caused by the thrift server side NPE (ResultSet couldn't contain 
null):
   2022-03-21 15:55:13 ERROR TThreadPoolServer:321 - Error occurred during 
processing of message.
   java.lang.NullPointerException
        at 
org.apache.thrift.protocol.TBinaryProtocol.writeString(TBinaryProtocol.java:225)
        at 
org.apache.doris.thrift.TShowResultSet$TShowResultSetStandardScheme.write(TShowResultSet.java:488)
        at 
org.apache.doris.thrift.TShowResultSet$TShowResultSetStandardScheme.write(TShowResultSet.java:409)
        at org.apache.doris.thrift.TShowResultSet.write(TShowResultSet.java:346)
        at 
org.apache.doris.thrift.TMasterOpResult$TMasterOpResultStandardScheme.write(TMasterOpResult.java:637)
        at 
org.apache.doris.thrift.TMasterOpResult$TMasterOpResultStandardScheme.write(TMasterOpResult.java:562)
        at 
org.apache.doris.thrift.TMasterOpResult.write(TMasterOpResult.java:480)
        at 
org.apache.doris.thrift.FrontendService$forward_result$forward_resultStandardScheme.write(FrontendService.java:14456)
        at 
org.apache.doris.thrift.FrontendService$forward_result$forward_resultStandardScheme.write(FrontendService.java:14418)
        at 
org.apache.doris.thrift.FrontendService$forward_result.write(FrontendService.java:14369)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:58)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38)
        at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:313)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: No
   2. Has unit tests been added: No Need
   3. Has document been added or modified: No Need
   4. Does it need to update dependencies: No
   5. Are there any changes that cannot be rolled back: No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to