diff --git a/src/modules/content/cache.c b/src/modules/content/cache.c index 6d4da698e9ce..68116bdfc886 100644 --- a/src/modules/content/cache.c +++ b/src/modules/content/cache.c @@ -34,7 +34,7 @@ * The callback is synchronized with the instance heartbeat, with a * sync period upper bound set to 'sync_max' seconds. */ -static double sync_max = 10.; +static double sync_max = 100.; static const char *default_hash = "sha1"; diff --git a/src/modules/kvs/kvs.c b/src/modules/kvs/kvs.c index 6b3b8a2179c9..1eb749fbeb22 100644 --- a/src/modules/kvs/kvs.c +++ b/src/modules/kvs/kvs.c @@ -2914,15 +2914,27 @@ static int checkpoint_get (flux_t *h, char *buf, size_t len, int *seq) */ static int checkpoint_put (flux_t *h, const char *rootref, int rootseq) { - flux_future_t *f = NULL; + flux_future_t *fcf = NULL; + flux_future_t *fcc = NULL; int rv = -1; - if (!(f = kvs_checkpoint_commit (h, NULL, rootref, rootseq, 0, 0)) - || flux_rpc_get (f, NULL) < 0) + /* first must ensure all content is flushed */ + if (!(fcf = flux_rpc (h, "content.flush", NULL, 0, 0)) + || flux_rpc_get (fcf, NULL) < 0) { + /* fallthrough to kvs_checkpoint_commit(), we may wish to checkpoint + * only to the content layer + */ + if (errno != ENOSYS) + goto error; + } + + if (!(fcc = kvs_checkpoint_commit (h, NULL, rootref, rootseq, 0, 0)) + || flux_rpc_get (fcc, NULL) < 0) goto error; rv = 0; error: - flux_future_destroy (f); + flux_future_destroy (fcf); + flux_future_destroy (fcc); return rv; } diff --git a/t/t0028-content-backing-none.t b/t/t0028-content-backing-none.t index abc72df1b079..9bf6723f0847 100755 --- a/t/t0028-content-backing-none.t +++ b/t/t0028-content-backing-none.t @@ -54,7 +54,8 @@ test_expect_success 'load kvs and create some kvs data' ' ' test_expect_success 'reload kvs' ' - flux module reload kvs && + flux module reload kvs + flux kvs get a && test $(flux kvs get a) = "1" && test $(flux kvs get b) = "foo" '