提交 8dbbdf4f 编写于 作者: Q qinzuoyan

fix rocksdb EnableFileDeletions(); fix test code

Summary: Ref T10566

Test Plan: N/A

Reviewers: sunweijie, cailiuyang

Reviewed By: sunweijie

Subscribers: #pegasus

Maniphest Tasks: T10566

Differential Revision: https://phabricator.d.xiaomi.net/D84866
上级 ce64caa6
......@@ -58,12 +58,14 @@ Status DBImpl::EnableFileDeletions(bool force) {
--disable_delete_obsolete_files_;
}
if (disable_delete_obsolete_files_ == 0) {
should_purge_files = true;
const uint64_t start_micros = env_->NowMicros();
FindObsoleteFiles(&job_context, false);
Log(InfoLogLevel::INFO_LEVEL, db_options_.info_log,
"File Deletions Enabled, find obsoleted files elapsed: %" PRIu64 "ns",
env_->NowMicros() - start_micros);
if (job_context.HaveSomethingToDelete()) {
should_purge_files = true;
}
} else {
Log(InfoLogLevel::WARN_LEVEL, db_options_.info_log,
"File Deletions Enable, but not really enabled. Counter: %d",
......
......@@ -214,7 +214,7 @@ function run_test()
pushd $ROOT/src/builder/bin/$module
REPORT_DIR=$REPORT_DIR ./run.sh
if [ $? != 0 ]; then
echo "run test \"$module\" in $pwd failed"
echo "run test \"$module\" in `pwd` failed"
exit
fi
popd
......
......@@ -22,7 +22,8 @@ global_env::global_env()
void global_env::get_dirs()
{
const char *cmd1 = "ps aux | grep pegasus_server | grep meta1 | awk '{print $2}'";
const char *cmd1 =
"ps aux | grep pegasus_server | grep '/meta1/pegasus_server' | awk '{print $2}'";
std::stringstream ss1;
assert(dsn::utils::pipe_execute(cmd1, ss1) == 0);
int meta1_pid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册