Skip to content
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

PIP-45: Handle session events and invalidations from single thread #12184

Merged

Conversation

merlimat
Copy link
Contributor

Motivation

When we receive session events from the MetadataStoreExtended implementation, we need to process them from a single thread to ensure that the locks and leader revalidations are not happening concurrently.

For example, it possible to receive a SessionEvent.Reconnected immediately followed by a SessionEvent.SessionReestablished. In this case we need to first finish processing the 1st event and complete all the revalidations, then proceeding to the other event, otherwise we'll be having multiple revalidations in flight.

@merlimat merlimat added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages doc-not-needed Your PR changes do not impact docs labels Sep 24, 2021
@merlimat merlimat added this to the 2.9.0 milestone Sep 24, 2021
@merlimat merlimat self-assigned this Sep 24, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@merlimat merlimat merged commit 3f512ea into apache:master Sep 25, 2021
@merlimat merlimat deleted the pip-45-single-thread-handling-session-events branch September 25, 2021 16:18
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…pache#12184)

* PIP-45: Handle session events and invalidations from single thread

* Use iterator instead of stream

* Removed synchronized
aloyszhang pushed a commit to aloyszhang/pulsar that referenced this pull request Jan 9, 2023
…est !188)

Squash merge branch 'release_2.8.1.4_fix_metadata' into 'release-2.8.1.4'
Fixes #<xyz>

### Motivation

chery pick了三个PR:

PIP-45: Handle session events and invalidations from single thread (apache#12184)
[fix][metadata] Set revalidateAfterReconnection true for certain failures apache#17664
[fix][metadata] Cleanup state when lock revalidation gets LockBusyException apache#17700

TAPD: --story=881235137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs release/2.9.0 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants