Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Add an option to enable Pegasus features #14

Merged
merged 4 commits into from
Apr 18, 2019

Conversation

acelyc111
Copy link
Member

@acelyc111 acelyc111 commented Apr 17, 2019

  • option中增加一个pegasus_data用于标记是否是Pegasus使用的rocksdb数据
  • 通过配置化, 使得项目本身可运行于非Pegasus模式下
  • 修复部分单测不过的问题(官方版本已修复)

@acelyc111 acelyc111 closed this Apr 17, 2019
@acelyc111 acelyc111 reopened this Apr 17, 2019
qinzuoyan
qinzuoyan previously approved these changes Apr 17, 2019
@@ -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());

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

Copy link
Member Author

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));

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 到新版本再去掉

Copy link
Member Author

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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种跟 5.9.2 有区别的地方建议都加标注

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

db/version_set.cc Outdated Show resolved Hide resolved
@acelyc111 acelyc111 merged commit 86d7fd6 into XiaoMi:pegasus Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants