Murilo Giacometti Rocha created HBASE-25108:
-----------------------------------------------
Summary: checkAndPut (or checkAndMutate) might return false when
the row is mutated successfully
Key: HBASE-25108
URL: https://issues.apache.org/jira/browse/HBASE-25108
Project: HBase
Issue Type: Bug
Affects Versions: 1.2.11, 2.1.0
Reporter: Murilo Giacometti Rocha
In the client, when the MutateRequest times out, we retry the operation in
org.apache.hadoop.hbase.client.RpcRetryingCallerImpl#callWithRetries. If the
server received the request but the client failed to get a response, the server
returns processed=falseĀ because the value is already there. So the value false
is returned, even though the checkAndPut was successful.
In 2.1.0, I could only reproduce it three times by accident, but it always
happened in 1.2.11. In 2.1.0, I could only reproduce it systematically by
cleaning the response with the debugger before it got to the client.
Repro steps
* Create a breakpoint in the exception in
org.apache.hadoop.hbase.client.RpcRetryingCallerImpl#callWithRetries to make
sure we get the exception and retry.
* Create an infinite loop to create different rows with checkAndPut.
* Start running with the disabled breakpoints.
* Enable the breakpoint.
* Pause all threads and verify that we are waiting for a response in the IPC
thread. Wait for 1-2 minutes. This will cause a timeout.
* Continue and verify that an exception is triggered.
* Add a breakpoint to verify the response.
* Continue and check the response and the returned value.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)