adapt to libserverframe 1.2.3
parent
5680a7fab8
commit
ff2aef1735
3
HISTORY
3
HISTORY
|
|
@ -1,4 +1,7 @@
|
||||||
|
|
||||||
|
Version 6.12.1 2024-02-26
|
||||||
|
* adapt to libserverframe 1.2.3
|
||||||
|
|
||||||
Version 6.12.0 2024-02-12
|
Version 6.12.0 2024-02-12
|
||||||
* bugfixed: parse ip and port use parseAddress instead of splitEx
|
* bugfixed: parse ip and port use parseAddress instead of splitEx
|
||||||
* bugfixed: fdfs_server_info_to_string support IPv6 correctly
|
* bugfixed: fdfs_server_info_to_string support IPv6 correctly
|
||||||
|
|
|
||||||
6
INSTALL
6
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.71
|
cd libfastcommon; git checkout V1.0.72
|
||||||
./make.sh clean && ./make.sh && ./make.sh install
|
./make.sh clean && ./make.sh && ./make.sh install
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ Chinese language: http://www.fastken.com/
|
||||||
# command lines as:
|
# command lines as:
|
||||||
|
|
||||||
git clone https://github.com/happyfish100/libserverframe.git
|
git clone https://github.com/happyfish100/libserverframe.git
|
||||||
cd libserverframe; git checkout V1.2.1
|
cd libserverframe; git checkout V1.2.2
|
||||||
./make.sh clean && ./make.sh && ./make.sh install
|
./make.sh clean && ./make.sh && ./make.sh install
|
||||||
|
|
||||||
# step 3. download fastdfs source codes and install it,
|
# step 3. download fastdfs source codes and install it,
|
||||||
|
|
@ -30,7 +30,7 @@ Chinese language: http://www.fastken.com/
|
||||||
# command lines as:
|
# command lines as:
|
||||||
|
|
||||||
git clone https://github.com/happyfish100/fastdfs.git
|
git clone https://github.com/happyfish100/fastdfs.git
|
||||||
cd fastdfs; git checkout V6.11.0
|
cd fastdfs; git checkout V6.12.0
|
||||||
./make.sh clean && ./make.sh && ./make.sh install
|
./make.sh clean && ./make.sh && ./make.sh install
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include "fastcommon/logger.h"
|
#include "fastcommon/logger.h"
|
||||||
#include "fdfs_global.h"
|
#include "fdfs_global.h"
|
||||||
|
|
||||||
Version g_fdfs_version = {6, 12, 0};
|
Version g_fdfs_version = {6, 12, 1};
|
||||||
bool g_use_connection_pool = false;
|
bool g_use_connection_pool = false;
|
||||||
ConnectionPool g_connection_pool;
|
ConnectionPool g_connection_pool;
|
||||||
int g_connection_pool_max_idle_time = 3600;
|
int g_connection_pool_max_idle_time = 3600;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
%define CommitVersion %(echo $COMMIT_VERSION)
|
%define CommitVersion %(echo $COMMIT_VERSION)
|
||||||
|
|
||||||
Name: %{FastDFS}
|
Name: %{FastDFS}
|
||||||
Version: 6.12.0
|
Version: 6.12.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: FastDFS server and client
|
Summary: FastDFS server and client
|
||||||
License: GPL
|
License: GPL
|
||||||
|
|
@ -18,14 +18,14 @@ Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
|
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
|
||||||
BuildRequires: libserverframe-devel >= 1.2.1
|
BuildRequires: libserverframe-devel >= 1.2.3
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides tracker & storage of fastdfs
|
This package provides tracker & storage of fastdfs
|
||||||
commit version: %{CommitVersion}
|
commit version: %{CommitVersion}
|
||||||
|
|
||||||
%package -n %{FDFSServer}
|
%package -n %{FDFSServer}
|
||||||
Requires: libserverframe >= 1.2.1
|
Requires: libserverframe >= 1.2.3
|
||||||
Requires: %{FDFSConfig}
|
Requires: %{FDFSConfig}
|
||||||
Summary: fastdfs tracker & storage
|
Summary: fastdfs tracker & storage
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ Requires: %{FDFSClient}
|
||||||
Summary: fastdfs tools
|
Summary: fastdfs tools
|
||||||
|
|
||||||
%package -n %{FDFSClient}
|
%package -n %{FDFSClient}
|
||||||
Requires: libserverframe >= 1.2.1
|
Requires: libserverframe >= 1.2.3
|
||||||
Requires: %{FDFSConfig}
|
Requires: %{FDFSConfig}
|
||||||
Summary: The client dynamic library of fastdfs
|
Summary: The client dynamic library of fastdfs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1508,7 +1508,7 @@ int storage_func_init(const char *filename)
|
||||||
SF_SET_CONTEXT_INI_CONFIG_EX(config, fc_comm_type_sock, filename,
|
SF_SET_CONTEXT_INI_CONFIG_EX(config, fc_comm_type_sock, filename,
|
||||||
&iniContext, NULL, FDFS_STORAGE_SERVER_DEF_PORT,
|
&iniContext, NULL, FDFS_STORAGE_SERVER_DEF_PORT,
|
||||||
FDFS_STORAGE_SERVER_DEF_PORT, DEFAULT_WORK_THREADS,
|
FDFS_STORAGE_SERVER_DEF_PORT, DEFAULT_WORK_THREADS,
|
||||||
"buff_size");
|
"buff_size", 0);
|
||||||
if ((result=sf_load_config_ex("storaged", &config, fixed_buffer_size,
|
if ((result=sf_load_config_ex("storaged", &config, fixed_buffer_size,
|
||||||
task_buffer_extra_size, need_set_run_by)) != 0)
|
task_buffer_extra_size, need_set_run_by)) != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -1668,12 +1668,12 @@ int storage_func_init(const char *filename)
|
||||||
(g_sync_end_time.hour == 23 && \
|
(g_sync_end_time.hour == 23 && \
|
||||||
g_sync_end_time.minute == 59));
|
g_sync_end_time.minute == 59));
|
||||||
|
|
||||||
if (g_sf_global_vars.min_buff_size < sizeof(TrackerHeader) +
|
if (g_sf_global_vars.net_buffer_cfg.min_buff_size <
|
||||||
TRUNK_BINLOG_BUFFER_SIZE)
|
sizeof(TrackerHeader) + TRUNK_BINLOG_BUFFER_SIZE)
|
||||||
{
|
{
|
||||||
logError("file: "__FILE__", line: %d, "
|
logError("file: "__FILE__", line: %d, "
|
||||||
"item \"buff_size\" is too small, value: %d < %d!",
|
"item \"buff_size\" is too small, value: %d < %d!",
|
||||||
__LINE__, g_sf_global_vars.min_buff_size,
|
__LINE__, g_sf_global_vars.net_buffer_cfg.min_buff_size,
|
||||||
(int)sizeof(TrackerHeader) + TRUNK_BINLOG_BUFFER_SIZE);
|
(int)sizeof(TrackerHeader) + TRUNK_BINLOG_BUFFER_SIZE);
|
||||||
result = EINVAL;
|
result = EINVAL;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ int tracker_load_from_conf_file(const char *filename)
|
||||||
SF_SET_CONTEXT_INI_CONFIG_EX(config, fc_comm_type_sock, filename,
|
SF_SET_CONTEXT_INI_CONFIG_EX(config, fc_comm_type_sock, filename,
|
||||||
&iniContext, NULL, FDFS_TRACKER_SERVER_DEF_PORT,
|
&iniContext, NULL, FDFS_TRACKER_SERVER_DEF_PORT,
|
||||||
FDFS_TRACKER_SERVER_DEF_PORT, DEFAULT_WORK_THREADS,
|
FDFS_TRACKER_SERVER_DEF_PORT, DEFAULT_WORK_THREADS,
|
||||||
"buff_size");
|
"buff_size", 0);
|
||||||
if ((result=sf_load_config_ex("trackerd", &config, fixed_buffer_size,
|
if ((result=sf_load_config_ex("trackerd", &config, fixed_buffer_size,
|
||||||
task_buffer_extra_size, need_set_run_by)) != 0)
|
task_buffer_extra_size, need_set_run_by)) != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2908,9 +2908,9 @@ static int tracker_deal_server_list_all_groups(struct fast_task_info *pTask)
|
||||||
|
|
||||||
expect_size = sizeof(TrackerHeader) + g_groups.count *
|
expect_size = sizeof(TrackerHeader) + g_groups.count *
|
||||||
sizeof(TrackerGroupStat);
|
sizeof(TrackerGroupStat);
|
||||||
if (expect_size > g_sf_global_vars.min_buff_size)
|
if (expect_size > g_sf_global_vars.net_buffer_cfg.min_buff_size)
|
||||||
{
|
{
|
||||||
if (expect_size <= g_sf_global_vars.max_buff_size)
|
if (expect_size <= g_sf_global_vars.net_buffer_cfg.max_buff_size)
|
||||||
{
|
{
|
||||||
if ((result=free_queue_set_send_buffer_size(pTask, expect_size)) != 0)
|
if ((result=free_queue_set_send_buffer_size(pTask, expect_size)) != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -2926,7 +2926,7 @@ static int tracker_deal_server_list_all_groups(struct fast_task_info *pTask)
|
||||||
"you should increase max_buff_size in tracker.conf",
|
"you should increase max_buff_size in tracker.conf",
|
||||||
__LINE__, TRACKER_PROTO_CMD_SERVER_LIST_ALL_GROUPS,
|
__LINE__, TRACKER_PROTO_CMD_SERVER_LIST_ALL_GROUPS,
|
||||||
pTask->client_ip, expect_size,
|
pTask->client_ip, expect_size,
|
||||||
g_sf_global_vars.max_buff_size);
|
g_sf_global_vars.net_buffer_cfg.max_buff_size);
|
||||||
pTask->send.ptr->length = sizeof(TrackerHeader);
|
pTask->send.ptr->length = sizeof(TrackerHeader);
|
||||||
return ENOSPC;
|
return ENOSPC;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue