Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 51961200B95 for ; Tue, 27 Sep 2016 22:11:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5048C160AE9; Tue, 27 Sep 2016 20:11:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9CA4B160AB9 for ; Tue, 27 Sep 2016 22:11:44 +0200 (CEST) Received: (qmail 54807 invoked by uid 500); 27 Sep 2016 20:11:43 -0000 Mailing-List: contact commits-help@jena.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jena.apache.org Delivered-To: mailing list commits@jena.apache.org Received: (qmail 54798 invoked by uid 99); 27 Sep 2016 20:11:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2016 20:11:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 63F83E02E4; Tue, 27 Sep 2016 20:11:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: andy@apache.org To: commits@jena.apache.org Date: Tue, 27 Sep 2016 20:11:43 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/6] jena git commit: JENA-1237: Capture transaction snapshot during begin. archived-at: Tue, 27 Sep 2016 20:11:45 -0000 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 Authored: Sat Sep 17 16:51:25 2016 +0100 Committer: Andy Seaborne 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 return master; } - private final ThreadLocal local = withInitial(() -> master().get()); + private final ThreadLocal local = withInitial(()->null); /** * @return a thread-local transactional reference to the internal table structure @@ -88,7 +88,9 @@ public abstract class PMapTupleTable * {@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() {