After some experimentation, I discovered that I was able to trigger rebalancing to occur if I targeted the function worker leader, but it's not clear if this happens consistently or not.
Expected behavior
Triggering function rebalancing should work consistently when triggered on any broker.
Also, if there is a failure, it should be reported in the logs. In the current implementation, when sending the rebalance request, no logs appeared in the targeted broker except when it succeeded.
More logging should indicate if there's a problem on the broker that receives the signal to rebalance functions.
Original Issue: apache/pulsar#12928
Describe the bug Hitting the endpoint to rebalance functions does not appear to work consistently in Pulsar 2.7.2.
To Reproduce Steps to reproduce the behavior:
First, we look at the function assignments:
Next, we trigger functions to rebalance:
$ curl fab08.example.domain.com:8080/admin/v2/worker/rebalance -X PUT -H "Authorization: Bearer eyJ...mNog"
Checking function assignments again after a few minutes shows no changes, as demonstrated below:
After some experimentation, I discovered that I was able to trigger rebalancing to occur if I targeted the function worker leader, but it's not clear if this happens consistently or not.
Expected behavior Triggering function rebalancing should work consistently when triggered on any broker. Also, if there is a failure, it should be reported in the logs. In the current implementation, when sending the rebalance request, no logs appeared in the targeted broker except when it succeeded. More logging should indicate if there's a problem on the broker that receives the signal to rebalance functions.