Nikita-Shupletsov opened a new pull request, #20646:
URL: https://github.com/apache/kafka/pull/20646

   clear pendingTasksToInit on tasks clear.
   It matters in situations when we shutting down a thread in 
PARTITIONS_ASSIGNED state.
   In this case we may have locked some unassigned task directories(see 
TaskManager#tryToLockAllNonEmptyTaskDirectories). Then we may have gotten 
assigned to one or multiple of those tasks. 
   In this scenario, we will not release the locks for the unassigned task 
directories(see TaskManager#releaseLockedUnassignedTaskDirectories), because 
TaskManager#allTasks includes pendingTasksToInit, but it hasn't been cleared.
   
   It addresses the flakiness of 
AdjustStreamThreadCountTest#shouldAddAndRemoveThreadsMultipleTimes


-- 
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]

Reply via email to