Skip to content

[Collections] Fix racy refresh #3327

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

Merged
merged 1 commit into from
Mar 8, 2021
Merged

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Mar 6, 2021

Motivation:
testHappyRefresh still crashes. See:
https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04/5991/console

refreshCollections leads to target trie getting updated. Trie is not thread-safe.

Modifications:
Make Trie thread-safe. TrieNode should be thread-safe already.

Motivation:
`testHappyRefresh` still crashes. See:
https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04/5991/console

`refreshCollections` leads to target trie getting updated. `Trie` is not thread-safe.

Modifications:
Make `Trie` thread-safe. `TrieNode` should be thread-safe already.
@yim-lee
Copy link
Contributor Author

yim-lee commented Mar 6, 2021

@swift-ci please smoke test

Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

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

LGTM

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Mar 7, 2021
@yim-lee yim-lee merged commit 31a2289 into swiftlang:main Mar 8, 2021
@yim-lee yim-lee deleted the racy-refresh-1 branch March 8, 2021 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants