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

[#3051] fix(kafka-catalog): Make the catalog creation failure exception more accurate #3060

Merged
merged 3 commits into from
Apr 20, 2024

Conversation

mchades
Copy link
Contributor

@mchades mchades commented Apr 20, 2024

What changes were proposed in this pull request?

  • postpone default schema creation after admin client
  • reduced exception nesting

Why are the changes needed?

Fix: #3015

Does this PR introduce any user-facing change?

yes, when the Kafka catalog creation fails, use the correct error message

How was this patch tested?

IT added

@mchades mchades self-assigned this Apr 20, 2024
@mchades mchades requested a review from yuqi1129 April 20, 2024 07:12
@@ -132,8 +134,16 @@ public void initialize(Map<String, String> config, CatalogInfo info) throws Runt
AdminClientConfig.CLIENT_ID_CONFIG,
String.format(CLIENT_ID_TEMPLATE, config.get(ID_KEY), info.namespace(), info.name()));

try {
adminClient = AdminClient.create(adminClientConfig);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the timeout? The web page has hang here for a long time if I use a wrong broker address.
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a UI problem or a backend problem?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backend. From the backend log, the list opearation block(retry) for a long time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because you are listing all the topics, the default API timeout is 1 minute, should I set it to a shorter time?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to shorten the time here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we create a new issue to track this? Since is already a list topics operation, not a create catalog issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we create a new issue to track this? Since is already a list topics operation, not a create catalog issue

Agree, a separate issue may be better.

@yuqi1129
Copy link
Contributor

Besides, you'd better change the folloing code as well.
image

@jerryshao
Copy link
Contributor

@yuqi1129 do you want to take another look?

@yuqi1129
Copy link
Contributor

@yuqi1129 do you want to take another look?

I have verified it, I'm okay with the changed.

@jerryshao jerryshao merged commit 4ea0731 into apache:main Apr 20, 2024
22 checks passed
diqiu50 pushed a commit to diqiu50/gravitino that referenced this pull request Jun 13, 2024
…xception more accurate (apache#3060)

### What changes were proposed in this pull request?

- postpone default schema creation after admin client
- reduced exception nesting

### Why are the changes needed?

Fix: apache#3015 

### Does this PR introduce _any_ user-facing change?

yes, when the Kafka catalog creation fails, use the correct error
message

### How was this patch tested?

IT added
@mchades mchades deleted the issue-3015 branch November 22, 2024 03:40
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 this pull request may close these issues.

[Bug report] Unexpected error message when create kafka catalog with nonsense "bootstrap.servers" value
3 participants