Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21761 Support table level replication in Hive
  3. HIVE-21764

REPL DUMP should detect and bootstrap any rename table events where old table was excluded but renamed table is included.



    • Target Version/s:


      REPL DUMP fetches the events from NOTIFICATION_LOG table based on regular expression + inclusion/exclusion list. So, in case of rename table event, the event will be ignored if old table doesn't match the pattern but the new table should be bootstrapped. REPL DUMP should have a mechanism to detect such tables and automatically bootstrap with incremental replication.Also, if renamed table is excluded from replication policy, then need to drop the old table at target as well. 

      There are 4 scenarios that needs to be handled.

      1. Both new name and old name satisfies the table name pattern filter.
        1. No need to do anything. The incremental event for rename should take care of the replication.
      2. Both the names does not satisfy the table name pattern filter.
        1. Both the names are not in the scope of the policy and thus nothing needs to be done.
      3. New name satisfies the pattern but the old name does not.
        1. The table will not be present at the target.
        2. Rename event handler for dump should detect this case and add the new table name to the list of table for bootstrap.
        3. All the events related to the table (new name) should be ignored.
        4. If there is a drop event for the table (with new name), then remove the table from the list of tables to be bootstrapped.
        5. In case of rename (double rename)
          1. If the new name satisfies the table pattern, then add the new name to the list of tables to be bootstrapped and remove the old name from the list of tables to be bootstrapped.
          2. If the new name does not satisfies then just removed the table name from the list of tables to be bootstrapped.
      4. New name does not satisfies the pattern but the old name satisfies.
        1. Change the rename event to a drop event.


        1. HIVE-21764.03.patch
          47 kB
          mahesh kumar behera
        2. HIVE-21764.02.patch
          48 kB
          mahesh kumar behera
        3. HIVE-21764.01.patch
          42 kB
          mahesh kumar behera

          Issue Links



              • Assignee:
                maheshk114 mahesh kumar behera
                sankarh Sankar Hariappan
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created:

                  Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0h
                  Time Spent - 7.5h