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

chore: Use ReentrantLock for inti ReferenceConfig. #14136

Merged
merged 1 commit into from
May 13, 2024
Merged

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Apr 27, 2024

What is the purpose of the change

Avoid pinning the carrier thread.

    org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:60) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:268) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:268) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) <== monitors:1
    org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) <== monitors:1

Brief changelog

Use ReentrantLock.

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@AlbumenJ
Copy link
Member

AlbumenJ commented May 8, 2024

image

Please fix the code style

@He-Pin
Copy link
Member Author

He-Pin commented May 11, 2024

@AlbumenJ Thanks, I have updated

Copy link

sonarcloud bot commented May 11, 2024

@AlbumenJ AlbumenJ merged commit 6a44987 into apache:3.3 May 13, 2024
16 of 19 checks passed
@He-Pin He-Pin deleted the lock branch May 13, 2024 04:02
@He-Pin
Copy link
Member Author

He-Pin commented May 13, 2024

thanks @AlbumenJ

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

Successfully merging this pull request may close these issues.

2 participants