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] fix the vague response if topic not found #20932

Merged

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Aug 4, 2023

Motivation

When I did this test below and got the error "Topic not found".

pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();

I do create the topic persistent://public/default/tp_1 first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic persistent://public/default/tp_1-sub1-RETRY was not created.

Modifications

clear the vague response if the topic is not founded.

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode self-assigned this Aug 4, 2023
@poorbarcode poorbarcode added this to the 3.2.0 milestone Aug 4, 2023
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 4, 2023
@poorbarcode poorbarcode changed the title [fix] [admin] fix the vague response if topic not found [fix] [log] fix the vague response if topic not found Aug 4, 2023
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@AnonHxy
Copy link
Contributor

AnonHxy commented Nov 28, 2023

/pulsarbot run-failure-checks

@AnonHxy AnonHxy closed this Nov 28, 2023
@AnonHxy AnonHxy reopened this Nov 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

Merging #20932 (eb40ee5) into master (e1d06b5) will increase coverage by 36.50%.
The diff coverage is 60.00%.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #20932       +/-   ##
=============================================
+ Coverage     36.83%   73.33%   +36.50%     
- Complexity      376    32712    +32336     
=============================================
  Files          1715     1892      +177     
  Lines        131097   140705     +9608     
  Branches      14318    15494     +1176     
=============================================
+ Hits          48288   103185    +54897     
+ Misses        76424    29405    -47019     
- Partials       6385     8115     +1730     
Flag Coverage Δ
inttests 24.10% <20.00%> (-0.14%) ⬇️
systests 24.70% <20.00%> (-0.23%) ⬇️
unittests 72.64% <60.00%> (+40.77%) ⬆️

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

Files Coverage Δ
...g/apache/pulsar/broker/lookup/TopicLookupBase.java 68.75% <100.00%> (+21.89%) ⬆️
...he/pulsar/broker/admin/v1/NonPersistentTopics.java 66.66% <50.00%> (+66.66%) ⬆️
...va/org/apache/pulsar/broker/service/ServerCnx.java 72.15% <80.00%> (+31.42%) ⬆️
...che/pulsar/broker/admin/impl/TransactionsBase.java 73.25% <50.00%> (+73.25%) ⬆️
...he/pulsar/broker/admin/v2/NonPersistentTopics.java 62.21% <0.00%> (+34.43%) ⬆️

... and 1456 files with indirect coverage changes

@poorbarcode poorbarcode force-pushed the fix/clearly_error_of_topic_not_found branch from 8760ce9 to eb40ee5 Compare November 28, 2023 15:22
@poorbarcode
Copy link
Contributor Author

rebase master

@poorbarcode poorbarcode merged commit 1a024bc into apache:master Nov 28, 2023
48 checks passed
@poorbarcode poorbarcode deleted the fix/clearly_error_of_topic_not_found branch November 28, 2023 17:56
poorbarcode added a commit that referenced this pull request Nov 28, 2023
### Motivation

When I did this test below and got the error "Topic not found".

```java
pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();
```

I do create the topic `persistent://public/default/tp_1` first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic `persistent://public/default/tp_1-sub1-RETRY` was not created.

### Modifications

clear the vague response if the topic is not founded.

(cherry picked from commit 1a024bc)
poorbarcode added a commit that referenced this pull request Nov 28, 2023
### Motivation

When I did this test below and got the error "Topic not found".

```java
pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();
```

I do create the topic `persistent://public/default/tp_1` first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic `persistent://public/default/tp_1-sub1-RETRY` was not created.

### Modifications

clear the vague response if the topic is not founded.

(cherry picked from commit 1a024bc)
poorbarcode added a commit that referenced this pull request Nov 28, 2023
### Motivation

When I did this test below and got the error "Topic not found".

```java
pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();
```

I do create the topic `persistent://public/default/tp_1` first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic `persistent://public/default/tp_1-sub1-RETRY` was not created.

### Modifications

clear the vague response if the topic is not founded.

(cherry picked from commit 1a024bc)
poorbarcode added a commit that referenced this pull request Nov 28, 2023
When I did this test below and got the error "Topic not found".

```java
pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();
```

I do create the topic `persistent://public/default/tp_1` first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic `persistent://public/default/tp_1-sub1-RETRY` was not created.

clear the vague response if the topic is not founded.

(cherry picked from commit 1a024bc)
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Dec 2, 2023
When I did this test below and got the error "Topic not found".

```java
pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();
```

I do create the topic `persistent://public/default/tp_1` first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic `persistent://public/default/tp_1-sub1-RETRY` was not created.

clear the vague response if the topic is not founded.

(cherry picked from commit 1a024bc)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 20, 2023
### Motivation

When I did this test below and got the error "Topic not found".

```java
pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();
```

I do create the topic `persistent://public/default/tp_1` first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic `persistent://public/default/tp_1-sub1-RETRY` was not created.

### Modifications

clear the vague response if the topic is not founded.

(cherry picked from commit 1a024bc)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 20, 2023
### Motivation

When I did this test below and got the error "Topic not found".

```java
pulsarAdmin.topics().createNonPartitionedTopic("persistent://public/default/tp_1");
Consumer consumer = null;
Consumer consumer = pulsarClient.newConsumer()
          .topic("persistent://public/default/tp_1")
          .subscriptionName("s1")
          .enableRetry(true)
          .subscribe();
```

I do create the topic `persistent://public/default/tp_1` first but got a response "Topic not found", it is confusing.

The root cause is the retry letter topic `persistent://public/default/tp_1-sub1-RETRY` was not created.

### Modifications

clear the vague response if the topic is not founded.

(cherry picked from commit 1a024bc)
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.

None yet

7 participants