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

Initialize in Construction of AtlasEntityPolygonsFilter #219

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

jklamer
Copy link
Contributor

@jklamer jklamer commented Sep 19, 2018

Description:

Initialize the underlying STRtree in the Rtree class, which lazily constructs its index, when first queried.
This means without querying the Rtree during construction, the filter isn't thread safe despite being read only.

Potential Impact:

Slightly higher memory usage when the filter is never used.

Unit Test Approach:

Standard unit tests should cover because the problem is itself a race condition and cannot be reliably reproduced.

Test Results:

Passes all unit tests.


In doubt: Contributing Guidelines

@MikeGost MikeGost added the Bug label Sep 19, 2018
Copy link
Contributor

@MikeGost MikeGost left a comment

Choose a reason for hiding this comment

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

Looks good. How did you find this?

@jklamer
Copy link
Contributor Author

jklamer commented Sep 19, 2018

@MikeGost multiple threads using the same filter. Caused an NPE in the STRtree code, where the stack trace lead right to the issue.

@MikeGost MikeGost merged commit c7ea7d4 into osmlab:dev Sep 19, 2018
@matthieun matthieun added this to the 5.1.13 milestone Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants