提交 507ee7c3 编写于 作者: S slguan

[TBASE-1129]

上级 d320f261
......@@ -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
......
......@@ -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) {
......
......@@ -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";
}
}
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册