Aircloak / aircloak

This repository contains the Aircloak Air frontend as well as the code for our Cloak query and anonymization platform
2 stars 0 forks source link

Don't block queries waiting for an analysis query to complete #4538

Open sebastian opened 4 years ago

sebastian commented 4 years ago

It transpires that we block a query when an analysis is pending, waiting for it to complete. I had forgotten about this detail. Given how long analyses queries can take to run in real deployments I think this is the wrong decision.

Therefore:

cristianberneanu commented 4 years ago

I don't think this is a good idea. It will add a level of non-determinism to our system, as many queries will be invalid until the analysis finishes. In the case of bounds checking, the result will be very slow queries, since they will need emulation.

Since the checks get prioritized, I think the current situation is fine.

sebastian commented 4 years ago

Queries might take hours to complete (without it being clear to the analyst that this is a temporary thing...). If we keep the current system then we need to communicate a query status that tells the person that the query is blocked on analysis queries completing! Otherwise there is no sensible feedback and the system will look completely broken.

cristianberneanu commented 4 years ago

Queries might take hours to complete

If you mean individual analysis queries will take hours to complete, I don't think this is a realistic scenario we should worry about, as the analysis queries will most likely get disabled anyway.

If you instead mean that all analysis queries will take hours to finish, the query won't need to wait for all of them, only for the relevant ones, which will get higher priority.

Otherwise there is no sensible feedback and the system will look completely broken.

Returning a specific error or timing out after a while makes sense. But continuing doesn't as the system is somewhat broken until those queries complete.