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

[improve][cli] topic offline internal-info provide schema ledger info #19883

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rdhabalia
Copy link
Contributor

@rdhabalia rdhabalia commented Mar 21, 2023

Motivation

There are many cases when a broker is not able to load the topic successfully and it requires examining the metadata of topic/schema/managed-ledger etc for example: #19882 . But all such metadata is stored in binary in metadata/zk and it really requires to broker admin API to fetch internal info of the topic. Therefore, issue like in PR# 19882 requires users to retrieve schema ledger metadata for further debugging even if topic is not successfully loaded. so, add topic's schema metadata into topic's internal-info API which doesn't depend on loaded topic.

Modifications

Add schema ledger metadata into topics' offline internal-metadata api.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

@rdhabalia rdhabalia added this to the 3.0.0 milestone Mar 21, 2023
@rdhabalia rdhabalia self-assigned this Mar 21, 2023
@poorbarcode
Copy link
Contributor

Since we will start the RC version of 3.0.0 on 2023-04-11, I will change the label/milestone of PR who have not been merged.

  • The PR of type feature is deferred to 3.1.0
  • The PR of type fix is deferred to 3.0.1

So drag this PR to 3.1.0

@poorbarcode poorbarcode modified the milestones: 3.0.0, 3.1.0 Apr 10, 2023
@github-actions
Copy link

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

@github-actions github-actions bot added the Stale label May 11, 2023
@tisonkun tisonkun requested a review from liudezhi2098 June 12, 2023 14:19
@@ -1455,6 +1457,22 @@ public void getInfoFailed(ManagedLedgerException exception, Object ctx) {
return null;
});

// Schema store ledgers
Copy link
Member

Choose a reason for hiding this comment

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

@liudezhi2098 I remember you have similar experience in debugging meta infos. Do you think this patch is good to go? I'm a bit uncertain due to it add a heavy operation on CLI command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm a bit uncertain due to it add a heavy operation on CLI command.

heavy operation? CLI command is client tool and it just prints the output at client side which should not cause any heavy CPU/IP/Memroy pressure.

@Technoboy- Technoboy- modified the milestones: 3.1.0, 3.2.0 Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 81.48148% with 5 lines in your changes missing coverage. Please review.

Project coverage is 74.50%. Comparing base (bbc6224) to head (5903aae).
Report is 636 commits behind head on master.

Files with missing lines Patch % Lines
...pulsar/broker/admin/impl/PersistentTopicsBase.java 71.42% 3 Missing and 1 partial ⚠️
.../apache/pulsar/broker/stats/TopicInternalInfo.java 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #19883      +/-   ##
============================================
+ Coverage     73.57%   74.50%   +0.93%     
- Complexity    32624    34549    +1925     
============================================
  Files          1877     1938      +61     
  Lines        139502   145456    +5954     
  Branches      15299    15898     +599     
============================================
+ Hits         102638   108378    +5740     
+ Misses        28908    28766     -142     
- Partials       7956     8312     +356     
Flag Coverage Δ
inttests 27.41% <0.00%> (+2.83%) ⬆️
systests 24.47% <0.00%> (+0.14%) ⬆️
unittests 73.87% <81.48%> (+1.02%) ⬆️

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

Files with missing lines Coverage Δ
.../apache/pulsar/broker/stats/TopicInternalInfo.java 92.30% <92.30%> (ø)
...pulsar/broker/admin/impl/PersistentTopicsBase.java 69.55% <71.42%> (+4.10%) ⬆️

... and 619 files with indirect coverage changes

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.

8 participants