You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "linyu003 (via GitHub)" <gi...@apache.org> on 2023/03/26 17:43:53 UTC

[GitHub] [incubator-seatunnel] linyu003 commented on issue #4247: [Bug] [KafkaSink] Failed to write data due to opening transaction

linyu003 commented on issue #4247:
URL: https://github.com/apache/incubator-seatunnel/issues/4247#issuecomment-1484169191

   I am watching on this issue now.  I have reproduced the problem by the config below.
   ```
   env {
       execution.parallelism = 1
       job.mode = "STREAMING"
       execution.checkpoint.interval = 10000
     }
    
     source {
       FakeSource {
         parallelism = 1
         result_table_name = "fake"
         split.read-interval = 1000
         row.num = 2
         schema = {
           fields {
             name = "string"
             age = "int"
           }
         }
       }
     }
    
     transform {
       sql {
         sql = "select name,age from fake"
       }
     }
     sink{
     kafka {
           topic = "test01"
           bootstrap.servers = "localhost:9092"
           semantics = EXACTLY_ONCE
       }
     }
   
   ```
   
   It seems that the KafkaSinkCommitter doesnot work well if the transaction is empty (meaning that the trasaction has no record to commit).
   A empty transaction is a special case, so I want to just commit the transaction in KafkaSinkWriter.snapshotState, instead of working hard to make KafkaSinkCommitter compatitive with it.
   
   I could submit a pr for this in several days.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org