You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ka...@apache.org on 2020/01/13 08:32:02 UTC

[phoenix] 03/03: PHOENIX-5666 IndexRegionObserver incorrectly updates PostIndexUpdateFailure metric

This is an automated email from the ASF dual-hosted git repository.

kadir pushed a commit to branch 4.x-HBase-1.3
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit 7a525c1fb0763852bd6db06576ced00f9b726858
Author: Kadir <ko...@salesforce.com>
AuthorDate: Wed Jan 8 01:51:41 2020 -0800

    PHOENIX-5666 IndexRegionObserver incorrectly updates PostIndexUpdateFailure metric
---
 .../main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
index 6e12950..08a120e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
@@ -763,7 +763,7 @@ public class IndexRegionObserver extends BaseRegionObserver {
       ListMultimap<HTableInterfaceReference, Mutation> indexUpdates = post ? context.postIndexUpdates : context.preIndexUpdates;
       //short circuit, if we don't need to do any work
 
-      if (context == null || indexUpdates.isEmpty()) {
+      if (context == null || indexUpdates == null || indexUpdates.isEmpty()) {
           return;
       }