Skip to content

[fix][broker] Avoid misleading ownership lock expiry logs during shutdown - #26633

Merged
lhotari merged 3 commits into
apache:masterfrom
Denovo1998:ownership-shutdown-log
Oct 1, 2026
Merged

lhotari merged 3 commits into
apache:masterfrom
Denovo1998:ownership-shutdown-log

Conversation

@Denovo1998

Copy link
Copy Markdown
Contributor

Motivation

When broker deregistration fails during shutdown, graceful bundle unloading is skipped and the coordination service releases the remaining ownership locks directly. These locks are still registered in OwnershipCache, so their release callbacks incorrectly report them as expired at INFO level.

This follow-up to #26533 avoids misleading expiry messages during shutdown.

Modifications

  • Log ownership lock expiry at INFO only while the broker is running, and at DEBUG during shutdown.
  • Preserve lock registration removal and ownership cleanup.
  • Add regression tests using a real ZooKeeper server and broker to cover shutdown with failed deregistration and actual lock expiry while running.

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

@Denovo1998
Denovo1998 requested a review from merlimat September 18, 2026 05:59
@Denovo1998

Denovo1998 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor Author

I checked the current flaky, and it doesn't seem to be caused by the changes in this PR. We can rerun the CI.
https://github.com/apache/pulsar/actions/runs/35312975992/job/105779725369?pr=26633

@lhotari lhotari added this to the 5.0.0 milestone Oct 1, 2026
@lhotari
lhotari merged commit 80d27d3 into apache:master Oct 1, 2026
43 checks passed
@Denovo1998
Denovo1998 deleted the ownership-shutdown-log branch October 1, 2026 11:49
ascentstream-bot pushed a commit to ascentstream/pulsar that referenced this pull request Oct 1, 2026
ascentstream-bot pushed a commit to ascentstream/pulsar that referenced this pull request Oct 2, 2026
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.

3 participants