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

volatile needIncreaseTermImmediately #30

Closed
luoxn28 opened this issue Aug 11, 2019 · 3 comments
Closed

volatile needIncreaseTermImmediately #30

luoxn28 opened this issue Aug 11, 2019 · 3 comments
Labels
enhancement enhancement

Comments

@luoxn28
Copy link

luoxn28 commented Aug 11, 2019

你好,io.openmessaging.storage.dledger.DLedgerLeaderElector中属性needIncreaseTermImmediately最好是设置成volatile类型,保证多线程间内存可见性。

private boolean needIncreaseTermImmediately = false;
@RongtongJin
Copy link
Contributor

IMO, it's necessary. You can submit a PR to polish relate code.

@RongtongJin RongtongJin added the enhancement enhancement label Nov 22, 2019
@shibd
Copy link
Contributor

shibd commented Apr 11, 2020

我可以提PR修复这个问题吗?是否需要对其他类的成员的可见性也做下修改。

@RongtongJin
Copy link
Contributor

我可以提PR修复这个问题吗?是否需要对其他类的成员的可见性也做下修改。

Of course, any enhancements are welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement
Projects
None yet
Development

No branches or pull requests

3 participants