IgorBerman commented on code in PR #16362:
URL: https://github.com/apache/druid/pull/16362#discussion_r1589914900
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/KillUnusedSegmentsTask.java:
##########
@@ -346,4 +347,24 @@ public LookupLoadingSpec getLookupLoadingSpec()
{
return LookupLoadingSpec.NONE;
}
+
+ @Override
+ public boolean isReady(TaskActionClient taskActionClient) throws Exception
+ {
+ final boolean isUsingConcurrentLocks = Boolean.TRUE.equals(
+ getContextValue(
+ Tasks.USE_CONCURRENT_LOCKS,
+ Tasks.DEFAULT_USE_CONCURRENT_LOCKS
+ )
+ );
+
+ TaskLockType defaultLockType = !markAsUnused && isUsingConcurrentLocks ?
TaskLockType.REPLACE : TaskLockType.EXCLUSIVE;
+
+ TaskLockType actualLockType = getContextValue(Tasks.TASK_LOCK_TYPE,
defaultLockType);
+
+ if (markAsUnused && actualLockType != TaskLockType.EXCLUSIVE) {
Review Comment:
ok, sure. So I'm removing markAsUnused and any references to it. Hopefully
I'll find all of it
--
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]