-
Notifications
You must be signed in to change notification settings - Fork 51
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
broker: fix content-cache flush list corruption #4484
Merged
mergify
merged 2 commits into
flux-framework:master
from
chu11:issue4482_flush_list_corruption
Aug 11, 2022
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh -e | ||
|
||
# How this test works | ||
# | ||
# add some unique data to the content cache, we do several stores to | ||
# build up a decent length internal list of flushable cache entries. | ||
# | ||
# write some of the same data again, if error present internal flush | ||
# list will be messed up and length of flush list < number of dirty | ||
# entries (acct_dirty). | ||
# | ||
# before fix, flux content flush will hang b/c number of dirty entries | ||
# (acct_dirty) never reaches zero. | ||
|
||
cat <<-EOF >t4482.sh | ||
#!/bin/sh -e | ||
|
||
echo "abcde" | flux content store | ||
echo "fghij" | flux content store | ||
echo "klmno" | flux content store | ||
echo "pqrst" | flux content store | ||
echo "tuvwx" | flux content store | ||
|
||
echo "fghij" | flux content store | ||
echo "klmno" | flux content store | ||
|
||
flux module load content-sqlite | ||
|
||
flux content flush | ||
|
||
flux module remove content-sqlite | ||
|
||
EOF | ||
|
||
chmod +x t4482.sh | ||
|
||
flux start -s 1 \ | ||
-o,--setattr=broker.rc1_path= \ | ||
-o,--setattr=broker.rc3_path= \ | ||
./t4482.sh |
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.
Since the test script is generated in place, it might be easier (and keep all test components together) to generate the custom
rc1
andrc3
scripts here as well. I'd also hate to proliferate the one-off rc scripts int/rc
and end up with manyrc1-issue*
files in there in the future.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.
Or, you could do away with the rc scripts and just load and unload necessary modules directly in the test script as you are doing with
content-sqlite
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.
My vote would be to make the test self-contained as well. It should probably drop the bash -e option and handle errors explicitly then, so that it doesn't bail out leaving modules unloaded for the next test.