diff --git a/conf/tracker.conf b/conf/tracker.conf index c1fb399..777a018 100644 --- a/conf/tracker.conf +++ b/conf/tracker.conf @@ -56,7 +56,8 @@ store_group=group2 # 0: round robin (default) # 1: the first server order by ip address # 2: the first server order by priority (the minimal) -store_server=1 +# Note: if use_trunk_file set to true, must set store_server to 1 or 2 +store_server=0 # which path(means disk or mount point) of the storage server to upload file # 0: round robin diff --git a/tracker/tracker_func.c b/tracker/tracker_func.c index 1f0b459..c7fe114 100644 --- a/tracker/tracker_func.c +++ b/tracker/tracker_func.c @@ -695,6 +695,14 @@ int tracker_load_from_conf_file(const char *filename, \ #endif + if (g_if_use_trunk_file && g_groups.store_server == FDFS_STORE_SERVER_ROUND_ROBIN) + { + logInfo("file: "__FILE__", line: %d, " + "set store_server to %d because use_trunk_file is true", + __LINE__, FDFS_STORE_SERVER_FIRST_BY_IP); + g_groups.store_server = FDFS_STORE_SERVER_FIRST_BY_IP; + } + logInfo("FastDFS v%d.%02d, base_path=%s, " \ "run_by_group=%s, run_by_user=%s, " \ "connect_timeout=%ds, " \