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

Creating secondary index with duplicated columns makes the catalog corrupted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 4.7.0
    • None
    • None
    • None

    Description

      Simple example

      create table x (t1 varchar primary key, t2 varchar, t3 varchar);
      create index idx on x (t2) include (t1,t3,t3);
      

      cause an exception that duplicated column was detected, but the client updates the catalog before throwing it and makes it unusable. All following attempt to use table x cause an exception ArrayIndexOutOfBounds. This problem was discussed on the user list recently.
      The cause of the problem is that check for duplicated columns happen in PTableImpl after MetaDataClient complete the server createTable.
      The simple way to fix is to add a similar check in MetaDataClient before createTable is called.
      Possible someone can suggest a more elegant way to fix it?

      Attachments

        1. PHOENIX-2783-1.patch
          2 kB
          Sergey Soldatov
        2. PHOENIX-2783-2.patch
          3 kB
          Sergey Soldatov
        3. PHOENIX-2783-INIT.patch
          2 kB
          Biju Nair
        4. PHOENIX-2783-3.patch
          4 kB
          Biju Nair
        5. PHOENIX-2783-4.patch
          5 kB
          Sergey Soldatov
        6. PHOENIX-2783-5.patch
          5 kB
          Sergey Soldatov

        Activity

          People

            sergey.soldatov Sergey Soldatov
            sergey.soldatov Sergey Soldatov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: