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

Stanilovsky Evgeny commented on IGNITE-11592:
---------------------------------------------

[~EdShangGG] thanks for review, will fix all your mentions.
[~Jokser] case is : concurrently destroy cache(s) and active tx`s on them, 
check 
org.apache.ignite.internal.processors.cache.transactions.TxOnCachesStopTest#runTxOnCacheStop
there at first runs tx(), block GridNearTxPrepareRequest and concurrently start 
cache.destroy,  after calling IgniteTxHandler#processNearTxPrepareRequest0 will 
follow into waitForExchangeFuture where cache can be already destroyed and for 
example IgniteTxHandler#prepareNearTx will throw NPE from 
{noformat}IgniteTxEntry firstWrite = unmarshal(req.writes());{noformat} or in 
section with GridCacheProcessor#rollbackCoveredTx we can still observe 
GridNearTxLocal tx`s (simple break point on tests run will show this) that we 
need to rollback before cache will be stopped.


> NPE in case of continuing tx and cache stop operation. 
> -------------------------------------------------------
>
>                 Key: IGNITE-11592
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11592
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.7
>            Reporter: Stanilovsky Evgeny
>            Assignee: Stanilovsky Evgeny
>            Priority: Major
>             Fix For: 2.8
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Parallel cache stop and tx operations may lead to NPE.
> {code}
> java.lang.NullPointerException
>       at 
> org.apache.ignite.internal.processors.cache.CacheObjectImpl.finishUnmarshal(CacheObjectImpl.java:129)
>       at 
> org.apache.ignite.internal.processors.cache.transactions.TxEntryValueHolder.unmarshal(TxEntryValueHolder.java:151)
>       at 
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry.unmarshal(IgniteTxEntry.java:964)
>       at 
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.unmarshal(IgniteTxHandler.java:306)
>       at 
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.prepareNearTx(IgniteTxHandler.java:338)
>       at 
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.processNearTxPrepareRequest0(IgniteTxHandler.java:154)
>       at 
> org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.lambda$null$0(IgniteTxHandler.java:580)
>       at 
> org.apache.ignite.internal.util.StripedExecutor$Stripe.body(StripedExecutor.java:496)
>       at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>       at java.lang.Thread.run(Thread.java:748)
> {code}
> i hope that correct decision would be to roll back tx (on exchange phase) 
> participating in stopped caches.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to