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 2021/11/24 06:38:00 UTC

[jira] [Commented] (IMPALA-10502) delayed 'Invalidated objects in cache' cause 'Table already exists'

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

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

Commit cc6f6d5c91ba1db3fca83c65f7d2f87c98077025 in impala's branch refs/heads/master from Vihang Karajgaonkar
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=cc6f6d5 ]

IMPALA-11028: Table loading can fail when events are cleaned up

IMPALA-10502 introduces a createEventId field of a table which
is updated when Impala creates a table. This is used by
the events processor to determine if the subsequent CREATE_TABLE
event which is received should be skipped or not.

When the table is loaded for the first time, in order to avoid
race conditions, TableLoader updates the createEventId to the
last CREATE_TABLE event id from the metastore. In order to
fetch the latest CREATE_TABLE event id, it fetches all the
events from metastore since the last known createEventId of the
table. However, if there is a significant delay between
(more than 24hrs) between the time a table is created
or invalidated, and the table is queried, it is possible that
the metastore cleanup thread deletes the events which are generated
since the table's createEventId. In such a case, the HMS Client method
getNextNotification() throws an IllegalStateException due to the missing
events. This exception causes the Table load to fail and query to error
out.

The fix is to not rely on the HMS Client method which throws the
IllegalStateException. Instead we use the backing thrift API directly.

Testing:
1. Introduced a custom cluster test which can reproduce this issue.
2. Test works after the patch.
3. Core tests.

Change-Id: I95e5e20e1a2086688a92abdfb28e89177e996a1a
Reviewed-on: http://gerrit.cloudera.org:8080/18038
Reviewed-by: Vihang Karajgaonkar <vi...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> delayed 'Invalidated objects in cache' cause 'Table already exists'
> -------------------------------------------------------------------
>
>                 Key: IMPALA-10502
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10502
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Catalog, Clients, Frontend
>    Affects Versions: Impala 3.4.0
>            Reporter: Adriano
>            Assignee: Vihang Karajgaonkar
>            Priority: Critical
>             Fix For: Impala 4.1.0
>
>
> In fast paced environment where the interval between the step 1 and 2 is # < 100ms (a simplified pipeline looks like):
> 0- catalog 'on demand' in use and disableHmsSync (enabled or disabled: no difference)
> 1- open session to coord A -> DROP TABLE X -> close session
> 2- open session to coord A -> CREATE TABLE X-> close session
> Results: the step -2- can fail with table already exist.
> During the internal investigation was discovered that IMPALA-9913 will regress the issue in almost all scenarios.
> However considering that the investigation are internally ongoing it is nice to have the event tracked also here.
> Once we are sure that IMPALA-9913 fix these events we can close this as duplicate, in alternative carry on the investigation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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