Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea: kvs: support a native "EOF" #6455

Open
chu11 opened this issue Nov 21, 2024 · 4 comments
Open

idea: kvs: support a native "EOF" #6455

chu11 opened this issue Nov 21, 2024 · 4 comments

Comments

@chu11
Copy link
Member

chu11 commented Nov 21, 2024

the job-info watcher knows it can stop watching certain keys when the job eventlog reaches its defined end

it could be convenient if there was a native "EOF" that could be added into the KVS, so such special handling wouldn't be necessary and the EOF could be used on other eventlogs (stdio, etc.)

@grondo
Copy link
Contributor

grondo commented Nov 21, 2024

This would imply an "eventlog_close()" or similar function would be required on eventlog writers?

@chu11
Copy link
Member Author

chu11 commented Nov 21, 2024

I haven't thought that far yet, but probably something like that.

@grondo
Copy link
Contributor

grondo commented Nov 21, 2024

Job eventlogs could be "closed" when the job becomes inactive and the guest namespace is moved to the main namespace. However, many eventlogs don't really ever "close" (e.g. resource.eventlog). Even stdio eventlogs can have "log" messages interspersed so it may not necessarily be clear when to close them.

@garlick
Copy link
Member

garlick commented Nov 21, 2024

We were brainstorming about this yesterday and my first thought was to define an eof event that could be interpreted by the KVS. The downside is that we'd have to teach kvs-watch about eventlogs (ick).

I think where you guys seem to be going is better - something like an end of file token that could be appended to a valref array. Then when a key is being watched wth the APPEND option, the streaming RPC could naturally terminate. Something like flux_kvs_txn_close() to add the eof token?

Seems like not a bad enhancement to the whole "append to a key" design space, which we kind of slapped together at the time.

I think we should discuss whether it's helpful to our current code base before we jump in though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants