Fork me on GitHub
#onyx
<
2018-05-12
>
sparkofreason16:05:41

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

lucasbradstreet17:05:17

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

👍 4
sparkofreason18:05:21

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?

lucasbradstreet19:05:02

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.

lucasbradstreet19:05:18

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

lucasbradstreet19:05:58

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

lucasbradstreet19:05:14

currently it only checks it once per batch

lucasbradstreet19:05:27

there would be some overhead though.

sparkofreason19:05:39

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.

lucasbradstreet19:05:42

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

sparkofreason19:05:22

Smaller batch size might help too, it sounds like.