Persistence hierarchy


just a brief question about persistence.
I am currently using mapdb (restoreOnStartup) and jdbc (anything else) which I would like to transfer to influxDB.

I just recognized that I have both jdbc and mapdb setup with restoreOnStartup.
Does this have a negative effect, so should I remove restoreOnStartup from jdbc?
Or which one is used preferrably with this conflict?

Yes probably
mapdb will probably restore first as it is a smaller db
jdbc databse are way slower, the jdbc database will try to restore after mabdb and you could end up with conflicting values but no errors. It just slows down you startup routine.

Use mapdb only for restoreonstartup. That’s what its for.

1 Like

So you’r recommend persisting such items twice, once in your regular persistence service (e.g., influxdb) and once in mapdb?

I’m currently only using influxdb as (single) persistence service and it works.

Yes it would. mapdb is just quicker at restoreonstartup.
I use three persistence services

mapdb for restoreonstartup
rrd4j for quick and dirty graphs on the UI (only number items)
influxdb for long term storage and grafana graphing (all types of items)

Thanks, I will delete the restoreOnStartup from the other persistence files then.