-
Notifications
You must be signed in to change notification settings - Fork 49
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
eliminate duplicate KVS restart in job-list and job-manager #5837
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
4f21fee
job-list: fix handling of respond failure
garlick 3b26000
job-manager: keep in-memory copy of job eventlog
garlick 1241e04
job-manager: allow job-manager.getattr eventlog
garlick 2e9ad25
job-manager: send complete journal to consumers
garlick a999469
job-list: get jobs from journal not KVS
garlick 830fab9
testsuite: udpate events_journal_stream test prog
garlick 4203b2f
testsuite: drop seq specific test from t2210
garlick d55a940
testsuite: drop journal-size-limit test from t2210
garlick 8f53d4e
testsuite: add full:true to journal test in t2210
garlick 75b28b1
testsuite: fix test that modifies eventlog in kvs
garlick dab5030
testsuite: drop issue test for purge + journal
garlick 6365e90
flux-config-job-manager(5): nix journal-size-limit
garlick 930d9da
job-list: use a separate flag during init
garlick 4973782
job-list: pass list_ctx into job_state_create()
garlick e588991
job-list: defer requests until after init
garlick e5e2b09
job-manager: include R, jobspec in journal stream
garlick 689ab54
job-list: improve journal error handling
garlick 5fb3a24
job-list: add job_parse_jobspec and _R variants
garlick 3dd36bd
job-list: process R, jobspec from journal not KVS
garlick 7c23756
job-list: drop futures list
garlick 3724d77
testsuite: drop job-list tests for illegal KVS content
garlick abdb9b6
job-list: drop code for deferring job data updates
garlick File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,13 @@ | |
const flux_msg_t *msg, void *arg) | ||
{ | ||
struct list_ctx *ctx = arg; | ||
|
||
if (!ctx->jsctx->initialized) { | ||
if (flux_msglist_append (ctx->deferred_requests, msg) < 0) | ||
goto error; | ||
return; | ||
} | ||
|
||
int pending = zlistx_size (ctx->jsctx->pending); | ||
int running = zlistx_size (ctx->jsctx->running); | ||
int inactive = zlistx_size (ctx->jsctx->inactive); | ||
|
@@ -57,15 +64,12 @@ | |
"idsync", | ||
"lookups", idsync_lookups, | ||
"waits", idsync_waits, | ||
"stats_watchers", stats_watchers) < 0) { | ||
flux_log_error (h, "%s: flux_respond_pack", __FUNCTION__); | ||
goto error; | ||
} | ||
|
||
"stats_watchers", stats_watchers) < 0) | ||
flux_log_error (h, "error responding to stats-get request"); | ||
return; | ||
error: | ||
if (flux_respond_error (h, msg, errno, NULL) < 0) | ||
flux_log_error (h, "%s: flux_respond_error", __FUNCTION__); | ||
flux_log_error (h, "error responding to stats-get request"); | ||
} | ||
|
||
static void purge_cb (flux_t *h, | ||
|
@@ -98,6 +102,17 @@ | |
flux_log (h, LOG_DEBUG, "purged %d inactive jobs", count); | ||
} | ||
|
||
void requeue_deferred_requests (struct list_ctx *ctx) | ||
{ | ||
const flux_msg_t *msg; | ||
|
||
while ((msg = flux_msglist_pop (ctx->deferred_requests))) { | ||
if (flux_requeue (ctx->h, msg, FLUX_RQ_TAIL) < 0) | ||
flux_log_error (ctx->h, "error requeuing deferred request"); | ||
flux_msg_decref (msg); | ||
} | ||
} | ||
|
||
static void disconnect_cb (flux_t *h, | ||
flux_msg_handler_t *mh, | ||
const flux_msg_t *msg, | ||
|
@@ -186,6 +201,7 @@ | |
if (ctx) { | ||
int saved_errno = errno; | ||
flux_msg_handler_delvec (ctx->handlers); | ||
flux_msglist_destroy (ctx->deferred_requests); | ||
if (ctx->jsctx) | ||
job_state_destroy (ctx->jsctx); | ||
if (ctx->isctx) | ||
|
@@ -207,7 +223,9 @@ | |
goto error; | ||
if (!(ctx->isctx = idsync_ctx_create (ctx->h))) | ||
goto error; | ||
if (!(ctx->jsctx = job_state_create (ctx->isctx))) | ||
if (!(ctx->jsctx = job_state_create (ctx))) | ||
goto error; | ||
if (!(ctx->deferred_requests = flux_msglist_create ())) | ||
goto error; | ||
return ctx; | ||
error: | ||
|
@@ -224,10 +242,6 @@ | |
flux_log_error (h, "initialization error"); | ||
goto done; | ||
} | ||
if (job_state_init_from_kvs (ctx->jsctx) < 0) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. commit message typo: s/sentinal/sentinel/ |
||
flux_log_error (h, "initialization from kvs error"); | ||
goto done; | ||
} | ||
if (flux_reactor_run (flux_get_reactor (h), 0) < 0) | ||
goto done; | ||
rc = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever!