GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [fix][meta] Retry failed leader election session revalidation by poorbarcode · Pull Request #27593 · apache/pulsar

Conversation

@poorbarcode

@poorbarcode poorbarcode commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Background

During a coordinator failover test, the election participant reacquired its ephemeral node after reconnecting. Its next session revalidation hit a transient metadata read failure. Even after the store recovered, the election made no further reads until another session event arrived.

Motivation

Revalidation sets the election to ElectionInProgress. A failed read can leave it there, and the handler for a later node deletion can then skip starting a new election. Broker leader election, the extensible load manager's channel owner and other users of LeaderElection need a way to recover when the metadata store becomes available again. #27580 addresses the separate v5 handshake ownership check.

Modifications

  • Retry a failed session revalidation after five seconds on the existing election executor. Serialize attempts with session notifications and keep one retry pending per election. A successful read ends the retry sequence.
  • Invalidate pending retries on a newer session event or when the election closes. A timer or a failed read from before close cannot restart retries on a reopened election.
  • On unpatched master, the regression test observed zero scheduled retries after the injected read failure. On this branch it verifies one read per retry interval, recovery without another session event, and cancellation on close. Across the metadata and broker suites, 136 targeted cases passed with test retries disabled, including channel-owner failover and recovery in the extensible load manager. The repository-wide quickCheck passed. Actual Oxia session failover remains untested.

Does this pull request potentially affect one of the following parts:

  • 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@poorbarcode
[fix][meta] Retry failed leader election session revalidation
a4ffce0
Assisted-by: OpenAI Codex
@poorbarcode poorbarcode added ready-to-test release/4.2.6 release/4.0.15 release/5.0.2 labels Nov 12, 2026
@poorbarcode poorbarcode self-assigned this Nov 12, 2026
@poorbarcode poorbarcode mentioned this pull request Nov 12, 2026
[fix][broker] Accept v5 transaction coordinator handshakes only on the elected leader #27580
Merged
1 of 10 tasks
@poorbarcode poorbarcode removed release/4.2.6 release/4.0.15 labels Nov 12, 2026
@poorbarcode poorbarcode added this to the 5.1.0 milestone Nov 12, 2026
@poorbarcode poorbarcode added release/4.2.6 release/4.0.15 labels Nov 12, 2026
codelipenghui
codelipenghui approved these changes Nov 12, 2026
View reviewed changes
@poorbarcode
poorbarcode merged commit c243267 into apache:master Nov 12, 2026
44 checks passed

Uh oh!

There was an error while loading. Please reload this page.

poorbarcode added a commit that referenced this pull request Nov 12, 2026
@poorbarcode
[fix][meta] Retry failed leader election session revalidation (#27593)
65f6bec
(cherry picked from commit c243267)
@poorbarcode poorbarcode added the cherry-picked/branch-5.0 label Nov 12, 2026
poorbarcode added a commit that referenced this pull request Nov 12, 2026
@poorbarcode
[fix][meta] Retry failed leader election session revalidation (#27593)
a312fe0
(cherry picked from commit c243267)
poorbarcode added a commit that referenced this pull request Nov 12, 2026
@poorbarcode
[fix][meta] Retry failed leader election session revalidation (#27593)
ccc21b1
(cherry picked from commit c243267)
@poorbarcode poorbarcode added cherry-picked/branch-4.0 cherry-picked/branch-4.2 labels Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@codelipenghui codelipenghui codelipenghui approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@poorbarcode poorbarcode

Labels

cherry-picked/branch-4.0 cherry-picked/branch-4.2 cherry-picked/branch-5.0 ready-to-test release/4.0.15 release/4.2.6 release/5.0.2

Projects

None yet

Milestone

5.1.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@poorbarcode @codelipenghui
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.