未验证 提交 c578cc6c 编写于 作者: Q QinZuoyan 提交者: GitHub

scripts: fix format_files.sh to ignore rdsn module (#209)

上级 8bf8a7d2
......@@ -9,11 +9,14 @@ sds=./src/shell/sds
if [ $# -eq 0 ]; then
echo "formating all .h/.cpp files in $root_dir ..."
find . -type f -not \( -wholename "$linenoise/*" -o -wholename "$sds/*" -o -wholename "./rocksdb/*" \) -regextype posix-egrep -regex ".*\.(cpp|h)" | xargs clang-format -i -style=file
find . -type f -not \( -wholename "$linenoise/*" -o -wholename "$sds/*" -o -wholename "./rocksdb/*" -o -wholename "./rdsn/*" \) \
-regextype posix-egrep -regex ".*\.(cpp|h)" | xargs clang-format -i -style=file
elif [ $1 = "-h" ]; then
echo "USAGE: ./format-files.sh [<relative_path>] -- format .h/.cpp files in $root_dir/relative_path"
echo " ./format-files.sh means format all .h/.cpp files in $root_dir"
else
echo "formating all .h/.cpp files in $root_dir/$1 ..."
find ./$1 -type f -not \( -wholename "$linenoise/*" -o -wholename "$sds/*" -o -wholename "./rocksdb/*" \) -regextype posix-egrep -regex ".*\.(cpp|h)" | xargs clang-format -i -style=file
find ./$1 -type f -not \( -wholename "$linenoise/*" -o -wholename "$sds/*" -o -wholename "./rocksdb/*" -o -wholename "./rdsn/*" \) \
-regextype posix-egrep -regex ".*\.(cpp|h)" | xargs clang-format -i -style=file
fi
......@@ -38,7 +38,8 @@ public:
if (_default_ttl != 0 && expire_ts == 0) {
// should update ttl
*new_value = existing_value.ToString();
pegasus_update_expire_ts(_value_schema_version, *new_value, utils::epoch_now() + _default_ttl);
pegasus_update_expire_ts(
_value_schema_version, *new_value, utils::epoch_now() + _default_ttl);
*value_changed = true;
return false;
}
......
......@@ -63,10 +63,7 @@ int pegasus_server_write::on_batched_write_requests(dsn::message_ex **requests,
return on_batched_writes(requests, count);
}
void pegasus_server_write::set_default_ttl(uint32_t ttl)
{
_write_svc->set_default_ttl(ttl);
}
void pegasus_server_write::set_default_ttl(uint32_t ttl) { _write_svc->set_default_ttl(ttl); }
int pegasus_server_write::on_batched_writes(dsn::message_ex **requests, int count)
{
......
......@@ -202,10 +202,7 @@ void pegasus_write_service::batch_abort(int64_t decree, int err)
clear_up_batch_states();
}
void pegasus_write_service::set_default_ttl(uint32_t ttl)
{
_impl->set_default_ttl(ttl);
}
void pegasus_write_service::set_default_ttl(uint32_t ttl) { _impl->set_default_ttl(ttl); }
void pegasus_write_service::clear_up_batch_states()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册