提交 8234faab 编写于 作者: O omegaga

Fix failed test

Summary: Fix failed persistent cache test introduced by recent PR to support cross-platform build.

Test Plan: Run persistent_cache_test (on multiple platforms)

Reviewers: sdong

Reviewed By: sdong

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D61467
上级 4990c0d1
......@@ -68,11 +68,8 @@ class BlockCacheTier : public PersistentCacheTier {
void TEST_Flush() override {
while (insert_ops_.Size()) {
#ifdef OS_WIN
Sleep(1000);
#else
/* sleep override */ sleep(1);
#endif
/* sleep override */
Env::Default()->SleepForMicroseconds(1000000);
}
}
......
......@@ -200,7 +200,8 @@ struct PersistentCacheConfig {
// file size in order to avoid dead lock.
size_t write_buffer_count() const {
assert(write_buffer_size);
return (writer_qdepth + writer_qdepth/5) * cache_file_size / write_buffer_size;
return static_cast<size_t>((writer_qdepth + 1.2) * cache_file_size /
write_buffer_size);
}
// writer-dispatch-size
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册