This whole mechanism is based on the assumption that checking memory usage is expensive.
So we bother understand how it works. The check rate controls how often the memory is actually checked when a call to checkMemoryAndThrowException is called. So if the check is in a loop that has the potential to add very little memory then the check rate is set higher - or lower depending on how you look at it. In some places I have the check rate set to 1000, like in the code that adds a data point to the search results. The cached search results only checks memory after every 1000 data points have been added.
So as in the code snip you shared if the check has the potential of adding a lot of memory between checks I set the checkRate to 1, so every time an actual memory check is made.
Between 1.1.3 and 1.2.0 is that I switch over to using CQL. One of the many benefits of using CQL is that it pages data to the client instead of sending it all in one big chunk. So my risk of running out of memory between checks is much lower so I can check less often and thus the setCheckRate(1) was removed in the refactoring of code.
With that said if you are experiencing an OOM at some place where the checks should be changed please let me know and we can update the code in future releases.
Thanks
Brian