Fork me on GitHub

Do grouping keys/functions for stateful tasks operate correctly in all of these configurations?


@dave.dixon in the split tenancies, etc? If so, it doesn’t make any difference.

👍 4

I have a stateful task that is simulating users calling another workflow, sometimes has to do some fairly intense computation and gets killed for lack of heartbeats. Updating the liveness timeout helps, but isn't a sure-fire solution. Is there a way to offer heartbeats? Or perhaps there's some other model I should consider to accomplish the simulation?


The way we deal with this in plugins is to allow prepare-batch and write-batch to return false, and the the peer will heartbeat. We don’t really have a way to perform the equivalent operation in stateful operations.


Say we gave you a function to heartbeat that is provided in the state-event map, would that help?


Maybe I could also make it check whether it should heartbeat in between segments too


currently it only checks it once per batch


there would be some overhead though.


Plugin might be the right thing here. I've already got a bit of a hack to allow this thing to be a task, using a plugin might clean things up all around. Let me go read about them.


Depending on what you’re doing, it probably isn’t the right approach. I was more pointing to how we dealt with similar problems elsewhere


Smaller batch size might help too, it sounds like.