small change for config files
parent
461e78ca30
commit
ecca01766a
|
|
@ -175,7 +175,7 @@ sync_log_buff_interval=10
|
||||||
|
|
||||||
# sync binlog buff / cache to disk every interval seconds
|
# sync binlog buff / cache to disk every interval seconds
|
||||||
# default value is 60 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
|
# sync storage stat info to disk every interval seconds
|
||||||
# default value is 300 seconds
|
# default value is 300 seconds
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ download_server=0
|
||||||
### K or k for kilobyte(KB)
|
### K or k for kilobyte(KB)
|
||||||
### no unit for byte(B)
|
### no unit for byte(B)
|
||||||
### XX.XX% as ratio such as reserved_storage_space = 10%
|
### 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:
|
#standard log level as syslog, case insensitive, value list:
|
||||||
### emerg for emergency
|
### 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
|
# this paramter is valid only when use_storage_id set to true
|
||||||
# default value is ip
|
# default value is ip
|
||||||
# since V4.03
|
# since V4.03
|
||||||
id_type_in_filename = ip
|
id_type_in_filename = id
|
||||||
|
|
||||||
# if store slave file use symbol link
|
# if store slave file use symbol link
|
||||||
# default value is false
|
# default value is false
|
||||||
|
|
|
||||||
|
|
@ -263,8 +263,7 @@ static int recovery_get_src_storage_server(ConnectionInfo *pSrcStorage)
|
||||||
|
|
||||||
if (pStorageStat->status == FDFS_STORAGE_STATUS_ACTIVE)
|
if (pStorageStat->status == FDFS_STORAGE_STATUS_ACTIVE)
|
||||||
{
|
{
|
||||||
strcpy(pSrcStorage->ip_addr, \
|
strcpy(pSrcStorage->ip_addr, pStorageStat->ip_addr);
|
||||||
pStorageStat->ip_addr);
|
|
||||||
pSrcStorage->port = pStorageStat->storage_port;
|
pSrcStorage->port = pStorageStat->storage_port;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -283,8 +282,8 @@ static int recovery_get_src_storage_server(ConnectionInfo *pSrcStorage)
|
||||||
return EINTR;
|
return EINTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
logDebug("file: "__FILE__", line: %d, " \
|
logDebug("file: "__FILE__", line: %d, "
|
||||||
"disk recovery: get source storage server %s:%d", \
|
"disk recovery: get source storage server %s:%d",
|
||||||
__LINE__, pSrcStorage->ip_addr, pSrcStorage->port);
|
__LINE__, pSrcStorage->ip_addr, pSrcStorage->port);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -883,8 +883,8 @@ static int storage_check_and_make_data_dirs()
|
||||||
static int storage_make_data_dirs(const char *pBasePath, bool *pathCreated)
|
static int storage_make_data_dirs(const char *pBasePath, bool *pathCreated)
|
||||||
{
|
{
|
||||||
char data_path[MAX_PATH_SIZE];
|
char data_path[MAX_PATH_SIZE];
|
||||||
char dir_name[9];
|
char dir_name[16];
|
||||||
char sub_name[9];
|
char sub_name[16];
|
||||||
char min_sub_path[16];
|
char min_sub_path[16];
|
||||||
char max_sub_path[16];
|
char max_sub_path[16];
|
||||||
int i, k;
|
int i, k;
|
||||||
|
|
@ -919,10 +919,11 @@ static int storage_make_data_dirs(const char *pBasePath, bool *pathCreated)
|
||||||
return errno != 0 ? errno : ENOENT;
|
return errno != 0 ? errno : ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(min_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/"FDFS_STORAGE_DATA_DIR_FORMAT,
|
sprintf(min_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/"
|
||||||
0, 0);
|
FDFS_STORAGE_DATA_DIR_FORMAT, 0, 0);
|
||||||
sprintf(max_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/"FDFS_STORAGE_DATA_DIR_FORMAT,
|
sprintf(max_sub_path, FDFS_STORAGE_DATA_DIR_FORMAT"/"
|
||||||
g_subdir_count_per_path-1, g_subdir_count_per_path-1);
|
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))
|
if (fileExists(min_sub_path) && fileExists(max_sub_path))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue