-
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
[improve][broker] Supplement schema ledger if schema ledger is lost #20415
base: master
Are you sure you want to change the base?
Conversation
@poorbarcode @congbobo184 @codelipenghui |
The pr had no activity for 30 days, mark with Stale label. |
Waiting to discuss whether this plan is feasible. I will send an email to discuss it later. |
The pr had no activity for 30 days, mark with Stale label. |
In the alternative, the implementation is updated. Needs to be discussed. |
# Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java # pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java
Fixes #20414
Master Issue: ##20414
Motivation
#17221 describes an environment when multiple bookie copies are corrupted, or a Ledger has been deleted. The loss of schema ledger results in new producers and consumers not even being created and working properly.
So we need a solution that does not just skip the schema with the missing ledger, but actually supplements the broken schema ledger.
Modifications
Add a new method
tryCompleteTheLostSchema()
inSchemaStorage
andSchemaRegistry
SchemaStorageFormat.SchemaEntry
built withschemaData
andschemaVersion
.Verifying this change
(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:)
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: Denovo1998#4