apache / apache/iotdb

三节点集群出现某个节点查询时间超长异常

Abierto
#4,700 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
6.4k
Forks
1.2k
Merge medio
1 d 23 h
PR fusionados (30 d)
115

Descripción

三节点集群使用过程中,同样的查询sql,两个节点查询时间几十毫秒,另外一个节点需要80多秒
1.三个节点1,2,3在集群搭建完使用过程中,五六天前第3节点服务器重启过,重启后重启了第3节点的iotdb服务
2.再之后间隔了一天左右1,2节点服务器也重启过,同样重启了两节点的iotdb服务,重启后执行过sql数据和响应时间是正常的
3.再之后过元旦,今天发现第3节点查询数据时间超级慢,1、2节点查询响应很快是正常的
4.然后尝试了重启第3节点的iotdb服务,重启之后第3节点还是很慢为80多秒
5.查看了很慢节点的log_all的日志文件发现日志描述Failed to synchronize with the leader after #20004ms执行了四次加起来差不多是80多秒,不知道有没有遇到同样的问题的人或懂得大神能给解解惑

log_all的日志
2022-01-04 09:46:37,223 [ClusterClient-1] INFO o.a.i.d.c.IoTDBThreadPoolFactory:55 - new fixed thread pool: Query, thread number: 8
2022-01-04 09:46:37,227 [ClusterClient-1] INFO o.a.i.d.s.TSServiceImpl:821 - Cost: 42152 ms, sql is select state from root.hbisdt.ntCDAlZT limit 10
2022-01-04 09:47:02,479 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Data(172.168.3.197:9003): Failed to synchronize with the leader after 20004ms
2022-01-04 09:47:23,485 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Meta: Failed to synchronize with the leader after 20003ms
2022-01-04 09:47:44,493 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Meta: Failed to synchronize with the leader after 20004ms
2022-01-04 09:48:05,499 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Data(172.168.3.197:9003): Failed to synchronize with the leader after 20004ms
2022-01-04 09:48:05,504 [ClusterClient-1] INFO o.a.i.d.s.TSServiceImpl:821 - Cost: 42016 ms, sql is select state from root.hbisdt.ntCDAlZT limit 10
2022-01-04 09:48:10,262 [pool-2-IoTDB-timedQuerySqlCountThread-1] INFO o.a.i.d.s.TSServiceImpl:201 - Query count in current 1 minute 1
2022-01-04 09:49:03,564 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Data(172.168.3.197:9003): Failed to synchronize with the leader after 20004ms
2022-01-04 09:49:24,572 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Meta: Failed to synchronize with the leader after 20006ms
2022-01-04 09:49:45,579 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Meta: Failed to synchronize with the leader after 20004ms
2022-01-04 09:50:06,586 [ClusterClient-1] WARN o.a.i.c.s.m.RaftMember:950 - Data(172.168.3.197:9003): Failed to synchronize with the leader after 20005ms
2022-01-04 09:50:06,591 [ClusterClient-1] INFO o.a.i.d.s.TSServiceImpl:821 - Cost: 42017 ms, sql is select state from root.hbisdt.ntCDAlZT limit 10

![88a7f85d5258a74b0bd129d77a8720d](https://user-images.githubusercontent.com/43607403/148002432-bc823465-bfd9-49e2-8d89-6f8766e6ce87.png)

超慢节点日志
[第三节点日志.zip](https://github.com/apache/iotdb/files/7805067/default.zip)
修改 3 个节点 conf/logback.xml 文件里面的 root level="info" 为 root level="debug"后清空日志文件,重启各个节点再次执行同样查询SQL,发现只有一个节点1快,另外两个成慢的了
![image](https://user-images.githubusercontent.com/43607403/148029483-2ccfd257-9fb8-492a-bf1e-6dd55ce39cef.png)
三个节点的所有日志
[三节点日志.zip](https://github.com/apache/iotdb/files/7806247/default.zip)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con los logs adjuntos de los tres nodos y las advertencias de RaftMember que muestran tiempos de espera de sincronización repetidos; después, compara los tiempos de las consultas y la secuencia de reinicio entre los nodos. Reproduce el mismo SQL en cada nodo e inspecciona los logs relevantes del clúster y del servicio; la tarea se considerará completada cuando se haya identificado por qué los retrasos de sincronización afectan a la latencia de las consultas y se haya documentado una resolución verificada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
databases, distributed-systems, performance
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.