-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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 DBImplReadOnly #10004
Conversation
@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
0afdf9f
to
5e0c9f1
Compare
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
@jowlyzhang 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 @jowlyzhang for the PR. Mostly LGTM with a few minor comments.
Can we add some test coverage for the error cases for Get()
, NewIterator()
and NewIterators()
?
Furthermore, can you update HISTORY.md, or should we update it after updating CompactedDBImpl
(in another PR)?
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
3f58290
to
b7f1dae
Compare
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
b7f1dae
to
00f1b3e
Compare
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
|
Thank you for the suggestion. I will update the HISTORY.md file in the follow up PR after |
00f1b3e
to
d1a8ab9
Compare
@jowlyzhang 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.
The test failure is legit and can be fixed by checking the return status.
Otherwise LGTM.
d1a8ab9
to
ade5b62
Compare
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
ade5b62
to
bcb1bf1
Compare
@jowlyzhang 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.
Thanks @jowlyzhang for the PR!
@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
bcb1bf1
to
d68e90b
Compare
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
d68e90b
to
2eaee08
Compare
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
2eaee08
to
9d30a42
Compare
@jowlyzhang has updated the pull request. You must reimport the pull request before landing. |
@jowlyzhang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…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
This PR adds timestamp support to a read only DB instance opened as
DBImplReadOnly
. A follow up PR will add the same support toCompactedDBImpl
.With this, read only database has these timestamp related APIs:
ReadOptions.timestamp
: read should return the latest data visible to this specified timestampIterator::timestamp()
: returns the timestamp associated with the key, valueDB:Get(..., std::string* timestamp)
: returns the timestamp associated with the key, value intimestamp
Test plan (on devserver):