limowang opened a new issue, #2386:
URL: https://github.com/apache/incubator-pegasus/issues/2386
Description
When a secondary replica has disk issues (IO_ERROR or SPACE_INSUFFICIENT),
the primary correctly
rejects write requests. However, the Java client receives a misleading
error message: "The request
maybe too large!" instead of the actual disk error.
Root Cause
Bug 1: C++ returns ERR_OK when secondary disk is abnormal
Location: src/replica/replica_2pc.cpp:184-188
if (FLAGS_reject_write_when_disk_insufficient &&
(_dir_node->status != disk_status::NORMAL ||
_primary_states.secondary_disk_abnormal())) {
response_client_write(request,
disk_status_to_error_code(_dir_node->status));
// BUG: When secondary is abnormal but primary is NORMAL, this returns
ERR_OK!
return;
}
Bug 2: Java maps empty response to ERR_INVALID_DATA
Location:
java-client/src/main/java/org/apache/pegasus/rpc/async/ThriftFrameDecoder.java:70-81
When C++ returns ERR_OK with no response body (write was rejected), Java's
recv_data() throws
TException, which gets incorrectly mapped to ERR_INVALID_DATA.
--
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]