[ 
https://issues.apache.org/jira/browse/GEODE-4033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16275003#comment-16275003
 ] 

ASF GitHub Bot commented on GEODE-4033:
---------------------------------------

nreich commented on a change in pull request #1115: GEODE-4033: Exception is 
thrown when Tx Id is not found on server dur…
URL: https://github.com/apache/geode/pull/1115#discussion_r154448437
 
 

 ##########
 File path: 
geode-core/src/test/java/org/apache/geode/cache/client/internal/TXFailoverOpTest.java
 ##########
 @@ -0,0 +1,388 @@
+/*
+ * 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.geode.cache.client.internal;
+
+import static org.mockito.Mockito.*;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.net.SocketTimeoutException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ScheduledExecutorService;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import org.apache.geode.CancelCriterion;
+import org.apache.geode.cache.TransactionException;
+import org.apache.geode.cache.client.NoAvailableServersException;
+import org.apache.geode.cache.client.internal.pooling.ConnectionManager;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.ServerLocation;
+import org.apache.geode.internal.cache.TXManagerImpl;
+import org.apache.geode.internal.cache.TXStateProxy;
+import org.apache.geode.internal.cache.tier.sockets.ServerQueueStatus;
+import org.apache.geode.internal.logging.InternalLogWriter;
+import org.apache.geode.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+@RunWith(PowerMockRunner.class)
+@PowerMockIgnore("*.UnitTest")
+@PrepareForTest({TXManagerImpl.class})
+public class TXFailoverOpTest {
+
+  @Rule
+  public ExpectedException expectedException = ExpectedException.none();
+
+  DummyManager manager;
+  private EndpointManager endpointManager;
+  private DummyQueueManager queueManager;
+  private RegisterInterestTracker riTracker;
+
+  protected int borrows;
 
 Review comment:
   should all be private

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> TxFailover doesn't throw exception when tx state is not found on the server
> ---------------------------------------------------------------------------
>
>                 Key: GEODE-4033
>                 URL: https://issues.apache.org/jira/browse/GEODE-4033
>             Project: Geode
>          Issue Type: Bug
>          Components: transactions
>            Reporter: Anilkumar Gingade
>            Assignee: Anilkumar Gingade
>
> When a client transaction gets an exception due to connection failure; it 
> tries to execute the transaction on other available server. This failover 
> transaction is processed, if the tx.state is available on any of the servers; 
> if not an exception thrown back to the client. 
> Currently the client catches this exception and tries to re-create the 
> exception instead of returning back to the application. This could cause 
> multiple transaction state to be created for the same transaction id on the 
> cluster (if the first attempt to the server is still in process), causing 
> unexpected behavior.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to