kfaraz commented on code in PR #16369:
URL: https://github.com/apache/druid/pull/16369#discussion_r1587396601
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:
##########
@@ -579,18 +579,20 @@ private TaskLockPosse createOrFindLockPosse(LockRequest
request, Task task, bool
|| revokeAllIncompatibleActiveLocksIfPossible(conflictPosses,
request)) {
posseToUse = createNewTaskLockPosse(request);
} else {
- // During a rolling update, tasks of mixed versions can be run at
the same time. Old tasks would request
- // timeChunkLocks while new tasks would ask segmentLocks. The
below check is to allow for old and new tasks
- // to get locks of different granularities if they have the same
groupId.
- final boolean allDifferentGranularity = conflictPosses
+ // When a rolling upgrade happens or lock types are changed for an
ongoing Streaming ingestion supervisor,
+ // the existing tasks might have or request different lock
granularities or types than the new ones.
+ // To ensure a smooth transition, we must allocate the different
lock types for the new tasks
+ // so that they can coexist and ingest with the required locks.
+ final boolean allConflictsAreForSameTaskGroupAndInterval =
conflictPosses
Review Comment:
```suggestion
final boolean allLocksHaveSameTaskGroupAndInterval =
conflictPosses
```
--
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]