[ 
https://issues.apache.org/jira/browse/IGNITE-26492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18056826#comment-18056826
 ] 

Evgeny Stanilovsky commented on IGNITE-26492:
---------------------------------------------

or call onBeforePut once

> Duplicated interceptor invocation with cache store
> --------------------------------------------------
>
>                 Key: IGNITE-26492
>                 URL: https://issues.apache.org/jira/browse/IGNITE-26492
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Ilya Shishkov
>            Priority: Minor
>              Labels: ise
>         Attachments: DuplicateInterceptorInvocationTest.patch
>
>
> When cache store is used, {{CacheInterceptor#onBeforePut}} will be invoked 
> twice on transaction coordinator.
> Problem is actual for transactional caches and it does not matter whether tx 
> coordinator is primary or backup.
> Usually, {{GridCacheMapEntry#innerSet}} invokes an interceptor, but with 
> cache store enabled extra invocation in {{IgniteTxAdapter#batchStoreCommit}} 
> is performed.
> *Reproducer:*  [^DuplicateInterceptorInvocationTest.patch] 
> *Example stacktraces:*
> {code:title=Calling interceptor in IgniteTxAdapter#batchStoreCommit}
>       
> org.apache.ignite.cache.store.DuplicateInterceptorInvocationTest$TestInterceptor.onBeforePut(DuplicateInterceptorInvocationTest.java:140)
>       
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter.batchStoreCommit(IgniteTxAdapter.java:1471)
>       
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter.userCommit(IgniteTxLocalAdapter.java:548)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.localFinish(GridNearTxLocal.java:3175)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.doFinish(GridNearTxFinishFuture.java:453)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.finish(GridNearTxFinishFuture.java:404)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.lambda$commitNearTxLocalAsync$5ce2d6ce$1(GridNearTxLocal.java:3454)
>       
> org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener$$$capture(GridFutureAdapter.java:474)
>       
> org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java)
> {code}
> {code:title=Calling interceptor in GridCacheMapEntry#innerSet}
>       
> org.apache.ignite.cache.store.DuplicateInterceptorInvocationTest$TestInterceptor.onBeforePut(DuplicateInterceptorInvocationTest.java:140)
>       
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.innerSet(GridCacheMapEntry.java:1058)
>       
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter.userCommit(IgniteTxLocalAdapter.java:696)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.localFinish(GridNearTxLocal.java:3175)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.doFinish(GridNearTxFinishFuture.java:453)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.finish(GridNearTxFinishFuture.java:404)
>       
> org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.lambda$commitNearTxLocalAsync$5ce2d6ce$1(GridNearTxLocal.java:3454)
>       
> org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener$$$capture(GridFutureAdapter.java:474)
>       
> org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java)
> {code}



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

Reply via email to