ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgenii Zhuravlev <e.zhuravlev...@gmail.com>
Subject Re: Client Server Persistent Store Fault Tolerance
Date Mon, 29 May 2017 15:13:52 GMT
Hi,

So, you stopped node, transaction was rolled back. You don't have inconsistent
data. What did you expect?

In this case you should handle this exception and run transaction again.

Evgenii







2017-05-29 7:53 GMT+03:00 rickynauvaldy <ricky.nauvaldy@sci.ui.ac.id>:

> So I've been trying to do the case using write through only, but when I
> stopped one of the server, exception appeared:
>
> > Exception in thread "main" javax.cache.CacheException: class
> > org.apache.ignite.cluster.ClusterTopologyException: Failed to acquire
> lock
> > for keys (primary node left grid, retry transaction if possible)
> > [keys=[UserKeyCacheObjectImpl [part=1, val=1, hasValBytes=true]],
> > node=d46c85bc-bd55-4731-b390-05e86fa68af6]
> >       at
> > org.apache.ignite.internal.processors.cache.GridCacheUtils.
> convertToCacheException(GridCacheUtils.java:1421)
> >       at
> > org.apache.ignite.internal.processors.cache.IgniteCacheProxy.
> cacheException(IgniteCacheProxy.java:2641)
> >       at
> > org.apache.ignite.internal.processors.cache.IgniteCacheProxy.get(
> IgniteCacheProxy.java:1205)
> >       at
> > myexamples.store.TransactionClient1.deposit(TransactionClient1.java:107)
> >       at myexamples.store.TransactionClient1.main(
> TransactionClient1.java:46)
> > Caused by: class org.apache.ignite.cluster.ClusterTopologyException:
> > Failed to acquire lock for keys (primary node left grid, retry
> transaction
> > if possible) [keys=[UserKeyCacheObjectImpl [part=1, val=1,
> > hasValBytes=true]], node=d46c85bc-bd55-4731-b390-05e86fa68af6]
> >       at
> > org.apache.ignite.internal.util.IgniteUtils$7.apply(
> IgniteUtils.java:812)
> >       at
> > org.apache.ignite.internal.util.IgniteUtils$7.apply(
> IgniteUtils.java:810)
> >       ... 5 more
> > Caused by: class
> > org.apache.ignite.internal.cluster.ClusterTopologyCheckedException:
> Failed
> > to acquire lock for keys (primary node left grid, retry transaction if
> > possible) [keys=[UserKeyCacheObjectImpl [part=1, val=1,
> > hasValBytes=true]], node=d46c85bc-bd55-4731-b390-05e86fa68af6]
> >       at
> > org.apache.ignite.internal.processors.cache.distributed.dht.colocated.
> GridDhtColocatedLockFuture.newTopologyException(
> GridDhtColocatedLockFuture.java:1319)
> >       at
> > org.apache.ignite.internal.processors.cache.distributed.dht.colocated.
> GridDhtColocatedLockFuture.access$1900(GridDhtColocatedLockFuture.java:85)
> >       at
> > org.apache.ignite.internal.processors.cache.distributed.dht.colocated.
> GridDhtColocatedLockFuture$MiniFuture.onResult(GridDhtColocatedLockFuture.
> java:1469)
> >       at
> > org.apache.ignite.internal.processors.cache.distributed.dht.colocated.
> GridDhtColocatedLockFuture.onNodeLeft(GridDhtColocatedLockFuture.java:414)
> >       at
> > org.apache.ignite.internal.processors.cache.GridCacheMvccManager$4.
> onEvent(GridCacheMvccManager.java:263)
> >       at
> > org.apache.ignite.internal.managers.eventstorage.
> GridEventStorageManager$LocalListenerWrapper.onEvent(
> GridEventStorageManager.java:1311)
> >       at
> > org.apache.ignite.internal.managers.eventstorage.
> GridEventStorageManager.notifyListeners(GridEventStorageManager.java:892)
> >       at
> > org.apache.ignite.internal.managers.eventstorage.
> GridEventStorageManager.record0(GridEventStorageManager.java:340)
> >       at
> > org.apache.ignite.internal.managers.eventstorage.
> GridEventStorageManager.record(GridEventStorageManager.java:307)
> >       at
> > org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$
> DiscoveryWorker.recordEvent(GridDiscoveryManager.java:2277)
> >       at
> > org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$
> DiscoveryWorker.body0(GridDiscoveryManager.java:2474)
> >       at
> > org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$
> DiscoveryWorker.body(GridDiscoveryManager.java:2306)
> >       at
> > org.apache.ignite.internal.util.worker.GridWorker.run(
> GridWorker.java:110)
> >       at java.lang.Thread.run(Unknown Source)
> > Caused by: class
> > org.apache.ignite.internal.cluster.ClusterTopologyCheckedException:
> Failed
> > to acquire lock for keys (primary node left grid, retry transaction if
> > possible) [keys=[UserKeyCacheObjectImpl [part=1, val=1,
> > hasValBytes=true]], node=d46c85bc-bd55-4731-b390-05e86fa68af6]
> >       at
> > org.apache.ignite.internal.processors.cache.distributed.dht.colocated.
> GridDhtColocatedLockFuture.newTopologyException(
> GridDhtColocatedLockFuture.java:1319)
> >       ... 11 more
>
> I saw this post [1], but I still don't get the /this means it has been
> already acquired/ part. What should I do?
>
> I used Transactions with /pessimistic /concurency with /serializable
> /isolation.
>
> When I try to change the isolation to /repeatable_read/, another exception
> is shown:
>
> > Exception in thread "main" class org.apache.ignite.IgniteException:
> Failed
> > to commit transaction:
> > GridNearTxLocal[id=ec0e9825c51-00000000-0668-82bc-0000-00000000001d,
> > concurrency=PESSIMISTIC, isolation=REPEATABLE_READ, state=ROLLED_BACK,
> > invalidate=false, rollbackOnly=true,
> > nodeId=bc2cac44-08b4-43e3-9316-c54bb8ca4679, duration=3859]
> >       at
> > org.apache.ignite.internal.util.IgniteUtils.
> convertException(IgniteUtils.java:949)
> >       at
> > org.apache.ignite.internal.processors.cache.transactions.
> TransactionProxyImpl.rollback(TransactionProxyImpl.java:314)
> >       at
> > myexamples.store.TransactionClient1.deposit(TransactionClient1.java:122)
> >       at myexamples.store.TransactionClient1.main(
> TransactionClient1.java:41)
> > Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
> > commit transaction:
> > GridNearTxLocal[id=ec0e9825c51-00000000-0668-82bc-0000-00000000001d,
> > concurrency=PESSIMISTIC, isolation=REPEATABLE_READ, state=ROLLED_BACK,
> > invalidate=false, rollbackOnly=true,
> > nodeId=bc2cac44-08b4-43e3-9316-c54bb8ca4679, duration=3859]
> >       at
> > org.apache.ignite.internal.processors.cache.distributed.
> near.GridNearTxFinishFuture.finish(GridNearTxFinishFuture.java:423)
> >       at
> > org.apache.ignite.internal.processors.cache.distributed.
> near.GridNearTxLocal.rollbackNearTxLocalAsync(GridNearTxLocal.java:3246)
> >       at
> > org.apache.ignite.internal.processors.cache.GridCacheSharedContext.
> rollbackTxAsync(GridCacheSharedContext.java:855)
> >       at
> > org.apache.ignite.internal.processors.cache.transactions.
> TransactionProxyImpl.rollback(TransactionProxyImpl.java:306)
> >       ... 2 more
>
> Any suggestion? Thanks.
>
> -- Ricky
>
> [1]
> http://apache-ignite-users.70518.x6.nabble.com/Enter-
> Lock-is-not-working-td8040.html
>
>
>
>
> -----
> -- Ricky
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Client-Server-Persistent-Store-Fault-
> Tolerance-tp13054p13186.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message