This was very confusing, but the even worse problem is that a lot more items are now being persisted in the mariadb database than I configured. I only configured 4 items, but for some reason I now have over 100 items in the database. And the list is still growing, so I guess that every updated items gets created in the database.
In OH 3 a default strategy was implemented by all the persistence addons. This default applies when there isn’t a .persist file or, in OH 4.0+, a managed config created through MainUI. Usually that strategy is to persist every Item on everyChange with restoreOnStartup (rrd4j of course is slightly different).
Do you see this file being loaded when OH starts or you change the file? You should see something like “loading model jdbc.persist”.
If on OH 4, if you navigate to Settings → Other: Persistence → JDBC → Gear Icon → Persistence Configuration is the contents of your jdbc.persist file represented there?
The fix from wezzix with the two commands to clean up the cache worked for me. Maybe the openhab-cli clean-cache command does not work anymore? I’m sure I’ve cleaned the cache with this command after the update.
@sihui Are you also using Openhabian? I’ve just tried to reproduce this problem on a different system with the Docker image of Openhab, but the problem does not occur there. Maybe this is related to Openhabian.