removeAllStatesBetween

Hello together,
today I tried to use “removeAllStatesBetween” because I have corrupted data in some items.
Here is the code I tried to use but it didn’t work.
I am running openHAB 4.2.1 as openhabian on a respberry pi.
The used persistance service is the default rrd4j.
Did someone already use this function successfully?

val ZonedDateTime start = ZonedDateTime.parse("2024-06-27T00:00:00.000Z");
val ZonedDateTime end = ZonedDateTime.parse("2024-09-09T00:00:00.000Z");

Wasserzahler_Value.removeAllStatesBetween(start, end);

rrd4j is only a queryable persistence service.

removeallstates requires a modifiable one, which rrd4j isn’t. I wonder whether this is a part of the error message to automatically answer future similar questions.

There should be a warning written in the log.

Instead of “There is no modifiable persistence service registered with the id ‘{}’”

Perhaps it should say “The persistence service {} does not support this operation”, if service is not null but not instance of modifiable