-
Notifications
You must be signed in to change notification settings - Fork 21
Add an option to enable Pegasus features #14
Conversation
acelyc111
commented
Apr 17, 2019
•
edited
Loading
edited
- option中增加一个pegasus_data用于标记是否是Pegasus使用的rocksdb数据
- 通过配置化, 使得项目本身可运行于非Pegasus模式下
- 修复部分单测不过的问题(官方版本已修复)
@@ -55,7 +55,8 @@ class TransactionTest : public ::testing::TestWithParam< | |||
env = new FaultInjectionTestEnv(Env::Default()); | |||
options.env = env; | |||
options.concurrent_prepare = std::get<1>(GetParam()); | |||
dbname = test::TmpDir() + "/transaction_testdb"; | |||
size_t tid = std::hash<std::thread::id>()(std::this_thread::get_id()); |
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.
这里都加个 TODO(laiyingchun) 吧,标记后面这里要回归成 rocksdb 的 test::PerThreadDBPath
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.
不需要
因为后面升级的话肯定是以官方分支为基础,再append我们的修改. 这个地方必然是有冲突需要自己解决的, 到时以官方分支为准即可.
ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 2000, 3000)); | ||
ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 2000, 3000)); | ||
ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 4000, 6100)); | ||
ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 2000, 3500)); |
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.
标注一下 attention,this place differs with rocksdb 5.9.2,等 merge 到新版本再去掉
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.
同上
@@ -970,7 +970,7 @@ TEST_P(DBTestUniversalCompaction, UniversalCompactionCompressRatio2) { | |||
dbfull()->TEST_WaitForFlushMemTable(); | |||
dbfull()->TEST_WaitForCompact(); | |||
} | |||
ASSERT_LT(TotalSize(), 120000U * 12 * 0.8 + 120000 * 2); | |||
ASSERT_LT(TotalSize(), 120000U * 12 * 0.82 + 120000 * 2); |
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.
这种跟 5.9.2 有区别的地方建议都加标注
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.
同上