kfaraz commented on code in PR #16362:
URL: https://github.com/apache/druid/pull/16362#discussion_r1595203754
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/KillUnusedSegmentsTask.java:
##########
@@ -346,4 +306,32 @@ public LookupLoadingSpec getLookupLoadingSpec()
{
return LookupLoadingSpec.NONE;
}
+
+ @Override
+ public boolean isReady(TaskActionClient taskActionClient) throws Exception
+ {
+ final boolean useConcurrentLocks = Boolean.TRUE.equals(
+ getContextValue(
+ Tasks.USE_CONCURRENT_LOCKS,
+ Tasks.DEFAULT_USE_CONCURRENT_LOCKS
+ )
+ );
+
+ TaskLockType defaultLockType = useConcurrentLocks ? TaskLockType.REPLACE :
TaskLockType.EXCLUSIVE;
+
+ TaskLockType actualLockType = getContextValue(Tasks.TASK_LOCK_TYPE,
defaultLockType);
Review Comment:
IIUC, this code means that if a user has specified both `useConcurrentLocks`
and `taskLockType` in the task context, the latter will be preferred.
But in `AbstractBatchIndexTask.determineLockType()`, `useConcurrentLocks` is
given preference. We should stick to the existing preference order.
--
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]