Skip to content

Conversation

yim-lee
Copy link
Contributor

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

#3529 for 5.5

Motivation:
rdar://78872613

`SQLitePackageCollectionsStorage.useSearchIndices` is set in `createSchemaIfNecessary`, which is invoked only along with a database operation. Since search methods (e.g., `searchPackages`) check `useSearchIndices` first thing, it's possible that `createSchemaIfNecessary` hasn't been called yet and as a result `useSearchIndices` defaults to `false`, causing a different code path to get executed.

Modification:
Make sure `createSchemaIfNecessary` is called before reading `useSearchIndices`.
@yim-lee
Copy link
Contributor Author

yim-lee commented Jun 5, 2021

@swift-ci please test

@tomerd tomerd added the 5.5 label Jun 7, 2021
@yim-lee yim-lee merged commit 12c2bb7 into swiftlang:release/5.5 Jun 7, 2021
@yim-lee yim-lee deleted the useSearchIndices-race-5.5 branch June 7, 2021 17:21
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