fdfs_monitor.c: do NOT call getHostnameByIp
parent
a885fd23cc
commit
8c5a6b6f00
6
HISTORY
6
HISTORY
|
|
@ -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.
|
* fdfs_trackerd and fdfs_storaged print the server version in usage.
|
||||||
you can execute fdfs_trackerd or fdfs_storaged without parameters
|
you can execute fdfs_trackerd or fdfs_storaged without parameters
|
||||||
to show the server version
|
to show the server version
|
||||||
|
|
@ -22,6 +22,10 @@ Version 6.05 2019-12-24
|
||||||
* support delete unused trunk files
|
* support delete unused trunk files
|
||||||
the config item in tracker.conf: 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
|
Version 6.04 2019-12-05
|
||||||
* storage_report_ip_changed ignore result EEXIST
|
* storage_report_ip_changed ignore result EEXIST
|
||||||
|
|
|
||||||
2
INSTALL
2
INSTALL
|
|
@ -11,7 +11,7 @@ Chinese language: http://www.fastken.com/
|
||||||
# command lines as:
|
# command lines as:
|
||||||
|
|
||||||
git clone https://github.com/happyfish100/libfastcommon.git
|
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
|
./make.sh clean && ./make.sh && ./make.sh install
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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')
|
if (*szHostname != '\0')
|
||||||
{
|
{
|
||||||
sprintf(szHostnamePrompt, " (%s)", szHostname);
|
sprintf(szHostnamePrompt, " (%s)", szHostname);
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ use_trunk_file = false
|
||||||
# the min slot size, should <= 4KB
|
# the min slot size, should <= 4KB
|
||||||
# default value is 256 bytes
|
# default value is 256 bytes
|
||||||
# since V3.00
|
# since V3.00
|
||||||
slot_min_size = 512
|
slot_min_size = 256
|
||||||
|
|
||||||
# the max slot size, should > slot_min_size
|
# the max slot size, should > slot_min_size
|
||||||
# store the upload file to trunk file when it's size <= this value
|
# store the upload file to trunk file when it's size <= this value
|
||||||
|
|
@ -159,7 +159,7 @@ slot_max_size = 1MB
|
||||||
# since V6.05
|
# since V6.05
|
||||||
# NOTE: the larger the alignment size, the less likely of disk
|
# NOTE: the larger the alignment size, the less likely of disk
|
||||||
# fragmentation, but the more space is wasted.
|
# 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
|
# if merge contiguous free spaces of trunk file
|
||||||
# default value is false
|
# default value is false
|
||||||
|
|
@ -169,7 +169,7 @@ trunk_free_space_merge = true
|
||||||
# if delete / reclaim the unused trunk files
|
# if delete / reclaim the unused trunk files
|
||||||
# default value is false
|
# default value is false
|
||||||
# since V6.05
|
# since V6.05
|
||||||
delete_unused_trunk_files = true
|
delete_unused_trunk_files = false
|
||||||
|
|
||||||
# the trunk file size, should >= 4MB
|
# the trunk file size, should >= 4MB
|
||||||
# default value is 64MB
|
# default value is 64MB
|
||||||
|
|
|
||||||
|
|
@ -549,6 +549,11 @@ static int trunk_merge_spaces(FDFSTrunkFullInfo **ppMergeFirst,
|
||||||
merge_stat->merged_trunk_count += (ppLast - ppMergeFirst) + 1;
|
merge_stat->merged_trunk_count += (ppLast - ppMergeFirst) + 1;
|
||||||
merge_stat->merged_size += merged_size;
|
merge_stat->merged_size += merged_size;
|
||||||
|
|
||||||
|
for (ppTrunkInfo=ppMergeFirst + 1; ppTrunkInfo<=ppLast; ppTrunkInfo++)
|
||||||
|
{
|
||||||
|
trunk_delete_space_ex(*ppTrunkInfo, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (!g_delete_unused_trunk_files)
|
if (!g_delete_unused_trunk_files)
|
||||||
|
|
@ -612,11 +617,6 @@ static int trunk_merge_spaces(FDFSTrunkFullInfo **ppMergeFirst,
|
||||||
false, false, &result);
|
false, false, &result);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ppTrunkInfo=ppMergeFirst + 1; ppTrunkInfo<=ppLast; ppTrunkInfo++)
|
|
||||||
{
|
|
||||||
trunk_delete_space_ex(*ppTrunkInfo, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue