[jira] [Commented] (IGNITE-11804) Assertion error on affinity initialization

2019-04-25 Thread Andrey Gura (JIRA)


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

Andrey Gura commented on IGNITE-11804:
--

[~ascherbakov] Just good practice. In many cases you can understand the problem 
just looking to stack trace. Thanks a lot!

> Assertion error on affinity initialization
> --
>
> Key: IGNITE-11804
> URL: https://issues.apache.org/jira/browse/IGNITE-11804
> Project: Ignite
>  Issue Type: Bug
>Reporter: Alexei Scherbakov
>Priority: Major
>
> Reproducer (needs some cleanup)
> {noformat}
> /*
>  * 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.
>  */
> package org.apache.ignite.internal.processors.cache.transactions;
> import java.util.ArrayList;
> import java.util.List;
> import java.util.concurrent.atomic.AtomicReference;
> import org.apache.ignite.Ignite;
> import org.apache.ignite.IgniteCache;
> import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
> import org.apache.ignite.configuration.CacheConfiguration;
> import org.apache.ignite.configuration.DataRegionConfiguration;
> import org.apache.ignite.configuration.DataStorageConfiguration;
> import org.apache.ignite.configuration.IgniteConfiguration;
> import org.apache.ignite.failure.StopNodeFailureHandler;
> import org.apache.ignite.internal.IgniteEx;
> import org.apache.ignite.internal.processors.cache.GridCacheContext;
> import org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl;
> import 
> org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteWalRebalanceTest;
> import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
> import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
> import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
> import org.apache.ignite.transactions.Transaction;
> import org.junit.Test;
> import static java.util.concurrent.TimeUnit.DAYS;
> import static java.util.concurrent.TimeUnit.MILLISECONDS;
> import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
> import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
> import static org.apache.ignite.configuration.WALMode.LOG_ONLY;
> import static 
> org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
> import static 
> org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
> /**
>  * Test framework for ordering transaction's prepares and commits by 
> intercepting messages and releasing then
>  * in user defined order.
>  */
> public class TxPartitionCounterStateAbstractTest extends 
> GridCommonAbstractTest {
> /** IP finder. */
> private static final TcpDiscoveryVmIpFinder IP_FINDER = new 
> TcpDiscoveryVmIpFinder(true);
> /** */
> private static final int MB = 1024 * 1024;
> /** */
> protected int backups;
> /** */
> public static final int TEST_TIMEOUT = 30_000;
> public static final String DEFAULT_CACHE_NAME_2 = DEFAULT_CACHE_NAME + 
> "2";
> /** */
> private AtomicReference testFailed = new AtomicReference<>();
> /** Number of keys to preload before txs to enable historical rebalance. 
> */
> protected static final int PRELOAD_KEYS_CNT = 1;
> /** */
> protected static final String CLIENT_GRID_NAME = "client";
> /** */
> protected static final int PARTS_CNT = 32;
> /** {@inheritDoc} */
> @Override protected IgniteConfiguration getConfiguration(String 
> igniteInstanceName) throws Exception {
> IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
> cfg.setConsistentId("node" + igniteInstanceName);
> cfg.setFailureHandler(new StopNodeFailureHandler());
> cfg.setRebalanceThreadPoolSize(4); // Necessary to reproduce some 
> issues.
> ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
> // TODO set this only for historical rebalance tests.
> cfg.setCommunicationSpi(new 
> IgniteWalRebalanceTest.WalRebalanceCheckingCommunicationSpi());
> boolean 

[jira] [Commented] (IGNITE-11804) Assertion error on affinity initialization

2019-04-25 Thread Alexei Scherbakov (JIRA)


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

Alexei Scherbakov commented on IGNITE-11804:


{noformat}
java.lang.AssertionError
at 
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.initStartedGroup(CacheAffinitySharedManager.java:1361)
at 
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.lambda$initAffinityOnCacheGroupsStart$641a38d$1(CacheAffinitySharedManager.java:1025)
at 
org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:10949)
at 
org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:10851)
at 
org.apache.ignite.internal.util.IgniteUtils.doInParallel(IgniteUtils.java:10831)
at 
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.initAffinityOnCacheGroupsStart(CacheAffinitySharedManager.java:1021)
at 
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processCacheStartRequests(CacheAffinitySharedManager.java:999)
at 
org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.onCacheChangeRequest(CacheAffinitySharedManager.java:855)
at 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onCacheChangeRequest(GridDhtPartitionsExchangeFuture.java:1273)
at 
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:795)
at 
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:3065)
at 
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2914)
at 
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120){noformat}

> Assertion error on affinity initialization
> --
>
> Key: IGNITE-11804
> URL: https://issues.apache.org/jira/browse/IGNITE-11804
> Project: Ignite
>  Issue Type: Bug
>Reporter: Alexei Scherbakov
>Priority: Major
>
> Reproducer (needs some cleanup)
> {noformat}
> /*
>  * 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.
>  */
> package org.apache.ignite.internal.processors.cache.transactions;
> import java.util.ArrayList;
> import java.util.List;
> import java.util.concurrent.atomic.AtomicReference;
> import org.apache.ignite.Ignite;
> import org.apache.ignite.IgniteCache;
> import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
> import org.apache.ignite.configuration.CacheConfiguration;
> import org.apache.ignite.configuration.DataRegionConfiguration;
> import org.apache.ignite.configuration.DataStorageConfiguration;
> import org.apache.ignite.configuration.IgniteConfiguration;
> import org.apache.ignite.failure.StopNodeFailureHandler;
> import org.apache.ignite.internal.IgniteEx;
> import org.apache.ignite.internal.processors.cache.GridCacheContext;
> import org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl;
> import 
> org.apache.ignite.internal.processors.cache.persistence.db.wal.IgniteWalRebalanceTest;
> import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
> import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
> import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
> import org.apache.ignite.transactions.Transaction;
> import org.junit.Test;
> import static java.util.concurrent.TimeUnit.DAYS;
> import static java.util.concurrent.TimeUnit.MILLISECONDS;
> import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
> import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
> import static org.apache.ignite.configuration.WALMode.LOG_ONLY;
> import static 
> org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
> import static 
> org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
> /**
>  * Test framework for ordering transaction's prepares and commits by 
>