diff --git a/src/inc/tstatus.h b/src/inc/tstatus.h index 0f9bea5ae5b57f4f007c18af43b6599702edf98b..18900d3b29f9825d10d8f02b643b9d484ab9ef87 100644 --- a/src/inc/tstatus.h +++ b/src/inc/tstatus.h @@ -73,23 +73,11 @@ enum _TSDB_VG_LB_STATUS { TSDB_VG_LB_STATUS_UPDATE }; -enum _TSDB_LB_TYPE { - TSDB_LB_TYPE_SCHEDULE, - TSDB_LB_TYPE_SOON, -}; - -enum _TSDB_LB_REASON { - TSDB_LB_REASON_PERIOD, - TSDB_LB_REASON_EVENT, -}; - const char* taosGetVnodeStatusStr(int vnodeStatus); const char* taosGetVnodeSyncStatusStr(int vnodeSyncStatus); const char* taosGetVnodeDropStatusStr(int dropping); const char* taosGetDnodeStatusStr(int dnodeStatus); const char* taosGetDnodeLbStatusStr(int dnodeBalanceStatus); -const char* taosGetBalanceTypeStr(int type); -const char* taosBalanceReasonStr(int reason); const char* taosGetVgroupLbStatusStr(int vglbStatus); #ifdef __cplusplus diff --git a/src/os/linux/src/tlinux.c b/src/os/linux/src/tlinux.c index 6a7225b47693f9c76c25fcdd3149d28381df77cf..c4d9425b4087fc3b78ef5b9d8fc3896653083e34 100644 --- a/src/os/linux/src/tlinux.c +++ b/src/os/linux/src/tlinux.c @@ -287,8 +287,10 @@ ssize_t tsendfile(int dfd, int sfd, off_t *offset, size_t size) { ssize_t sentbytes; while (leftbytes > 0) { - // TODO : Think to check if file is larger than 1GB - if (leftbytes > 1000000000) leftbytes = 1000000000; + /* + * TODO : Think to check if file is larger than 1GB + */ + //if (leftbytes > 1000000000) leftbytes = 1000000000; sentbytes = sendfile(dfd, sfd, offset, leftbytes); if (sentbytes == -1) { if (errno == EINTR) { diff --git a/src/util/src/tstatus.c b/src/util/src/tstatus.c index 4e3141b13bd60c86f60cba3e6632f534f50cdeee..f38655ac454848c498d942b8744abd3002b9a08f 100644 --- a/src/util/src/tstatus.c +++ b/src/util/src/tstatus.c @@ -73,20 +73,3 @@ const char* taosGetVgroupLbStatusStr(int vglbStatus) { default: return "undefined"; } } - -const char* taosGetBalanceTypeStr(int type) { - switch (type) { - case TSDB_LB_TYPE_SCHEDULE: return "schedule"; - case TSDB_LB_TYPE_SOON: return "soon"; - default: return "undefined"; - } -} - -const char* taosBalanceReasonStr(int reason) { - switch (reason) { - case TSDB_LB_REASON_PERIOD: return "period"; - case TSDB_LB_REASON_EVENT: return "event"; - default: return "undefined"; - } -} - diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 8413294bcceee6690204422c8d8cd8e0316ef65b..e0dcb0aa3f22c8eadd4f30c75c9fa6e7bced1727 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -490,7 +490,7 @@ char *taosIpStr(uint32_t ipInt) { static int ipStrIndex = 0; char *ipStr = ipStrArray[(ipStrIndex++) % 3]; - sprintf(ipStr, "0x%x:%d.%d.%d.%d", ipInt, ipInt & 0xFF, (ipInt >> 8) & 0xFF, (ipInt >> 16) & 0xFF, ipInt >> 24); + sprintf(ipStr, "0x%x:%u.%u.%u.%u", ipInt, ipInt & 0xFF, (ipInt >> 8) & 0xFF, (ipInt >> 16) & 0xFF, (uint8_t)(ipInt >> 24)); return ipStr; }