You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/09 16:05:50 UTC

[GitHub] [camel] geekrupam opened a new pull request, #8499: [camel-18588] Added condition around commitManager.forceCommit method to not reset from zero if there is no information on the last offset committed

geekrupam opened a new pull request, #8499:
URL: https://github.com/apache/camel/pull/8499

   <!-- Uncomment and fill this section if your PR is not trivial
   - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.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@camel.apache.org

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


[GitHub] [camel] github-actions[bot] commented on pull request #8499: [camel-18588] Added condition around commitManager.forceCommit method to not reset from zero if there is no information on the last offset committed

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8499:
URL: https://github.com/apache/camel/pull/8499#issuecomment-1272597493

   :x: Finished component verification: **1 component(s) test failed** out of 1 component(s) tested


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

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


[GitHub] [camel] orpiske commented on a diff in pull request #8499: [camel-18588] Added condition around commitManager.forceCommit method to not reset from zero if there is no information on the last offset committed

Posted by GitBox <gi...@apache.org>.
orpiske commented on code in PR #8499:
URL: https://github.com/apache/camel/pull/8499#discussion_r990967060


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/support/KafkaRecordProcessor.java:
##########
@@ -131,8 +131,11 @@ private boolean processException(
                 LOG.warn("Will seek consumer to offset {} and start polling again.", partitionLastOffset);
             }
 
-            // force commit, so we resume on next poll where we failed
-            commitManager.forceCommit(partition, partitionLastOffset);
+            // force commit, so we resume on next poll where we failed except when the failure happened
+            // at the first message in a poll
+            if(partitionLastOffset != -1) {

Review Comment:
   Please use `AbstractCommitManager.START_OFFSET` instead of -1, so it's easier to read. 
   
   
   Thanks!



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

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


[GitHub] [camel] geekrupam closed pull request #8499: [camel-18588] Added condition around commitManager.forceCommit method to not reset from zero if there is no information on the last offset committed

Posted by GitBox <gi...@apache.org>.
geekrupam closed pull request #8499: [camel-18588] Added condition around commitManager.forceCommit method to not reset from zero  if  there is no information on the last offset committed
URL: https://github.com/apache/camel/pull/8499


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

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


[GitHub] [camel] davsclaus commented on a diff in pull request #8499: [camel-18588] Added condition around commitManager.forceCommit method to not reset from zero if there is no information on the last offset committed

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #8499:
URL: https://github.com/apache/camel/pull/8499#discussion_r991336659


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/consumer/support/KafkaRecordProcessor.java:
##########
@@ -131,8 +131,11 @@ private boolean processException(
                 LOG.warn("Will seek consumer to offset {} and start polling again.", partitionLastOffset);
             }
 
-            // force commit, so we resume on next poll where we failed
-            commitManager.forceCommit(partition, partitionLastOffset);
+            // force commit, so we resume on next poll where we failed except when the failure happened
+            // at the first message in a poll
+            if(partitionLastOffset != -1) {

Review Comment:
   Also the code should be formatted, you can do that with `mvn compile -P format`



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

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


[GitHub] [camel] github-actions[bot] commented on pull request #8499: [camel-18588] Added condition around commitManager.forceCommit method to not reset from zero if there is no information on the last offset committed

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8499:
URL: https://github.com/apache/camel/pull/8499#issuecomment-1272573683

   :warning: This PR changes Camel components and will be tested automatically.


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

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