[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 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().
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 pull request #501: JENA-1643: Use transactional dataset in clear().
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? ---
[GitHub] jena pull request #501: JENA-1643: Use transactional dataset in clear().
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().
Github user asfgit closed the pull request at: https://github.com/apache/jena/pull/501 ---