[Mondrian] Limit Exceptions : Out Of Memory

Julian Hyde julianhyde at speakeasy.net
Tue Jan 23 04:34:08 EST 2007

> Richard Emberson wrote:
> 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?

That's fine with me. If anyone else has objections regarding this behavior,
speak up!


More information about the Mondrian mailing list