David Ribeiro Alves has submitted this change and it was merged. Change subject: Add integration tests for replay cache with writes ......................................................................
Add integration tests for replay cache with writes This adds a couple of new integration tests for replay cache with writes. Both tests start multiple threads writing, independently, to tablet servers simulaneously. The tests leverage the fact that followers are also able to answer requests, once they are cached, and stores all responses, which are compared at the end of the test. Some of the requests (1/3) are "empty" writes, so that we stress the serialization point in transaction_driver.cc without relying on row lock serialization. This adds two different tests, one that stresses a lot of elections and one that crashes nodes. This is inline with other tests we already had in raft_consensus-itest. This also adds a new fault injection point right after the leader sends a request. We currently have one right _before_ the leader sends a request, but having one for after the request is sent encourages stressing the path where a newly elected leader as both incoming client request and ongoing replica transactions, which can possibly race with each other if they correspond to the same write. Finally this changes attempt_no in RequestIdPB to be an int64 instead of just an int. While an int is more than enough in normal operation, the new test generates many more attempts and we need a bigger number to make sure all attempt numbers are unique. I looped this about 1000 times, without related failures. Change-Id: I35722eb1c83f97e886cfe9d6b03ed95bcd62429f Reviewed-on: http://gerrit.cloudera.org:8080/3519 Reviewed-by: Mike Percy <mpe...@apache.org> Tested-by: Kudu Jenkins --- M src/kudu/consensus/consensus_peers.cc M src/kudu/integration-tests/CMakeLists.txt A src/kudu/integration-tests/exactly_once_writes-itest.cc M src/kudu/integration-tests/raft_consensus-itest.cc M src/kudu/integration-tests/ts_itest-base.h M src/kudu/rpc/rpc_header.proto 6 files changed, 326 insertions(+), 33 deletions(-) Approvals: Mike Percy: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/3519 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35722eb1c83f97e886cfe9d6b03ed95bcd62429f Gerrit-PatchSet: 35 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: David Ribeiro Alves <dral...@apache.org> Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Todd Lipcon <t...@apache.org>