Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-12591

Consider using getTableIfCached() in Analyzer#dbContainsTable()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • ghx-label-7

    Description

      In the review of IMPALA-11501, fangyurao found REFRESH <table> would trigger metadata loading in local catalog mode:
      https://gerrit.cloudera.org/c/20742/1/tests/authorization/test_ranger.py#1610

      The cause is db.getTable() is called in Analyzer#dbContainsTable():
      https://github.com/apache/impala/blob/4c762725c707f8d150fe250c03faf486008702d4/fe/src/main/java/org/apache/impala/analysis/Analyzer.java#L3847
      In local catalog mode, coordinator will load the table metadata for db.getTable(). If callers just want to check existence of a table, they should use db.getTableIfCached() instead (added in IMPALA-8606).

      This JIRA is to examine the usages of Analyzer#dbContainsTable() and see if we can use getTableIfCached() in it. Note that some comments point out that getTable() is unwanted:
      https://github.com/apache/impala/blob/4c762725c707f8d150fe250c03faf486008702d4/fe/src/main/java/org/apache/impala/analysis/ResetMetadataStmt.java#L162C1-L165C91

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stigahuang Quanlong Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: