commit
b1bb894e63
|
@ -23,10 +23,10 @@ extern "C" {
|
|||
#include "taosmsg.h"
|
||||
#include "tsdb.h"
|
||||
|
||||
extern short sdbPeerPort;
|
||||
extern short sdbSyncPort;
|
||||
extern short tsMgmtMgmtPort;
|
||||
extern short tsMgmtSyncPort;
|
||||
extern int sdbMaxNodes;
|
||||
extern int sdbHbTimer; // seconds
|
||||
extern int tsMgmtPeerHBTimer; // seconds
|
||||
extern char sdbZone[];
|
||||
extern char sdbMasterIp[];
|
||||
extern char sdbPrivateIp[];
|
||||
|
|
|
@ -25,7 +25,6 @@ extern "C" {
|
|||
|
||||
#define TAOS_CONN_UDPS 0
|
||||
#define TAOS_CONN_UDPC 1
|
||||
#define TAOS_CONN_UDP 1
|
||||
#define TAOS_CONN_TCPS 2
|
||||
#define TAOS_CONN_TCPC 3
|
||||
#define TAOS_CONN_HTTPS 4
|
||||
|
@ -39,7 +38,7 @@ extern "C" {
|
|||
#define TAOS_ID_REALLOCATE 2
|
||||
|
||||
#define TAOS_CONN_SOCKET_TYPE_S() ((strcasecmp(tsSocketType, TAOS_SOCKET_TYPE_NAME_UDP) == 0)? TAOS_CONN_UDPS:TAOS_CONN_TCPS)
|
||||
#define TAOS_CONN_SOCKET_TYPE_C() ((strcasecmp(tsSocketType, TAOS_SOCKET_TYPE_NAME_UDP) == 0)? TAOS_CONN_UDP:TAOS_CONN_TCPC)
|
||||
#define TAOS_CONN_SOCKET_TYPE_C() ((strcasecmp(tsSocketType, TAOS_SOCKET_TYPE_NAME_UDP) == 0)? TAOS_CONN_UDPC:TAOS_CONN_TCPC)
|
||||
|
||||
#define taosSendMsgToPeer(x, y, z) taosSendMsgToPeerH(x, y, z, NULL)
|
||||
#define taosOpenRpcChann(x, y, z) taosOpenRpcChannWithQ(x,y,z,NULL)
|
||||
|
|
|
@ -204,7 +204,6 @@ int taosOpenUDServerSocket(char *ip, short port) {
|
|||
char name[128];
|
||||
|
||||
pTrace("open ud socket:%s", name);
|
||||
// if (tsAllowLocalhost) ip = "0.0.0.0";
|
||||
sprintf(name, "%s.%d", ip, port);
|
||||
|
||||
bzero((char *)&serverAdd, sizeof(serverAdd));
|
||||
|
|
|
@ -197,7 +197,6 @@ int taosOpenUDServerSocket(char *ip, short port) {
|
|||
char name[128];
|
||||
|
||||
pTrace("open ud socket:%s", name);
|
||||
// if (tsAllowLocalhost) ip = "0.0.0.0";
|
||||
sprintf(name, "%s.%d", ip, port);
|
||||
|
||||
bzero((char *)&serverAdd, sizeof(serverAdd));
|
||||
|
|
|
@ -185,8 +185,9 @@ static void taosProcessTcpData(void *param) {
|
|||
|
||||
void *buffer = malloc(1024);
|
||||
int headLen = taosReadMsg(pFdObj->fd, buffer, sizeof(STaosHeader));
|
||||
|
||||
if (headLen != sizeof(STaosHeader)) {
|
||||
tError("%s read error, headLen:%d", pThreadObj->label, headLen);
|
||||
tError("%s read error, headLen:%d, errno:%d", pThreadObj->label, headLen, errno);
|
||||
taosCleanUpFdObj(pFdObj);
|
||||
tfree(buffer);
|
||||
continue;
|
||||
|
|
|
@ -62,8 +62,8 @@ short tsMgmtShellPort = 6030; // udp[6030-6034] tcp[6030]
|
|||
short tsVnodeShellPort = 6035; // udp[6035-6039] tcp[6035]
|
||||
short tsMgmtVnodePort = 6040; // udp[6040-6044] tcp[6040]
|
||||
short tsVnodeVnodePort = 6045; // tcp[6045]
|
||||
short tsMgmtMgmtPort = 6050; // sdbPeerPort only udp, numOfVnodes fixed to 1, range udp[6050]
|
||||
short tsMgmtSyncPort = 6050; // sdbSyncPort only tcp, range tcp[6050]
|
||||
short tsMgmtMgmtPort = 6050; // udp, numOfVnodes fixed to 1, range udp[6050]
|
||||
short tsMgmtSyncPort = 6050; // tcp, range tcp[6050]
|
||||
|
||||
int tsStatusInterval = 1; // second
|
||||
int tsShellActivityTimer = 3; // second
|
||||
|
@ -77,7 +77,7 @@ float tsRatioOfQueryThreads = 0.5;
|
|||
char tsPublicIp[TSDB_IPv4ADDR_LEN] = {0};
|
||||
char tsInternalIp[TSDB_IPv4ADDR_LEN] = {0};
|
||||
char tsPrivateIp[TSDB_IPv4ADDR_LEN] = {0};
|
||||
char tsServerIpStr[TSDB_IPv4ADDR_LEN] = "0.0.0.0";
|
||||
char tsServerIpStr[TSDB_IPv4ADDR_LEN] = "127.0.0.1";
|
||||
short tsNumOfVnodesPerCore = 8;
|
||||
short tsNumOfTotalVnodes = 0;
|
||||
short tsCheckHeaderFile = 0;
|
||||
|
|
|
@ -269,7 +269,6 @@ int taosOpenUdpSocket(char *ip, short port) {
|
|||
int bufSize = 8192000;
|
||||
|
||||
pTrace("open udp socket:%s:%d", ip, port);
|
||||
// if (tsAllowLocalhost) ip = "0.0.0.0";
|
||||
|
||||
memset((char *)&localAddr, 0, sizeof(localAddr));
|
||||
localAddr.sin_family = AF_INET;
|
||||
|
@ -334,7 +333,6 @@ int taosOpenTcpClientSocket(char *destIp, short destPort, char *clientIp) {
|
|||
int ret;
|
||||
|
||||
pTrace("open tcp client socket:%s:%d", destIp, destPort);
|
||||
// if (tsAllowLocalhost) destIp = "0.0.0.0";
|
||||
|
||||
sockFd = (int)socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
|
||||
|
@ -430,7 +428,6 @@ int taosOpenTcpServerSocket(char *ip, short port) {
|
|||
int reuse;
|
||||
|
||||
pTrace("open tcp server socket:%s:%d", ip, port);
|
||||
// if (tsAllowLocalhost) ip = "0.0.0.0";
|
||||
|
||||
bzero((char *)&serverAdd, sizeof(serverAdd));
|
||||
serverAdd.sin_family = AF_INET;
|
||||
|
@ -472,7 +469,6 @@ int taosOpenRawSocket(char *ip) {
|
|||
struct sockaddr_in rawAdd;
|
||||
|
||||
pTrace("open udp raw socket:%s", ip);
|
||||
// if (tsAllowLocalhost) ip = "0.0.0.0";
|
||||
|
||||
fd = (int)socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
|
||||
if (fd < 0) {
|
||||
|
|
Loading…
Reference in New Issue