Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16857 )
Change subject: IMPALA-10391: Fix LIRS edge case for single unprotected entry ...................................................................... IMPALA-10391: Fix LIRS edge case for single unprotected entry When an unprotected entry is not in the recency list, a lookup will cause it to be moved to be the newest entry in the unprotected list. The fix for IMPALA-10127 introduced a regression when this happens when there is exactly on entry in the unprotected list. The code currently calls RemoveFromUnprotectedList() followed by AddToUnprotectedList(). This now fails because it is doing these operations without manipulating the num_unprotected_ count. RemoveFromUnprotectedList() clears out unprotected_list_front_, because num_unprotected_ is 1. However, AddToUnprotectedList() does not set it back, because it only does that if num_unprotected_ is 0, and the count is not changing. This skips the remove/add in this case if there is exactly one unprotected entry in the list. Testing: - Added a backend test for this specific case and verfied that it failed before the fix and passes now Change-Id: I8d21b619811a1a7baab1a92790f2ffc03e949131 Reviewed-on: http://gerrit.cloudera.org:8080/16857 Reviewed-by: Joe McDonnell <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M be/src/util/cache/lirs-cache-test.cc M be/src/util/cache/lirs-cache.cc 2 files changed, 44 insertions(+), 2 deletions(-) Approvals: Joe McDonnell: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/16857 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8d21b619811a1a7baab1a92790f2ffc03e949131 Gerrit-Change-Number: 16857 Gerrit-PatchSet: 4 Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
