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

[Question] future jobid data type and its property #382

Closed
dongahn opened this issue Aug 24, 2018 · 2 comments
Closed

[Question] future jobid data type and its property #382

dongahn opened this issue Aug 24, 2018 · 2 comments

Comments

@dongahn
Copy link
Member

dongahn commented Aug 24, 2018

The resource match module currently assumes the monotonically increasing jobid of int64_t type. For example, the match_request_cb looks like:

static void match_request_cb (flux_t *h, flux_msg_handler_t *w,
                              const flux_msg_t *msg, void *arg)
{

<CUT>

    if (flux_request_unpack (msg, NULL, "{s:s s:I s:s}", "cmd", &cmd,
                             "jobid", &jobid, "jobspec", &js_str) < 0)
        goto error;

Since I am writing a tester to invoke this handler to finish up my current resource module PR, I thought I should ask to minimize future changes.

Will this change in a near future? If so, what will be its data type and property?

@grondo
Copy link
Contributor

grondo commented Aug 24, 2018

@dongahn, see @garlick's PR here flux-framework/flux-core#1626 for the future direction. I think the newly proposed flux_jobid_t is a uint64_t, and could be passed around as an encoded integer or in one of the FLUID string encodings.

The match module should probably not assume monotonically increasing jobids, but the jobids should be loosely ordered. @garlick may have more to add.

@dongahn
Copy link
Member Author

dongahn commented Aug 24, 2018

@dongahn, see @garlick's PR here flux-framework/flux-core#1626 for the future direction. I think the newly proposed flux_jobid_t is a uint64_t, and could be passed around as an encoded integer or in one of the FLUID string encodings.

Ah. Thanks. This is great! I can then keep using std::map based on uint64_t or int64_t

The match module should probably not assume monotonically increasing jobids, but the jobids should be loosely ordered. @garlick may have more to add.

In general I think I can easily relax monotonicity assumption. There are some jobid validation checks but this shouldn't be necessary I think. (Need to check the code a bit.)

@dongahn dongahn closed this as completed Sep 2, 2018
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