Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/22132 )

Change subject: KUDU-613: Don't modify refs when moving entries
......................................................................

KUDU-613: Don't modify refs when moving entries

The current implementation of the SLRU cache temporarily
changes the reference count of entries when moving between
segments of the cache (either during an upgrade or downgrade).
A temporary decrement of the handle's ref count can cause a
concurrent Release call to the entry to think it's the last
reference to the entry and free it when it shouldn't be.

This patch changes this behavior by not modifying the ref
count of entries when moving between segments. A reproduction
scenario to trigger the concurrency error is added to cache-bench.

The existing behavior is to update the mem tracker when moving
entries between segments but that's not necessary. This patch
changes that behavior by not updating the mem tracker for
entries moving between segments.

Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Reviewed-on: http://gerrit.cloudera.org:8080/22132
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/util/cache-bench.cc
M src/kudu/util/slru_cache.cc
M src/kudu/util/slru_cache.h
3 files changed, 111 insertions(+), 86 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Kudu Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/22132
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I643907612d43eba2c5f8dbc19d2f74f88bbca869
Gerrit-Change-Number: 22132
Gerrit-PatchSet: 6
Gerrit-Owner: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Mahesh Reddy <[email protected]>

Reply via email to