Skip to content

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.

@jowlyzhang jowlyzhang requested a review from pdillinger June 30, 2023 17:13
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!

@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.

3 participants