You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "cw-longwang (via GitHub)" <gi...@apache.org> on 2025/04/09 13:23:02 UTC

[I] [Bug] [connector-file-s3] Bug title [seatunnel]

cw-longwang opened a new issue, #9133:
URL: https://github.com/apache/seatunnel/issues/9133

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   The flink engine reads kafka and Mysqlcdc writes to s3. The two checkpoint file names are the same. As a result, the later file overwrites the earlier file, resulting in data loss;
   
   
   
   
   ### SeaTunnel Version
   
   2.3.10
   
   ### SeaTunnel Config
   
   ```conf
   # Defining the runtime environment
   env {
     parallelism = 1
     job.mode = "STREAMING"
     checkpoint.interval=60000
   }
   
   source {
     MySQL-CDC {
   	base-url = "jdbc:mysql://ai-bigdatanew-instance-1.ca56eeecuskl.us-east-1.rds.amazonaws.com:3306/test"
       username = "admin"
       password = "abc123456"
       table-names = ["test.test"]
       startup.mode = "latest"
   	exactly_once = true
   	format = compatible_debezium_json
   	debezium = {
           key.converter.schemas.enable = false
           value.converter.schemas.enable = false
           database.server.name =  "mysql_cdc_1"
       }
     }
   }
   
   sink {
       S3File {
         bucket = "s3a://sparktest111cw"
   	  path="/sea/test666"
   	  tmp_path = "/tmp/seatunnel"
         fs.s3a.endpoint="s3.us-east-1.amazonaws.com"
         fs.s3a.aws.credentials.provider="org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider"
   	  access_key="AKIAZ3MGNGECBK2XNCJE"
   	  secret_key="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"
   	  format = “compatible_debezium_json”
         file_format_type = "parquet"
   	  data_save_mode  = "APPEND_DATA"
   	  have_partition = true
         partition_by = ["topic"]
         partition_dir_expression = "${k0}=${v0}"
   	  single_file_mode=false
   	  is_enable_transaction=true
   	  batch_size=2
   	custom_filename = true
       file_name_expression = "${transactionId}_${now}"
       filename_time_format = "yyyy.MM.dd"
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   kubectl create -f sen.yaml -n flink-bigdata
   ```
   
   ### Error Exception
   
   ```log
   The flink engine reads kafka and Mysqlcdc writes to s3. The two checkpoint file names are the same. As a result, the later file overwrites the earlier file, resulting in data loss;
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   java8
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.apache.org

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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "FrommyMind (via GitHub)" <gi...@apache.org>.
FrommyMind commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791375347

   Do you mean you have a kafka to s3 job at the same time?


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791496017

   @FrommyMind No. There is only one seatunnel task. In the same task, two checkpoints write two files, and the file name is exactly the same.


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791497690

   ![Image](https://github.com/user-attachments/assets/6c2bb05e-e245-4473-a46b-3d85b11d658b) For stream processing tasks, there is always only one file for a task. Because the file name is the same each time, it overwrites the previous one. Batch processing does not do this.


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2899579229

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791510090

   [taskmanager.log](https://github.com/user-attachments/files/19677861/taskmanager.log)


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791786710

   single_file_mode=false   data_save_mode=APPEND_DATA  custom_filename=true
   
   I have tried all these parameters, but none of them worked. Even if I customize the file name and add the timestamp in seconds, the two file names are still the same, and the later file will still overwrite the previous file.


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791782131

   data_save_mode=


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2869287451

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791510476

   @FrommyMind 


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791509492

   ![Image](https://github.com/user-attachments/assets/4f982453-4483-4730-8713-49d259ef5522)Each parallelism, the file name is exactly the same each time


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "cw-longwang (via GitHub)" <gi...@apache.org>.
cw-longwang commented on issue #9133:
URL: https://github.com/apache/seatunnel/issues/9133#issuecomment-2791940390

   This problem only occurs when streaming out. Batch processing will roll files according to batchsize


-- 
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


Re: [I] [Bug] [connector-file-s3] S3 sink data loss [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #9133: [Bug] [connector-file-s3] S3 sink data loss
URL: https://github.com/apache/seatunnel/issues/9133


-- 
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