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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 2eb6677e Add debug string to configuration service to output epochs we 
could not find
2eb6677e is described below

commit 2eb6677ebedf760a87da827fa50708035d353f75
Author: Alex Petrov <[email protected]>
AuthorDate: Tue Jun 17 11:03:25 2025 +0200

    Add debug string to configuration service to output epochs we could not find
    
    Patch by Alex Petrov; reviewed by Benedict Elliott Smith for CASSANDRA-20716
---
 .../accord/impl/AbstractConfigurationService.java   | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git 
a/accord-core/src/main/java/accord/impl/AbstractConfigurationService.java 
b/accord-core/src/main/java/accord/impl/AbstractConfigurationService.java
index 56e763d7..72b8119d 100644
--- a/accord-core/src/main/java/accord/impl/AbstractConfigurationService.java
+++ b/accord-core/src/main/java/accord/impl/AbstractConfigurationService.java
@@ -429,6 +429,27 @@ public abstract class 
AbstractConfigurationService<EpochState extends AbstractCo
             listener.onEpochRetired(ranges, epoch);
     }
 
+    public String getDebugStr()
+    {
+        StringBuilder sb = new StringBuilder();
+        synchronized (this)
+        {
+            for (long i = epochs.minEpoch(); i <= epochs.maxEpoch(); i++)
+            {
+                if (i > epochs.minEpoch())
+                    sb.append(", ");
+                sb.append(i).append(": ")
+                  .append(" received ")
+                  .append(epochs.getOrCreate(i).received)
+                  .append(" acknowledged ")
+                  .append(epochs.getOrCreate(i).acknowledged)
+                  .append(" reads ")
+                  .append(epochs.getOrCreate(i).reads);
+            }
+        }
+        return sb.toString();
+    }
+
     // synchronized because state.reads is written
     public AsyncChain<Void> epochReady(long epoch)
     {


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

Reply via email to