You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by if...@apache.org on 2024/10/01 08:42:00 UTC

(cassandra-accord) branch cep-15-accord-stabilize-tests created (now 78badf67)

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

ifesdjeen pushed a change to branch cep-15-accord-stabilize-tests
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


      at 78badf67 Pull in Ariel's fix

This branch includes the following new commits:

     new 78badf67 Pull in Ariel's fix

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


(cassandra-accord) 01/01: Pull in Ariel's fix

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch cep-15-accord-stabilize-tests
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git

commit 78badf67faf811ae5ee3e709e28f9b52223784ec
Author: Alex Petrov <ol...@gmail.com>
AuthorDate: Tue Oct 1 10:25:54 2024 +0200

    Pull in Ariel's fix
---
 accord-core/src/main/java/accord/impl/DefaultRequestTimeouts.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/accord-core/src/main/java/accord/impl/DefaultRequestTimeouts.java b/accord-core/src/main/java/accord/impl/DefaultRequestTimeouts.java
index 8f11e5f1..e9f8c817 100644
--- a/accord-core/src/main/java/accord/impl/DefaultRequestTimeouts.java
+++ b/accord-core/src/main/java/accord/impl/DefaultRequestTimeouts.java
@@ -18,6 +18,8 @@
 
 package accord.impl;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.Function;
@@ -91,16 +93,19 @@ public class DefaultRequestTimeouts implements RequestTimeouts
         @Override
         public void run()
         {
+            List<Timeout> timedOut = new ArrayList<>();
             lock.lock();
             try
             {
                 long now = node.elapsed(MILLISECONDS);
                 // TODO (expected): should we handle reentrancy? Or at least throw an exception?
-                timeouts.advance(now, this, (s, r) -> r.timeout.timeout());
+                timeouts.advance(now, this, (s, r) -> timedOut.add(r.timeout));
             }
             finally
             {
                 lock.unlock();
+                for (Timeout timeout : timedOut)
+                    timeout.timeout();
             }
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org