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

xiatian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new df1428f32 [ISSUE #4795] Replace this exception in beginFlush() with 
log print and return false (#4797)
df1428f32 is described below

commit df1428f3230ad516ad29364721ccd2a5fdc58871
Author: Jevin Jiang <[email protected]>
AuthorDate: Thu Mar 21 01:33:54 2024 +0800

    [ISSUE #4795] Replace this exception in beginFlush() with log print and 
return false (#4797)
---
 .../openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java
 
b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java
index 76931d85a..3c5ed033a 100644
--- 
a/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java
+++ 
b/eventmesh-openconnect/eventmesh-openconnect-offsetmgmt-plugin/eventmesh-openconnect-offsetmgmt-api/src/main/java/org/apache/eventmesh/openconnect/offsetmgmt/api/storage/OffsetStorageWriterImpl.java
@@ -84,7 +84,8 @@ public class OffsetStorageWriterImpl implements 
OffsetStorageWriter, Closeable {
      */
     public synchronized boolean beginFlush() {
         if (isFlushing()) {
-            throw new RuntimeException("OffsetStorageWriter is already 
flushing");
+            log.warn("OffsetStorageWriter is already flushing");
+            return false;
         }
         if (data.isEmpty()) {
             return false;


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

Reply via email to