Skip to content

[5.5][Collections] Throw error instead of preconditionFailure after storage closed #3513

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 May 26, 2021

#3512 for 5.5

…e closed

Motivation:
With swiftlang#3505, the code does `preconditionFailure` when trying to execute DB statement after connection is disconnected. In `populateTargetTrie` we check connection state before calling `executeStatement`, but it's still possible for storage to close _after_ the check but _before_ `executeStatement`. This might have caused rdar://78513692.

Modifications:
- Throw error instead of `preconditionFailure`
- Unrelated: `GitHubPackageMetadataProvider.configuration` doesn't need to be var
@yim-lee
Copy link
Contributor Author

yim-lee commented May 26, 2021

@swift-ci please test

@yim-lee yim-lee merged commit ababf36 into swiftlang:release/5.5 May 27, 2021
@yim-lee yim-lee deleted the testUpdateAuthTokens-sig6-5.5 branch May 27, 2021 02:33
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