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] In HiveConnectorAdapter.java possible threading issue #1910

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 field version is 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
Copy link
Contributor

Fixed by @coolderli in #2139

@yuqi1129
Copy link
Contributor

@coolderli
The same applies to this issue.

@coolderli
Copy link
Contributor

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