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

Indexing: add a workaround for clearing the index #647

Merged
merged 4 commits into from
Jul 6, 2023

Conversation

compnerd
Copy link
Member

The unit tests will occasionally desire to clean up the generated index while retaining a reference to the NavigatorIndex instance. This is prevented on Windows as the LMDB environment will preserve an open handle which results in the index not being removed.

Adding an internal API to support this use case as this is used for tests only AFAICT.

@compnerd compnerd requested a review from d-ronnqvist June 26, 2023 16:49
@compnerd
Copy link
Member Author

I'm not sure if this is the best approach for this, and I'm open to additional approaches - @d-ronnqvist @daniel-grumberg

@compnerd
Copy link
Member Author

compnerd commented Jul 5, 2023

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Jul 6, 2023

Thanks @Kyle-Ye I definitely like this approach much better, it is cleaner.

@compnerd
Copy link
Member Author

compnerd commented Jul 6, 2023

@swift-ci please test

compnerd and others added 4 commits July 6, 2023 13:04
The unit tests will occasionally desire to clean up the generated index
while retaining a reference to the NavigatorIndex instance.  This is
prevented on Windows as the LMDB environment will preserve an open
handle which results in the index not being removed.

Adding an internal API to support this use case as this is used for
tests only AFAICT.
Co-authored-by: Kyle <kyle201817146@gmail.com>
Co-authored-by: Kyle <kyle201817146@gmail.com>
@compnerd
Copy link
Member Author

compnerd commented Jul 6, 2023

@swift-ci please test

@compnerd compnerd merged commit 91f32ae into swiftlang:main Jul 6, 2023
@compnerd compnerd deleted the indexing branch July 6, 2023 21:58
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