it seems like the RRD4J persistence service always restore number values as double, but not as integer, e.g. the Item.state is: 1, RRD4J internally stores it as 1.0 and returns 1.0 when using “restoreOnStartup” as system start.
This is causing a problem when using mappings in a sitemap, because none of the mappings matches anymore:
.items:
Number SET_Scene_Autoswitching “Szenen-Automatik”
After a system restart, SET_Scene_Autoswitching is e.g. set to 1.0, and therefore no value is highlighted for this item.
This behaviour is different in Openhab 1.x, which stores the value as integer
2019-01-30 15:28:36.834 [DEBUG] [.p.internal.PersistenceManager] - Restored item state from ‘30-Jan-2019 15:27:00’ for item ‘SET_Scene_Autoswitching’ -> ‘1’
MapDB is the one and only database that is build for that task!
This database saves ONLY the last state of every persisted item, therefore using it for every item is possible.
Any other database does save either each state of the persisted item or ( as in the case of rrd4j) all states over a fixed period,. Doing such for all items would be waisting memory.