mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make GetDbIdentity pure virtual and also implement it for StackableDB, DBWithTTL
Summary: As title Test Plan: make clean and make Reviewers: igor Reviewed By: igor CC: leveldb Differential Revision: https://reviews.facebook.net/D14469
This commit is contained in:
@@ -295,10 +295,7 @@ class DB {
|
||||
// Sets the globally unique ID created at database creation time by invoking
|
||||
// Env::GenerateUniqueId(), in identity. Returns Status::OK if identity could
|
||||
// be set properly
|
||||
virtual Status GetDbIdentity(std::string& identity) {
|
||||
identity.clear();
|
||||
return Status::OK();
|
||||
}
|
||||
virtual Status GetDbIdentity(std::string& identity) = 0;
|
||||
|
||||
private:
|
||||
// No copying allowed
|
||||
|
||||
@@ -140,6 +140,10 @@ class StackableDB : public DB {
|
||||
return db_->DeleteFile(name);
|
||||
}
|
||||
|
||||
virtual Status GetDbIdentity(std::string& identity) {
|
||||
return db_->GetDbIdentity(identity);
|
||||
}
|
||||
|
||||
virtual Status GetUpdatesSince(SequenceNumber seq_number,
|
||||
unique_ptr<TransactionLogIterator>* iter)
|
||||
override {
|
||||
|
||||
Reference in New Issue
Block a user