-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4484 from chu11/issue4482_flush_list_corruption
broker: fix content-cache flush list corruption
- Loading branch information
Showing
3 changed files
with
55 additions
and
2 deletions.
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 |