Skip to content
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

Fix a unit test hole for recovering UDTs with WAL files #11577

Closed
wants to merge 2 commits into from

Conversation

jowlyzhang
Copy link
Contributor

Thanks @pdillinger for pointing out this test hole. The test DBWALTestWithTimestamp.Recover that is intended to test recovery from WAL including user-defined timestamps doesn't achieve its promised coverage. Specifically, after #11557, timestamps will be removed during flush, and RocksDB by default flush memtables during recovery with avoid_flush_during_recovery defaults to false. This test didn't fail even if all the timestamps are quickly lost due to the default flush behavior.

This PR renamed test Recover to RecoverAndNoFlush, and updated it to verify timestamps are successfully recovered from WAL with some time-travel reads. avoid_flush_during_recovery is set to true to help do this verification.

On the other hand, for test DBWALTestWithTimestamp.RecoverAndFlush, since flush on reopen is DB's default behavior. Setting the flags max_write_buffer and arena_block_size are not really the factors that enforces the flush, so these flags are removed.

Test Plan:
./db_wal_test

@facebook-github-bot
Copy link
Contributor

@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

Copy link
Contributor

@pdillinger pdillinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

db/db_wal_test.cc Outdated Show resolved Hide resolved
@pdillinger
Copy link
Contributor

Don't forget to re-import :)

@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

@jowlyzhang
Copy link
Contributor Author

Don't forget to re-import :)

Thank you for your help reviewing this PR and the reminder!

@facebook-github-bot
Copy link
Contributor

@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jowlyzhang merged this pull request in baf37a0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants