Description
I had a broker with lots of scheduled messages and I noticed that during startup (clean or unclean) the broker was reading the whole index file and storing it os memory:
In order to prevent the OOM, I changed this method to return a Iterator<JobLocation> instead of a List<JobLocation> avoiding load all this data into the heap.
I also noticed that during the startup we read the index at least 3 times:
and
Probably we can optimize this but this should be another Jira (also maybe we dont need to call recover(tx) when its a clean shutdown)
Attachments
Issue Links
- links to