提交 213e8b89 编写于 作者: H Haojun Liao

log: disable some logs.

上级 ca4df761
...@@ -165,7 +165,7 @@ void* queryThread(void* arg) { ...@@ -165,7 +165,7 @@ void* queryThread(void* arg) {
int32_t numOfThreads = 1; int32_t numOfThreads = 1;
void tmq_commit_cb_print(tmq_t* pTmq, int32_t code, void* param) { void tmq_commit_cb_print(tmq_t* pTmq, int32_t code, void* param) {
printf("auto commit success, code:%d\n\n\n\n", code); // printf("auto commit success, code:%d\n", code);
} }
void* doConsumeData(void* param) { void* doConsumeData(void* param) {
...@@ -1053,19 +1053,24 @@ TEST(clientCase, sub_db_test) { ...@@ -1053,19 +1053,24 @@ TEST(clientCase, sub_db_test) {
} }
TEST(clientCase, sub_tb_test) { TEST(clientCase, sub_tb_test) {
taos_options(TSDB_OPTION_CONFIGDIR, "~/first/cfg"); taos_options(TSDB_OPTION_CONFIGDIR, "/home/tests/dir/cfg/");
TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); TAOS* pConn = taos_connect("vm116", "root", "taosdata", NULL, 0);
ASSERT_NE(pConn, nullptr); ASSERT_NE(pConn, nullptr);
tmq_conf_t* conf = tmq_conf_new(); tmq_conf_t* conf = tmq_conf_new();
int64_t ts = taosGetTimestampMs();
char consumerGroupid[128] = {0};
sprintf(consumerGroupid, "group_id_%"PRId64, ts);
tmq_conf_set(conf, "enable.auto.commit", "true"); tmq_conf_set(conf, "enable.auto.commit", "true");
tmq_conf_set(conf, "auto.commit.interval.ms", "1000"); tmq_conf_set(conf, "auto.commit.interval.ms", "2000");
tmq_conf_set(conf, "group.id", "cgrpName45"); tmq_conf_set(conf, "group.id", consumerGroupid);
tmq_conf_set(conf, "td.connect.user", "root"); tmq_conf_set(conf, "td.connect.user", "root");
tmq_conf_set(conf, "td.connect.pass", "taosdata"); tmq_conf_set(conf, "td.connect.pass", "taosdata");
tmq_conf_set(conf, "auto.offset.reset", "earliest"); tmq_conf_set(conf, "auto.offset.reset", "earliest");
tmq_conf_set(conf, "experimental.snapshot.enable", "true"); tmq_conf_set(conf, "experimental.snapshot.enable", "false");
tmq_conf_set(conf, "msg.with.table.name", "true"); tmq_conf_set(conf, "msg.with.table.name", "true");
tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL); tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL);
...@@ -1074,7 +1079,7 @@ TEST(clientCase, sub_tb_test) { ...@@ -1074,7 +1079,7 @@ TEST(clientCase, sub_tb_test) {
// 创建订阅 topics 列表 // 创建订阅 topics 列表
tmq_list_t* topicList = tmq_list_new(); tmq_list_t* topicList = tmq_list_new();
tmq_list_append(topicList, "topic_t2"); tmq_list_append(topicList, "topic_t1");
// 启动订阅 // 启动订阅
tmq_subscribe(tmq, topicList); tmq_subscribe(tmq, topicList);
...@@ -1093,15 +1098,15 @@ TEST(clientCase, sub_tb_test) { ...@@ -1093,15 +1098,15 @@ TEST(clientCase, sub_tb_test) {
while (1) { while (1) {
TAOS_RES* pRes = tmq_consumer_poll(tmq, timeout); TAOS_RES* pRes = tmq_consumer_poll(tmq, timeout);
if (pRes) { if (pRes) {
char buf[1024]; char buf[128];
const char* topicName = tmq_get_topic_name(pRes); // const char* topicName = tmq_get_topic_name(pRes);
const char* dbName = tmq_get_db_name(pRes); // const char* dbName = tmq_get_db_name(pRes);
int32_t vgroupId = tmq_get_vgroup_id(pRes); // int32_t vgroupId = tmq_get_vgroup_id(pRes);
//
printf("topic: %s\n", topicName); // printf("topic: %s\n", topicName);
printf("db: %s\n", dbName); // printf("db: %s\n", dbName);
printf("vgroup id: %d\n", vgroupId); // printf("vgroup id: %d\n", vgroupId);
while (1) { while (1) {
TAOS_ROW row = taos_fetch_row(pRes); TAOS_ROW row = taos_fetch_row(pRes);
...@@ -1111,16 +1116,14 @@ TEST(clientCase, sub_tb_test) { ...@@ -1111,16 +1116,14 @@ TEST(clientCase, sub_tb_test) {
fields = taos_fetch_fields(pRes); fields = taos_fetch_fields(pRes);
numOfFields = taos_field_count(pRes); numOfFields = taos_field_count(pRes);
precision = taos_result_precision(pRes);
taos_print_row(buf, row, fields, numOfFields);
totalRows += 1; totalRows += 1;
printf("precision: %d, row content: %s\n", precision, buf); if (totalRows % 100000 == 0) {
taos_print_row(buf, row, fields, numOfFields);
printf("row content: %s\n", buf);
}
} }
taos_free_result(pRes); taos_free_result(pRes);
// if ((++count) > 1) {
// break;
// }
} else { } else {
break; break;
} }
......
...@@ -113,8 +113,16 @@ static void vmProcessFetchQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO ...@@ -113,8 +113,16 @@ static void vmProcessFetchQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
int32_t code = vnodeProcessFetchMsg(pVnode->pImpl, pMsg, pInfo); int32_t code = vnodeProcessFetchMsg(pVnode->pImpl, pMsg, pInfo);
if (code != 0) { if (code != 0) {
if (terrno != 0) code = terrno; if (terrno != 0) {
dGError("vnodeProcessFetchMsg vgId:%d, msg:%p failed to fetch since %s", pVnode->vgId, pMsg, terrstr()); code = terrno;
}
if (code == TSDB_CODE_WAL_LOG_NOT_EXIST) {
dGDebug("vnodeProcessFetchMsg vgId:%d, msg:%p failed to fetch since %s", pVnode->vgId, pMsg, terrstr());
} else {
dGError("vnodeProcessFetchMsg vgId:%d, msg:%p failed to fetch since %s", pVnode->vgId, pMsg, terrstr());
}
vmSendRsp(pMsg, code); vmSendRsp(pMsg, code);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册