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

[fix] [log] Do not print error log if tenant/namespace does not exist when calling get topic metadata #23291

Merged

Conversation

poorbarcode
Copy link
Contributor

Motivation & Modifications

If users trying to use a tenant that does not exist, the broker should not print an error-level log.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added this to the 4.0.0 milestone Sep 12, 2024
@poorbarcode poorbarcode self-assigned this Sep 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 12, 2024
@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode poorbarcode force-pushed the fix/correct_error_if_ns_not_exists branch from 426a731 to 3813b93 Compare September 27, 2024 01:40
@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 68.18182% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.55%. Comparing base (bbc6224) to head (3813b93).
Report is 606 commits behind head on master.

Files with missing lines Patch % Lines
...va/org/apache/pulsar/broker/service/ServerCnx.java 68.18% 5 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23291      +/-   ##
============================================
+ Coverage     73.57%   74.55%   +0.97%     
- Complexity    32624    33928    +1304     
============================================
  Files          1877     1934      +57     
  Lines        139502   145045    +5543     
  Branches      15299    15851     +552     
============================================
+ Hits         102638   108135    +5497     
+ Misses        28908    28628     -280     
- Partials       7956     8282     +326     
Flag Coverage Δ
inttests 27.57% <0.00%> (+2.98%) ⬆️
systests 24.54% <0.00%> (+0.22%) ⬆️
unittests 73.92% <68.18%> (+1.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...va/org/apache/pulsar/broker/service/ServerCnx.java 72.55% <68.18%> (+0.40%) ⬆️

... and 605 files with indirect coverage changes

@poorbarcode poorbarcode merged commit 5583102 into apache:master Sep 27, 2024
51 checks passed
lhotari pushed a commit that referenced this pull request Oct 4, 2024
… when calling get topic metadata (#23291)

(cherry picked from commit 5583102)
lhotari pushed a commit that referenced this pull request Oct 4, 2024
… when calling get topic metadata (#23291)

(cherry picked from commit 5583102)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 15, 2024
… when calling get topic metadata (apache#23291)

(cherry picked from commit 5583102)
(cherry picked from commit 3ec6eea)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 16, 2024
… when calling get topic metadata (apache#23291)

(cherry picked from commit 5583102)
(cherry picked from commit 3ec6eea)
RobertIndie pushed a commit to apache/pulsar-client-python that referenced this pull request Oct 31, 2024
After apache/pulsar#23291, which is included in Pulsar 4.0.0, when the tenant does not exist, the broker will respond with `BrokerMetadataError`, which is retryable.

Before that, the error code is `AuthorizationError`, which is not retryable so that `create_producer` will fail immediately.

This patch fixes the `test_send_failure` to assert the error is `Timeout`. Additional, separate some tests from `pulsar_test.py`:
1. debug logger tests will affect other tests so that all tests will print debug logs
2. running `schema_test` in `pulsar_test` might have unexpected failures like

```
Failed to create ConsumerImpl for persistent://public/default/my-python-pattern-consumer-3-partition-0: Failed to create steady_timer: kqueue: Too many open files [system:24]
Failed when subscribed to topic persistent://public/default/my-python-pattern-consumer-3 in TopicsConsumer. Error - ConnectError
Unable to create Consumer - [Muti Topics Consumer: TopicName - persistent://public/default/my-python-pattern-consumer.* - Subscription - my-pattern-consumer-sub] Error - ConnectError
Failed to retry lookup for get-partition-metadata-persistent://public/default/my-v2-topic-producer-consumer: Failed to create steady_timer: kqueue: Too many open files [system:24]
Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/my-v2-topic-producer-consumer -- ConnectError
Failed to retry lookup for get-partition-metadata-persistent://public/default/my-v2-topic-producer-consumer: Failed to create steady_timer: kqueue: Too many open files [system:24]
Error Checking/Getting Partition Metadata while Subscribing on persistent://public/default/my-v2-topic-producer-consumer -- ConnectError
Failed to retry lookup for get-partition-metadata-persistent://public/default/test_has_message_available_after_seek-1730263910.78957: Failed to create steady_timer: kqueue: Too many open files [system:24]
Error Checking/Getting Partition Metadata while creating producer on persistent://public/default/test_has_message_available_after_seek-1730263910.78957 -- ConnectError
Failed to retry lookup for get-partition-metadata-persistent://public/default/test_seek_latest_message_id-1730263910.789991: Failed to create steady_timer: kqueue: Too many open files [system:24]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants