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

Fix remaining issues with Long viewIndexIds

    XMLWordPrintableJSON

Details

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

    Description

      Update: Since I uncovered more problems here, I changed the title.
      This fixes the following three issues:
      1. PHOENIX-5550, local index is not correctly built when data existed in the data table.
      2. Index ids are correctly generated on the client, so that index updates for different indexes are written into the same index.
      3. Stale boundary cache is not correctly detected in some cases (namely when the scan already was in the second daughter region and that daugthter region is the last region.)

      All of these happen when short view index ids are used (which is the default). The included test covers all three scenarios.

      Was: 

      phoenix: CREATE TABLE test (pk INTEGER PRIMARY KEY, v1 INTEGER, v2 integer);
      No rows affected (1.389 seconds)
      phoenix: create local index l1 on test(v1);
      1 row affected (11.343 seconds)
      phoenix: create local index l2 on test(v1);
      1 row affected (5.107 seconds)
      phoenix: UPSERT INTO test VALUES(2,2,2);
      1 row affected (0.037 seconds)
      
      hbase: scan 'TEST'
      ROW                                     COLUMN+CELL                                                                                                       
       \x00\x00\xC1\x03\x00\x80\x00\x00\x02   column=L#0:\x00\x00\x00\x00, timestamp=1572842063925, value=x                                                     
       \x80\x00\x00\x02                       column=0:\x00\x00\x00\x00, timestamp=1572842063925, value=x                                                       
       \x80\x00\x00\x02                       column=0:\x80\x0B, timestamp=1572842063925, value=\x80\x00\x00\x02                                                
       \x80\x00\x00\x02                       column=0:\x80\x0C, timestamp=1572842063925, value=\x80\x00\x00\x02                                                
      2 row(s) in 0.0190 seconds

      There should be two index rows.

      And in fact there are with phoenix.index.longViewIndex.enabled set to true, there are correctly two different index entries for both of the local indexes.

      gjacoby rajeshbabu

      Attachments

        1. 5559-test.txt
          4 kB
          Lars Hofhansl
        2. 5559-4.x-HBase-1.5.txt
          26 kB
          Lars Hofhansl
        3. 5559-4.x-HBase-1.5.txt
          26 kB
          Lars Hofhansl
        4. 5559-4.x-HBase-1.5-v2.txt
          27 kB
          Lars Hofhansl
        5. 5559-4.x-HBase-1.5-v3.txt
          28 kB
          Lars Hofhansl
        6. 5559-4.x-HBase-1.5-v5.txt
          31 kB
          Lars Hofhansl

        Issue Links

          Activity

            People

              larsh Lars Hofhansl
              larsh Lars Hofhansl
              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