-
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
Add unit test to verify that the dynamic priority can be passed from compaction to FS #10088
Conversation
… from compaction to FS
… from compaction to FS
…into io_priority_unit_test_1
@gitbw95 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
…into io_priority_unit_test_1
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
…into io_priority_unit_test_1
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
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.
Overall LGTM, but there seems to be a lot of code duplication between CompactionJobIOPriorityTestBase and CompactionJobTestBase. Is there any way we can reuse most of the code for the overridden functions? AFAICT, the main difference is which table builder to use.
…into io_priority_unit_test_1
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
@gitbw95 has updated the pull request. You must reimport the pull request before landing. |
This comment is addressed in the latest commit. |
@gitbw95 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary:
Add unit tests to verify that the dynamic priority can be passed from compaction to FS. Compaction reads&writes and other DB reads&writes share the same read&write paths to FSRandomAccessFile or FSWritableFile, so a MockTestFileSystem is added to replace the default filesystem from Env to intercept and verify the io_priority. To prepare the compaction input files, use the default filesystem from Env. To test the io priority of the compaction reads and writes, db_options_.fs is set as MockTestFileSystem.
Test Plan:
Add unit tests.