You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhaohongyan133 (via GitHub)" <gi...@apache.org> on 2025/02/24 10:03:22 UTC

[I] [Bug] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

zhaohongyan133 opened a new issue, #8803:
URL: https://github.com/apache/seatunnel/issues/8803

   ### 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
   
   ![Image](https://github.com/user-attachments/assets/e3153719-e6ee-44f5-8eda-613f152d95d7)
   
   ![Image](https://github.com/user-attachments/assets/cff2a3cf-25e6-4115-a3a9-0e7814463846)
   
   ![Image](https://github.com/user-attachments/assets/5e4e778c-6195-472b-af42-3f8373ff3440)
   
   ![Image](https://github.com/user-attachments/assets/215f320d-98a0-482e-9490-df5ae5fe6aa8)
   
   I want to export 100 or 1000,000 datas,but actual export 200 or 2000,000,it will  happens every 10-20 times
   
   ### SeaTunnel Version
   
   2.3.9
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 4
     job.mode = "BATCH"
     checkpoint.interval = 100000
   }
   
   source {
     Clickhouse {
       host = "192.168.0.22:8123"
       database = "default"
       sql = "select * from argus.test limit 100"
       username = "default"
       password = "xxx"
       clickhouse.config = {
         "socket_timeout": "300000"
       }
     }
   }
   
   sink {
   
     LocalFile {
       path = "/home/zhaohy/seatunnel/output/"
       file_format_type = "csv"
       field_delimiter = ","
       row_delimiter = "\n"
     }
   
   }
   ```
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel.sh --config config/argus_clickhouse_2_csv_100.conf -m local
   ```
   
   ### Error Exception
   
   ```log
   no error
   ```
   
   ### Zeta or Flink or Spark Version
   
   zeta
   
   ### Java or Scala Version
   
   1.8
   
   ### 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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   Setting the parallelism to 1 is fine, but when I want to export a large amount of data and want to have multiple threads running in parallel, this can happen


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   > Hi, this is a bug. https://github.com/apache/seatunnel/blob/dev/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSourceSplitEnumerator.java#L77
   > 
   > Sometimes the reader register to enumerator at same time, so multiple reader receive query task. We need add a lock.
   > 
   > And looks it's not support `SupportParallelism`, the query can only run on 1 reader.
   > 
   > ```
   > if (assigned < 0 ){
   >    assigned = subTaskId;
   >   // so next time other reader won't be assign read task. Means not support `SupportParallelism`
   > }
   > ```
   > 
   > cc [@Hisoka-X](https://github.com/Hisoka-X) , Please correct me if I am wrong.
   
   Yes, it's a bug.


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   > [@liunaijie](https://github.com/liunaijie) Could you assign this to me pls.
   
   Already assign it to you, looking forward for your contribution.
   
   @zhaohongyan133 Let's wait for this fix.
   


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   ```
   env {
     parallelism = 4
     job.mode = "BATCH"
     checkpoint.interval = 100000
   }
   
   source {
     Clickhouse {
       host = "192.168.0.22:8123"
       database = "default"
       sql = "select * from argus.test limit 100"
       username = "default"
       password = "xxx"
       clickhouse.config = {
         "socket_timeout": "300000"
       }
     }
   }
   ```
   
   When you use this job config with `parallelism=4` and the SQL query includes `LIMIT 100`, what will be the final result size?
   Based on my understanding, it should be 400. Is that correct?
   


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   In fact, it is 200. In my test, the maximum parallelism is 2, even though I set the parallelism to 4.


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   @liunaijie  Could you assign this to me pls.


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   try to set parallelism to 1


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 closed issue #8803: [Bug] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000
URL: https://github.com/apache/seatunnel/issues/8803


-- 
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] [Clickhouse to localfile] export Data rows error,need 1000,000 but actual 2000,000 [seatunnel]

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

   Hi, this is a bug. 
   https://github.com/apache/seatunnel/blob/dev/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSourceSplitEnumerator.java#L77
   
   Sometimes the reader register to enumerator at same time, so multiple reader receive query task. We need add a lock.
   
   And looks it's not support `SupportParallelism`, the query can only run on 1 reader. 
   ```
   if (assigned < 0 ){
      assigned = subTaskId;
     // so next time other reader won't be assign read task. Means not support `SupportParallelism`
   }
   ```
   
   cc @Hisoka-X , Please correct me if I am wrong.
   


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