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

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

commit 20815a31089447b0d4d1808ed8d6e522f068fae7
Merge: 5aec5a9103 ada958eaf7
Author: Bereng <[email protected]>
AuthorDate: Thu Jul 14 06:59:24 2022 +0200

    Merge branch 'cassandra-4.1' into trunk

 .../commitlog/AbstractCommitLogSegmentManager.java | 37 +++++++++++++++++++---
 .../apache/cassandra/db/commitlog/CommitLog.java   |  3 +-
 2 files changed, 34 insertions(+), 6 deletions(-)

diff --cc 
src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogSegmentManager.java
index 627c885cd0,d8eb0e720f..e6cc2fa814
--- 
a/src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogSegmentManager.java
+++ 
b/src/java/org/apache/cassandra/db/commitlog/AbstractCommitLogSegmentManager.java
@@@ -177,7 -182,25 +182,25 @@@ public abstract class AbstractCommitLog
                  // There could be a new segment in next not offered, but only 
on failure to discard it while
                  // shutting down-- nothing more can or needs to be done in 
that case.
              }
-             WaitQueue.waitOnCondition(managerThreadWaitCondition, 
managerThreadWaitQueue);
+ 
+             interrupted = interrupted || Thread.interrupted();
+             if (!interrupted)
+             {
+                 try
+                 {
+                     WaitQueue.waitOnCondition(managerThreadWaitCondition, 
managerThreadWaitQueue);
+                 }
+                 catch(InterruptedException e)
+                 {
+                     interrupted = true;
+                 }
+             }
 -            
++
+             if (interrupted)
+             {
+                 discardAvailableSegment();
+                 throw new InterruptedException();
+             }
          }
      }
  


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

Reply via email to