-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Disable secondary test with sst truncation deletion; API clarification #13395
Conversation
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
LGTM! Thanks for the quick fix.
include/rocksdb/db.h
Outdated
// WARNING: Secondary databases cannot read shared SST files that have been | ||
// truncated in the primary database. To avoid compatibility issues, users | ||
// should refrain from using features in the primary database that can cause | ||
// truncation, such as setting `bytes_max_delete_chunk > 0` when invoking |
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.
nit: rate_bytes_per_sec
is another setting that enables slow deletion:
rocksdb/file/delete_scheduler.cc
Line 64 in e697219
if (rate_bytes_per_sec_.load() <= 0 || |
These two both need to be > 0 in order for ftruncate
to be used for file deletion.
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.
Fixed
edc6e55
to
2bae302
Compare
@hx235 has updated the pull request. You must reimport the pull request before landing. |
@hx235 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
thanks for making this change! hopefully the secondary crash tests are more quiet
Context/Summary:
Secondary DB relies on open file descriptor of the shared SST file in primary DB to continue being able to read the file even if that file is deleted in the primary DB. However, this won't work if the file is truncated instead of deleted, which triggers an "truncated block read" corruption in stress test on secondary db reads. Truncation can happen if RocksDB implementation of SSTFileManager and
bytes_max_delete_chunk>0
are used. This PR is to disable such testing combination in stress test and clarify the related API.Test: