Alexey Kukushkin created IGNITE-16272:
-----------------------------------------

             Summary: IgniteOutOfMemoryException is not a critical failure
                 Key: IGNITE-16272
                 URL: https://issues.apache.org/jira/browse/IGNITE-16272
             Project: Ignite
          Issue Type: Improvement
            Reporter: Alexey Kukushkin


h3. The Problem

Ignite raises the 
[IgniteOutOfMemoryException|https://github.com/apache/ignite/blob/2.11.1/modules/core/src/main/java/org/apache/ignite/internal/mem/IgniteOutOfMemoryException.java]
 if a data region size is exceeded when trying to add more data to a cache. 
Ignite considers the {{IgniteOutOfMemoryException}} as a critical failure. This 
causes shutting down the Ignite server with the default failure handler.

However, reaching the data region capacity does not seem to be such a critical 
problem requiring the server shutdown or restart. For example, in our 
application we just want to report this problem back to the users and notify 
the DevOps without applying the critical failure handler. To achieve that, we 
had to define a custom {{FailureHandler}} that detects and ignores the 
{{IgniteOutOfMemoryException}} and all the exception caused by the 
{{{}IgniteOutOfMemoryException{}}}, allowing the final exception to reach the 
application. This solution is clumsy and unreliable since it uses the internal 
{{IgniteOutOfMemoryException}} definition and relies on a complex secondary 
exception structure trying to find the {{IgniteOutOfMemoryException}} among the 
suppressed exception and causes.

Ignite out-of-the-box failure handlers have the {{ignoredFailure}} property 
that allows filtering out some kinds of failures. However, the 
{{IgniteOutOfMemoryException}} is not among the 
[FailureType|https://github.com/apache/ignite/blob/2.11.1/modules/core/src/main/java/org/apache/ignite/failure/FailureType.java]
 that can be ignored.
h3. The Proposal
 # Does anyone really want to treat the "data region capacity exceeded" problem 
as a critical failure and stop or restart the server?
 ** Consider never treating this condition as a critical failure. This change 
is not backward compatible.
 ** Or add another item to the {{FailureType}} enumeration to optionally allow 
the users not to have that treated as a critical failure. This is 
backward-compatible.
 # Make the {{IgniteOutOfMemoryException}} a public API (now it is in the 
{{internal}} package)
 # Consider renaming {{IgniteOutOfMemoryException}} (for example, to something 
like {{{}NotEnoughStorageException{}}}) since the current name is similar to a 
really critical and usually unrecoverable Java's {{OutOfMemoryError}} although 
the {{IgniteOutOfMemoryException}} is not that critical.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to