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

Fix ConsumeDriver running status #748

Merged
merged 3 commits into from
Jan 19, 2025
Merged

Fix ConsumeDriver running status #748

merged 3 commits into from
Jan 19, 2025

Conversation

JoeCqupt
Copy link
Contributor

@JoeCqupt JoeCqupt commented Jan 17, 2025

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

@wu-sheng
Copy link
Member

Could you explain why do this change?

@@ -88,6 +88,9 @@ public void begin(Channels channels) {
}
lock.lock();
try {
if (running){
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double Checked Locking

@JoeCqupt
Copy link
Contributor Author

ConsumeDriver use a lock + running status to protect begin method. but there is a problem with code. it should use Double Checked Locking

@wu-sheng
Copy link
Member

ConsumeDriver use a lock + running status to protect begin method. but there is a problem with code. it should use Double Checked Locking

Did you face some issues? Could you paste the logs here?
Or just from code review perspective?

@wu-sheng wu-sheng added the bug Something isn't working label Jan 18, 2025
@wu-sheng wu-sheng added this to the 9.4.0 milestone Jan 18, 2025
@wu-sheng
Copy link
Member

You should update changes.md and describe what is fixed.

@wu-sheng
Copy link
Member

You should update changes.md and describe what is fixed.

CI seems strange. Please update this and push again.

@JoeCqupt
Copy link
Contributor Author

ConsumeDriver use a lock + running status to protect begin method. but there is a problem with code. it should use Double Checked Locking

Did you face some issues? Could you paste the logs here? Or just from code review perspective?

I just found it when I am studying the skywalking-java source code

@wu-sheng
Copy link
Member

It seems you broke the code style, please check before submit.

@wu-sheng wu-sheng merged commit affbaa8 into apache:main Jan 19, 2025
193 of 194 checks passed
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 this pull request may close these issues.

2 participants