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

libkvs: checkpoint convenience functions #4145

Closed
chu11 opened this issue Feb 18, 2022 · 1 comment
Closed

libkvs: checkpoint convenience functions #4145

chu11 opened this issue Feb 18, 2022 · 1 comment
Assignees

Comments

@chu11
Copy link
Member

chu11 commented Feb 18, 2022

Per discussion in #4136, it may be convenient if some common "kvs checkpointing" functions were put into libkvs. They could be private, need not be public. Off the top of my head:

json_t *kvs_checkpoint_create (const char *rootref);
kvs_checkpoint_parse_rootref (json_t *o, char *buf, size_t len);
kvs_checkpoint_parse_timestamp (json_t *o, double *timestamp);

might work out, with internal setting version / timestamp or getting only if version valid.

Edit: OR possibly wrappers around these to do the rpc calls / gets, TBD

@garlick
Copy link
Member

garlick commented Feb 18, 2022

I like the RPC idea, something like?

flux_future_t *kvs_checkpoint_update (flux_t *h, const char *name, const char *blobref);
flux_future_t *kvs_checkpoint_lookup (flux_t *h, const char *name);
const char *kvs_checkpoint_lookup_get_blobref (flux_future_t *f);
const char *kvs_checkpoint_lookup_get_formatted_timestamp (flux_future_t *f);

@chu11 chu11 self-assigned this Feb 23, 2022
chu11 added a commit to chu11/flux-core that referenced this issue Feb 25, 2022
Problem: Some kvs checkpointing operations are duplicated.  It
would be convenient if there were common functions for it.

Solution: Add common checkpointing operations into a new
kvs_checkpoint api in libkvs.  Keep the API private for now.
Add unit tests.

Fixes flux-framework#4145
chu11 added a commit to chu11/flux-core that referenced this issue Feb 28, 2022
Problem: Some kvs checkpointing operations are duplicated.  It
would be convenient if there were common functions for it.

Solution: Add common checkpointing operations into a new
kvs_checkpoint api in libkvs.  Keep the API private for now.
Add unit tests.

Fixes flux-framework#4145
chu11 added a commit to chu11/flux-core that referenced this issue Mar 1, 2022
Problem: Some kvs checkpointing operations are duplicated.  It
would be convenient if there were common functions for it.

Solution: Add common checkpointing operations into a new
kvs_checkpoint api in libkvs.  Keep the API private for now.
Add unit tests.

Fixes flux-framework#4145
chu11 added a commit to chu11/flux-core that referenced this issue Mar 1, 2022
Problem: Some kvs checkpointing operations are duplicated.  It
would be convenient if there were common functions for it.

Solution: Add common checkpointing operations into a new
kvs_checkpoint api in libkvs.  Keep the API private for now.
Add unit tests.

Fixes flux-framework#4145
chu11 added a commit to chu11/flux-core that referenced this issue Mar 1, 2022
Problem: Some kvs checkpointing operations are duplicated.  It
would be convenient if there were common functions for it.

Solution: Add common checkpointing operations into a new
kvs_checkpoint api in libkvs.  Keep the API private for now.
Add unit tests.

Fixes flux-framework#4145
@mergify mergify bot closed this as completed in 9c7ea6d Mar 2, 2022
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

2 participants