diff --git a/conf/storage.conf b/conf/storage.conf index 7c8aba9..c9713b9 100644 --- a/conf/storage.conf +++ b/conf/storage.conf @@ -175,7 +175,7 @@ sync_log_buff_interval=10 # sync binlog buff / cache to disk every interval seconds # default value is 60 seconds -sync_binlog_buff_interval=10 +sync_binlog_buff_interval=1 # sync storage stat info to disk every interval seconds # default value is 300 seconds diff --git a/conf/tracker.conf b/conf/tracker.conf index 5e28136..c2d645b 100644 --- a/conf/tracker.conf +++ b/conf/tracker.conf @@ -80,7 +80,7 @@ download_server=0 ### K or k for kilobyte(KB) ### no unit for byte(B) ### XX.XX% as ratio such as reserved_storage_space = 10% -reserved_storage_space = 10% +reserved_storage_space = 20% #standard log level as syslog, case insensitive, value list: ### emerg for emergency @@ -217,7 +217,7 @@ storage_ids_filename = storage_ids.conf # this paramter is valid only when use_storage_id set to true # default value is ip # since V4.03 -id_type_in_filename = ip +id_type_in_filename = id # if store slave file use symbol link # default value is false diff --git a/storage/storage_disk_recovery.c b/storage/storage_disk_recovery.c index 6cd9a11..09ddd58 100644 --- a/storage/storage_disk_recovery.c +++ b/storage/storage_disk_recovery.c @@ -263,8 +263,7 @@ static int recovery_get_src_storage_server(ConnectionInfo *pSrcStorage) if (pStorageStat->status == FDFS_STORAGE_STATUS_ACTIVE) { - strcpy(pSrcStorage->ip_addr, \ - pStorageStat->ip_addr); + strcpy(pSrcStorage->ip_addr, pStorageStat->ip_addr); pSrcStorage->port = pStorageStat->storage_port; break; } @@ -283,8 +282,8 @@ static int recovery_get_src_storage_server(ConnectionInfo *pSrcStorage) return EINTR; } - logDebug("file: "__FILE__", line: %d, " \ - "disk recovery: get source storage server %s:%d", \ + logDebug("file: "__FILE__", line: %d, " + "disk recovery: get source storage server %s:%d", __LINE__, pSrcStorage->ip_addr, pSrcStorage->port); return 0; } diff --git a/storage/storage_func.c b/storage/storage_func.c index d11f4be..7da246e 100644 --- a/storage/storage_func.c +++ b/storage/storage_func.c @@ -883,8 +883,8 @@ static int storage_check_and_make_data_dirs() static int storage_make_data_dirs(const char *pBasePath, bool *pathCreated) { char data_path[MAX_PATH_SIZE]; - char dir_name[9]; - char sub_name[9]; + char dir_name[16]; + char sub_name[16]; char min_sub_path[16]; char max_sub_path[16]; int i, k; @@ -919,10 +919,11 @@ static int storage_make_data_dirs(const char *pBasePath, bool *pathCreated) return errno != 0 ? errno : ENOENT; } - sprintf(min_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/"FDFS_STORAGE_DATA_DIR_FORMAT, - 0, 0); - sprintf(max_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/"FDFS_STORAGE_DATA_DIR_FORMAT, - g_subdir_count_per_path-1, g_subdir_count_per_path-1); + sprintf(min_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/" + FDFS_STORAGE_DATA_DIR_FORMAT, 0, 0); + sprintf(max_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/" + FDFS_STORAGE_DATA_DIR_FORMAT, g_subdir_count_per_path - 1, + g_subdir_count_per_path - 1); if (fileExists(min_sub_path) && fileExists(max_sub_path)) { return 0;