Todd Lipcon has submitted this change and it was merged.

Change subject: Add time/watermark based garbage collection to ResultTracker

Add time/watermark based garbage collection to ResultTracker

This adds time and watermark based garbage collection to the
ResultTracker.  Regarding time GC, there are two ttl's, a client ttl and
a response ttl.

After the response ttl has elapsed, we garbage collect responses
but the ResultTracker remembers that it doesn't know them, so if
the client retries a request older than that it gets a meaningful
error back, stating that the request is stale.

After the client ttl period without hearing back from a client,
we GC the client state entirely, meaning all requests from that
client will be treated as new.

Regarding watermark GC the algorithm is simple, we trust the client to
tell us what's its lowest incomplete sequence number and we GC
everything below that.

This adds a simple test that makes sure this basically works, and adds a
multithreaded test that runs GC at the same time as writes.

NOTE: this does not wire the time-based garbage collection process into
the server itself -- it's currently only triggered by the included

Original patch by David.
Some changes by Todd.

Change-Id: I2c8e7b7191ca14842a31b64813ed498bdf626fa8
Reviewed-by: Adar Dembo <>
Tested-by: Todd Lipcon <>
M src/kudu/integration-tests/
M src/kudu/rpc/CMakeLists.txt
A src/kudu/rpc/
M src/kudu/rpc/
M src/kudu/rpc/result_tracker.h
M src/kudu/rpc/retriable_rpc.h
D src/kudu/rpc/
M src/kudu/rpc/rpc_header.proto
M src/kudu/rpc/
M src/kudu/tablet/
M src/kudu/tablet/transactions/
11 files changed, 797 insertions(+), 428 deletions(-)

  Adar Dembo: Looks good to me, approved
  Todd Lipcon: Verified

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c8e7b7191ca14842a31b64813ed498bdf626fa8
Gerrit-PatchSet: 19
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <>
Gerrit-Reviewer: Adar Dembo <>
Gerrit-Reviewer: Alexey Serbin <>
Gerrit-Reviewer: Dan Burkert <>
Gerrit-Reviewer: David Ribeiro Alves <>
Gerrit-Reviewer: Jean-Daniel Cryans <>
Gerrit-Reviewer: Todd Lipcon <>

Reply via email to