incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: Fixed NPE.
Date Sat, 15 Sep 2012 13:57:14 GMT
Fixed NPE.


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

Branch: refs/heads/0.1.3
Commit: 500114e6d2331d7f34b7ad6513280b0920638168
Parents: 6d05a5e
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat Sep 15 09:52:36 2012 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat Sep 15 09:52:36 2012 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/manager/IndexManager.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/500114e6/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index 0470db5..725174a 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -106,7 +106,6 @@ import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.util.ReaderUtil;
 
-
 public class IndexManager {
 
   private static final String NOT_FOUND = "NOT_FOUND";
@@ -123,7 +122,6 @@ public class IndexManager {
   private BlurMetrics _blurMetrics;
   private QueryMetrics _queryMetrics;
   private long _defaultParallelCallTimeout = TimeUnit.MINUTES.toMillis(1);
-  
 
   public void setMaxClauseCount(int maxClauseCount) {
     BooleanQuery.setMaxClauseCount(maxClauseCount);
@@ -867,7 +865,9 @@ public class IndexManager {
       long s = System.nanoTime();
       // Finally, replace the existing row with the new row we have built.
       blurIndex.replaceRow(mutation.waitToBeVisible, mutation.wal, newRow);
-      _queryMetrics.recordDataMutate(System.nanoTime() - s, newRow.records.size());
+      if (newRow != null && newRow.records != null) {
+        _queryMetrics.recordDataMutate(System.nanoTime() - s, newRow.records.size());
+      }
     } else {
       throw new BException("Mutation cannot update row that does not exist.", mutation);
     }


Mime
View raw message