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

ReadOnlyServiceImpl里的Disruptor使用问题 #120

Closed
gumandy opened this issue Apr 19, 2019 · 4 comments · Fixed by #121
Closed

ReadOnlyServiceImpl里的Disruptor使用问题 #120

gumandy opened this issue Apr 19, 2019 · 4 comments · Fixed by #121
Labels
bug Something isn't working
Milestone

Comments

@gumandy
Copy link

gumandy commented Apr 19, 2019

ReadIndexResponseClosure里持有RingBuffer里的ReadIndexEvent对象,发起node.handleReadIndexRequest请求异步回调Closure,这里切换了线程,ReadIndexEvent里面的值是有可能被addRequest操作覆盖的

@fengjiachun
Copy link
Contributor

@gumandy 非常感谢指出这个问题,确实是 bug

@fengjiachun
Copy link
Contributor

这个问题确实是个 bug,但是不影响 readIndex 读的正确性和一致性
对稳定性会有一定影响,就是前面的read 被 notifyFail 却影响了新进来的 read 请求返回失败,需要重试解决
在 rheakv 中,readIndex 失败会走 raft log 读,可以借鉴

@gumandy
Copy link
Author

gumandy commented Apr 19, 2019

@fengjiachun 前面read由于closure被覆盖都得不到notify了,直到超时,这。。。。。。。。。。。

@fengjiachun
Copy link
Contributor

恩,被覆盖的需要等到超时

@fengjiachun fengjiachun added the bug Something isn't working label Apr 19, 2019
@fengjiachun fengjiachun added this to the 1.2.6 milestone Apr 19, 2019
killme2008 pushed a commit that referenced this issue Apr 21, 2019
* (bugfix) fix readindex concurrent bug #120

* (bugfix) fix readindex concurrent bug #120

* (fix) fix travis build failed with openjdk11 (#122)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants