Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZookeeperRegisterServiceImplTest buildZkTest UT failed #5366

Closed
1 task
slievrly opened this issue Feb 21, 2023 · 3 comments
Closed
1 task

ZookeeperRegisterServiceImplTest buildZkTest UT failed #5366

slievrly opened this issue Feb 21, 2023 · 3 comments
Assignees
Labels
task: help-wanted Extra attention is needed

Comments

@slievrly
Copy link
Member

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

image
image
https://github.com/seata/seata/actions/runs/4229244833/jobs/7345446030

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version : 11
  • Seata version:
  • OS :
  • Others:
@slievrly slievrly added the task: help-wanted Extra attention is needed label Feb 22, 2023
@Bughue
Copy link
Contributor

Bughue commented Feb 22, 2023

plz assgin to me

@Bughue
Copy link
Contributor

Bughue commented Feb 23, 2023

目前了解到的情况:

  1. 关于NPE:这个看起来是zk源码里不完善导致的,问题发生在server关闭时,代码不严谨。但无论有没有这个异常server都会关掉了
  2. 关于server自动关闭:是因为doIO()的时候遇到了IOException (在这里发现是server的state!=running),同样是zk内部的问题,应该是start的时候使用了异步线程,导致state状态更新不及时

关于解决方案

  1. 提供足够的时间给server去启动:现在adBeforeClass()里面创建时start=true,后面又start了一下,其实是没有用的,因为CAS会马上返回。除非在beforeclass里面sleep一下,但如果单测碰到问题都这样去做以后CI会非常慢。
  2. 用明确的机制去保证server启动没问题:目前没有看到方法可以直接调用以便等待。
  3. client捕捉zkexception:遇到异常的时候sleep 1s再重试,降低单测失败率

建议是用方案3,看看大家有没有什么建议

@funky-eyes
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task: help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants