Skip to content

Build sessionPool blocking when the connection address is incorrect but the connection can still be established. #620

@vince-0202

Description

@vince-0202

**Describe the bug **
我基于sessionPool进行session管理,并且将sessionPool注册为spring boot bean,但是我们公司测试同事在配置时,错误的将NebulaGraph Studio访问端口配置成了hostAddress,导致服务长时间阻塞于启动状态。
因为我们基于k8s部署,设置了就绪探针,在阻塞几分钟后就被自动重启了,然后一直重复上述的步骤,且期间没有任何可以参考的日志。
后续排查到,最终阻塞在了最后的verifyClientVersion方法内部的recv_verifyClientVersion()。
Image
最终执行到readMessageBegion()之后就阻塞住了。
Image
原因应该是我没有设置timeout,前面一段默认在构建TProtocol时timeout给了一个Integer.MAX_VALUE。
Image

但是一般程序就绪探针的不会设置这么长的时间,这就导致还没有等到超时报错程序就被杀死重启了。
对于这个默认的timeout时间是否可以进行缩短。

**Your Environments **

  • JDK: 11

How To Reproduce

  1. 构建SessionPool时不设置timeout参数
  2. host设置为一个能连通当不正确的地址,如NebulaGraph Studio的访问地址
  3. 调用sessionPool构造器

Expected behavior

缩短在timeout未设置时传递给TProtocol的timeout值

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions