You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Simon Helsen (JIRA)" <ji...@apache.org> on 2011/08/08 15:54:27 UTC
[jira] [Commented] (JENA-86) NPE in BlockMgrCache in direct mode
[ https://issues.apache.org/jira/browse/JENA-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080949#comment-13080949 ]
Simon Helsen commented on JENA-86:
----------------------------------
Thanks Andy. Is there a way to figure out what fixes made it into subsequent nightly or continuous builds?
(I am probably quite spoiled by IBM's RTC)
> NPE in BlockMgrCache in direct mode
> -----------------------------------
>
> Key: JENA-86
> URL: https://issues.apache.org/jira/browse/JENA-86
> Project: Jena
> Issue Type: Bug
> Components: TDB
> Reporter: Simon Helsen
> Assignee: Andy Seaborne
> Priority: Critical
>
> There seems to be a problem with the implementation of getWrite in BlockMgrCache. Whenever there is a write and read cache miss, the code does not actually delegate to the wrapped BlockMgr. In direct mode, this would have to be the file system. The resulting exception is
> java.lang.NullPointerException
> at com.hp.hpl.jena.tdb.base.page.PageBlockMgr.getWrite(PageBlockMgr.java:50)
> at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.getMgrWrite(BPTreeNode.java:162)
> at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.get(BPTreeNode.java:145)
> at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.delete(BPTreeNode.java:227)
> at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.deleteAndReturnOld(BPlusTree.java:324)
> at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.delete(BPlusTree.java:318)
> at com.hp.hpl.jena.tdb.index.TupleIndexRecord.performDelete(TupleIndexRecord.java:55)
> at com.hp.hpl.jena.tdb.index.TupleIndexBase.delete(TupleIndexBase.java:61)
> at com.hp.hpl.jena.tdb.index.TupleTable.delete(TupleTable.java:108)
> at com.hp.hpl.jena.tdb.graph.BulkUpdateHandlerTDB.removeWorker(BulkUpdateHandlerTDB.java:136)
> at com.hp.hpl.jena.tdb.graph.BulkUpdateHandlerTDB.removeAll(BulkUpdateHandlerTDB.java:90)
> at com.hp.hpl.jena.rdf.model.impl.ModelCom.removeAll(ModelCom.java:315)
> I think the fix is to change the following code in the getWrite method of BlockMgrCache (starting at line 158):
> // Did not find.
> cacheMisses++ ;
> log("Miss/w: %d", id) ;
> if ( writeCache != null )
> writeCache.put(id, blk) ;
> return blk ;
> into
> // Did not find.
> cacheMisses++ ;
> log("Miss/w: %d", id) ;
> blk = super.getWrite(id);
> if ( writeCache != null )
> writeCache.put(id, blk) ;
> return blk ;
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira