You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/03/18 17:47:29 UTC

[1/2] git commit: tried fixing a bug in LinkedHashSetBlockingQueue

tried fixing a bug in LinkedHashSetBlockingQueue


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

Branch: refs/heads/master
Commit: aab28ebe61cccbe494568b2bfea998e9dc798ae6
Parents: e0045ea
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Mon Mar 18 17:47:09 2013 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Mon Mar 18 17:47:09 2013 +0100

----------------------------------------------------------------------
 .../kiwi/persistence/h2/drop_base_tables.sql       |    2 +-
 .../core/util/LinkedHashSetBlockingQueue.java      |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/aab28ebe/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
index 72d0619..bf3d7e4 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
@@ -14,7 +14,7 @@
 -- limitations under the License.
 
 DROP INDEX IF EXISTS idx_node_content;
-DROP INDEX idx_literal_lang;
+DROP INDEX IF EXISTS idx_literal_lang;
 
 DROP INDEX IF EXISTS idx_triples_s;
 DROP INDEX IF EXISTS idx_triples_o;

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/aab28ebe/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/LinkedHashSetBlockingQueue.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/LinkedHashSetBlockingQueue.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/LinkedHashSetBlockingQueue.java
index 852227d..bd63baa 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/LinkedHashSetBlockingQueue.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/LinkedHashSetBlockingQueue.java
@@ -372,6 +372,9 @@ public class LinkedHashSetBlockingQueue<E> extends AbstractQueue<E> implements B
                 fullyLock();
                 try {
                     it.remove();
+
+                    // remove counter
+                    count.getAndDecrement();
                 } finally {
                     fullyUnlock();
                 }
@@ -408,6 +411,7 @@ public class LinkedHashSetBlockingQueue<E> extends AbstractQueue<E> implements B
         fullyLock();
         try {
             delegate.clear();
+            count.set(0);
         } finally {
             fullyUnlock();
         }