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] Wrong label random generation method leads to illegal doris label #420

Open
3 tasks done
monologuist opened this issue Jul 10, 2024 · 0 comments
Open
3 tasks done

Comments

@monologuist
Copy link

monologuist commented Jul 10, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

Doris:2.1
doris-flink-connector:1.5.0+
Flink:1.16.2
Flink CDC: 3.0.1

What's Wrong?

I use Flink+Flink CDC to synchronize data from MySQL to Doris.
I found that Doris's label generator generates a label name like this: label _7_test_cust_d547cac0-d2d8-4705-8769-d1a03d364272.
This label contains an illegal "-" hyphen.
Such a label name is not recognized and accepted by Doris.
When you need to clean this label, an error will be generated: Encountered:-
image

image

By reading the source code, I found that many label generation methods in the LabelGenerator class use the UUID.randomUUID() method to generate random numbers. This is where the "-" symbol is introduced. [1]

[1] UUID is usually a string containing 32 hexadecimal characters in the following form:
550e8400-e29b-41d4-a716-446655440000
Each UUID consists of five parts, separated by hyphens "-".

I think this is a problem and needs to be fixed.

What You Expected?

Replace the "-" in label with "_" to ensure the generation of a legal random label.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

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

Successfully merging a pull request may close this issue.

1 participant