klcopp commented on a change in pull request #2507:
URL: https://github.com/apache/hive/pull/2507#discussion_r673943888
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
##########
@@ -204,7 +218,8 @@ public CompactionInfo findNextToCompact(String workerId,
String workerVersion) t
info.properties = rs.getString(6);
// Now, update this record as being worked on by this worker.
long now = getDbTime(dbConn);
- s = "UPDATE \"COMPACTION_QUEUE\" SET \"CQ_WORKER_ID\" = '" +
workerId + "', \"CQ_WORKER_VERSION\" = '" + workerVersion + "', " +
+ s = "UPDATE \"COMPACTION_QUEUE\" SET \"CQ_WORKER_ID\" = '" +
rqst.getWorkerId() + "', " +
+ "\"CQ_WORKER_VERSION\" = '" + rqst.getWorkerVersion() + "', " +
Review comment:
Great question. It turns out we do handle this case, we filter for:
Objects::nonNull when counting the number of versions. However this case wasn't
covered in tests so I'll update the PR with coverage.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]