]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Add timestamp support to secondary instance (#10061)
authorYu Zhang <yuzhangyu@fb.com>
Fri, 27 May 2022 02:45:31 +0000 (19:45 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 27 May 2022 02:45:31 +0000 (19:45 -0700)
commit8c4ea7b85166d092c4d05d7116172eb8ab9ff484
tree1760cb6a0d658300ab43891c94db515249955d40
parentf6e45382e998e3500a4d453cf6ac91695eb15f41
Add timestamp support to secondary instance (#10061)

Summary:
This PR adds timestamp support to the secondary DB instance.

With this, these timestamp related APIs are supported:

ReadOptions.timestamp : read should return the latest data visible to this specified timestamp
Iterator::timestamp() : returns the timestamp associated with the key, value
DB:Get(..., std::string* timestamp) : returns the timestamp associated with the key, value in timestamp

Test plan (on devserver):
```
$COMPILE_WITH_ASAN=1 make -j24 all
$./db_secondary_test --gtest_filter=DBSecondaryTestWithTimestamp*
```

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10061

Reviewed By: riversand963

Differential Revision: D36722915

Pulled By: jowlyzhang

fbshipit-source-id: 644ada39e4e51164a759593478c38285e0c1a666
db/db_impl/db_impl_secondary.cc
db/db_impl/db_impl_secondary.h
db/db_secondary_test.cc