Skip to content

[5.5][Collections] testPopulateTargetTrie sometimes gets stuck #3523

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

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Jun 3, 2021

#3522 for 5.5

…3522)

Motivation:
`PackageCollectionsStorageTests/testPopulateTargetTrie` gets stuck sometimes because `targetTrieReady` is already set and `callback` is only invoked in the body of `memoize`.

https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64/79/console

Modifications:
Rearrange logic in `populateTargetTrie` such that `callback` is invoked outside of `memoize` body.

Also, add `populateTargetTrieLock` to prevent more than one thread from calling `memoize` at the same time.
@yim-lee yim-lee changed the title [Collections] testPopulateTargetTrie sometimes gets stuck (#3522) [5.5][Collections] testPopulateTargetTrie sometimes gets stuck (#3522) Jun 3, 2021
@yim-lee yim-lee changed the title [5.5][Collections] testPopulateTargetTrie sometimes gets stuck (#3522) [5.5][Collections] testPopulateTargetTrie sometimes gets stuck Jun 3, 2021
@yim-lee
Copy link
Contributor Author

yim-lee commented Jun 3, 2021

@swift-ci please test

@tomerd tomerd added the 5.5 label Jun 3, 2021
@yim-lee yim-lee merged commit 3933aa2 into swiftlang:release/5.5 Jun 3, 2021
@yim-lee yim-lee deleted the stuck-populateTargetTrie-5.5 branch June 3, 2021 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants