Skip to content

Commit

Permalink
refactor(FLAG): Revert "refactor(FLAG): remove the quotes of section …
Browse files Browse the repository at this point in the history
…field of FLAG (apache#1308)"

This reverts commit 966e900.
  • Loading branch information
acelyc111 committed Feb 11, 2023
1 parent 4476219 commit e6baf35
Show file tree
Hide file tree
Showing 45 changed files with 136 additions and 135 deletions.
4 changes: 2 additions & 2 deletions src/block_service/directio_writable_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ namespace dsn {
namespace dist {
namespace block_service {

DSN_DEFINE_uint32(replication,
DSN_DEFINE_uint32("replication",
direct_io_buffer_pages,
64,
"Number of pages we need to set to direct io buffer");
DSN_TAG_VARIABLE(direct_io_buffer_pages, FT_MUTABLE);

DSN_DEFINE_bool(replication,
DSN_DEFINE_bool("replication",
enable_direct_io,
false,
"Whether to enable direct I/O when download files");
Expand Down
8 changes: 4 additions & 4 deletions src/block_service/fds/fds_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ namespace dsn {
namespace dist {
namespace block_service {

DSN_DEFINE_uint32(replication, fds_write_limit_rate, 100, "write rate limit of fds(MB/s)");
DSN_DEFINE_uint32("replication", fds_write_limit_rate, 100, "write rate limit of fds(MB/s)");
DSN_TAG_VARIABLE(fds_write_limit_rate, FT_MUTABLE);

DSN_DEFINE_uint32(replication, fds_write_burst_size, 500, "write burst size of fds(MB)");
DSN_DEFINE_uint32("replication", fds_write_burst_size, 500, "write burst size of fds(MB)");
DSN_TAG_VARIABLE(fds_write_burst_size, FT_MUTABLE);

DSN_DEFINE_uint32(replication, fds_read_limit_rate, 100, "read rate limit of fds(MB/s)");
DSN_DEFINE_uint32("replication", fds_read_limit_rate, 100, "read rate limit of fds(MB/s)");
DSN_TAG_VARIABLE(fds_read_limit_rate, FT_MUTABLE);

DSN_DEFINE_uint32(replication, fds_read_batch_size, 100, "read batch size of fds(MB)");
DSN_DEFINE_uint32("replication", fds_read_batch_size, 100, "read batch size of fds(MB)");
DSN_TAG_VARIABLE(fds_read_batch_size, FT_MUTABLE);

class utils
Expand Down
8 changes: 4 additions & 4 deletions src/block_service/hdfs/hdfs_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ namespace block_service {

DEFINE_TASK_CODE(LPC_HDFS_SERVICE_CALL, TASK_PRIORITY_COMMON, THREAD_POOL_BLOCK_SERVICE)

DSN_DEFINE_uint64(replication,
DSN_DEFINE_uint64("replication",
hdfs_read_batch_size_bytes,
64 << 20,
"hdfs read batch size, the default value is 64MB");
DSN_TAG_VARIABLE(hdfs_read_batch_size_bytes, FT_MUTABLE);

DSN_DEFINE_uint32(replication, hdfs_read_limit_rate_mb_per_sec, 200, "hdfs read limit(MB/s)");
DSN_DEFINE_uint32("replication", hdfs_read_limit_rate_mb_per_sec, 200, "hdfs read limit(MB/s)");
DSN_TAG_VARIABLE(hdfs_read_limit_rate_mb_per_sec, FT_MUTABLE);

DSN_DEFINE_uint32(replication, hdfs_write_limit_rate_mb_per_sec, 200, "hdfs write limit(MB/s)");
DSN_DEFINE_uint32("replication", hdfs_write_limit_rate_mb_per_sec, 200, "hdfs write limit(MB/s)");
DSN_TAG_VARIABLE(hdfs_write_limit_rate_mb_per_sec, FT_MUTABLE);

DSN_DEFINE_uint64(replication,
DSN_DEFINE_uint64("replication",
hdfs_write_batch_size_bytes,
64 << 20,
"hdfs write batch size, the default value is 64MB");
Expand Down
8 changes: 4 additions & 4 deletions src/block_service/test/hdfs_service_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ static std::string example_name_node = "<hdfs_name_none>";
static std::string example_backup_path = "<hdfs_path>";
// Please modify following paras in 'config-test.ini' to enable hdfs_service_test,
// or hdfs_service_test will be skipped and return true.
DSN_DEFINE_string(hdfs_test, test_name_node, "<hdfs_name_none>", "hdfs name node");
DSN_DEFINE_string(hdfs_test,
DSN_DEFINE_string("hdfs_test", test_name_node, "<hdfs_name_none>", "hdfs name node");
DSN_DEFINE_string("hdfs_test",
test_backup_path,
"<hdfs_path>",
"path for uploading and downloading test files");

DSN_DEFINE_uint32(hdfs_test, num_test_file_lines, 4096, "number of lines in test file");
DSN_DEFINE_uint32(hdfs_test,
DSN_DEFINE_uint32("hdfs_test", num_test_file_lines, 4096, "number of lines in test file");
DSN_DEFINE_uint32("hdfs_test",
num_total_files_for_hdfs_concurrent_test,
64,
"number of total files for hdfs concurrent test");
Expand Down
2 changes: 1 addition & 1 deletion src/common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "utils/strings.h"

namespace dsn {
DSN_DEFINE_string(replication, cluster_name, "", "name of this cluster");
DSN_DEFINE_string("replication", cluster_name, "", "name of this cluster");

/*extern*/ const char *get_current_cluster_name()
{
Expand Down
2 changes: 1 addition & 1 deletion src/common/duplication_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_uint32(replication,
DSN_DEFINE_uint32("replication",
duplicate_log_batch_bytes,
4096,
"send mutation log batch bytes size per rpc");
Expand Down
2 changes: 1 addition & 1 deletion src/common/fs_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_int32(replication,
DSN_DEFINE_int32("replication",
disk_min_available_space_ratio,
10,
"if disk available space ratio "
Expand Down
4 changes: 2 additions & 2 deletions src/common/replication_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_int32(replication,
DSN_DEFINE_int32("replication",
max_concurrent_bulk_load_downloading_count,
5,
"concurrent bulk load downloading replica count");
Expand Down Expand Up @@ -81,7 +81,7 @@ DSN_DEFINE_int32(replication,
* Empty write is used for flushing WAL log entry which is submit asynchronously.
* Make sure it can work well if you diable it.
*/
DSN_DEFINE_bool(replication,
DSN_DEFINE_bool("replication",
empty_write_disabled,
false,
"whether to disable empty write, default is false");
Expand Down
2 changes: 1 addition & 1 deletion src/http/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

namespace dsn {

DSN_DEFINE_bool(http, enable_http_server, true, "whether to enable the embedded HTTP server");
DSN_DEFINE_bool("http", enable_http_server, true, "whether to enable the embedded HTTP server");

namespace {
error_s update_config(const http_request &req)
Expand Down
2 changes: 1 addition & 1 deletion src/meta/cluster_balance_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace dsn {
namespace replication {
DSN_DEFINE_uint32(meta_server,
DSN_DEFINE_uint32("meta_server",
balance_op_count_per_round,
10,
"balance operation count per round for cluster balancer");
Expand Down
2 changes: 1 addition & 1 deletion src/meta/greedy_load_balancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace dsn {
namespace replication {
DSN_DEFINE_bool(meta_server, balance_cluster, false, "whether to enable cluster balancer");
DSN_DEFINE_bool("meta_server", balance_cluster, false, "whether to enable cluster balancer");
DSN_TAG_VARIABLE(balance_cluster, FT_MUTABLE);

DSN_DECLARE_uint64(min_live_node_count_for_unfreeze);
Expand Down
4 changes: 2 additions & 2 deletions src/meta/meta_bulk_load_ingestion_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
namespace dsn {
namespace replication {

DSN_DEFINE_uint32(meta_server,
DSN_DEFINE_uint32("meta_server",
bulk_load_node_max_ingesting_count,
4,
"max partition_count executing ingestion for one node at the same time");
DSN_TAG_VARIABLE(bulk_load_node_max_ingesting_count, FT_MUTABLE);

DSN_DEFINE_uint32(meta_server, bulk_load_node_min_disk_count, 1, "min disk count of one node");
DSN_DEFINE_uint32("meta_server", bulk_load_node_min_disk_count, 1, "min disk count of one node");
DSN_TAG_VARIABLE(bulk_load_node_min_disk_count, FT_MUTABLE);

ingestion_context::ingestion_context() { reset_all(); }
Expand Down
6 changes: 3 additions & 3 deletions src/meta/meta_bulk_load_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_uint32(meta_server,
DSN_DEFINE_uint32("meta_server",
bulk_load_max_rollback_times,
10,
"if bulk load rollback time "
Expand All @@ -35,13 +35,13 @@ DSN_DEFINE_uint32(meta_server,
"failed");
DSN_TAG_VARIABLE(bulk_load_max_rollback_times, FT_MUTABLE);

DSN_DEFINE_bool(meta_server,
DSN_DEFINE_bool("meta_server",
bulk_load_verify_before_ingest,
false,
"verify files according to metadata before ingest");
DSN_TAG_VARIABLE(bulk_load_verify_before_ingest, FT_MUTABLE);

DSN_DEFINE_bool(meta_server,
DSN_DEFINE_bool("meta_server",
enable_concurrent_bulk_load,
false,
"whether to enable different apps to execute bulk load at the same time");
Expand Down
2 changes: 1 addition & 1 deletion src/meta/meta_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace replication {
// To be consistent with `max_replicas_in_group`, default value of `max_reserved_dropped_replicas`
// is set to 1 so that the unit tests can be passed. For production environments, it should be set
// to 0.
DSN_DEFINE_uint32(meta_server,
DSN_DEFINE_uint32("meta_server",
max_reserved_dropped_replicas,
1,
"max reserved number allowed for dropped replicas");
Expand Down
2 changes: 1 addition & 1 deletion src/meta/meta_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_uint64(meta_server,
DSN_DEFINE_uint64("meta_server",
min_live_node_count_for_unfreeze,
3,
"minimum live node count without which the state is freezed");
Expand Down
4 changes: 2 additions & 2 deletions src/meta/server_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ using namespace dsn;
namespace dsn {
namespace replication {

DSN_DEFINE_int32(meta_server,
DSN_DEFINE_int32("meta_server",
max_allowed_replica_count,
5,
"max replica count allowed for any app of a cluster");
Expand All @@ -68,7 +68,7 @@ DSN_DEFINE_validator(max_allowed_replica_count, [](int32_t allowed_replica_count
return allowed_replica_count > 0;
});

DSN_DEFINE_int32(meta_server,
DSN_DEFINE_int32("meta_server",
min_allowed_replica_count,
1,
"min replica count allowed for any app of a cluster");
Expand Down
25 changes: 14 additions & 11 deletions src/nfs/nfs_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ namespace dsn {
namespace service {
static uint32_t current_max_copy_rate_megabytes = 0;

DSN_DEFINE_uint32(nfs,
DSN_DEFINE_uint32("nfs",
nfs_copy_block_bytes,
4 * 1024 * 1024,
"max block size (bytes) for each network copy");
DSN_DEFINE_uint32(
nfs,
"nfs",
max_copy_rate_megabytes_per_disk,
0,
"max rate per disk of copying from remote node(MB/s), zero means disable rate limiter");
Expand All @@ -56,31 +56,34 @@ DSN_DEFINE_group_validator(max_copy_rate_megabytes_per_disk, [](std::string &mes
(FLAGS_max_copy_rate_megabytes_per_disk << 20) > FLAGS_nfs_copy_block_bytes;
});

DSN_DEFINE_int32(nfs,
DSN_DEFINE_int32("nfs",
max_concurrent_remote_copy_requests,
50,
"max concurrent remote copy to the same server on nfs client");
DSN_DEFINE_int32(nfs, max_concurrent_local_writes, 50, "max local file writes on nfs client");
DSN_DEFINE_int32(nfs, max_buffered_local_writes, 500, "max buffered file writes on nfs client");
DSN_DEFINE_int32(nfs,
DSN_DEFINE_int32("nfs", max_concurrent_local_writes, 50, "max local file writes on nfs client");
DSN_DEFINE_int32("nfs", max_buffered_local_writes, 500, "max buffered file writes on nfs client");
DSN_DEFINE_int32("nfs",
high_priority_speed_rate,
2,
"the copy speed rate of high priority comparing with low priority on nfs client");
DSN_DEFINE_int32(nfs,
DSN_DEFINE_int32("nfs",
file_close_expire_time_ms,
60 * 1000,
"max idle time for an opening file on nfs server");
DSN_DEFINE_int32(nfs,
DSN_DEFINE_int32("nfs",
file_close_timer_interval_ms_on_server,
30 * 1000,
"time interval for checking whether cached file handles need to be closed");
DSN_DEFINE_int32(nfs,
DSN_DEFINE_int32("nfs",
max_file_copy_request_count_per_file,
2,
"maximum concurrent remote copy requests for the same file on nfs client"
"to limit each file copy speed");
DSN_DEFINE_int32(nfs, max_retry_count_per_copy_request, 2, "maximum retry count when copy failed");
DSN_DEFINE_int32(nfs,
DSN_DEFINE_int32("nfs",
max_retry_count_per_copy_request,
2,
"maximum retry count when copy failed");
DSN_DEFINE_int32("nfs",
rpc_timeout_ms,
1e5, // 100s
"rpc timeout in milliseconds for nfs copy, "
Expand Down
2 changes: 1 addition & 1 deletion src/nfs/nfs_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace dsn {
namespace service {

DSN_DEFINE_uint32(
nfs,
"nfs",
max_send_rate_megabytes_per_disk,
0,
"max rate per disk of send to remote node(MB/s),zero means disable rate limiter");
Expand Down
8 changes: 4 additions & 4 deletions src/replica/disk_cleaner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ namespace dsn {
namespace replication {

DSN_DEFINE_uint64(
replication,
"replication",
gc_disk_error_replica_interval_seconds,
7 * 24 * 3600 /*7day*/,
"Duration of error replica being removed, which is in a directory with '.err' suffixed");
DSN_TAG_VARIABLE(gc_disk_error_replica_interval_seconds, FT_MUTABLE);

DSN_DEFINE_uint64(
replication,
"replication",
gc_disk_garbage_replica_interval_seconds,
24 * 3600 /*1day*/,
"Duration of garbaged replica being removed, which is in a directory with '.gar' suffixed");
DSN_TAG_VARIABLE(gc_disk_garbage_replica_interval_seconds, FT_MUTABLE);

DSN_DEFINE_uint64(replication,
DSN_DEFINE_uint64("replication",
gc_disk_migration_tmp_replica_interval_seconds,
24 * 3600 /*1day*/,
"Duration of disk-migration tmp replica being removed, which is in a directory "
"with '.tmp' suffixed");
DSN_TAG_VARIABLE(gc_disk_migration_tmp_replica_interval_seconds, FT_MUTABLE);

DSN_DEFINE_uint64(replication,
DSN_DEFINE_uint64("replication",
gc_disk_migration_origin_replica_interval_seconds,
7 * 24 * 3600 /*7day*/,
"Duration of disk-migration origin replica being removed, which is in a "
Expand Down
2 changes: 1 addition & 1 deletion src/replica/mutation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_uint64(replication,
DSN_DEFINE_uint64("replication",
abnormal_write_trace_latency_threshold,
1000 * 1000 * 1000, // 1s
"latency trace will be logged when exceed the write latency threshold");
Expand Down
2 changes: 1 addition & 1 deletion src/replica/mutation_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

namespace dsn {
namespace replication {
DSN_DEFINE_bool(replication,
DSN_DEFINE_bool("replication",
plog_force_flush,
false,
"when write private log, whether to flush file after write done");
Expand Down
2 changes: 1 addition & 1 deletion src/replica/replica_2pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_bool(replication,
DSN_DEFINE_bool("replication",
reject_write_when_disk_insufficient,
true,
"reject client write requests if disk status is space insufficient");
Expand Down
2 changes: 1 addition & 1 deletion src/replica/replica_backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
namespace dsn {
namespace replication {

DSN_DEFINE_uint64(replication,
DSN_DEFINE_uint64("replication",
max_concurrent_uploading_file_count,
10,
"concurrent uploading file count to block service");
Expand Down
6 changes: 3 additions & 3 deletions src/replica/replica_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@
namespace dsn {
namespace replication {

DSN_DEFINE_bool(replication,
DSN_DEFINE_bool("replication",
ignore_broken_disk,
true,
"true means ignore broken data disk when initialize");

DSN_DEFINE_uint32(replication,
DSN_DEFINE_uint32("replication",
max_concurrent_manual_emergency_checkpointing_count,
10,
"max concurrent manual emergency checkpoint running count");
DSN_TAG_VARIABLE(max_concurrent_manual_emergency_checkpointing_count, FT_MUTABLE);

DSN_DEFINE_uint32(
replication,
"replication",
config_sync_interval_ms,
30000,
"The interval milliseconds of replica server to syncs replica configuration with meta server");
Expand Down
Loading

0 comments on commit e6baf35

Please sign in to comment.