jerrypeng 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_r219256717
##########
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 would suggest moving all the logic concerning heartbeat function out of
the scheduler. You can just make create an assignment for the heartbeat
function in the scheduler manager. Ideally we don't want any of this with the
heartbeat function within the scheduler
----------------------------------------------------------------
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