From notifications-return-3292-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Tue May 14 14:43:01 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7275118065D for ; Tue, 14 May 2019 16:43:01 +0200 (CEST) Received: (qmail 86835 invoked by uid 500); 14 May 2019 14:43:00 -0000 Mailing-List: contact notifications-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list notifications@ignite.apache.org Received: (qmail 86826 invoked by uid 99); 14 May 2019 14:43:00 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 May 2019 14:43:00 +0000 From: GitBox To: notifications@ignite.apache.org Subject: [GitHub] [ignite] Jokser commented on a change in pull request #5765: IGNITE-10078 Node failure during concurrent partition updates may cause partition desync between primary and backup. Message-ID: <155784497576.723.10818278902998719611.gitbox@gitbox.apache.org> Date: Tue, 14 May 2019 14:42:55 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Jokser commented on a change in pull request #5765: IGNITE-10078 Node failure during concurrent partition updates may cause partition desync between primary and backup. URL: https://github.com/apache/ignite/pull/5765#discussion_r283836102 ########## File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateWithFilterTest.java ########## @@ -0,0 +1,200 @@ +/* + * 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.List; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.cache.CacheMode; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.processors.cache.PartitionUpdateCounter; +import org.apache.ignite.internal.util.typedef.G; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.apache.ignite.transactions.Transaction; +import org.apache.ignite.transactions.TransactionConcurrency; +import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; + +import static org.apache.ignite.cache.CacheMode.PARTITIONED; +import static org.apache.ignite.cache.CacheMode.REPLICATED; +import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; + +/** + * Test if NOOP tx operation skips incrementing update counter for entry partition. + */ +public class TxPartitionCounterStateWithFilterTest extends GridCommonAbstractTest { + /** */ + private static final int NODES = 4; + + /** */ + private boolean client; + + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { + IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); + + cfg.setClientMode(client); + + return cfg; + } + + /** {@inheritDoc} */ + @Override protected void beforeTestsStarted() throws Exception { + super.beforeTestsStarted(); + + startGridsMultiThreaded(NODES - 1); + + client = true; + + startGrid(NODES - 1); + } + + /** */ + @Test + public void testAssignCountersInTxWithFilterReplicated() { Review comment: All tests can be rewritten with Parametrized rule to avoid test methods duplication. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services