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][broker] Support customized shadow managed ledger implementation #23179

Merged

Conversation

BewareMyPower
Copy link
Contributor

Motivation

There is still an instanceof operation on ShadowManagedLedgerImpl in the main code, so users cannot implement their own shadow managed ledger.

Modifications

Replace the type check with the source topic check.

Documentation

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

Matching PR in forked repository

PR in forked repository:

…tion

### Motivation

There is still an `instanceof` operation on `ShadowManagedLedgerImpl` in
the main code, so users cannot implement their own shadow managed ledger.

### Modifications

Replace the type check with the source topic check.
@lhotari
Copy link
Member

lhotari commented Aug 16, 2024

Error in flaky test suite:

Error:    Run 2: NamespaceServiceTest.testSplitMapWithRefreshedStatMap:213 » NullPointer Cannot invoke "org.apache.bookkeeper.mledger.ManagedLedgerConfig.getShadowSource()" because the return value of "org.apache.bookkeeper.mledger.ManagedLedger.getConfig()" is null

@BewareMyPower
Copy link
Contributor Author

Let me fix the failed tests

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.57%. Comparing base (bbc6224) to head (954f4fc).
Report is 529 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23179      +/-   ##
============================================
+ Coverage     73.57%   74.57%   +1.00%     
- Complexity    32624    33665    +1041     
============================================
  Files          1877     1921      +44     
  Lines        139502   144486    +4984     
  Branches      15299    15809     +510     
============================================
+ Hits         102638   107754    +5116     
+ Misses        28908    28480     -428     
- Partials       7956     8252     +296     
Flag Coverage Δ
inttests 27.59% <0.00%> (+3.00%) ⬆️
systests 24.70% <0.00%> (+0.38%) ⬆️
unittests 73.93% <100.00%> (+1.09%) ⬆️

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

Files Coverage Δ
...sar/broker/service/persistent/PersistentTopic.java 79.30% <100.00%> (+0.84%) ⬆️

... and 507 files with indirect coverage changes

@BewareMyPower BewareMyPower merged commit 7f04364 into apache:master Aug 16, 2024
51 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/fix-custom-shadow-ml branch August 16, 2024 15:30
lhotari pushed a commit that referenced this pull request Aug 16, 2024
lhotari pushed a commit that referenced this pull request Aug 16, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 22, 2024
…tion (apache#23179)

(cherry picked from commit 7f04364)
(cherry picked from commit 4196195)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 23, 2024
…tion (apache#23179)

(cherry picked from commit 7f04364)
(cherry picked from commit 4196195)
grssam pushed a commit to grssam/pulsar that referenced this pull request Sep 4, 2024
@lhotari lhotari added this to the 4.0.0 milestone Oct 14, 2024
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.

5 participants