[ 
https://issues.apache.org/jira/browse/IGNITE-25614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ilya Shishkov updated IGNITE-25614:
-----------------------------------
    Description: 
{{CacheStoreListener#onSessionEnd}} is invoked during transaction commit. 
In case if we commit state to external database and then some extension occur 
in {{#onSessionEnd}}, then transaction will be rolled back in Ignite, but not 
in external database.

*Reproducer:*  [^CacheStoreFailureInSessionListenerTest.patch]

As you can see in attached reproducer, it does not matter, if put fails on 
primary or backup node.
Also, {{#onSessionEnd}} is invoked once on initiating node.
Logic of commit to external database is the same as in [1].


# 
https://github.com/apache/ignite/blob/946360aa5438d8fabf0a7df4082ffb83346503ea/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListener.java#L125

  was:
{{CacheStoreListener#onSessionEnd}} is invoked during transaction commit. 
In case if we commit state to external database and then some extension occur 
in {{#onSessionEnd}}, then transaction will be rolled back in Ignite, but not 
in external database.

As you can see in attached reproducer, it does not matter, if put fails on 
primary or backup node.
Also, {{#onSessionEnd}} is invoked once on initiating node.

*Reproducer:*  [^CacheStoreFailureInSessionListenerTest.patch]

Logic of commit to external database is the same as in [1].

# 
https://github.com/apache/ignite/blob/946360aa5438d8fabf0a7df4082ffb83346503ea/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListener.java#L125


> Exception in CacheStoreListener#onSessionEnd can cause inconsistency of 
> CacheStore
> ----------------------------------------------------------------------------------
>
>                 Key: IGNITE-25614
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25614
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Ilya Shishkov
>            Priority: Major
>              Labels: ise
>         Attachments: CacheStoreFailureInSessionListenerTest.patch
>
>
> {{CacheStoreListener#onSessionEnd}} is invoked during transaction commit. 
> In case if we commit state to external database and then some extension occur 
> in {{#onSessionEnd}}, then transaction will be rolled back in Ignite, but not 
> in external database.
> *Reproducer:*  [^CacheStoreFailureInSessionListenerTest.patch]
> As you can see in attached reproducer, it does not matter, if put fails on 
> primary or backup node.
> Also, {{#onSessionEnd}} is invoked once on initiating node.
> Logic of commit to external database is the same as in [1].
> # 
> https://github.com/apache/ignite/blob/946360aa5438d8fabf0a7df4082ffb83346503ea/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcStoreSessionListener.java#L125



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to