You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ayalamark-afk (via GitHub)" <gi...@apache.org> on 2026/01/29 08:54:59 UTC

[PR] KAFKA-17676: Fix NPE when starting tasks after config topic compaction [kafka]

ayalamark-afk opened a new pull request, #21368:
URL: https://github.com/apache/kafka/pull/21368

   ## Summary
   
   Fix for KAFKA-17676 - NullPointerException when starting tasks after the connect-configs topic has been compacted.
   
   ## Problem
   
   When the connect-configs topic gets compacted, connector config records can be removed even though the connector is still active. The fix for KAFKA-16838 assumes that if a connector config is missing, the connector was deleted, and ignores task configs. This causes an NPE when trying to start tasks:
   
   java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "inputMap" is null
       at org.apache.kafka.connect.runtime.TaskConfig.<init>
       at org.apache.kafka.connect.runtime.Worker.startTask
   
   ## Solution
   
   Distinguish between two scenarios in processTasksCommitRecord:
   
   1. Connector was truly deleted (no deferred updates, not previously applied) → Ignore task configs (preserves KAFKA-16838 fix)
   
   2. Connector config was compacted but connector is still active → Use previously applied config if available, or mark as inconsistent
   
   This prevents NPE crashes while maintaining backward compatibility with the KAFKA-16838 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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17676: Fix NPE when starting tasks after config topic compaction [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21368:
URL: https://github.com/apache/kafka/pull/21368#issuecomment-4411392550

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening 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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17676: Fix NPE when starting tasks after config topic compaction [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21368:
URL: https://github.com/apache/kafka/pull/21368#issuecomment-4394208025

   This PR is being marked as stale since it has not had any activity in 90 days. If you
   would like to keep this PR alive, please leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. If no activity
   occurs in the next 30 days, it will be automatically closed.


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17676: Fix NPE when starting tasks after config topic compaction [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21368:
URL: https://github.com/apache/kafka/pull/21368#issuecomment-5739063906

   This PR is being marked as stale since it has not had any activity in 90 days. If you
   would like to keep this PR alive, please leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. If no activity
   occurs in the next 30 days, it will be automatically closed.


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17676: Fix NPE when starting tasks after config topic compaction [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21368:
URL: https://github.com/apache/kafka/pull/21368#issuecomment-3857813189

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening 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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-17676: Fix NPE when starting tasks after config topic compaction [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21368:
URL: https://github.com/apache/kafka/pull/21368#issuecomment-5754965949

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening 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: jira-unsubscribe@kafka.apache.org

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