rdhabalia commented on a change in pull request #2613: Avoid scheduling
heartbeat function if owner-worker not available
URL: https://github.com/apache/incubator-pulsar/pull/2613#discussion_r219637420
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/scheduler/RoundRobinScheduler.java
##########
@@ -52,6 +52,10 @@
List<Assignment> newAssignments = Lists.newArrayList();
for (Instance unassignedFunctionInstance :
unassignedFunctionInstances) {
String heartBeatWorkerId =
checkHeartBeatFunction(unassignedFunctionInstance);
+ if (heartBeatWorkerId != null &&
workerIdToAssignment.get(heartBeatWorkerId) == null) {
Review comment:
I feel any scheduler related responsibility should be part of Scheduler.
there will be many things can be shared across multiple implementations. One of
the example is "LoadManager" in pulsar where we have multiple implementations
and there are many things which are shared in both implementations. and moving
responsibilities of such modules at caller might not be good.
However, moving out heartbeat might not be a big deal and it will be
cleaner as well. let me fix it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services