This is an automated email from the ASF dual-hosted git repository.

pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-projection.git


The following commit(s) were added to refs/heads/main by this push:
     new 14bcba1  fix: move latch.countDown() after buffer.append() in 
concatHandler to fix race condition (#464)
14bcba1 is described below

commit 14bcba1d00a49965f42fcc005a83be20a7832193
Author: PJ Fanning <[email protected]>
AuthorDate: Thu May 7 08:50:56 2026 +0100

    fix: move latch.countDown() after buffer.append() in concatHandler to fix 
race condition (#464)
    
    Agent-Logs-Url: 
https://github.com/pjfanning/incubator-pekko-projection/sessions/ce3146fc-412a-4b16-8a66-f450145aa6fa
    
    Co-authored-by: copilot-swe-agent[bot] 
<[email protected]>
    Co-authored-by: pjfanning <[email protected]>
---
 .../test/java/org/apache/pekko/projection/jdbc/JdbcProjectionTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/jdbc/src/test/java/org/apache/pekko/projection/jdbc/JdbcProjectionTest.java 
b/jdbc/src/test/java/org/apache/pekko/projection/jdbc/JdbcProjectionTest.java
index 020c785..796cbb8 100644
--- 
a/jdbc/src/test/java/org/apache/pekko/projection/jdbc/JdbcProjectionTest.java
+++ 
b/jdbc/src/test/java/org/apache/pekko/projection/jdbc/JdbcProjectionTest.java
@@ -217,11 +217,12 @@ public class JdbcProjectionTest extends JUnitSuite {
       StringBuffer buffer, CountDownLatch latch, Predicate<Long> 
failPredicate) {
     return JdbcHandler.fromFunction(
         (PureJdbcSession session, Envelope envelope) -> {
-          latch.countDown();
           if (failPredicate.test(envelope.offset)) {
+            latch.countDown();
             throw new RuntimeException(failMessage(envelope.offset));
           } else {
             buffer.append(envelope.message).append("|");
+            latch.countDown();
           }
         });
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to