Hello David Ribeiro Alves,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/5359

to review the following change.

Change subject: KUDU-1622. result_tracker: respond to RPCs outside of the lock
......................................................................

KUDU-1622. result_tracker: respond to RPCs outside of the lock

This patch started with the goal of addressing the flakiness of
ExactlyOnceRpcTest.TestExactlyOnceSemanticsAfterRpcCompleted. The issue
was that the MemTracker updates resulting from an RPC response were
occurring asynchronously after the RPC was responded, and in two
separate increments. Thus, in this test, there was one scenario in which
the test would record a partial update and then in a later assertion not
match the earlier recorded value.

In order to fix this, I ended up at a solution which both fixed the
flakiness and reduced lock contention in ResultTracker. We now respond
to RPCs after we've done the required MemTracker updates, which also
means that we respond to RPCs after dropping the ResultTracker locks.
This has been a high contention point in stress tests, so this is a nice
benefit.

Fixing the flakiness also meant that other 'AssertEventually'
workarounds from this test case could now be removed.

I looped ExactlyOnceRpcTest.TestExactlyOnceSemanticsAfterRpcCompleted
500 times with 4 stress threads and it passed 100% of the time[1]. Prior
to this patch, it would reliably fail at least a couple runs out of
500[2].

I also looped exactly_once_writes-itest 500 times with this patch
with 100% success[3].

[1] http://dist-test.cloudera.org//job?job_id=todd.1480928777.29435
[2] http://dist-test.cloudera.org//job?job_id=todd.1480929041.29742
[3] http://dist-test.cloudera.org//job?job_id=todd.1480929367.31010

Change-Id: I065b9e40bc1af81e0871220a0a01461ea35143b5
---
M src/kudu/rpc/exactly_once_rpc-test.cc
M src/kudu/rpc/result_tracker.cc
2 files changed, 92 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/59/5359/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5359
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I065b9e40bc1af81e0871220a0a01461ea35143b5
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>

Reply via email to