apache / apache/pulsar

setbacklog will fail if retention policies cache not updated immediately

Open
#15,555 1 comment 0 reactions 0 assignees View on GitHub
Stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. set retention policies which routed to broker 1
2. set backlog policies which routed to broker 2
3. broker 2 checkBacklogQuota which will fail sometimes

![image](https://user-images.githubusercontent.com/2684384/168006030-09758fb0-214d-4152-bc33-7f7c121301be.png)

because the retention cache in broker 2 was updated immediately

**Expected behavior**
A clear and concise description of what you expected to happen.

invalidate the retention cache first

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using the listed retention-policy and backlog-policy routing steps, then inspect the broker handling for retention and backlog quota checks. The fix is complete when the retention cache is invalidated before the backlog policy is checked, preventing the intermittent failure on broker 2.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.