You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "daehokimm (via GitHub)" <gi...@apache.org> on 2023/06/14 11:55:19 UTC

[GitHub] [kafka] daehokimm opened a new pull request, #13853: KAFKA-15088: Fixing Incorrect Reference Usage in Connector State Changes

daehokimm opened a new pull request, #13853:
URL: https://github.com/apache/kafka/pull/13853

   Currently, in the AbstractHerder class, the behavior of state changes for Connectors and Tasks is handled by implementing Listener using the ConnectorStatus and TaskStatus classes, which inherit from AbstractStatus. However, the code implementing the state change behavior in ConnectorStatus refers to and uses an inappropriate State enum class.
   
   Both ConnectorStatus and TaskStatus inherit and implement AbstractStatus, and as a result, they share the State class. However, there is a need to make modifications for clear referencing. We need to fix the implementation in ConnectorStatus to use the appropriate reference for state changes.
   
   This bug ticket will address the task of modifying the code to use the correct reference for Connector state changes.
   
   ### 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.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] gharris1727 commented on pull request #13853: KAFKA-15088: Fixing Incorrect Reference Usage in Connector State Changes

Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 commented on PR #13853:
URL: https://github.com/apache/kafka/pull/13853#issuecomment-1632939211

   Hey @daehokimm Thanks for the PR!
   
   I think that there is some semantic difference between `AbstractStatus.State` and `ConnectorStatus.State`, and certainly between `ConnectorStatus.State` and `TaskStatus.State`. Unfortunately Java doesn't seem to think so: there's no difference in the type-checker to separate these different types. Without the type-checker to enforce this, I don't think we're going to catch all of the mistakes that already exist, or prevent new ones from being added.
   
   What do you think about refactoring this AbstractStatus.State into distinct enums? It would help us to find all of the other places that this typo may exist.


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


[GitHub] [kafka] C0urante commented on pull request #13853: KAFKA-15088: Fixing Incorrect Reference Usage in Connector State Changes

Posted by "C0urante (via GitHub)" <gi...@apache.org>.
C0urante commented on PR #13853:
URL: https://github.com/apache/kafka/pull/13853#issuecomment-1642271686

   The refactor that @gharris1727 is suggesting here would also be nice since it would allow us to establish states that are only applicable to `Connector` or `Task` instances. There's a use case for this that exists today: the `STOPPED` state will only ever be visible for `Connector` instances, and never for `Tasks`, so it doesn't really make sense to use the same state enum for the two.


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


[GitHub] [kafka] vamossagar12 commented on pull request #13853: KAFKA-15088: Fixing Incorrect Reference Usage in Connector State Changes

Posted by "vamossagar12 (via GitHub)" <gi...@apache.org>.
vamossagar12 commented on PR #13853:
URL: https://github.com/apache/kafka/pull/13853#issuecomment-1591072071

   @daehokimm ,nice catch, thanks for the PR. LGTM


-- 
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-15088: Fixing Incorrect Reference Usage in Connector State Changes [kafka]

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

   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 ask a committer for review. If the PR has  merge conflicts, please update it with the latest from trunk (or appropriate release branch) <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