Open hylkevds opened 5 years ago
@chhonker: the development version of FROST-Server now supports filtered deletes.
FROST-Client also does, in version 0.19-SNAPSHOT:
service.observations().query().filter("phenomenonTime lt 2018-01-01T12:00:00Z").delete();
Could you try it out and see if it works as you expect?
ToDo: Add documentation and link to that on the landing page
Is deletion on sets with $filter support implemented now? I see this issue is still open.
It appears to still be in the code:
Ah, good point. Yes this is implemented and can be enabled using the option extension.filterDelete.enable.
I should type up the documentation page, and add a conformance class to the landing page linking to that documentation.
Thanks Hylke! I can see where the filterDeleteEnabled
flag is set in the code: https://github.com/FraunhoferIOSB/FROST-Server/blob/v2.x/FROST-Server.Core/src/main/java/de/fraunhofer/iosb/ilt/frostserver/settings/CoreSettings.java#L277 - but do you have notes on how to toggle this setting? By default it is set to false
, how would I set it to true
? A note that we are deploying this as a docker container.
EDIT: I think I found it, I think I can set an environment variable with the name extension.filterDelete.enable
to true
in our environment configuration to override the default false
setting. Looking at this line in particular: https://github.com/FraunhoferIOSB/FROST-Server/blob/v2.x/FROST-Server.Core/src/main/java/de/fraunhofer/iosb/ilt/frostserver/settings/CoreSettings.java#L134
Yes, the link I posted above points to the settings documentation that lists that option (https://fraunhoferiosb.github.io/FROST-Server/settings/settings.html#extension-settings)
Ok, I think I have the extension.filterDelete.enable
set to true on my frost http server.
The deletes are working now, it is a bit slow at the moment (sometimes times out after 60 seconds processing 10 such queries at a time) but I imagine I'll need to add some indexes to the frost db to speed it up. Any suggestions on speeding up such queries would be appreciated - thank you as always.
There's a setting to log slow queries: persistence.slowQueryThreshold
. More info on that is on our DB Performance page.
See https://github.com/opengeospatial/sensorthings/issues/44