From 37da0e660f55312a4c5190216af4c60b616fd8b0 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Tue, 25 Aug 2020 14:13:02 +0800 Subject: [PATCH] [TD-1203] --- src/inc/taosdef.h | 1 + src/sync/src/tarbitrator.c | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 3dea8da18a..ff5b9a958f 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -395,6 +395,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size); #define TSDB_PORT_DNODEDNODE 5 #define TSDB_PORT_SYNC 10 #define TSDB_PORT_HTTP 11 +#define TSDB_PORT_ARBITRATOR 12 #define TAOS_QTYPE_RPC 0 #define TAOS_QTYPE_FWD 1 diff --git a/src/sync/src/tarbitrator.c b/src/sync/src/tarbitrator.c index 3538391a94..625c0d6838 100644 --- a/src/sync/src/tarbitrator.c +++ b/src/sync/src/tarbitrator.c @@ -40,12 +40,16 @@ typedef struct { void *pConn; } SNodeConn; +uint16_t tsArbitratorPort = 0; + int main(int argc, char *argv[]) { char arbLogPath[TSDB_FILENAME_LEN + 16] = {0}; + tsArbitratorPort = tsServerPort + TSDB_PORT_ARBITRATOR; + for (int i=1; i