Skip to content

Conversation

@merlimat
Copy link
Contributor

Motivation

We're using a 5min TTL for entries stored in the metadata cache. After that time a refresh is triggered in background.
This is done to prevent an entry that could have gone out of sync to remain stale forever.

As an enhancement, if we know that we are not connected to metadata service, we should not attempt the refresh because it would certainly fail. Instead, we wait until we're reconnected back.

@merlimat merlimat added the doc-not-needed Your PR changes do not impact docs label Sep 21, 2021
@merlimat merlimat added this to the 2.9.0 milestone Sep 21, 2021
@merlimat merlimat self-assigned this Sep 21, 2021
Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM

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.

looks great to me

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Sep 23, 2021
@merlimat merlimat merged commit ee1ccf9 into apache:master Sep 23, 2021
@merlimat merlimat deleted the cache-refresh branch September 23, 2021 19:10
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
apache#12120)

* Avoid trying to refresh MetadataCaches when we're disconnected from ZK

* Address comments
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.

3 participants