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

WIP: content: flush before checkpointing #6260

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
9 changes: 3 additions & 6 deletions src/modules/content-files/content-files.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ void checkpoint_get_cb (flux_t *h,
if (flux_respond_pack (h,
msg,
"{s:O}",
"value",
o) < 0)
"value", o) < 0)
flux_log_error (h, "error responding to checkpoint-get request");
free (data);
json_decref (o);
Expand Down Expand Up @@ -257,10 +256,8 @@ void checkpoint_put_cb (flux_t *h,
if (flux_request_unpack (msg,
NULL,
"{s:s s:o}",
"key",
&key,
"value",
&o) < 0)
"key", &key,
"value", &o) < 0)
goto error;
if (!(value = json_dumps (o, JSON_COMPACT))) {
errstr = "failed to encode checkpoint value";
Expand Down
21 changes: 7 additions & 14 deletions src/modules/content-s3/content-s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,10 @@ static struct s3_config *parse_config (const flux_conf_t *conf,
&error,
"{s:{s:s, s:s, s:s, s?b !} }",
"content-s3",
"credential-file",
&cred_file,
"bucket",
&bucket,
"uri",
&uri,
"virtual-host-style",
&is_virtual_host) < 0) {
"credential-file", &cred_file,
"bucket", &bucket,
"uri", &uri,
"virtual-host-style", &is_virtual_host) < 0) {
errprintf (errp, "%s", error.text);
goto error;
}
Expand Down Expand Up @@ -367,8 +363,7 @@ void checkpoint_get_cb (flux_t *h,
if (flux_respond_pack (h,
msg,
"{s:O}",
"value",
o) < 0) {
"value", o) < 0) {
errno = EIO;
flux_log_error (h, "error responding to checkpoint-get request (pack)");
}
Expand Down Expand Up @@ -400,10 +395,8 @@ void checkpoint_put_cb (flux_t *h,
if (flux_request_unpack (msg,
NULL,
"{s:s s:o}",
"key",
&key,
"value",
&o) < 0)
"key", &key,
"value", &o) < 0)
goto error;
if (!(value = json_dumps (o, JSON_COMPACT))) {
errstr = "failed to encode checkpoint value";
Expand Down
9 changes: 3 additions & 6 deletions src/modules/content-sqlite/content-sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@ void checkpoint_get_cb (flux_t *h,
if (flux_respond_pack (h,
msg,
"{s:O}",
"value",
o) < 0)
"value", o) < 0)
flux_log_error (h, "flux_respond_pack");
(void )sqlite3_reset (ctx->checkpt_get_stmt);
json_decref (o);
Expand All @@ -440,10 +439,8 @@ void checkpoint_put_cb (flux_t *h,
if (flux_request_unpack (msg,
NULL,
"{s:s s:o}",
"key",
&key,
"value",
&o) < 0)
"key", &key,
"value", &o) < 0)
goto error;
if (!(value = json_dumps (o, JSON_COMPACT))) {
errstr = "failed to encode checkpoint value";
Expand Down
1 change: 0 additions & 1 deletion src/modules/content/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,6 @@ static void content_register_backing_request (flux_t *h,
if (flux_respond (h, msg, NULL) < 0)
flux_log_error (h, "error responding to register-backing request");
(void)cache_flush (cache);
(void)checkpoints_flush (cache->checkpoint);
return;
error:
if (flux_respond_error (h, msg, errno, errstr) < 0)
Expand Down
Loading
Loading