onyx

FYI: alternative Onyx :onyx: chat is at <https://gitter.im/onyx-platform/onyx> ; log can be found at <https://clojurians-log.clojureverse.org/onyx/index.html>
sparkofreason 2018-05-12T16:20:41.000162Z

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

lucasbradstreet 2018-05-12T17:30:17.000017Z

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

đź‘Ť 1
sparkofreason 2018-05-12T18:51:21.000132Z

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?

lucasbradstreet 2018-05-12T19:15:02.000134Z

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.

lucasbradstreet 2018-05-12T19:15:18.000093Z

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

lucasbradstreet 2018-05-12T19:15:58.000067Z

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

lucasbradstreet 2018-05-12T19:16:14.000024Z

currently it only checks it once per batch

lucasbradstreet 2018-05-12T19:16:27.000109Z

there would be some overhead though.

sparkofreason 2018-05-12T19:40:39.000045Z

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.

lucasbradstreet 2018-05-12T19:42:42.000067Z

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

sparkofreason 2018-05-12T19:49:22.000106Z

Smaller batch size might help too, it sounds like.

lucasbradstreet 2018-05-12T19:49:31.000077Z

Yes