[ 
https://issues.apache.org/jira/browse/HIVE-25009?focusedWorklogId=582276&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-582276
 ]

ASF GitHub Bot logged work on HIVE-25009:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Apr/21 07:32
            Start Date: 14/Apr/21 07:32
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on a change in pull request #2175:
URL: https://github.com/apache/hive/pull/2175#discussion_r613005967



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -390,7 +390,7 @@ protected Boolean findNextCompactionAndExecute(boolean 
computeStats) {
         }
       }
       ci = 
CompactionInfo.optionalCompactionInfoStructToInfo(msc.findNextCompact(workerName,
 runtimeVersion));
-      if ((runtimeVersion != null || ci.initiatorVersion != null) && 
!runtimeVersion.equals(ci.initiatorVersion)) {
+      if (ci != null && (runtimeVersion != null || ci.initiatorVersion != 
null) && !runtimeVersion.equals(ci.initiatorVersion)) {

Review comment:
       Hi Anti, I placed by mistake version check above the ci null check part, 
could you please move it below the null check:
   if (ci == null) {
           return false;
   }




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 582276)
    Time Spent: 20m  (was: 10m)

> Compaction worker and initiator version check can cause NPE if the 
> COMPACTION_QUEUE is empty
> --------------------------------------------------------------------------------------------
>
>                 Key: HIVE-25009
>                 URL: https://issues.apache.org/jira/browse/HIVE-25009
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>    Affects Versions: 4.0.0
>            Reporter: Antal Sinkovits
>            Assignee: Antal Sinkovits
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to