Joe McDonnell has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/19929 )

Change subject: IMPALA-12154: Trim recency list appropriately for LIRS 
ToUninitialize()
......................................................................

IMPALA-12154: Trim recency list appropriately for LIRS ToUninitialize()

The LIRS implementation relies on the invariant that the
last entry on the recency list is PROTECTED. This is not
being enforced properly when the code removes an entry
from the recency list in ToUninitialized(). This comes
up when an entry is erased or when a protected element
is overwritten.

This modifies ToUninitialized() to call TrimRecencyList()
when removing the last entry on the recency list. To
avoid recursion, it avoids this logic when TrimRecencyList()
itself is calling ToUninitialized().

Tests:
 - Added a unit tests for erasing/overwriting the last entry
   on the recency list

Change-Id: I83298e0a042174a09f0144aa336b2eb2b28bfee8
Reviewed-on: http://gerrit.cloudera.org:8080/19929
Reviewed-by: Joe McDonnell <[email protected]>
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Michael Smith <[email protected]>
---
M be/src/util/cache/lirs-cache-test.cc
M be/src/util/cache/lirs-cache.cc
2 files changed, 123 insertions(+), 8 deletions(-)

Approvals:
  Joe McDonnell: Looks good to me, but someone else must approve
  Michael Smith: Looks good to me, approved; Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I83298e0a042174a09f0144aa336b2eb2b28bfee8
Gerrit-Change-Number: 19929
Gerrit-PatchSet: 5
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>

Reply via email to