Skip to content

[fix][broker] Apply dedup disable after recovery#25982

Open
Denovo1998 wants to merge 1 commit into
apache:masterfrom
Denovo1998:dedup_recovery_policy_convergence
Open

[fix][broker] Apply dedup disable after recovery#25982
Denovo1998 wants to merge 1 commit into
apache:masterfrom
Denovo1998:dedup_recovery_policy_convergence

Conversation

@Denovo1998

Copy link
Copy Markdown
Contributor

Motivation

Message deduplication recovery now returns the active recovery future when another checkStatus() call observes Recovering. However, if the topic policy changes to disable deduplication while recovery is still in progress, the second check only waits for the recovery future and does not apply the new disabled target state.

As a result, recovery can complete as Enabled, leaving deduplication active until another status check happens.

Modifications

  • Re-check deduplication status after an in-progress recovery completes when the desired policy has changed to disabled.
  • Allow disabled policy handling to clean up from Failed status as well as Enabled.
  • Add broker deduplication state-machine tests for policy changes during successful and failed recovery.

Verifying this change

  • ./gradlew :pulsar-broker:test --tests org.apache.pulsar.broker.BrokerMessageDeduplicationTest --rerun-tasks

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants