You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A static field version is being updated in a 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 the method static?
The text was updated successfully, but these errors were encountered:
justinmclean
changed the title
[Improvement] Possible thread issue in MemoryConnectorAdapter
[Improvement] Possible thread issue in MemoryConnectorAdapter.javaFeb 2, 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
What would you like to be improved?
A static field version is being updated in a 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 the method static?
The text was updated successfully, but these errors were encountered: