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

[Improvement] Possible thread issue in MySQLConnectorAdapter.java #1946

Closed
justinmclean opened this issue Feb 2, 2024 · 3 comments
Closed
Assignees
Labels
improvement Improvements on everything

Comments

@justinmclean
Copy link
Member

What would you like to be improved?

Static variable version is being updated in non-static method buildInternalConnectorConfig.

Correctly updating a static field from a non-static method is tricky to get right and could easily lead to bugs if there are multiple class instances and/or multiple threads in play. Ideally, static fields are only updated from synchronized static methods.

How should we improve?

Make method static?

@justinmclean justinmclean added the improvement Improvements on everything label Feb 2, 2024
yuqi1129 pushed a commit that referenced this issue Feb 20, 2024
…n atomic to keep thread safe (#2139)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[#123] feat(operator): support xxx"
     - "[#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[#255] test: fix flaky test NameOfTheTest"
   Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->

### What changes were proposed in this pull request?

close #1953 #1946 #1941 #1920 #1910 

### Why are the changes needed?


Fix: #1953 #1946 #1941 #1920 #1910 

### Does this PR introduce _any_ user-facing change?

- no

### How was this patch tested?

- ut
@jerryshao jerryshao added this to the Gravitino 0.5.0 milestone Apr 7, 2024
@jerryshao jerryshao assigned jerryshao and unassigned jerryshao Apr 7, 2024
@jerryshao
Copy link
Contributor

Fixed by @coolderli in #2139

@yuqi1129
Copy link
Contributor

@coolderli
Can you leave a comment here, I'm handling the release work, as this is your credit, but due to GitHub restrictions, I can't assign it to you.

@coolderli
Copy link
Collaborator

Closed by #2139

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

No branches or pull requests

4 participants