[TBASE-1129]
This commit is contained in:
parent
d320f26135
commit
507ee7c3c7
|
@ -73,23 +73,11 @@ enum _TSDB_VG_LB_STATUS {
|
||||||
TSDB_VG_LB_STATUS_UPDATE
|
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* taosGetVnodeStatusStr(int vnodeStatus);
|
||||||
const char* taosGetVnodeSyncStatusStr(int vnodeSyncStatus);
|
const char* taosGetVnodeSyncStatusStr(int vnodeSyncStatus);
|
||||||
const char* taosGetVnodeDropStatusStr(int dropping);
|
const char* taosGetVnodeDropStatusStr(int dropping);
|
||||||
const char* taosGetDnodeStatusStr(int dnodeStatus);
|
const char* taosGetDnodeStatusStr(int dnodeStatus);
|
||||||
const char* taosGetDnodeLbStatusStr(int dnodeBalanceStatus);
|
const char* taosGetDnodeLbStatusStr(int dnodeBalanceStatus);
|
||||||
const char* taosGetBalanceTypeStr(int type);
|
|
||||||
const char* taosBalanceReasonStr(int reason);
|
|
||||||
const char* taosGetVgroupLbStatusStr(int vglbStatus);
|
const char* taosGetVgroupLbStatusStr(int vglbStatus);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -287,8 +287,10 @@ ssize_t tsendfile(int dfd, int sfd, off_t *offset, size_t size) {
|
||||||
ssize_t sentbytes;
|
ssize_t sentbytes;
|
||||||
|
|
||||||
while (leftbytes > 0) {
|
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);
|
sentbytes = sendfile(dfd, sfd, offset, leftbytes);
|
||||||
if (sentbytes == -1) {
|
if (sentbytes == -1) {
|
||||||
if (errno == EINTR) {
|
if (errno == EINTR) {
|
||||||
|
|
|
@ -73,20 +73,3 @@ const char* taosGetVgroupLbStatusStr(int vglbStatus) {
|
||||||
default: return "undefined";
|
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;
|
static int ipStrIndex = 0;
|
||||||
|
|
||||||
char *ipStr = ipStrArray[(ipStrIndex++) % 3];
|
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;
|
return ipStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue