Alexey Serbin created KUDU-1698:
-----------------------------------

             Summary: Kudu C++ client: add a new unit test to make sure 
default_rpc_timeout and session timeout are separate entities
                 Key: KUDU-1698
                 URL: https://issues.apache.org/jira/browse/KUDU-1698
             Project: Kudu
          Issue Type: Task
            Reporter: Alexey Serbin
            Assignee: Alexey Serbin
            Priority: Minor


We need a new unit test that makes sure there is a difference between top-level 
operation timeout and per-call RPC timeout in Kudu C++ client library.  Prior 
to change introduced in 5195ce573850653e0e53094cdd35a1da93d33444 it was the 
same (which was a bug).

The test should:
* set  per-call RPC timeout when creating KuduClient object
* set KuduSession::SetTimeoutMillis() for the target session: the value should 
be 2 times of per-call RPC timeout or such.
* create a tablet with replication factor of 2 at least.
* find current tablet replica leader and pause it (send SIGSTOP)
* make a write into the table
* make sure the write operation was successful

Prior to change introduced in 5195ce573850653e0e53094cdd35a1da93d33444 such a 
test would fail because the C++ client used the full operation deadline on 
every RPC call.

I.e., it would wait till the call to current leader times out, and that would 
consume time budget of the whole operation.  Once RPC timeout is less thatn the 
timeout for the whole write operation, the call to the frozen tablet server 
should timeout, and the client should re-discover a new tablet replicate leader 
and complete the write operation successfully.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to