[Mondrian] Limit Exceptions : Out Of Memory

Richard Emberson remberson at edgedynamics.com
Mon Jan 22 19:16:35 EST 2007


Right now there are a couple of ResultLimitExceeded exceptions
in Mondrian: QueryCanceledException, QueryTimeoutException,
and ResourceLimitExceeded.
I would like to add a new one, MemoryExceeded, which
would be thrown if 1) one is running with Java5 and 2)
one has the exception type enabled.
To do this I would use the Java5 memory monitoring interface.
On creation, each RolapResult registers to be notified
if memory becomes short and in the RolapResult's contructor's
finally clause it would unregister itself. (As you know, all
of a RolapResult's work is done in its constructor.)
Using this a Mondrian client (in the same JVM) can be notified
that the mdx query failed because memory was short; the
client would receive the MemoryExceeded exception. (The XMLA
code could also be modified to send an error back to its
client.)

At some later date, spilling data structures to disk, etc.
might be tried, but for now just protecting the JVM from
death is the goal.

Here, we've done this to other parts of our multi-jvm
application and I'd like to make Mondrian OutOfMemory safe.
Thoughts?

Richard

-- 
Quis custodiet ipsos custodes:
This email message is for the sole use of the intended recipient(s) and
may contain confidential information.  Any unauthorized review, use,
disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies of the original message.



More information about the Mondrian mailing list