You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Menshikov (JIRA)" <ji...@apache.org> on 2018/05/21 16:23:00 UTC
[jira] [Comment Edited] (IGNITE-8238) Operation can fails with
unexpected RuntimeException when node is stopping.
[ https://issues.apache.org/jira/browse/IGNITE-8238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16482399#comment-16482399 ]
Alexander Menshikov edited comment on IGNITE-8238 at 5/21/18 4:22 PM:
----------------------------------------------------------------------
[~amashenkov]
I'm sorry but I don't understand the question.
If you are asking why I didn't do it, the answer is: there isn't anything about such approach in issue description or in your comments.
In the previous comment you have written:
{quote}<...>
This behavior isn't mentioned in javadoc.
<...>
I think we shouldn't use RuntimeException class directly, but throws smth meaningful either IgniteException or IllegalStateException.
{quote}
So I have chosen IllegalStateException and added information in Javadoc. That's it.
If you want I can rework PR with the new approach. But please specify for me some details:
# Do you want to throw NodeStoppingException (which is checked) wrapped into IgniteException from #checkpointReadLock()*?*
# Do you interesting only an exception from GridCacheUtils#unwindEvicts *?* I mean checkpointReadLock are called in 81 places in the project, so there is no pipeline as checkpointReadLock -> unwindEvicts.
# Do you want to catch IgniteException with NodeStoppingException cause in GridCacheTtlManager#expire (GridCacheUtils#unwindEvicts call it)*?* Now it catches only IgniteCheckedException.
# When you are writing "Ignored" do you mean "logged"*?* Now GridCacheTtlManager#expire is logging exception with error level – is this a fine behaver?
Maybe my questions look as over-detailed, but I don't want to misunderstand you twice in one PR:)
was (Author: sharpler):
[~amashenkov]
I'm sorry but I don't understand the question.
If you are asking why I didn't do it, the answer is: there isn't anything about such approach in issue description or in your comments.
In the previous comment you have written:
{quote}<...>
This behavior isn't mentioned in javadoc.
<...>
I think we shouldn't use RuntimeException class directly, but throws smth meaningful either IgniteException or IllegalStateException.
{quote}
So I have chosen IllegalStateException and added information in Javadoc. That's it.
If you want I can rework PR with the new approach. But please specify for me some details:
# Do you want to throw NodeStopp*ing*Exception (which is checked) wrapped into IgniteException from #checkpointReadLock()*?*
# Do you interesting only an exception from GridCacheUtils#unwindEvicts*?* I mean checkpointReadLock are called in 81 places in the project, so there is no pipeline as checkpointReadLock -> unwindEvicts.
# Do you want to catch IgniteException with NodeStoppingException cause in GridCacheTtlManager#expire (GridCacheUtils#unwindEvicts call it)*?* Now it catches only IgniteCheckedException.
# When you are writing "Ignored" do you mean "logged"*?* Now GridCacheTtlManager#expire is logging exception with error level – is this a fine behaver?
Maybe my questions look as over-detailed, but I don't want to misunderstand you twice in one PR:)
> Operation can fails with unexpected RuntimeException when node is stopping.
> ---------------------------------------------------------------------------
>
> Key: IGNITE-8238
> URL: https://issues.apache.org/jira/browse/IGNITE-8238
> Project: Ignite
> Issue Type: Bug
> Components: general
> Reporter: Andrew Mashenkov
> Assignee: Alexander Menshikov
> Priority: Minor
> Fix For: 2.6
>
>
> Operation can fails with RuntimeException when node is stoped in other thread.
> It is not clear from javadoc that operation can throws RuntimeException.
> We should add it to javadoc or e.g. throws IllegalStateException which already present in java cache api javadoc.
> Failure in thread: Thread [id=3484, name=updater-2]
> java.lang.RuntimeException: Failed to perform cache update: node is stopping.
> at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.checkpointReadLock(GridCacheDatabaseSharedManager.java:1350)
> at org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager$GridCacheDataStore.purgeExpired(GridCacheOffheapManager.java:1685)
> at org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager.expire(GridCacheOffheapManager.java:796)
> at org.apache.ignite.internal.processors.cache.GridCacheTtlManager.expire(GridCacheTtlManager.java:197)
> at org.apache.ignite.internal.processors.cache.GridCacheUtils.unwindEvicts(GridCacheUtils.java:834)
> at org.apache.ignite.internal.processors.cache.GridCacheGateway.leaveNoLock(GridCacheGateway.java:240)
> at org.apache.ignite.internal.processors.cache.GridCacheGateway.leave(GridCacheGateway.java:225)
> at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.onLeave(GatewayProtectedCacheProxy.java:1708)
> at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.putAll(GatewayProtectedCacheProxy.java:945)
> at org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTest$1.call(IgnitePdsContinuousRestartTest.java:261)
> at org.apache.ignite.testframework.GridTestThread.run(GridTestThread.java:86)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)