From ffdc93d13c2ecdf0567453d497777f0aa031158d Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Sat, 29 Feb 2020 17:24:57 +0800 Subject: [PATCH] put tsRpcMaxUdpSize as an configurable parameter --- src/inc/trpc.h | 1 - src/rpc/inc/tsched.h | 39 --------------------------------------- src/rpc/src/rpcMain.c | 1 - src/util/inc/tglobalcfg.h | 1 + src/util/src/tglobalcfg.c | 1 + 5 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 src/rpc/inc/tsched.h diff --git a/src/inc/trpc.h b/src/inc/trpc.h index 48280061fe..710e9bc5e6 100644 --- a/src/inc/trpc.h +++ b/src/inc/trpc.h @@ -27,7 +27,6 @@ extern "C" { #define TAOS_CONN_CLIENT 1 extern int tsRpcHeadSize; -extern int tsRpcMaxUdpSize; typedef struct { int8_t inUse; diff --git a/src/rpc/inc/tsched.h b/src/rpc/inc/tsched.h deleted file mode 100644 index 9b6eb92462..0000000000 --- a/src/rpc/inc/tsched.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. - * - * This program is free software: you can use, redistribute, and/or modify - * it under the terms of the GNU Affero General Public License, version 3 - * or later ("AGPL"), as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -#ifndef TDENGINE_TSCHED_H -#define TDENGINE_TSCHED_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _sched_msg { - void *msg; - int msgLen; - int8_t type; - int32_t code - void handle; -} SRpcMsg; - -void *rpcInitMsgQueue(int queueSize, void (*fp)(int num, SRpcQueue *),const char *label); -int rpcPutIntoMsgQueue(void *qhandle, SRpcMsg *pMsg); -void rpcCleanUpMsgQueue(void *param); - -#ifdef __cplusplus -} -#endif - -#endif // TDENGINE_TSCHED_H diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 5b1f24f664..c20874d604 100755 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -122,7 +122,6 @@ typedef struct _RpcConn { } SRpcConn; int tsRpcProgressTime = 10; // milliseocnds -int tsRpcMaxUdpSize = 15000; // bytes; // not configurable int tsRpcMaxRetry; diff --git a/src/util/inc/tglobalcfg.h b/src/util/inc/tglobalcfg.h index fa823c5a3b..c72269d8d6 100644 --- a/src/util/inc/tglobalcfg.h +++ b/src/util/inc/tglobalcfg.h @@ -178,6 +178,7 @@ extern uint32_t taosMaxTmrCtrl; extern int tsRpcTimer; extern int tsRpcMaxTime; +extern int tsRpcMaxUdpSize; extern int tsUdpDelay; extern char version[]; extern char compatible_version[]; diff --git a/src/util/src/tglobalcfg.c b/src/util/src/tglobalcfg.c index 04978d537d..643573da02 100644 --- a/src/util/src/tglobalcfg.c +++ b/src/util/src/tglobalcfg.c @@ -199,6 +199,7 @@ int tsIsCluster = 0; int tsRpcTimer = 300; int tsRpcMaxTime = 600; // seconds; +int tsRpcMaxUdpSize = 15000; // bytes char tsMonitorDbName[TSDB_DB_NAME_LEN] = "log"; int tsMonitorInterval = 30; // seconds -- GitLab