Giter Club home page Giter Club logo

Comments (4)

fengjiachun avatar fengjiachun commented on July 17, 2024

是否可以改成 在readIndex的时候异步的发送心跳

不行的,如果有阻塞,会逐步 block 住所有可用线程的,没办法从根本解决问题。

这里有个判断,对于没创建连接的,会快速失败并异步建连,不应该有阻塞的。你用的什么版本?

另外,看堆栈,这是魔改过的 jraft?

from sofa-jraft.

ye-xiaowei avatar ye-xiaowei commented on July 17, 2024

我在排查为什么会timeout的时候自己加了很多日志所以行数可能对不上,版本是1.3.13.

看图片2,堆栈中checkConnection之后 park?

我打印日志的时候发现readIndex在从发送到一个掉线的节点,到发送到正常的节点相差5s,这个时候早已timeout了。然后会打印

A timeout read-index response finally returned: Status[OK]

from sofa-jraft.

fengjiachun avatar fengjiachun commented on July 17, 2024

不仅仅是日志行数对不上的问题,比如 com.galaxybase 是什么?

看图片2,堆栈中checkConnection之后 park?

看不到具体代码行数,不过是 ConcurrentHashMap 里面的锁吧?这里 bolt rpc 建连也是异步的 (我的意思是想说你再抓一把线程栈可能没有这个 wait 了)

至少从现在的信息里是看不到哪里 block 的,建议用 arthas 试试能不能找到 block 在哪了

from sofa-jraft.

ye-xiaowei avatar ye-xiaowei commented on July 17, 2024

嗯嗯

from sofa-jraft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.