jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/6] jena git commit: JENA-1237: Capture transaction snapshot during begin.
Date Tue, 27 Sep 2016 20:11:43 GMT
Repository: jena
Updated Branches:
  refs/heads/master 0a60d3804 -> fbb53efcc


JENA-1237: Capture transaction snapshot during begin.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/cc2c4bd5
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/cc2c4bd5
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/cc2c4bd5

Branch: refs/heads/master
Commit: cc2c4bd54c15b958dede6b4e83e6ee440a3157c8
Parents: 0a60d38
Author: Andy Seaborne <andy@apache.org>
Authored: Sat Sep 17 16:51:25 2016 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Sep 17 16:51:25 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/jena/sparql/core/mem/PMapTupleTable.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/cc2c4bd5/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/PMapTupleTable.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/PMapTupleTable.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/PMapTupleTable.java
index 3231f2d..c1cda88 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/PMapTupleTable.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/mem/PMapTupleTable.java
@@ -55,7 +55,7 @@ public abstract class PMapTupleTable<TupleMapType, TupleType, ConsumerType>
         return master;
     }
 
-    private final ThreadLocal<TupleMapType> local = withInitial(() -> master().get());
+    private final ThreadLocal<TupleMapType> local = withInitial(()->null);
 
     /**
      * @return a thread-local transactional reference to the internal table structure
@@ -88,7 +88,9 @@ public abstract class PMapTupleTable<TupleMapType, TupleType, ConsumerType>
      * {@link #local} is initialized via {@link #initial()}
      */
     @Override
-    public void begin(final ReadWrite rw) {}
+    public void begin(final ReadWrite rw) {
+        local.set(master().get());
+    }
 
     @Override
     public void end() {


Mime
View raw message