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

dcapwell pushed a commit to branch poc/harry-on-accord
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git


The following commit(s) were added to refs/heads/poc/harry-on-accord by this 
push:
     new 48333901 remove notifying waiting from the lock, and perform after 
releaseing the lock
48333901 is described below

commit 48333901b82817fe63b073dcd44e813d4f20919a
Author: David Capwell <[email protected]>
AuthorDate: Fri Nov 1 11:18:43 2024 -0700

    remove notifying waiting from the lock, and perform after releaseing the 
lock
---
 accord-core/src/main/java/accord/impl/MajorityDepsFetcher.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/accord-core/src/main/java/accord/impl/MajorityDepsFetcher.java 
b/accord-core/src/main/java/accord/impl/MajorityDepsFetcher.java
index dcb94801..b1f4163e 100644
--- a/accord-core/src/main/java/accord/impl/MajorityDepsFetcher.java
+++ b/accord-core/src/main/java/accord/impl/MajorityDepsFetcher.java
@@ -193,12 +193,13 @@ public class MajorityDepsFetcher
                             {
                                 try
                                 {
+                                    boolean notifyWaiting = false;
                                     synchronized (MajorityDepsFetcher.this)
                                     {
                                         index = nextIndex;
                                         if (index >= numberOfSplits)
                                         {
-                                            waiting.forEach(w -> 
w.trySuccess(null));
+                                            notifyWaiting = true;
                                             logger.info("Successfully fetched 
majority deps for {} at epoch {}", this.range, epoch);
                                             defunct = true;
                                             shardSchedulers.remove(this.range, 
ShardScheduler.this);
@@ -208,6 +209,8 @@ public class MajorityDepsFetcher
                                             schedule();
                                         }
                                     }
+                                    if (notifyWaiting)
+                                        waiting.forEach(w -> 
w.trySuccess(null));
                                 }
                                 catch (Throwable t)
                                 {


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

Reply via email to