[ 
https://issues.apache.org/jira/browse/PHOENIX-3759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ankit Singhal updated PHOENIX-3759:
-----------------------------------
    Attachment: PHOENIX-3759.patch

During major compaction when all the local indexes are dropped, Empty HFile is 
created in L#0 store and exception will come in subsequent major compaction 
when we try to do an operation on first key(which is actually null).
Attach patch should catch it.

Workaround(who are affected by this):-
When all the local indices are dropped, then drop the local index column 
families(starting with L#) from descriptor to avoid this issue.

{code}
hbase(main):001:0> describe 'T'
hbase(main):002:0> alter 'T','delete'=>'L#0'
hbase(main):003:0> describe 'T'
{code}



> Dropping a local index causes NPE
> ---------------------------------
>
>                 Key: PHOENIX-3759
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3759
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.10.0
>            Reporter: Mujtaba Chohan
>            Assignee: Ankit Singhal
>         Attachments: PHOENIX-3759.patch
>
>
> {noformat}
> java.lang.NullPointerException
>       at 
> org.apache.hadoop.hbase.KeyValue.createKeyValueFromKey(KeyValue.java:2773)
>       at 
> org.apache.phoenix.util.RepairUtil.isLocalIndexStoreFilesConsistent(RepairUtil.java:32)
>       at 
> org.apache.hadoop.hbase.regionserver.IndexHalfStoreFileReaderGenerator.preCompactScannerOpen(IndexHalfStoreFileReaderGenerator.java:197)
>       at 
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$6.call(RegionCoprocessorHost.java:521)
>       at 
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1621)
>       at 
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1697)
>       at 
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperationWithResult(RegionCoprocessorHost.java:1660)
>       at 
> org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preCompactScannerOpen(RegionCoprocessorHost.java:516)
>       at 
> org.apache.hadoop.hbase.regionserver.compactions.Compactor.preCreateCoprocScanner(Compactor.java:325)
>       at 
> org.apache.hadoop.hbase.regionserver.compactions.Compactor.preCreateCoprocScanner(Compactor.java:315)
>       at 
> org.apache.hadoop.hbase.regionserver.compactions.Compactor.compact(Compactor.java:266)
>       at 
> org.apache.hadoop.hbase.regionserver.compactions.DefaultCompactor.compact(DefaultCompactor.java:64)
>       at 
> org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompactionContext.compact(DefaultStoreEngine.java:121)
>       at org.apache.hadoop.hbase.regionserver.HStore.compact(HStore.java:1154)
>       at 
> org.apache.hadoop.hbase.regionserver.HRegion.compact(HRegion.java:1559)
>       at 
> org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.doCompaction(CompactSplitThread.java:502)
>       at 
> org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:540)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at java.util.concurrent.ThreadPoolExecutor$Work
> {noformat}
> Region server gets aborted due to this NPE. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to