PDA

View Full Version : [Mondrian] Limit Exceptions : Out Of Memory



Richard Emberson
01-22-2007, 08:22 PM
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.
_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Julian Hyde
01-23-2007, 05:41 AM
> 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!

Julian

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian