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

The format of VIEW_MODIFIED_PROPERTY_BYTES is incorrect as a tag of the cell

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.15.0, 5.1.0
    • 4.15.0, 5.1.0, 5.0.1
    • None
    • None

    Description

      We use a tag of cell to indicat that some properties should not be derived from the base table for view table. VIEW_MODIFIED_PROPERTY_BYTES is used a tag bytes, but the format is incorrect, the below is a reference from KeyValue interface:

      KeyValue can optionally contain Tags. When it contains tags, it is added in the byte array after

      • the value part. The format for this part is: <code><tagslength><tagsbytes></code>.
      • <code>tagslength</code> maximum is <code>Short.MAX_SIZE</code>. The <code>tagsbytes</code>
      • contain one or more tags where as each tag is of the form
      • <code><taglength><tagtype><tagbytes></code>. <code>tagtype</code> is one byte
      • and <code>taglength</code> maximum is <code>Short.MAX_SIZE</code> and it includes 1 byte type
      • length and actual tag bytes length.

      The CATALOG table will be badly affected. Some errors will be caused when reads CATALOG table.

       

      0: jdbc:phoenix:thin:url=http://localhost> drop view "test_2"; Error: Error -1 (00000) : Error while executing SQL "drop view "test_2"": Remote driver error: RuntimeException: org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.DoNotRetryIOException: test_2: 4 at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:114) at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.dropTable(MetaDataEndpointImpl.java:2729) at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17078) at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8210) at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2475) at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2457) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42010) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:418) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:136) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304) Caused by: java.lang.ArrayIndexOutOfBoundsException: 4 at org.apache.hadoop.hbase.ArrayBackedTag.<init>(ArrayBackedTag.java:97) at org.apache.hadoop.hbase.CellUtil$5.next(CellUtil.java:1107) at org.apache.hadoop.hbase.CellUtil$5.next(CellUtil.java:1094) at org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher.isCellTTLExpired(ScanQueryMatcher.java:153) at org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher.preCheck(ScanQueryMatcher.java:198) at org.apache.hadoop.hbase.regionserver.querymatcher.NormalUserScanQueryMatcher.match(NormalUserScanQueryMatcher.java:64) at org.apache.hadoop.hbase.regionserver.StoreScanner.next(StoreScanner.java:578)
      

       

      Attachments

        1. Screen Shot 2019-04-01 at 16.13.10.png
          502 kB
          Jaanai Zhang
        2. Screen Shot 2019-04-01 at 16.09.23.png
          1.16 MB
          Jaanai Zhang
        3. PHOENIX-5226-master.patch
          6 kB
          Jaanai Zhang
        4. PHOENIX-5226-master-v2.patch
          6 kB
          Jaanai Zhang
        5. PHOENIX-5226-master-v3.patch
          8 kB
          Jaanai Zhang

        Activity

          People

            jaanai Jaanai Zhang
            jaanai Jaanai Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: