-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[feat][broker]PIP-180 Shadow Topic - Part V - Support shadow topic creation. #17711
Conversation
/pulsarbot run-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, thanks for your great work!
I left some comments. and I also have a question, hope you can answer.
Question:
Sorry for missing previous PRs. Can we shadow the shadowed topic?
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/MetaStoreImpl.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/MetaStoreImpl.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Outdated
Show resolved
Hide resolved
return MapUtils.getString(properties, PROPERTY_SOURCE_TOPIC_KEY); | ||
} | ||
|
||
public static final String PROPERTY_SOURCE_TOPIC_KEY = "PULSAR.SHADOW_SOURCE"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppercase or lowercase? I remember the replicator being lowercase. But I'm not sure which is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would appear in topic property. I think uppercase should cause less conflict.
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
@mattisonchao |
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ShadowTopicTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ShadowTopicTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ShadowTopicTest.java
Show resolved
Hide resolved
@AnonHxy @mattisonchao PTAL |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/pulsarbot run-failure-checks |
|
||
@Override | ||
synchronized void initialize(ManagedLedgerInitializeLedgerCallback callback, Object ctx) { | ||
// TODO: ShadowManagedLedger has different initialize process from normal ManagedLedger, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should avoid TODOs and try to implement full PR or make it extendable PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should avoid TODOs and try to implement full PR or make it extendable PR.
@rdhabalia This would make PIP-180 a very huge PR and very hard to review. The next PR is coming up and have implemented this.
this PR introduced test failure: |
Master Issue: #16153
Motivation
The main purpose of this part is to support shadow topic creation.
Note:
Modifications
Key changes:
checkOwnershipAndCreatePersistentTopic
createShadowTopic
andgetShadowSource
ShadowManagedLedgerImpl
, but it's not implemented yet. It's quite complicated and it will be implemented in the following PRs.Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
Java doc added in
pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
doc-complete
(Docs have been already added)
Matching PR in forked repository
PR in forked repository:Jason918#7