You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/10/29 03:32:56 UTC

[GitHub] [kafka] chia7712 opened a new pull request #9525: KAFKA-10658 ErrantRecordReporter.report always return completed futur…

chia7712 opened a new pull request #9525:
URL: https://github.com/apache/kafka/pull/9525


   issue: https://issues.apache.org/jira/browse/KAFKA-10658
   
   This issue happens when both DLQ and error log are enabled. There is a incorrect filter in handling multiple reports and it results in the uncompleted future is filtered out. Hence, users always receive a completed future even though the record is still in producer buffer.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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

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



[GitHub] [kafka] chia7712 commented on pull request #9525: KAFKA-10658 ErrantRecordReporter.report always return completed futur…

Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #9525:
URL: https://github.com/apache/kafka/pull/9525#issuecomment-768828561


   merge to trunk, 2.7 and 2.6


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

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



[GitHub] [kafka] chia7712 commented on pull request #9525: KAFKA-10658 ErrantRecordReporter.report always return completed futur…

Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #9525:
URL: https://github.com/apache/kafka/pull/9525#issuecomment-752399751


   @dajac Could you please take a look? 


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

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



[GitHub] [kafka] showuon commented on a change in pull request #9525: KAFKA-10658 ErrantRecordReporter.report always return completed futur…

Posted by GitBox <gi...@apache.org>.
showuon commented on a change in pull request #9525:
URL: https://github.com/apache/kafka/pull/9525#discussion_r514121667



##########
File path: connect/runtime/src/test/java/org/apache/kafka/connect/runtime/errors/ProcessingContextTest.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.connect.runtime.errors;
+
+import org.apache.kafka.clients.producer.RecordMetadata;
+import org.apache.kafka.common.TopicPartition;
+import org.junit.Test;
+
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class ProcessingContextTest {
+
+    @Test
+    public void testReportWithSingleReporter() {
+        testReport(1);
+    }
+
+    @Test
+    public void testReportWithTwoReporters() {

Review comment:
       testReportWithTwoReporters -> testReportWithMultipleReporters




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

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



[GitHub] [kafka] chia7712 merged pull request #9525: KAFKA-10658 ErrantRecordReporter.report always return completed futur…

Posted by GitBox <gi...@apache.org>.
chia7712 merged pull request #9525:
URL: https://github.com/apache/kafka/pull/9525


   


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

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



[GitHub] [kafka] chia7712 commented on a change in pull request #9525: KAFKA-10658 ErrantRecordReporter.report always return completed futur…

Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #9525:
URL: https://github.com/apache/kafka/pull/9525#discussion_r514132602



##########
File path: connect/runtime/src/test/java/org/apache/kafka/connect/runtime/errors/ProcessingContextTest.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.connect.runtime.errors;
+
+import org.apache.kafka.clients.producer.RecordMetadata;
+import org.apache.kafka.common.TopicPartition;
+import org.junit.Test;
+
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class ProcessingContextTest {
+
+    @Test
+    public void testReportWithSingleReporter() {
+        testReport(1);
+    }
+
+    @Test
+    public void testReportWithTwoReporters() {

Review comment:
       will copy that




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

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



[GitHub] [kafka] chia7712 commented on pull request #9525: KAFKA-10658 ErrantRecordReporter.report always return completed futur…

Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #9525:
URL: https://github.com/apache/kafka/pull/9525#issuecomment-718338043


   @aakashnshah @rhauch @kkonstantine Could you take a look? This issue was related to #8720 and you guys are experts on that.


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

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