[
https://issues.apache.org/jira/browse/JENA-1527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16443229#comment-16443229
]
ASF GitHub Bot commented on JENA-1527:
--------------------------------------
GitHub user afs opened a pull request:
https://github.com/apache/jena/pull/402
JENA-1527: Create PrefixMap on each getPrefixMapping
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afs/jena tdb-prefixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/402.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #402
----
commit ec67a007074b6beb42c72ae9a257e1876dd4a8b1
Author: Andy Seaborne <andy@...>
Date: 2018-04-18T21:14:09Z
JENA-1527: Create PrefixMap on each getPrefixMapping
----
> GraphDB caches prefix map across transactions.
> ----------------------------------------------
>
> Key: JENA-1527
> URL: https://issues.apache.org/jira/browse/JENA-1527
> Project: Apache Jena
> Issue Type: Bug
> Components: TDB
> Affects Versions: Jena 3.7.0
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Major
>
> The pattern below causes transaction errors ("BlockMgrJournal not active")
> because the pmap is carried from trasnaction1 to transaction 2 in the
> GraphBase cache (member "pm").
> {noformat}
> Graph g = dsg.getGraph(gn1);
> Txn.executeWrite(dsg, ()->{
> // Get, do not use. ** GraphBase caches **
> PrefixMapping pmap = g.getPrefixMapping();
> });
> Txn.executeWrite(dsg, ()-> {
> PrefixMapping pmap = g.getPrefixMapping();
> pmap.setNsPrefix("x0", "http:/example/x0#");
> });
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)