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

Support multi region SYSTEM.CATALOG table

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.15.0, 5.1.0
    • None
    • None

    Description

      Currently Phoenix requires that the SYSTEM.CATALOG table is single region based on the server-side row locks being held for operations that impact a table and all of it's views. For example, adding/removing a column from a base table pushes this change to all views.

      As an alternative to making the SYSTEM.CATALOG transactional (PHOENIX-2431), when a new table is created we can do a lazy cleanup of any rows that may be left over from a failed DDL call (kudos to lhofhansl for coming up with this idea). To implement this efficiently, we'd need to also do PHOENIX-2051 so that we can efficiently find derived views.

      The implementation would rely on an optimistic concurrency model based on checking our sequence numbers for each table/view before/after updating. Each table/view row would be individually locked for their change (metadata for a view or table cannot span regions due to our split policy), with the sequence number being incremented under lock and then returned to the client.

      Attachments

        1. PHOENIX-3534.patch
          869 kB
          Thomas D'Silva
        2. PHOENIX-3534-v2.patch
          881 kB
          Hadoop QA
        3. PHOENIX-3534-v3.patch
          886 kB
          Thomas D'Silva

        Issue Links

          1.
          Changing a base table property value should be reflected in child views (if the property wasn't changed) Sub-task Closed Chinmay Kulkarni  
          2.
          Cleanup metadata of child views for a base table that has been dropped Sub-task Closed Kadir OZDEMIR

          100%

          Original Estimate - Not Specified Original Estimate - Not Specified
          Time Spent - 10m
          3.
          Add client and server side config property to enable rollback of splittable System Catalog if required Sub-task Closed Thomas D'Silva  
          4.
          Create client side config to stop sending parent metadata while creating child views Sub-task Resolved Unassigned  
          5.
          Remove code in MetadataEndpointImpl.createTable that removes parent table column metadata Sub-task Resolved Unassigned  
          6.
          Update encoded col qualifiers on the base table correctly Sub-task Closed Thomas D'Silva  
          7.
          Write cells using checkAndMutate to prevent conflicting changes Sub-task Closed Thomas D'Silva  
          8.
          Send parent->child link mutations to SYSTEM.CHILD_LINK table in MetdataClient.createTableInternal Sub-task Closed Chinmay Kulkarni

          100%

          Original Estimate - Not Specified Original Estimate - Not Specified
          Time Spent - 50m
          9.
          Continue to write base table column metadata when creating a view in order to support rollback Sub-task Closed Thomas D'Silva  
          10.
          Don't acquire a mutex while dropping a table and while creating a view Sub-task Closed Chinmay Kulkarni  
          11.
          Add tests for salted tables to AlterMultiTenantTableWithViewsIT Sub-task Resolved Unassigned  
          12.
          Move parent column combining logic of view and view indexes from server to client Sub-task Closed Thomas D'Silva

          100%

          Original Estimate - Not Specified Original Estimate - Not Specified
          Time Spent - 3h 10m
          13.
          Move parent index inheriting logic of views to server Sub-task Resolved Unassigned  
          14.
          Move MetaDataEndpointImplTest to integration test Sub-task Closed Thomas D'Silva  
          15.
          Modify MetdataEndpointImpl.processRemoteRegionMutations to run as login user Sub-task Resolved Unassigned  
          16.
          Perform splittable SYSCAT actions on the client only Sub-task Closed Unassigned  
          17.
          While adding a view column make a single RPC to update the encoded column qualifier counter and remove the table from the cache of the physical table Sub-task Open Unassigned  
          18.
          Move check to client side to see if there are any child views that need to be dropped while receating a table/view Sub-task Open Unassigned  
          19.
          When dropping a view, use the PTable for generating delete mutations for links rather than scanning SYSTEM.CATALOG Sub-task Open Unassigned  
          20.
          When dropping a view, send delete mutations for parent->child links from client to server rather than doing server-server RPCs Sub-task Open Unassigned  
          21.
          Create a column attribute IS_EXCLUDED to denote a dropped derived column and remove LinkType.EXCLUDED_COLUMN Sub-task Resolved Unassigned  
          22.
          Move the check for existence of child views and task addition to drop those child views to the client side when dropping a table/view Sub-task Open Unassigned  

          Activity

            People

              tdsilva Thomas D'Silva
              jamestaylor James R. Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              13 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