fdfs_monitor.c: do NOT call getHostnameByIp

pull/484/head
YuQing 2019-12-25 19:26:58 +08:00
parent a885fd23cc
commit 8c5a6b6f00
5 changed files with 16 additions and 11 deletions

View File

@ -1,5 +1,5 @@
Version 6.05 2019-12-24
Version 6.05 2019-12-25
* fdfs_trackerd and fdfs_storaged print the server version in usage.
you can execute fdfs_trackerd or fdfs_storaged without parameters
to show the server version
@ -22,6 +22,10 @@ Version 6.05 2019-12-24
* support delete unused trunk files
the config item in tracker.conf: delete_unused_trunk_files
* fdfs_monitor.c: do NOT call getHostnameByIp
NOTE: you MUST upgrade libfastcommon to V1.43 or later
Version 6.04 2019-12-05
* storage_report_ip_changed ignore result EEXIST

View File

@ -11,7 +11,7 @@ Chinese language: http://www.fastken.com/
# command lines as:
git clone https://github.com/happyfish100/libfastcommon.git
cd libfastcommon; git checkout V1.0.42
cd libfastcommon; git checkout V1.0.43
./make.sh clean && ./make.sh && ./make.sh install

View File

@ -389,7 +389,8 @@ static int list_storages(FDFSGroupStat *pGroupStat)
}
}
getHostnameByIp(pStorage->ip_addr, szHostname, sizeof(szHostname));
//getHostnameByIp(pStorage->ip_addr, szHostname, sizeof(szHostname));
*szHostname = '\0';
if (*szHostname != '\0')
{
sprintf(szHostnamePrompt, " (%s)", szHostname);

View File

@ -146,7 +146,7 @@ use_trunk_file = false
# the min slot size, should <= 4KB
# default value is 256 bytes
# since V3.00
slot_min_size = 512
slot_min_size = 256
# the max slot size, should > slot_min_size
# store the upload file to trunk file when it's size <= this value
@ -159,7 +159,7 @@ slot_max_size = 1MB
# since V6.05
# NOTE: the larger the alignment size, the less likely of disk
# fragmentation, but the more space is wasted.
trunk_alloc_alignment_size = 512
trunk_alloc_alignment_size = 256
# if merge contiguous free spaces of trunk file
# default value is false
@ -169,7 +169,7 @@ trunk_free_space_merge = true
# if delete / reclaim the unused trunk files
# default value is false
# since V6.05
delete_unused_trunk_files = true
delete_unused_trunk_files = false
# the trunk file size, should >= 4MB
# default value is 64MB

View File

@ -549,6 +549,11 @@ static int trunk_merge_spaces(FDFSTrunkFullInfo **ppMergeFirst,
merge_stat->merged_trunk_count += (ppLast - ppMergeFirst) + 1;
merge_stat->merged_size += merged_size;
for (ppTrunkInfo=ppMergeFirst + 1; ppTrunkInfo<=ppLast; ppTrunkInfo++)
{
trunk_delete_space_ex(*ppTrunkInfo, false, false);
}
do
{
if (!g_delete_unused_trunk_files)
@ -612,11 +617,6 @@ static int trunk_merge_spaces(FDFSTrunkFullInfo **ppMergeFirst,
false, false, &result);
}
for (ppTrunkInfo=ppMergeFirst + 1; ppTrunkInfo<=ppLast; ppTrunkInfo++)
{
trunk_delete_space_ex(*ppTrunkInfo, false, false);
}
return result;
}