simlaudato / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

LSMRTreeWithAntiMatterTuples causes NPE during flush and merge #921

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, the master branch of asterixdb only uses LSMRTree index.
LSMRTreeWithAniMatterTuples implementation exists in hyracks but is not used in 
asterixdb level. 
When LSMRTree is replaced with LSMRTreeWithAniMatterTuples in asterixdb, null 
pointer exception is occured during flush and merge in the following code of 
LSMRTreeIOOperationCallback.java.  

    @Override
    public void afterOperation(LSMOperationType opType, List<ILSMComponent> oldComponents, ILSMComponent newComponent)
            throws HyracksDataException {
        if (newComponent != null) {
            LSMRTreeDiskComponent rtreeComponent = (LSMRTreeDiskComponent) newComponent;
            putLSNIntoMetadata(rtreeComponent.getRTree(), oldComponents);
            putLSNIntoMetadata(rtreeComponent.getBTree(), oldComponents); // <---- this line causes NPE since getBTree() returns null for LSMRTreeWithAntiMatterTuples index. 
        }
    }

Original issue reported on code.google.com by kiss...@gmail.com on 5 Aug 2015 at 6:16