You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/08/02 22:06:54 UTC

Re: transaction not timing out

Yes, prepare phase happens within the commit() and the commit phase start
only after prepare is finished.

The commit phase updates the data which includes write-through to the
database. So if commit takes a lot of time due to issues with the database,
we can't rollback without causing data inconsistency.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/transaction-not-timing-out-tp5540p6685.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: transaction not timing out

Posted by bintisepaha <bi...@tudor.com>.
Update - we started using pessimistic txns now and it looks much better. so
we can close this thread now.
raised another issue here

http://apache-ignite-users.70518.x6.nabble.com/IgniteCompute-broadcast-stuck-td7255.html

Thanks,
Binti



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/transaction-not-timing-out-tp5540p7256.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: transaction not timing out

Posted by bintisepaha <bi...@tudor.com>.
Val, we are still seeing this issue from time to time.
Transactions are hung during commit() . we do not use write-through so DB
will not cause slowness for us. I understand that prior to commit, locks
were acquired in prepare phase, so if prepare is successful, then why would
commit hang? I am assuming within the commit() call, the first phase of
prepare won't even complete if locks were not acquired, in that case we have
seen transaction optimistic exception various times and on retry the txn
completes successfully.

in the case where it hangs on commit(), we are unable to figure out what
resource it is blocked on?

Also, to free up the resource and see how the cluster behaves, if we kill
any of the offending nodes then the entire cluster hangs.

we use full_sync mode for caches, is there any setting that we need to use
with that? most of our distributed caches have a config similar to below

Any help is very much appreciated.

<bean id="tradeOrderCache"
class="org.apache.ignite.configuration.CacheConfiguration">
		<property name="name" value="TradeOrder" />
		<property name="readThrough" value="True" />
		<property name="writeThrough" value="True" />
		<property name="writeBehindEnabled" value="True" />
		
		<property name="writeBehindFlushFrequency" value="#{5 * 1000}" />
		<property name="writeBehindFlushSize" value="0" />
		<property name="cacheMode" value="PARTITIONED" />
		<property name="atomicityMode" value="TRANSACTIONAL" />
		<property name="backups" value="1" />
		<property name="startSize" value="#{1 * 1024 * 1024}" />
		<property name="rebalanceBatchSize" value="#{2 * 1024 * 1024}"/>
        <property name="rebalanceThrottle" value="100"/>

		
		<property name="memoryMode" value="OFFHEAP_TIERED" />
		<property name="offHeapMaxMemory" value="#{10 * 1024L * 1024L * 1024L}" />

		<property name="cacheStoreFactory">
			<bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
				<constructor-arg>
					<ref bean="tradeOrderCacheStore" />
				</constructor-arg>
			</bean>
		</property>
		<property name="writeSynchronizationMode" value="FULL_SYNC" />
		<property name="statisticsEnabled" value="true" />
		<property name="queryEntities">
			<list>
				<bean id="tradeOrderQueryEntity"
class="org.apache.ignite.cache.QueryEntity">
					<property name="keyType"
						value="com.tudor.datagridI.client.data.trading.OrderKey" />
					<property name="valueType"
						value="com.tudor.datagridI.client.data.trading.TradeOrder" />

					<property name="fields">
						<map>
							<entry key="traderId" value="java.lang.Integer" />
							<entry key="orderId" value="java.lang.Integer" />
							<entry key="insIid" value="java.lang.Integer" />
							<entry key="settlement" value="java.util.Date" />
							<entry key="clearAgent" value="java.lang.String" />
							<entry key="strategy" value="java.lang.String" />
							<entry key="pvId" value="java.lang.Integer" />
							<entry key="pvDate" value="java.util.Date" />
							<entry key="linkId" value="java.lang.Integer" />
						</map>
					</property>
					<property name="indexes">
						<list>
							<bean class="org.apache.ignite.cache.QueryIndex">
								<constructor-arg>
									<list>
										<value>traderId</value>
										<value>orderId</value>
									</list>
								</constructor-arg>
								<constructor-arg>
									<value>SORTED</value>
								</constructor-arg>
								<property name="name" value="tradeOrder_key_index" />
							</bean>
						</list>
					</property>
				</bean>
			</list>
		</property>
		<property name="affinity">
			<bean
			
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
				<property name="excludeNeighbors" value="true" />
			</bean>
		</property>
	</bean>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/transaction-not-timing-out-tp5540p7187.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.