Skip to content

WIP: content: flush before checkpointing #6260

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

chu11
Copy link
Member

@chu11 chu11 commented Sep 5, 2024

Problem: Before checkpointing, users need to remember to call content.flush, to ensure data has been flushed to the backing store. It is easy to forget this.

Within the content module, call content.flush before checkpointing.

Fixes #6242


Last in the chain, this is built on top of #6255 and then #6240. So this one is last, setting WIP for now.

@chu11 chu11 force-pushed the issue6242_content_flush_in_checkpoint branch from 8e9d319 to 647340f Compare December 18, 2024 18:31
@chu11 chu11 force-pushed the issue6242_content_flush_in_checkpoint branch 2 times, most recently from 26e38fe to f7250e7 Compare April 1, 2025 20:08
@chu11 chu11 force-pushed the issue6242_content_flush_in_checkpoint branch from f7250e7 to aa11c8f Compare April 9, 2025 18:20
@chu11 chu11 force-pushed the issue6242_content_flush_in_checkpoint branch from aa11c8f to aa3110b Compare July 10, 2025 16:31
chu11 added 5 commits July 18, 2025 10:00
Problem: There is no coverage to ensure FLUX_KVS_SYNC fails when
there is no longer space on disk.

Add coverage to t0090-content-enospc.t.
Problem: There is no coverage to ensure FLUX_KVS_SYNC does not
work if there is no backing store.

Add coverage in t1010-kvs-commit-sync.t.
Problem: When the KVS module is unloaded, a checkpoint of the root
reference is attempted.  However, a content.flush is not done
beforehand.  This could result in an invalid checkpoint reference
as data is not guaranteed to be flushed to the backing store.

Solution: Call content.flush before checkpointing.

Fixes flux-framework#6237
Problem: Before checkpointing, users need to remember to call
content.flush, to ensure data has been flushed to the backing store.
It is easy to forget this.

Within the content module, call content.flush before checkpointing.

Fixes flux-framework#6242
Problem: Calls to content.checkpoint-put (via kvs_checkpoint_commit())
will automatically call content.flush.  Therefore the calls to
content.flush in the kvs are duplicates and now unnecessary.

Remove calls to content.flush in the kvs module.
@chu11 chu11 force-pushed the issue6242_content_flush_in_checkpoint branch from aa3110b to cd83d1a Compare July 18, 2025 17:09
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

Attention: Patch coverage is 69.23077% with 12 lines in your changes missing coverage. Please review.

Project coverage is 83.88%. Comparing base (df3c11c) to head (cd83d1a).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/modules/content/checkpoint.c 68.42% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6260      +/-   ##
==========================================
- Coverage   83.91%   83.88%   -0.03%     
==========================================
  Files         540      540              
  Lines       90610    90617       +7     
==========================================
- Hits        76033    76013      -20     
- Misses      14577    14604      +27     
Files with missing lines Coverage Δ
src/modules/kvs/kvs.c 74.46% <ø> (+0.12%) ⬆️
src/modules/kvs/kvstxn.c 80.54% <100.00%> (+0.28%) ⬆️
src/modules/content/checkpoint.c 72.36% <68.42%> (-5.03%) ⬇️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

content: call content.flush within content-checkout.put
1 participant