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

[GitHub] [incubator-seatunnel] liugddx opened a new pull request, #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

liugddx opened a new pull request, #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update change log that in connector document. For more details you can refer to [connector-v2](https://github.com/apache/incubator-seatunnel/tree/dev/docs/en/connector-v2)
     2. Update [plugin-mapping.properties](https://github.com/apache/incubator-seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     3. Update the pom file of [seatunnel-dist](https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-dist/pom.xml)
   * [ ] Update the [`release-note`](https://github.com/apache/incubator-seatunnel/blob/dev/release-note.md).


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


[GitHub] [incubator-seatunnel] liugddx commented on pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#issuecomment-1551530157

   > Can you add an test case reference https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/ClusterFaultToleranceTwoPipelineIT.java to test this?
   
   I've tested it locally and it works fine.
   
   <img width="1303" alt="image" src="https://github.com/apache/incubator-seatunnel/assets/48236177/fc83ab7b-22ec-4d06-ab53-248503726f22">
   


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


[GitHub] [seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764#discussion_r1199943681


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
   This is a warning, because the lock object is not final. So I chose a final modified lock.



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


[GitHub] [incubator-seatunnel] ic4y commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197457591


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -180,7 +182,6 @@ public void close() throws IOException {
     public void addSplitsBack(List<KafkaSourceSplit> splits, int subtaskId) {
         if (!splits.isEmpty()) {
             pendingSplit.putAll(convertToNextSplit(splits));
-            assignSplit();

Review Comment:
   During runtime, if new partition are discovered, will they not be distributed anymore?



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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197370593


##########
.gitignore:
##########
@@ -48,4 +48,5 @@ test.conf
 spark-warehouse
 *.flattened-pom.xml
 
-seatunnel-examples
\ No newline at end of file
+seatunnel-examples

Review Comment:
   > > revert
   > 
   > I don't know if it's a recent new feature, I generate a lib after every build.
   
   I built it again and found that the lib is not in the output. So i revert it.



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


[GitHub] [incubator-seatunnel] ic4y commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197524352


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
   @ashulin  @Hisoka-X @hailin0 PTAL 



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


[GitHub] [seatunnel] EricJoy2048 merged pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 merged PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764


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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#issuecomment-1551285253

   Can you add an test case reference https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/ClusterFaultToleranceTwoPipelineIT.java to test 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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197488830


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -369,7 +365,6 @@ public Map<TopicPartition, Long> listConsumerGroupOffsets(Collection<TopicPartit
 
     private void discoverySplits() throws ExecutionException, InterruptedException {
         fetchPendingPartitionSplit();
-        assignSplit();

Review Comment:
   Here @ic4y 



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


[GitHub] [incubator-seatunnel] ic4y commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197481070


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -180,7 +182,6 @@ public void close() throws IOException {
     public void addSplitsBack(List<KafkaSourceSplit> splits, int subtaskId) {
         if (!splits.isEmpty()) {
             pendingSplit.putAll(convertToNextSplit(splits));
-            assignSplit();

Review Comment:
   During normal operation, when a topic generates new partitions, we can automatically discover them and distribute to the reader for reading.
   



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


[GitHub] [seatunnel] hailin0 commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764#discussion_r1199936209


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
   why change this



##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
    why change this  @liugddx 



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


[GitHub] [incubator-seatunnel] liugddx commented on pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#issuecomment-1552287990

   > LGTM, A small suggestion, I do not recommend modifying the code style while fixing bugs, as it will increase the difficulty of reviewing.
   
   Thanks for reminding, I saw the warning, so I formatted the code. In the future, I will pay attention to this point.
   


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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197309362


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -369,7 +365,6 @@ public Map<TopicPartition, Long> listConsumerGroupOffsets(Collection<TopicPartit
 
     private void discoverySplits() throws ExecutionException, InterruptedException {
         fetchPendingPartitionSplit();
-        assignSplit();

Review Comment:
   > I think there might be a problem here. If all readers are registered and a new split be discover, It can not be assign.
   
   Got it



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


[GitHub] [seatunnel] hailin0 commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764#discussion_r1199991843


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
   Useing private object field as lock object



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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197287762


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -369,7 +365,6 @@ public Map<TopicPartition, Long> listConsumerGroupOffsets(Collection<TopicPartit
 
     private void discoverySplits() throws ExecutionException, InterruptedException {
         fetchPendingPartitionSplit();
-        assignSplit();

Review Comment:
   I think there might be a problem here. If all readers are registered and a new split be discover, It can not be assign.



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


[GitHub] [incubator-seatunnel] ic4y commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197490139


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -180,7 +182,6 @@ public void close() throws IOException {
     public void addSplitsBack(List<KafkaSourceSplit> splits, int subtaskId) {
         if (!splits.isEmpty()) {
             pendingSplit.putAll(convertToNextSplit(splits));
-            assignSplit();

Review Comment:
   I misread.



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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197468971


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -180,7 +182,6 @@ public void close() throws IOException {
     public void addSplitsBack(List<KafkaSourceSplit> splits, int subtaskId) {
         if (!splits.isEmpty()) {
             pendingSplit.putAll(convertToNextSplit(splits));
-            assignSplit();

Review Comment:
   `addSplitsBack()` shouldn't do the assign split, it lags behind `registeredReaders()`. In addition, run() will assign split again and it is run in the next stage.
   
   



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


[GitHub] [seatunnel] EricJoy2048 commented on pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764#issuecomment-1558937574

   @TyrantLucifer  PTAL again.


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


[GitHub] [seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764#discussion_r1200688113


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
   > > Useing private object field as lock object
   > 
   > Done.
   
   The properties of `SourceSplitEnumeratorTask` need to be serialized, so I removed the lock.



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


[GitHub] [seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764#discussion_r1199998887


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
   > Useing private object field as lock object
   
   Done.



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


[GitHub] [seatunnel] hailin0 commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #4764:
URL: https://github.com/apache/seatunnel/pull/4764#discussion_r1199992247


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SourceSplitEnumeratorTask.java:
##########
@@ -141,7 +141,7 @@ public void triggerBarrier(Barrier barrier) throws Exception {
         final long barrierId = barrier.getId();
         Serializable snapshotState = null;
         byte[] serialize = null;
-        synchronized (enumeratorContext) {
+        synchronized (source) {

Review Comment:
   or don't change it



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


[GitHub] [incubator-seatunnel] liugddx commented on pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#issuecomment-1551580911

   #4773


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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#issuecomment-1551607285

   > LGTM, A small suggestion, I do not recommend modifying the code style while fixing bugs, as it will increase the difficulty of reviewing.
   
   @hailin0  @ic4y  PTAL.


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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197245188


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SourceFlowLifeCycle.java:
##########
@@ -177,7 +177,7 @@ public void requestSplit() {
                             enumeratorTaskAddress)
                     .get();
         } catch (InterruptedException | ExecutionException e) {
-            log.warn("source request split failed [{}]", e);
+            log.warn("source request split failed.", e);

Review Comment:
   > Why change it?
   
   Exceptions will not be spliced ​​into {}, this usage is 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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197243371


##########
.gitignore:
##########
@@ -48,4 +48,5 @@ test.conf
 spark-warehouse
 *.flattened-pom.xml
 
-seatunnel-examples
\ No newline at end of file
+seatunnel-examples

Review Comment:
   > revert
   
   I don't know if it's a recent new feature, I generate a lib after every build.
   
   



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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1197471941


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -180,7 +182,6 @@ public void close() throws IOException {
     public void addSplitsBack(List<KafkaSourceSplit> splits, int subtaskId) {
         if (!splits.isEmpty()) {
             pendingSplit.putAll(convertToNextSplit(splits));
-            assignSplit();

Review Comment:
   ![image](https://github.com/apache/incubator-seatunnel/assets/48236177/f4a194f9-40da-45d6-a069-82d578346201)
   



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


[GitHub] [incubator-seatunnel] liugddx commented on pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#issuecomment-1551542720

   Task recovery process assignSplit() must be called after registerReader().
   


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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #4764: [hotfix][kafka] Fix the problem that the partition information cannot be obtained when kafka is restored

Posted by "TyrantLucifer (via GitHub)" <gi...@apache.org>.
TyrantLucifer commented on code in PR #4764:
URL: https://github.com/apache/incubator-seatunnel/pull/4764#discussion_r1196739655


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SourceFlowLifeCycle.java:
##########
@@ -177,7 +177,7 @@ public void requestSplit() {
                             enumeratorTaskAddress)
                     .get();
         } catch (InterruptedException | ExecutionException e) {
-            log.warn("source request split failed [{}]", e);
+            log.warn("source request split failed.", e);

Review Comment:
   Why change it?



##########
.gitignore:
##########
@@ -48,4 +48,5 @@ test.conf
 spark-warehouse
 *.flattened-pom.xml
 
-seatunnel-examples
\ No newline at end of file
+seatunnel-examples

Review Comment:
   revert



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