Merge pull request #737 from mlin/readonly-syncwal
Override DBImplReadOnly::SyncWAL() to return NotSupported.
This commit is contained in:
commit
94ac8826c4
@ -100,6 +100,11 @@ class DBImplReadOnly : public DBImpl {
|
|||||||
return Status::NotSupported("Not supported operation in read only mode.");
|
return Status::NotSupported("Not supported operation in read only mode.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using DBImpl::SyncWAL;
|
||||||
|
virtual Status SyncWAL() override {
|
||||||
|
return Status::NotSupported("Not supported operation in read only mode.");
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class DB;
|
friend class DB;
|
||||||
|
|
||||||
|
@ -244,6 +244,7 @@ TEST_F(DBTest, ReadOnlyDB) {
|
|||||||
ASSERT_OK(ReadOnlyReopen(options));
|
ASSERT_OK(ReadOnlyReopen(options));
|
||||||
ASSERT_EQ("v3", Get("foo"));
|
ASSERT_EQ("v3", Get("foo"));
|
||||||
ASSERT_EQ("v2", Get("bar"));
|
ASSERT_EQ("v2", Get("bar"));
|
||||||
|
ASSERT_TRUE(db_->SyncWAL().IsNotSupported());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(DBTest, CompactedDB) {
|
TEST_F(DBTest, CompactedDB) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user