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

Add timestamp support to CompactedDBImpl #10030

Closed
wants to merge 5 commits into from

Conversation

jowlyzhang
Copy link
Contributor

@jowlyzhang jowlyzhang commented May 21, 2022

This PR is the second and last part for adding user defined timestamp support to read only DB. Specifically, the change in this PR includes:

  • options.timestamp respected by CompactedDBImpl::Get and CompactedDBImpl::MultiGet to return results visible up till that timestamp.
  • CompactedDBImpl::Get(...,std::string* timestsamp) and CompactedDBImpl::MultiGet(std::vector<std::string>* timestamps) return the timestamp(s) associated with the key(s).

Test Plan:

$COMPILE_WITH_ASAN=1 make -j24 all
$./db_readonly_with_timestamp_test --gtest_filter="DBReadOnlyTestWithTimestamp.CompactedDB*"
$./db_basic_test --gtest_filter="DBBasicTest.CompactedDB*"
$make all check

@jowlyzhang jowlyzhang force-pushed the compacted_db_readonly branch 2 times, most recently from 65ab62b to fca3bf4 Compare May 21, 2022 03:54
Copy link
Contributor

@riversand963 riversand963 left a comment

Choose a reason for hiding this comment

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

Thanks @jowlyzhang for the PR! Left some comments.

db/db_impl/compacted_db_impl.cc Outdated Show resolved Hide resolved
db/db_impl/compacted_db_impl.cc Outdated Show resolved Hide resolved
db/db_impl/compacted_db_impl.h Show resolved Hide resolved
@jowlyzhang
Copy link
Contributor Author

@riversand963 hello Yanqin, sending you this PR for a sanity check. The mini-crashtest failure seems legit because it constantly fails when I retry it, however I didn't quite get how the code path changed in this PR could be related to this crash because read only mode is disabled in this test:
Screen Shot 2022-05-23 at 10 15 34 AM

Do you have any suggestions for proceed to debug this crash?

@riversand963
Copy link
Contributor

I don't think it's related to your change, so ignore it for now. More details should be #10032

Copy link
Contributor

@riversand963 riversand963 left a comment

Choose a reason for hiding this comment

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

Thanks @jowlyzhang for the PR

db/db_readonly_with_timestamp_test.cc Outdated Show resolved Hide resolved
db/db_readonly_with_timestamp_test.cc Outdated Show resolved Hide resolved
db/db_readonly_with_timestamp_test.cc Outdated Show resolved Hide resolved
@riversand963
Copy link
Contributor

For the mini-crashtest failure, you may need to rebase onto latest main.
The LITE build failure is legit.
Not sure about the test failures on VS

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

@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 pushed a commit that referenced this pull request May 25, 2022
…10047)

Summary:
After #10030 and #10004, we can enable checkpoint and backup in stress tests when
user-defined timestamp is enabled.

This PR has no production risk.

Pull Request resolved: #10047

Test Plan:
```
TEST_TMPDIR=/dev/shm make crash_test_with_ts
```

Reviewed By: jowlyzhang

Differential Revision: D36641565

Pulled By: riversand963

fbshipit-source-id: d86c9d87efcc34c32d1aa176af691d32b897644a
@jowlyzhang jowlyzhang deleted the compacted_db_readonly branch May 25, 2022 20:28
This pull request was closed.
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