bugfixed: report connections' current_count and max_count correctly

pull/630/head
YuQing 2023-02-15 12:44:53 +08:00
parent 0615ac3867
commit 0376cf8e2c
3 changed files with 12 additions and 12 deletions

View File

@ -6,13 +6,13 @@ Please visit the FastDFS Home Page for more detail.
Chinese language: http://www.fastken.com/ Chinese language: http://www.fastken.com/
FastDFS is an open source high performance distributed file system. Its major FastDFS is an open source high performance distributed file system. Its major
functions include: file storing, file syncing and file accessing (file uploading functions include: file storing, file syncing and file accessing (file uploading
and file downloading), and it can resolve the high capacity and load balancing and file downloading), and it can resolve the high capacity and load balancing
problem. FastDFS should meet the requirement of the website whose service based problem. FastDFS should meet the requirement of the website whose service based
on files such as photo sharing site and video sharing site. on files such as photo sharing site and video sharing site.
FastDFS has two roles: tracker and storage. The tracker takes charge of FastDFS has two roles: tracker and storage. The tracker takes charge of
scheduling and load balancing for file access. The storage store files and it's scheduling and load balancing for file access. The storage store files and it's
function is file management including: file storing, file syncing, providing file function is file management including: file storing, file syncing, providing file
access interface. It also manage the meta data which are attributes representing access interface. It also manage the meta data which are attributes representing
@ -27,13 +27,13 @@ The storarge servers organizing by the file volume/group to obtain high capacity
The storage system contains one or more volumes whose files are independent among The storage system contains one or more volumes whose files are independent among
these volumes. The capacity of the whole storage system equals to the sum of all these volumes. The capacity of the whole storage system equals to the sum of all
volumes' capacity. A file volume contains one or more storage servers whose files volumes' capacity. A file volume contains one or more storage servers whose files
are same among these servers. The servers in a file volume backup each other, are same among these servers. The servers in a file volume backup each other,
and all these servers are load balancing. When adding a storage server to a and all these servers are load balancing. When adding a storage server to a
volume, files already existing in this volume are replicated to this new server volume, files already existing in this volume are replicated to this new server
automatically, and when this replication done, system will switch this server automatically, and when this replication done, system will switch this server
online to providing storage services. online to providing storage services.
When the whole storage capacity is insufficiency, you can add one or more When the whole storage capacity is insufficiency, you can add one or more
volumes to expand the storage capacity. To do this, you need to add one or volumes to expand the storage capacity. To do this, you need to add one or
more storage servers. more storage servers.

View File

@ -366,8 +366,8 @@ static int fdfs_dump_storage_stat(char *buff, const int buffSize)
"last_heart_beat_time=%s\n", "last_heart_beat_time=%s\n",
g_stat_change_count, g_sync_change_count, g_stat_change_count, g_sync_change_count,
free_queue_alloc_connections(), free_queue_alloc_connections(),
g_storage_stat.connection.current_count, SF_G_CONN_CURRENT_COUNT,
g_storage_stat.connection.max_count, SF_G_CONN_MAX_COUNT,
g_storage_stat.total_upload_count, g_storage_stat.total_upload_count,
g_storage_stat.success_upload_count, g_storage_stat.success_upload_count,
g_storage_stat.total_set_meta_count, g_storage_stat.total_set_meta_count,

View File

@ -2314,12 +2314,12 @@ static int tracker_heart_beat(ConnectionInfo *pTrackerServer,
pStatBuff = (FDFSStorageStatBuff *)( \ pStatBuff = (FDFSStorageStatBuff *)( \
out_buff + sizeof(TrackerHeader)); out_buff + sizeof(TrackerHeader));
int2buff(free_queue_alloc_connections(), \ int2buff(free_queue_alloc_connections(),
pStatBuff->connection.sz_alloc_count); pStatBuff->connection.sz_alloc_count);
int2buff(g_storage_stat.connection.current_count, \ int2buff(SF_G_CONN_CURRENT_COUNT,
pStatBuff->connection.sz_current_count); pStatBuff->connection.sz_current_count);
int2buff(g_storage_stat.connection.max_count, \ int2buff(SF_G_CONN_MAX_COUNT, pStatBuff->
pStatBuff->connection.sz_max_count); connection.sz_max_count);
long2buff(g_storage_stat.total_upload_count, \ long2buff(g_storage_stat.total_upload_count, \
pStatBuff->sz_total_upload_count); pStatBuff->sz_total_upload_count);