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

Provide an option to fully rebuild indexes asynchronously through SQL

    XMLWordPrintableJSON

Details

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

    Description

      Currently if we run "ALTER INDEX ... REBUILD" , all the rows in the index are deleted and the index is rebuilt synchronously.

      "ALTER INEX ... REBUILD ASYNC" seems to be used for the IndexTool's partial rebuild option, rebuilding from ASYNC_REBUILD_TIMESTAMP (PHOENIX-2890)

      So it seems currently the only way to fully rebuild is the drop the index, and recreate it.  This is burdensome as it requires have the schema DDL.

      We should have an option to fully rebuild asynchronously, that has the same semantics as dropping and recreating the index.  A further advantage of this is we can maintain the splits of the index table while dropping its data.  We are currently seeing issues where rebuilding a large table via a MR job results in hotspotting due to all data regions writing to the same index region at the start.

       

      Attachments

        1. PHOENIX-4703-4.x.patch
          16 kB
          Gokcen Iskender
        2. PHOENIX-4703.patch
          16 kB
          Gokcen Iskender

        Issue Links

          Activity

            People

              giskender Gokcen Iskender
              vincentpoon Vincent Poon
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 5h
                  5h