Closed chu11 closed 2 weeks ago
hmmmm,
hiccup 1. We can't guarantee how fast each subprocess launched by flux-exec
reads data out of its buffer. Some may read from their stdin buffer faster than others. Simple solution is determine the minimum amount that any of the subprocesses can take and only send that much to each one. But now we're bottle necked by the slowest subprocess, and it could be a hang if one of them is stuck.
p = zlist_first (subprocesses);
while (p) {
if (flux_subprocess_state (p) == FLUX_SUBPROCESS_INIT
|| flux_subprocess_state (p) == FLUX_SUBPROCESS_RUNNING) {
if (flux_subprocess_write (p, "stdin", ptr, lenp) < 0)
log_err_exit ("flux_subprocess_write");
}
p = zlist_next (subprocesses);
}
sounds acceptable? As I ponder this, it seems that the pros simply outweigh the cons in this scenario.
That seems expected to me since the consumer is in charge of the rate of date transfer.
See flux-framework/rfc#427 for a proposed protocol.
From #4572