kaushik-develop commented on a change in pull request #12178:
URL: https://github.com/apache/pulsar/pull/12178#discussion_r719761657
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/SchedulerManager.java
##########
@@ -415,6 +633,34 @@ private void compactAssignmentTopic() {
}
}
+ protected int updateWorkerDrainMap() {
+ long startTime = System.nanoTime();
+ int numRemovedWorkerIds = 0;
+
+ if (drainOpStatusMap.size() > 0) {
Review comment:
That is by design. The external orchestrator is expected to trigger the
draining of a worker, and check for drain status. It is also expected to remove
the worker after a drain operation completes, and not re-add a worker with the
same name as the drained/removed worker for one period (configurable, nominally
60 seconds) after the worker-removal. This will ensure that the two actors work
on different entries of the concurrent map. But PLMK if you foresee problems in
any specific scenario.
--
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]