Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][DataProxy] The topic name generated by dataproxy is incorrect #8192

Closed
1 of 2 tasks
fuweng11 opened this issue Jun 8, 2023 · 3 comments · Fixed by #8194
Closed
1 of 2 tasks

[Bug][DataProxy] The topic name generated by dataproxy is incorrect #8192

fuweng11 opened this issue Jun 8, 2023 · 3 comments · Fixed by #8194
Assignees
Labels
Milestone

Comments

@fuweng11
Copy link
Contributor

fuweng11 commented Jun 8, 2023

What happened

The topic name generated by dataproxy is incorrect.
The following is the logic for creating kakfa topic on the manager side:
1.Get streamInfo.mqResource.
2.If streamInfo.mqResource equal to streamId, set topic to groupInfo.mqResource.streamInfo.mqResource

What you expected to happen

The topic name generated by dataproxy is incorrect.
The following is the logic for creating kakfa topic on the manager side:
1.Get streamInfo.mqResource.
2.If streamInfo.mqResource equal to streamId, set topic to groupInfo.mqResource.streamInfo.mqResource

How to reproduce

Set streamInfo.mqResource to rain streamId inconsistent.

Environment

No response

InLong version

master

InLong Component

InLong DataProxy

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

@fuweng11 fuweng11 added the type/bug Something is wrong label Jun 8, 2023
@fuweng11
Copy link
Contributor Author

fuweng11 commented Jun 8, 2023

@fuweng11, I don't understand, the implementation[1] image

is actually directly migrated [2]: image

Is there a problem with the previous logic, then why is there no error reported?

  1. https://github.com/apache/inlong/blob/master/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/holder/MetaConfigHolder.java#L375
  2. https://github.com/apache/inlong/blob/branch-1.7/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/mq/kafka/KafkaHandler.java#L150

Yes, this problem was not discovered before because if streamInfo.mqResource is not set when the stream is created, the manager side will automatically set streamId to streamInfo.mqResource, and in most cases streamId and streamInfo.mqResource` are the same.

企业微信截图_e36ff000-18c9-47d5-9f3f-e2cd97749651

https://github.com/apache/inlong/blob/master/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/kafka/KafkaResourceOperators.java#L115

@gosonzhang
Copy link
Contributor

@fuweng11, ok, got it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants