We should execute a "SHUTDOWN COMPACT" Statement if the server is being stopped / restarted to clean up all of the data.
Furthermore, we should execute a regular task (like once per day) to do this:
I also experience this and I tested it with latest H2 and seams that problem is solved. What used to be ~6GB database file for me is now less than 0.5MB!!!! We should include this update before releasing 1.6.9.
Nothing is helping here, I tried compacting (both ways) and version update as well.
But at least it seams that I found what is a reason for the growth. It seams that it happens when I execute the query to load the complete agent from the DB:
I am not sure why (maybe join) but this query is the problem. If I set all the relationships in the PlatformIdent to be eager and load the platform by the EntityManager#load() then everything works and database stays small even with reloading, new data, etc.
The only problem is that creating eager relationships there are requiring the complete overwrite of the Registration service. Thus, I must perform major changes there in the way how are things registered, because until now we always loaded PlatformIdent instance from the DB with each registration. And now this is killing us because of the eager loads. But anyway I assume even Registration service can be faster than it is right now, so changes there should be improvement as well. I will just need more time
Now with JMX stuff this got even more problematic. If you monitor JMX data then it's even growing faster. Thus, I increased priority to highest.