You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by afs <gi...@git.apache.org> on 2018/11/30 11:29:00 UTC

[GitHub] jena pull request #501: JENA-1643: Use transactional dataset in clear().

GitHub user afs opened a pull request:

    https://github.com/apache/jena/pull/501

    JENA-1643: Use transactional dataset in clear().

    The fix is the one line change in method `clear()`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/afs/jena graphtdb-clear

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/501.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 #501
    
----
commit 2c1b6c84b589b004aeab76099578aa0aee2bbab0
Author: Andy Seaborne <an...@...>
Date:   2018-11-30T11:15:09Z

    JENA-1643: Use transactional dataset in clear().

----


---

[GitHub] jena pull request #501: JENA-1643: Use transactional dataset in clear().

Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/501#discussion_r237839306
  
    --- Diff: jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java ---
    @@ -171,7 +171,10 @@ protected final int graphBaseSize() {
     
         @Override
         public void clear() {
    -        getDatasetGraphTDB().deleteAny(getGraphName(), Node.ANY, Node.ANY, Node.ANY) ;
    +        // Logically, this is "super.clear()" except the default implementation
    +        // is a loop that materializes nodes. We want to call the dataset directly 
    +        // so that nodes don't get materialized, just deleted from indexes.
    --- End diff --
    
    Yes.


---

[GitHub] jena pull request #501: JENA-1643: Use transactional dataset in clear().

Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/501#discussion_r237830232
  
    --- Diff: jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java ---
    @@ -171,7 +171,10 @@ protected final int graphBaseSize() {
     
         @Override
         public void clear() {
    -        getDatasetGraphTDB().deleteAny(getGraphName(), Node.ANY, Node.ANY, Node.ANY) ;
    +        // Logically, this is "super.clear()" except the default implementation
    +        // is a loop that materializes nodes. We want to call the dataset directly 
    +        // so that nodes don't get materialized, just deleted from indexes.
    --- End diff --
    
    @afs Just for my education, what do you mean by "materialized" here?


---

[GitHub] jena issue #501: JENA-1643: Use transactional dataset in clear().

Posted by afs <gi...@git.apache.org>.
Github user afs commented on the issue:

    https://github.com/apache/jena/pull/501
  
    And review approvals?


---

[GitHub] jena pull request #501: JENA-1643: Use transactional dataset in clear().

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/jena/pull/501


---

[GitHub] jena pull request #501: JENA-1643: Use transactional dataset in clear().

Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on a diff in the pull request:

    https://github.com/apache/jena/pull/501#discussion_r237831448
  
    --- Diff: jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java ---
    @@ -171,7 +171,10 @@ protected final int graphBaseSize() {
     
         @Override
         public void clear() {
    -        getDatasetGraphTDB().deleteAny(getGraphName(), Node.ANY, Node.ANY, Node.ANY) ;
    +        // Logically, this is "super.clear()" except the default implementation
    +        // is a loop that materializes nodes. We want to call the dataset directly 
    +        // so that nodes don't get materialized, just deleted from indexes.
    --- End diff --
    
    Loaded from the node table into nodes in the cache I think?


---