-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Assert unlimited max_open_files for FIFO compaction. #8172
Assert unlimited max_open_files for FIFO compaction. #8172
Conversation
593c979
to
6f38b78
Compare
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.
Looks good so far. Do you mind also mentioning this under "Bug Fixes" section in the "HISTORY.md" file?
It looks like some tests relied on the now unsupported combination of options. You can try running make check -j$(nproc)
locally (if that fails and it's not obvious what caused it, try make watch-log
) to find all such cases.
756785a
to
a43af28
Compare
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.
Looks great!
utilities/option_change_migration/option_change_migration_test.cc
Outdated
Show resolved
Hide resolved
Resolves facebook#8014 - Add an assertion on `DB::Open` to ensure `db_options.max_open_files` is unlimited if FIFO Compaction is being used. - This is to align with what the docs mention and to prevent premature data deletion. - Update tests to work with this assertion. Test Plan: 'make check -j$(nproc)`
a43af28
to
fe19286
Compare
@thejchap has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
if (cf_options.compaction_style == kCompactionStyleFIFO && | ||
db_options.max_open_files != -1 && cf_options.ttl > 0) { |
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.
Can you explain the ttl > 0? If ttl == 0, is it okay if max_open_files != -1 ?
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.
As far as we know, the max_open_files == -1
is only needed to ensure the files' creation_time properties are read, which are used for deciding to trigger TTL compaction. When ttl == 0
, TTL compaction is disabled.
Resolves #8014
DB::Open
to ensuredb_options.max_open_files
is unlimited if FIFO Compaction is being used.Test Plan:
$ make check -j$(nproc) Generated TARGETS Summary: - 6 libs - 0 binarys - 180 tests