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

Huge filter leads to unresponsive ohsome API #530

Closed
matthiasschaub opened this issue Jun 17, 2024 · 1 comment · Fixed by #531
Closed

Huge filter leads to unresponsive ohsome API #530

matthiasschaub opened this issue Jun 17, 2024 · 1 comment · Fixed by #531
Labels
bug Something isn't working as expected question Further information is requested

Comments

@matthiasschaub
Copy link

Bug Description

Sending a request to geometry extraction endpoint with a single small bpoly but a huge filter makes the ohsome API unresponsive.

General Information

Please include the following general information about the issue and list any additional steps needed to reproduce the bug.

  • Version of the ohsome API: 1.10.2
  • Which API instance was requested: https://api.ohsome.org/v1
  • Affected endpoint(s): /elements/bbox
  • Used HTTP method; POST
  • Utilized tool/library for the request: ohsome-py

bazooka_query.txt

@matthiasschaub matthiasschaub added the bug Something isn't working as expected label Jun 17, 2024
@tyrasd tyrasd transferred this issue from GIScience/ohsome-api Jun 25, 2024
@tyrasd tyrasd added the question Further information is requested label Jun 25, 2024
@tyrasd
Copy link
Member

tyrasd commented Jun 25, 2024

The problem with this (extreme) filter is that its large number of or boolean operators makes calculating the disjunctive normal form of the filter (here) extremely inefficient. This computation is done in the optimization phase before executing the query. It would be possible to implement a fail-safe which aborts this particular optimization if the DNF blows up, but as it works fine for filters of "reasonable" complexity, I think it is not really necessary at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants