Fixed race in GridDhtForceKeysRequest processing

Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/326a5a10
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/326a5a10
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/326a5a10

Branch: refs/heads/ignite-force-keys
Commit: 326a5a1066a3eabe8257dab1281f00e943a2c973
Parents: 5e39c09
Author: Valentin Kulichenko <valentin.kuliche...@gmail.com>
Authored: Fri Oct 2 20:49:44 2015 -0700
Committer: Valentin Kulichenko <valentin.kuliche...@gmail.com>
Committed: Fri Oct 2 20:49:44 2015 -0700

----------------------------------------------------------------------
 .../yardstick/config/sb/benchmark-sb.properties |  62 +++++
 modules/yardstick/config/sb/gg-base.xml         | 144 ++++++++++
 modules/yardstick/config/sb/gg-client.xml       |  91 ++++++
 modules/yardstick/config/sb/gg-server.xml       | 276 +++++++++++++++++++
 .../cache/IgnitePutAllTxBenchmark.java          |  30 +-
 5 files changed, 587 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/326a5a10/modules/yardstick/config/sb/benchmark-sb.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/sb/benchmark-sb.properties 
b/modules/yardstick/config/sb/benchmark-sb.properties
new file mode 100644
index 0000000..141021d
--- /dev/null
+++ b/modules/yardstick/config/sb/benchmark-sb.properties
@@ -0,0 +1,62 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Contains all multicast benchmarks
+#
+
+# JVM options.
+JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
+
+# Uncomment to enable concurrent garbage collection (GC) if you encounter long 
GC pauses.
+JVM_OPTS=${JVM_OPTS}" \
+-Xloggc:./gc.log \
+-XX:+PrintGCDetails \
+-verbose:gc \
+-XX:+UseParNewGC \
+-XX:+UseConcMarkSweepGC \
+-XX:+UseTLAB \
+-XX:NewSize=128m \
+-XX:MaxNewSize=128m \
+-XX:MaxTenuringThreshold=0 \
+-XX:SurvivorRatio=1024 \
+-XX:+UseCMSInitiatingOccupancyOnly \
+-XX:CMSInitiatingOccupancyFraction=60 \
+"
+
+# List of default probes.
+# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on 
Linux).
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
+
+# Packages where the specified benchmark is searched by reflection mechanism.
+BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+
+# Restart servers for each benchmark.
+RESTART_SERVERS=true
+
+# Comma-separated list of the hosts to run BenchmarkServers on.
+SERVER_HOSTS=10.20.0.217,10.20.0.217,10.20.0.217,10.20.0.217,10.20.0.217,10.20.0.217,10.20.0.217,10.20.0.217,10.20.0.217,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.218,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.219,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.221,10.20.0.222,10.20.0.222,10.20.0.222,10.20.0.222,10.20.0.222,10.20.0.222,10.20.0.222,10.20.0.222,10.20.0.222,10.20.0.222
+
+# Comma-separated list of the hosts to run BenchmarkDrivers on.
+DRIVER_HOSTS=localhost
+
+# Number of nodes, used to wait for the specified number of nodes to start.
+nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo 
${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
+
+# Run configuration which contains all benchmarks.
+# Note that each benchmark is set to run for 300 seconds (5 mins) with warm-up 
set to 60 seconds (1 minute).
+CONFIGS="\
+-cfg ${SCRIPT_DIR}/../config/sb/gg-server.xml -nn ${nodesNum} -bs 50 -w 30 -d 
90 -t 64 -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds sb-put-all-tx\
+"

http://git-wip-us.apache.org/repos/asf/ignite/blob/326a5a10/modules/yardstick/config/sb/gg-base.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/sb/gg-base.xml 
b/modules/yardstick/config/sb/gg-base.xml
new file mode 100755
index 0000000..5fdc75b
--- /dev/null
+++ b/modules/yardstick/config/sb/gg-base.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                            
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+                            http://www.springframework.org/schema/context
+                            
http://www.springframework.org/schema/context/spring-context-3.0.xsd";
+       xmlns:context="http://www.springframework.org/schema/context";>
+
+    <!--<context:property-placeholder/>-->
+
+    <!--<bean id="hostIpDetector" class="ru.sberbank.oti.ignite.IpFinder">-->
+    <!--</bean>-->
+    <!-- -->
+    <!--<bean id="affinitySettings-proto" abstract="true" 
class="ru.sberbank.oti.ignite.impl.AffinitySettings" >-->
+        <!--<property name="zonePartSize" value="1000"/>-->
+        <!--<property name="zoneCount" value="${topology.zone.count:1}"/>-->
+        <!--<property name="seed" value="1234"/>-->
+    <!--</bean>    -->
+
+    <bean id="base.grid.cfg" abstract="true" 
class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="metricsLogFrequency" value="0"/>
+        <!--<property name="localHost" 
value="#{hostIpDetector.getIp('lo')}"/>-->
+        <property name="failureDetectionTimeout" value="10000"/>
+
+        <property name="transactionConfiguration" >
+            <bean 
class="org.apache.ignite.configuration.TransactionConfiguration">
+                <property name="defaultTxTimeout" value="987654" />
+                <property name="defaultTxConcurrency" value="PESSIMISTIC"/>
+            </bean>
+        </property>
+
+        <property name="atomicConfiguration">
+            <bean class="org.apache.ignite.configuration.AtomicConfiguration">
+                <!--property name="backups" value="2"/-->
+                <property name="cacheMode" value="REPLICATED"/>
+                <property name="atomicSequenceReserveSize" value="5000000"/>
+            </bean>
+        </property>
+        <property name="peerClassLoadingEnabled" value="false"/>
+
+        <property name="marshaller">
+            <bean 
class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
+                <property name="requireSerializable" value="false"/>
+            </bean>
+        </property>
+
+    </bean>
+
+    <bean id="prb-cache-template-base" abstract="true" 
class="org.apache.ignite.configuration.CacheConfiguration">
+
+        <property name="atomicityMode" value="TRANSACTIONAL"/>
+        <!--property name="writeSynchronizationMode" value="PRIMARY_SYNC"/-->
+        <property name="writeSynchronizationMode" value="FULL_SYNC"/>
+        <property name="rebalanceMode" value="SYNC"/>
+        <property name="maxConcurrentAsyncOperations" value="4500"/>
+        <property name="startSize" value="0"/>
+
+
+    </bean>
+
+
+    <!--PRB_REPL, PRB_PART_IDX, PRB_PART_NO_IDX-->
+
+    <bean id="prb-repl-cache-template" abstract="true" 
parent="prb-cache-template-base" 
class="org.apache.ignite.configuration.CacheConfiguration">
+        <property name="name" value="PRB_REPL"/>
+
+        <property name="cacheMode" value="REPLICATED"/>
+        <property name="memoryMode" value="OFFHEAP_TIERED" />
+        <property name="offHeapMaxMemory" value="0" />
+
+        <!--<property name="indexedTypes">-->
+            <!--<list>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.FSFMOperationListGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.FSFMRuleGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.PCRoutingRuleGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.PCPaymentListGG</value>-->
+            <!--</list>-->
+        <!--</property>-->
+    </bean>
+
+    <bean id="prb-no-idx-cache-template" abstract="true" 
parent="prb-cache-template-base" 
class="org.apache.ignite.configuration.CacheConfiguration">
+        <property name="name" value="PRB_PART_NO_IDX"/>
+        <property name="cacheMode" value="PARTITIONED"/>
+        <property name="backups" value="2"/>
+
+        <!--property name="affinity">
+            <bean class="ru.sberbank.oti.ignite.impl.AffinityFunction">
+                <property name="settings" ref="affinitySettings"/>
+            </bean>
+        </property-->
+
+        <!--property name="affinity">
+            <bean class="ru.sberbank.oti.ignite.impl.DefaultAffinityWrapper">
+                <property name="settings" ref="affinitySettings"/>
+            </bean>
+        </property-->
+
+        <property name="affinity">
+            <bean 
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
+                <property name="partitions" value="6600"/>
+            </bean>
+        </property>
+
+        <property name="offHeapMaxMemory" value="0" />
+        <property name="memoryMode" value="OFFHEAP_TIERED" />
+
+        <!--property name="rebalanceDelay" value="60000"/>
+        <property name="rebalanceThreadPoolSize" value="4"/>
+        <property name="rebalanceTimeout" value="30000"/-->
+
+    </bean>
+
+    <bean id="prb-act-balance-template" abstract="true" 
parent="prb-no-idx-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">
+        <property name="name" value="PRB_ACT_BALANCE"/>
+    </bean>
+
+    <!--<bean id="prb-idx-cache-template" abstract="true" 
parent="prb-no-idx-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">-->
+        <!--<property name="name" value="PRB_PART_IDX"/>-->
+
+        <!--<property name="indexedTypes">-->
+            <!--<list>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.IndProductConditionGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.ClientGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.ConditionGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.ProductConditionGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.ProductGG</value>-->
+                
<!--<value>ru.sberbank.oti.ignite.impl.dao.keys.SimpleZoneCompositeKey</value>-->
+                
<!--<value>ru.sberbank.oti.prb.entity.internal.AgreementIndexGG</value>-->
+            <!--</list>-->
+        <!--</property>-->
+
+    <!--</bean>-->
+
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/326a5a10/modules/yardstick/config/sb/gg-client.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/sb/gg-client.xml 
b/modules/yardstick/config/sb/gg-client.xml
new file mode 100755
index 0000000..0510b93
--- /dev/null
+++ b/modules/yardstick/config/sb/gg-client.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                            
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+                            http://www.springframework.org/schema/context
+                            
http://www.springframework.org/schema/context/spring-context-3.0.xsd";
+       xmlns:context="http://www.springframework.org/schema/context";>
+
+    <import resource="gg-base.xml" />
+    
+    <bean id="affinitySettings" parent="affinitySettings-proto" 
class="ru.sberbank.oti.ignite.impl.AffinitySettings" >
+        <property name="zonePartSize" value="300"/>
+    </bean>    
+
+    <bean id="gridGainClientConf" 
class="org.apache.ignite.configuration.IgniteConfiguration" 
parent="base.grid.cfg">
+        
+        <property name="localHost" value="#{hostIpDetector.getIp('^p\dp1$')}"/>
+        
+        <property name="userAttributes">
+            <map>
+                <entry key="NODE_FILTER_MARKER" value="PRB_REPL"/>
+            </map>
+        </property>
+        
+        <property name="pluginConfigurations">
+            <bean 
class="org.gridgain.grid.configuration.GridGainConfiguration">
+                <property name="dataCenterId" value="4"/>
+            </bean>
+        </property>
+        
+        <!--property name="publicThreadPoolSize" value="96"/>
+        <property name="systemThreadPoolSize" value="96"/-->
+
+        <property name="communicationSpi">
+            <bean 
class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
+                <!--property name="socketWriteTimeout" value="5000"/-->
+                <!--property name="selectorsCount" value="8"/-->
+                <!-- property name="socketReceiveBuffer" value="999424"/-->
+                <!-- property name="socketSendBuffer" value="999424"/-->
+                <property name="localPort" value="47330"/>
+                <!--property name="sharedMemoryPort" value="-1"/-->
+                <!--property name="selectorsCount" value="12"/-->
+            </bean>
+        </property>
+        
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <!--property name="ackTimeout" value="5000" />
+                <property name="networkTimeout" value="60000" />
+                <property name="socketTimeout" value="5000" /-->
+                
+                <property name="ipFinder">
+                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+                        <property name="addresses" 
value="#{hostIpDetector.getIpWithPortRangeList('^p\dp1$', 47500, 47505)}">
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>        
+        
+        <property name="cacheConfiguration">
+            <list>
+                <bean parent="prb-repl-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">
+                </bean>
+                <bean parent="prb-no-idx-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">
+                </bean>
+                <bean parent="prb-act-balance-template" 
class="org.apache.ignite.configuration.CacheConfiguration">
+                </bean>
+                <bean parent="prb-idx-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">
+                </bean>
+            </list>
+        </property>
+        
+        <property name="clientMode" value="true" />
+    </bean>
+    
+    <bean id="gridGainSpring" class="org.apache.ignite.IgniteSpringBean">
+        <property name="configuration">
+            <ref bean="gridGainClientConf"/>
+        </property>
+    </bean>    
+    
+    
+    <bean id="gridGain" class="ru.sberbank.oti.ignite.GridClientService">
+        <property name="ignite">
+            <ref bean="gridGainSpring"/>
+        </property>
+    </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/326a5a10/modules/yardstick/config/sb/gg-server.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/sb/gg-server.xml 
b/modules/yardstick/config/sb/gg-server.xml
new file mode 100755
index 0000000..9b600ea
--- /dev/null
+++ b/modules/yardstick/config/sb/gg-server.xml
@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                            
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+                            http://www.springframework.org/schema/context
+                            
http://www.springframework.org/schema/context/spring-context-3.0.xsd";
+       xmlns:context="http://www.springframework.org/schema/context";>
+
+    <import resource="gg-base.xml" />
+
+    <!--<bean id="affinitySettings" parent="affinitySettings-proto" 
class="ru.sberbank.oti.ignite.impl.AffinitySettings" >-->
+        <!--<property name="zonePartSize" value="300"/>-->
+    <!--</bean>    -->
+
+    <bean class="org.apache.ignite.configuration.IgniteConfiguration" 
parent="base.grid.cfg">
+
+        <!--<property name="gridLogger">-->
+            <!--<bean class="org.apache.ignite.logger.log4j.Log4JLogger">-->
+                <!--<constructor-arg type="java.lang.String" 
value="config/ignite-log4j.xml"/>-->
+            <!--</bean>-->
+        <!--</property>-->
+
+        <!--<property name="localHost" 
value="#{hostIpDetector.getIp('^p\dp1$')}" />-->
+
+        <!--property name="publicThreadPoolSize" value="96"/>
+        <property name="systemThreadPoolSize" value="96"/-->
+
+        <property name="communicationSpi">
+            <bean 
class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
+                <!-- property name="socketReceiveBuffer" value="999424"/-->
+                <!-- property name="socketSendBuffer" value="999424"/-->
+                <!--property name="socketWriteTimeout" value="5000"/-->
+                <!--property name="sharedMemoryPort" value="-1"/-->
+                <!--property name="selectorsCount" value="12"/-->
+            </bean>
+        </property>
+
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <!--property name="ackTimeout" value="5000" />
+                <property name="networkTimeout" value="60000" />
+                <property name="socketTimeout" value="5000" /-->
+
+                <property name="ipFinder">
+                    <bean 
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+
+                        <!--<property name="addresses">-->
+                            <!--<list>-->
+                                
<!--&lt;!&ndash;value>127.0.0.1:47500..47505</value&ndash;&gt;-->
+                                
<!--&lt;!&ndash;value>10.117.0.21:47500..47505</value&ndash;&gt;-->
+                                <!--<value>172.16.32.5:47500..47599</value>-->
+                                <!--<value>172.16.32.6:47500..47599</value>-->
+                                <!--<value>172.16.32.7:47500..47599</value>-->
+                                <!--<value>172.16.32.8:47500..47599</value>-->
+                                <!--<value>172.16.32.9:47500..47599</value>-->
+                                <!--<value>172.16.32.10:47500..47599</value>-->
+                                <!--<value>172.16.32.11:47500..47599</value>-->
+                                <!--<value>172.16.32.12:47500..47599</value>-->
+                                <!--<value>172.16.32.13:47500..47599</value>-->
+                                <!--<value>172.16.32.14:47500..47599</value>-->
+                            <!--</list>-->
+                            <!--&lt;!&ndash;<list>-->
+                                <!--<value>10.117.0.16:47500..47505</value>-->
+                                <!--<value>10.117.0.17:47500..47505</value>-->
+                                <!--<value>10.117.0.18:47500..47505</value>-->
+                                <!--<value>10.117.0.19:47500..47505</value>-->
+
+                                
<!--&lt;!&ndash;<value>10.68.208.2:47500..47505</value>-->
+                                <!--<value>10.68.208.4:47500..47505</value>-->
+                                <!--<value>10.68.208.6:47500..47505</value>-->
+                                <!--<value>10.68.208.11:47500..47505</value>-->
+                                
<!--<value>10.68.208.12:47500..47505</value>&ndash;&gt;-->
+                            <!--</list>&ndash;&gt;-->
+                        <!--</property>-->
+                    </bean>
+                </property>
+            </bean>
+        </property>
+
+        <!-- Sender hub configuration-->
+        <!--<property name="pluginConfigurations">-->
+            <!--<bean 
class="org.gridgain.grid.configuration.GridGainConfiguration">-->
+                <!--<property name="dataCenterId" value="4"/>-->
+            <!--</bean>-->
+        <!--</property>-->
+        <!-- <property name="pluginConfigurations" >
+            <bean 
class="org.gridgain.grid.configuration.GridGainConfiguration">
+                <property name="dataCenterId" value="1" />
+                <property name="drSenderConfiguration">
+                    <bean 
class="org.gridgain.grid.configuration.DrSenderConfiguration">
+                        <property name="store">
+                            <bean 
class="org.gridgain.grid.dr.store.fs.DrSenderFsStore">
+                                <property name="directoryPath" 
value="/disk3/sender/data/repl/" />
+                                <property name="maxFilesCount" value="30" />
+                                <property name="maxFileSize" value="314572800" 
/>
+                            </bean>
+                        </property>
+                        <property name="maxQueueSize" value="250" />
+                        <property name="cacheNames" >
+                            <list>
+                                <value>prb</value>
+                                <value>prb_repl</value>
+                            </list>
+                        </property>
+                        <property name="connectionConfiguration">
+                            <bean 
class="org.gridgain.grid.dr.DrSenderConnectionConfiguration">
+                                <property name="dataCenterId" value="2" />
+                                <property name="receiverAddresses">
+                                    <list>
+                                        <value>10.117.0.16:49000</value>
+                                        <value>10.117.0.17:49000</value>
+                                        <value>10.117.0.18:49000</value>
+                                        <value>10.117.0.19:49000</value>
+                                    </list>
+                                </property>
+                            </bean>
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>-->
+        <!-- Receiver hub configuration -->
+        <!-- property name="pluginConfigurations" >
+            <bean 
class="org.gridgain.grid.configuration.GridGainConfiguration">
+                <property name="dataCenterId" value="2" />
+                <property name="drReceiverConfiguration" >
+                    <bean 
class="org.gridgain.grid.configuration.DrReceiverConfiguration">
+                        <property name="selectorCount" value="32" />
+                        <property name="perNodeBufferSize" value="4096" />
+                        <property name="perNodeParallelLoadOperations" 
value="32" />
+                        <property name="messageQueueLimit" value="4096" />
+                        <property name="flushFrequency" value="1000" />
+                    </bean>
+                </property>
+            </bean>
+        </property -->
+
+        <!--<property name="userAttributes">-->
+            <!--<map>-->
+                <!--<entry key="sber_zone">-->
+                    <!--<bean class="java.lang.Integer">-->
+                        <!--<constructor-arg value="${zoneId:0}" type="int" 
/>-->
+                    <!--</bean>-->
+                <!--</entry>-->
+                <!--<entry key="sber_rack">-->
+                    <!--<bean class="java.lang.Integer">-->
+                        <!--<constructor-arg value="${rack:0}" type="int" />-->
+                    <!--</bean>-->
+                <!--</entry>-->
+                <!--<entry key="NODE_FILTER_MARKER" value="*"/>-->
+            <!--</map>-->
+        <!--</property>-->
+
+        <property name="cacheConfiguration">
+            <list>
+                <!--<bean parent="prb-repl-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">-->
+                    <!-- Sender cache config -->
+                    <!--<property name="pluginConfigurations">
+                        <bean 
class="org.gridgain.grid.configuration.GridGainCacheConfiguration">
+                            <property name="drSenderConfiguration">
+                                <bean 
class="org.gridgain.grid.cache.dr.CacheDrSenderConfiguration">
+                                    <property name="batchSendSize" 
value="8192" />
+                                    <property name="batchSendFrequency" 
value="1000" />
+                                    <property name="maxBatches" value="64"/>
+                                    <property name="stateTransferThreadsCount" 
value="8" />
+                                </bean>
+                            </property>
+                        </bean>
+                    </property>-->
+
+                    <!-- Receiver cache config -->
+                    <!--<property name="pluginConfigurations">
+                        <bean 
class="org.gridgain.grid.configuration.GridGainCacheConfiguration">
+                            <property name="drReceiverEnabled" value="true" />
+                        </bean>
+                    </property>-->
+
+                    <!--SYNC, ASYNC_BUFFERED, SYNC_BUFFERED-->
+                    <!---->
+                    <!--property name="loadPreviousValue" value="true" /-->
+                    <!--property name="readThrough" value="true" />
+                    <property name="writeThrough" value="true"/>
+                    <property name="cacheStoreFactory">
+                        <bean 
class="ru.sberbank.oti.ignite.impl.PersistentStoreFactory">
+                            <property name="writeMode" value="SYNC" />
+                            <property name="rootPath" 
value="/disk3/server/data/prb-repl/" />
+                            <property name="fsyncDelay" value="500" />
+                            <property name="sparsityCheckFreq" value="3600" />
+                        </bean>
+                    </property-->
+                <!--</bean>-->
+                <!--<bean parent="prb-act-balance-template" 
class="org.apache.ignite.configuration.CacheConfiguration">-->
+                <!--</bean>-->
+                <bean parent="prb-no-idx-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">
+                    <!-- Sender cache config -->
+                    <!--<property name="pluginConfigurations">
+                        <bean 
class="org.gridgain.grid.configuration.GridGainCacheConfiguration">
+                            <property name="drSenderConfiguration">
+                                <bean 
class="org.gridgain.grid.cache.dr.CacheDrSenderConfiguration">
+                                    <property name="batchSendSize" 
value="8192" />
+                                    <property name="batchSendFrequency" 
value="1000" />
+                                    <property name="maxBatches" value="64"/>
+                                    <property name="stateTransferThreadsCount" 
value="8" />
+                                </bean>
+                            </property>
+                        </bean>
+                    </property>-->
+
+                    <!-- Receiver cache config -->
+                    <!--<property name="pluginConfigurations">
+                        <bean 
class="org.gridgain.grid.configuration.GridGainCacheConfiguration">
+                            <property name="drReceiverEnabled" value="true" />
+                        </bean>
+                    </property>-->
+
+                    <!--property name="loadPreviousValue" value="true" /-->
+                    <!--property name="readThrough" value="true" />
+                    <property name="writeThrough" value="true"/>
+                    <property name="cacheStoreFactory">
+                        <bean 
class="ru.sberbank.oti.ignite.impl.PersistentStoreFactory">
+                            <property name="writeMode" value="SYNC" />
+                            <property name="rootPath" 
value="/disk3/server/data/prb/" />
+                            <property name="fsyncDelay" value="500" />
+                            <property name="sparsityCheckFreq" value="3600" />
+                            <property name="mapCap" value="#{ 256 * 1024 }" />
+                            <property name="mapSegments" value="512" />
+                        </bean>
+                    </property-->
+
+
+                </bean>
+                <!--<bean parent="prb-idx-cache-template" 
class="org.apache.ignite.configuration.CacheConfiguration">-->
+                    <!-- Sender cache config -->
+                    <!--<property name="pluginConfigurations">
+                        <bean 
class="org.gridgain.grid.configuration.GridGainCacheConfiguration">
+                            <property name="drSenderConfiguration">
+                                <bean 
class="org.gridgain.grid.cache.dr.CacheDrSenderConfiguration">
+                                    <property name="batchSendSize" 
value="8192" />
+                                    <property name="batchSendFrequency" 
value="1000" />
+                                    <property name="maxBatches" value="64"/>
+                                    <property name="stateTransferThreadsCount" 
value="8" />
+                                </bean>
+                            </property>
+                        </bean>
+                    </property>-->
+
+                    <!-- Receiver cache config -->
+                    <!--<property name="pluginConfigurations">
+                        <bean 
class="org.gridgain.grid.configuration.GridGainCacheConfiguration">
+                            <property name="drReceiverEnabled" value="true" />
+                        </bean>
+                    </property>-->
+
+                    <!--property name="loadPreviousValue" value="true" /-->
+                    <!--property name="readThrough" value="true" />
+                    <property name="writeThrough" value="true"/>
+                    <property name="cacheStoreFactory">
+                        <bean 
class="ru.sberbank.oti.ignite.impl.PersistentStoreFactory">
+                            <property name="writeMode" value="SYNC" />
+                            <property name="rootPath" 
value="/disk3/server/data/prbIdx/" />
+                            <property name="fsyncDelay" value="500" />
+                            <property name="sparsityCheckFreq" value="3600" />
+                            <property name="mapCap" value="#{ 256 * 1024 }" />
+                            <property name="mapSegments" value="512" />
+                        </bean>
+                    </property-->
+
+
+                <!--</bean>-->
+            </list>
+        </property>
+
+    </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/326a5a10/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutAllTxBenchmark.java
----------------------------------------------------------------------
diff --git 
a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutAllTxBenchmark.java
 
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutAllTxBenchmark.java
index dc8e3f8..b843fa0 100644
--- 
a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutAllTxBenchmark.java
+++ 
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutAllTxBenchmark.java
@@ -18,13 +18,15 @@
 package org.apache.ignite.yardstick.cache;
 
 import java.util.Map;
-import java.util.SortedMap;
 import java.util.TreeMap;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.transactions.Transaction;
 import org.yardstickframework.BenchmarkConfiguration;
 
+import static 
org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
+import static 
org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
+
 /**
  * Ignite benchmark that performs transactional putAll operations.
  */
@@ -36,34 +38,30 @@ public class IgnitePutAllTxBenchmark extends 
IgniteCacheAbstractBenchmark {
     @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
         super.setUp(cfg);
 
-        aff = ignite().affinity("tx");
+        aff = ignite().affinity("PRB_PART_NO_IDX");
     }
 
     /** {@inheritDoc} */
     @Override public boolean test(Map<Object, Object> ctx) throws Exception {
-        SortedMap<Integer, Integer> vals = new TreeMap<>();
-
-        ClusterNode node = args.collocated() ? 
aff.mapKeyToNode(nextRandom(args.range())) : null;
+        Map<Integer, Integer> map = new TreeMap<>();
 
-        for (int i = 0; i < args.batch(); ) {
+        for (int i = 0; i < args.batch(); i++) {
             int key = nextRandom(args.range());
 
-            if (args.collocated() && !aff.isPrimary(node, key))
-                continue;
+            map.put(key, key);
+        }
 
-            ++i;
+        try (Transaction tx = ignite().transactions().txStart(PESSIMISTIC, 
REPEATABLE_READ)) {
+            cache.putAll(map);
 
-            vals.put(key, key);
+            tx.commit();
         }
 
-        // Implicit transaction is used.
-        cache.putAll(vals);
-
         return true;
     }
 
     /** {@inheritDoc} */
     @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("tx");
+        return ignite().cache("PRB_PART_NO_IDX");
     }
-}
\ No newline at end of file
+}

Reply via email to