You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2017/06/29 10:45:43 UTC
[07/11] jena git commit: Tidy up.
Tidy up.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b92ba1a5
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b92ba1a5
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b92ba1a5
Branch: refs/heads/master
Commit: b92ba1a56a011479aa6f3cfef556fc512c507fae
Parents: e1abec9
Author: Andy Seaborne <an...@apache.org>
Authored: Tue Jun 27 22:45:40 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Tue Jun 27 22:45:40 2017 +0100
----------------------------------------------------------------------
.../org/apache/jena/tdb/transaction/NodeTableTrans.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/b92ba1a5/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java
index f8090d2..98615e1 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java
@@ -58,12 +58,13 @@ public class NodeTableTrans implements NodeTable, TransactionLifecycle
private final String label ;
private final Transaction txn ; // Can be null (during recovery).
- public NodeTableTrans(Transaction txn, String label, NodeTable sub, Index nodeIndex, ObjectFile objFile)
+ public NodeTableTrans(Transaction txn, String label, NodeTable sub, Index nodeIndex, ObjectFile journalObjFile)
{
this.txn = txn ;
this.base = sub ;
this.nodeIndex = nodeIndex ;
- this.journalObjFile = objFile ;
+ // Workspace for
+ this.journalObjFile = journalObjFile ;
// Clear bytes from an old run
// (a crash while writing means the old transaction did not commit
// any bytes in the file are junk)
@@ -280,6 +281,7 @@ public class NodeTableTrans implements NodeTable, TransactionLifecycle
@Override
public void commitPrepare(Transaction txn)
{
+ // The index "node2id", which is Node hash to NodeId, is done because it has a BlockMgr.
debug("commitPrepare") ;
// The node table is append-only so it can be written during prepare.
@@ -314,7 +316,8 @@ public class NodeTableTrans implements NodeTable, TransactionLifecycle
warn(log, "Inconsistency: base.allocOffset() = %d : allocOffset = %d", expected, allocOffset) ;
long newbase = -1 ;
- append() ; // Calls all() which does a buffer flish.
+ // Copy to the base NodeTable.
+ append() ;
// Reset (in case we use this again)
nodeIndex.clear() ;
journalObjFile.truncate(journalObjFileStartOffset) ; // Side effect is a buffer flush.