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 concurrency issue in LazilyConfiguredMapping #2268

Merged
merged 2 commits into from
May 12, 2022

Conversation

carterkozak
Copy link
Contributor

==COMMIT_MSG==
Fix concurrency issue in LazilyConfiguredMapping
==COMMIT_MSG==

@carterkozak carterkozak requested a review from CRogers May 12, 2022 21:07
@changelog-app
Copy link

changelog-app bot commented May 12, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Fix concurrency issue in LazilyConfiguredMapping

Check the box to generate changelog(s)

  • Generate changelog entry

private final List<LazyValues<K, V, A>> values = new ArrayList<>();

@GuardedBy("this")
private final Map<K, Optional<V>> computedValues = new HashMap<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Considered swapping to a ConcurrentHashmap which handles nested mutations more gracefully, however that's not expected to happen (and isn't related to this issue).

@bulldozer-bot bulldozer-bot bot merged commit ad97e2a into develop May 12, 2022
@bulldozer-bot bulldozer-bot bot deleted the ckozak/concurrency branch May 12, 2022 21:29
@svc-autorelease
Copy link
Collaborator

Released 4.134.0

bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request May 12, 2022
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.132.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | Safety analysis checks superinterfaces (in addition to superclasses) | palantir/gradle-baseline#2267 |


## 4.133.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | More lazily acquire JDK storage locations | palantir/gradle-baseline#2263 |


## 4.134.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Fix concurrency issue in LazilyConfiguredMapping | palantir/gradle-baseline#2268 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants