incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/6] git commit: The commit in the optimize call needed to be wrapped in the writer lock.
Date Wed, 08 Jan 2014 03:24:11 GMT
The commit in the optimize call needed to be wrapped in the writer lock.


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

Branch: refs/heads/apache-blur-0.2
Commit: ff40894a77ea719553c0b80fa5ed27a2fe867366
Parents: 702b01d
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Jan 7 20:51:46 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Jan 7 20:51:46 2014 -0500

----------------------------------------------------------------------
 .../org/apache/blur/manager/writer/BlurIndexSimpleWriter.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ff40894a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
index 6548522..13d8d50 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
@@ -213,7 +213,12 @@ public class BlurIndexSimpleWriter extends BlurIndex {
           waitUntilNotNull(_writer);
           BlurIndexWriter writer = _writer.get();
           writer.forceMerge(numberOfSegmentsPerShard, true);
-          writer.commit();
+          _writeLock.lock();
+          try {
+            commit();
+          } finally {
+            _writeLock.unlock();
+          }
         } catch (Exception e) {
           LOG.error("Unknown error during optimize on table [{0}] shard [{1}]", e, table,
shard);
         }


Mime
View raw message