You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/06/02 22:39:00 UTC

[jira] [Commented] (IMPALA-12154) LIRS cache implementation is missing some locations to trim the recency list

    [ https://issues.apache.org/jira/browse/IMPALA-12154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17728883#comment-17728883 ] 

ASF subversion and git services commented on IMPALA-12154:
----------------------------------------------------------

Commit fe73f584140cc1376418479421ae35c702f69326 in impala's branch refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=fe73f5841 ]

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 <jo...@cloudera.com>
Reviewed-by: Michael Smith <mi...@cloudera.com>
Tested-by: Michael Smith <mi...@cloudera.com>


> LIRS cache implementation is missing some locations to trim the recency list
> ----------------------------------------------------------------------------
>
>                 Key: IMPALA-12154
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12154
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 4.3.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>
> In some testing for IMPALA-10971, I found that some code locations doing ToUninitialized() are not checking and trimming the recency list. In particular, Erase() doesn't check whether the entry being erased is the last entry on the recency list, so it doesn't do the trim appropriately. Also, the instant eviction codepath doesn't check either.
> These are edge cases, but they can result in an assert firing for EnforceProtectedCapacity() or MoveToRecencyListBack().



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org