flux-framework / rfc

Flux RFC project
https://flux-framework.readthedocs.io/projects/flux-rfc/
7 stars 13 forks source link

should all eventlogs complete with a defined event #193

Open chu11 opened 5 years ago

chu11 commented 5 years ago

Problem:

In the flux-core job-info module (accessed via flux job wait-event command), if the user specifies an event that will never occur, the watch will hang forever. The job-info module could return an error (EINVAL?) if the eventlog reaches its end without seeing the event.

The problem is that different eventlogs have different defined ending events. it would be burdensome of the job-info module to have knowledge of the ending event of every type of eventlog (not to mention determining the type of eventlog a user is even looking at).

Up for consideration / discussion:

Define an ending event that all eventlogs must use.

grondo commented 5 years ago

if the user specifies an event that will never occur, the watch will hang forever.

I admit this is how I assumed it would work. This matches what happens if you wait for an actual event that will never occur, or if you watch a kvs key that will never exist.

Now that you mention it, though, it would be nicer if we could determine if an eventlog is "closed". If nothing else it closes a bit of a DoS problem for the job-info service.

I think it is a good idea, but there may be use cases I'm not considering. I'm also ok with current behavior for now. So, I apologize for being thoroughly unhelpful ;-)

garlick commented 5 years ago

Pondering this... One problem with a single defined end event for all eventlogs is that currently, eventlogs can have multiple writers, so it may not be feasible in all cases to be sure one is writing the last event...