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

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

albertogpz commented on a change in pull request #5845:
URL: https://github.com/apache/geode/pull/5845#discussion_r542635697



##########
File path: 
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
##########
@@ -467,8 +467,66 @@ public void 
testPRParallelPropagationWithGroupTransactionEventsSendsBatchesWithC
     assertEquals(0, v4List.get(5) + v5List.get(5) + v6List.get(5) + 
v7List.get(5));
     // events not queued conflated:
     assertEquals(0, v4List.get(7) + v5List.get(7) + v6List.get(7) + 
v7List.get(7));
+    // batches with incomplete transactions
+    assertEquals(0, (int) v4List.get(13));
+
+  }
+
+  @Test
+  public void 
testPRParallelPropagationWithGroupTransactionEventsWithIncompleteTransactions() 
{
+    Integer lnPort = vm0.invoke(() -> 
WANTestBase.createFirstLocatorWithDSId(1));
+    Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, 
lnPort));
+
+    createCacheInVMs(nyPort, vm2);
+    createReceiverInVMs(vm2);
+
+    int dispThreads = 2;
+    createSenderInVm(lnPort, vm4, dispThreads);
+
+    createReceiverPR(vm2, 0);
+
+    createSenderPRInVM(0, vm4);
+
+    startSenderInVMs("ln", vm4);
+
+    // Adding events in transactions
+    final Map<Object, Object> keyValue = new HashMap<>();
+    int entries = 30;
+    for (int i = 0; i < entries; i++) {
+      keyValue.put(i, i);
+    }
+
+    int entriesPerTransaction = 3;
+    vm4.invoke(
+        () -> WANTestBase.doPutsInsideTransactions(testName, keyValue, 
entriesPerTransaction));
+
+    vm4.invoke(() -> WANTestBase.validateRegionSize(testName, entries));
+
+    ArrayList<Integer> v4List =
+        (ArrayList<Integer>) vm4.invoke(() -> WANTestBase.getSenderStats("ln", 
0));
+
+    int batches = 4;

Review comment:
       Very good question. I will try to clarify it in a comment in the test 
case.




----------------------------------------------------------------
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:
us...@infra.apache.org


> Publish batchesWithIncompleteTransactions in GatewaySenderMXBean
> ----------------------------------------------------------------
>
>                 Key: GEODE-8783
>                 URL: https://issues.apache.org/jira/browse/GEODE-8783
>             Project: Geode
>          Issue Type: Improvement
>          Components: docs, jmx, wan
>            Reporter: Alberto Gomez
>            Assignee: Alberto Gomez
>            Priority: Major
>              Labels: pull-request-available
>
> It would be interesting to have a counter called 
> "batchesWithIncompleteTransactions" in the GatewaySenderMXBean that shows the 
> number of batches sent with incomplete transactions. 
> The reason is that it may not be guaranteed that all the events for a 
> transaction will be sent in the same batch, even if group-transaction-events 
> is enabled, due to a wrong configuration or under very high traffic 
> conditions.
> It would be advisable to document this possibility and also relate it the new 
> counter.
> For completeness sake, it would also be desirable to have batchesDistributed 
> (given that batchesRedistributed and now batchesWithIncompleteTransactions) 
> also published in the GatewaySenderMXBean.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to