runzhiwang commented on pull request #237: URL: https://github.com/apache/incubator-ratis/pull/237#issuecomment-718429329
@szetszwo Could you help review this ? It's only a draft, I'm not sure whether my thought is right, so I have not add unit test, and the code is also rough. I change the origin design, please correct me if I am wrong. 1. Primary server no need to send close-stream to other servers to check whether other servers have received all the data, because primary server can check the STREAM_DATA reply from other servers to check whether other servers have received all the data. 2. Do not use start-transaction, when primary server receive close stream and make sure other servers have received all the data, primary server will submit RaftClientRequest to itself directly, if NotLeaderException happens, primary server will send close-stream to the suggested leader, the suggested leader will submit RaftClientRequest to itself. 3. Get RaftClientRequest from DataStream. 4. Encode the RaftClientReply into DataStreamReply#buffer Origin design: client —(close-stream)—> primary server —(close-stream)—> other servers primary server <—(ack-close-stream)— other servers primary server —(start-transaction)—> other servers client <—(RaftClientReply)— primary server <—(RaftClientReply)— leader ---------------------------------------------------------------- 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: [email protected]
