AmatyaAvadhanula commented on code in PR #16393:
URL: https://github.com/apache/druid/pull/16393#discussion_r1592430190
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:
##########
@@ -1271,6 +1277,134 @@ public void remove(final Task task)
}
}
+ /**
+ * Verifies that every lock held by the replacing task is a REPLACE lock
+ * @param task replacing task
+ */
+ public void verifyLocksForReplaceTask(Task task)
+ {
+ for (TaskLockPosse lockPosse : findLockPossesForTask(task)) {
+ if (lockPosse.taskLock.getType() != TaskLockType.REPLACE) {
+ throw DruidException.defensive(
+ "All the locks must be of type REPLACE for
segmentTransactionalReplace. Found lock of type[%s] for task[%s].",
Review Comment:
@kfaraz the validations have been moved to the actions.
--
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]