Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5634

Use 'phoenix.default.update.cache.frequency' from connection properties at query time

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.15.0, 5.1.0
    • 5.1.0, 4.15.1, 4.16.0
    • None
    • None

    Description

      We have the config 'phoenix.default.update.cache.frequency' which specifies the time a client should wait before it refreshes its metadata cache entry for a table by fetching the latest metadata from system catalog. This value could be set for a table in the following ways (in the following preference order):

      1. Specifying UPDATE_CACHE_FREQUENCY in table creation DDL
      2. Specifying the connection property 'phoenix.default.update.cache.frequency'
      3. Using the default 'phoenix.default.update.cache.frequency'

      At query time, we look at whether UPDATE_CACHE_FREQUENCY was specified for the table and decide based on that value if the latest metadata for a table should be fetched from system catalog to update the cache. However, when the table doesn't have UPDATE_CACHE_FREQUENCY specified we should look at the connection property 'phoenix.default.update.cache.frequency' (or the default 'phoenix.default.update.cache.frequency' when the connection level property is not set) to make that decision. The support for latter is missing - this Jira is intended to add that.

      This will aid exiting installations where the tables were created without a specified UPDATE_CACHE_FREQUENCY, and thus always hit the system catalog to get the latest metadata when referenced. With this support, we will be able to reduce the load on system catalog by specifying a connection level property for all tables referenced from the connection (as against UPSERTing each table entry in system catalog to set an UPDATE_CACHE_FREQUENCY value).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ntshmah Nitesh Maheshwari
            ntshmah Nitesh Maheshwari
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h 10m
                4h 10m

                Slack

                  Issue deployment