Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-18036: [Bug] consumer backlog eviction policy should not reset read position of the consumer #4991

Open
2 tasks done
sijie opened this issue Oct 13, 2022 · 0 comments
Open
2 tasks done
Labels

Comments

@sijie
Copy link
Member

sijie commented Oct 13, 2022

Original Issue: apache#18036


Search before asking

  • I searched in the issues and found nothing similar.

Version

  • Pulsar: latest
  • JDK: 17

Minimal reproduce step

  • Run unit test: org.apache.pulsar.broker.service.BacklogQuotaManagerTest#testConsumerBacklogEvictionTimeQuota

What did you expect to see?

  1. The backlog eviction policy should not the reset read position of the consumer. It is due to wrong method for resetting mark delete position.
  2. Reduce the resetting mark delete position request.

What did you see instead?

    1. When I run the unit test, I found the cursor c1 's read position was reset by BacklogQuotaManager. The backlog eviction policy should not the reset read position of the consumer. See the following log.
2022-10-13T17:50:37,488 - INFO  - [pulsar-backlog-quota-checker-64-1:BacklogQuotaManager@89] - Backlog quota type message_age exceeded for topic [persistent://prop/ns-quota/topic3c8347406-bbe5-40e9-9f08-eced5d838a42]. Applying [consumer_backlog_eviction] policy
2022-10-13T17:50:37,492 - INFO  - [BookKeeperClientWorker-OrderedExecutor-1-0:ManagedCursorImpl@1193] - [prop/ns-quota/persistent/topic3c8347406-bbe5-40e9-9f08-eced5d838a42] Initiate reset position to 1:0 on cursor c1

2022-10-13T17:50:37,628 - INFO  - [bookkeeper-ml-scheduler-OrderedScheduler-1-0:ManagedCursorImpl$30@2963] - [prop/ns-quota/persistent/topic3c8347406-bbe5-40e9-9f08-eced5d838a42] Updated cursor c1 with ledger id 3 md-position=0:-1 rd-position=2:4
2022-10-13T17:50:37,795 - INFO  - [BookKeeperClientWorker-OrderedExecutor-1-0:ManagedCursorImpl@1193] - [prop/ns-quota/persistent/topic3c8347406-bbe5-40e9-9f08-eced5d838a42] Initiate reset position to 2:0 on cursor c1
2022-10-13T17:50:37,799 - INFO  - [BookKeeperClientWorker-OrderedExecutor-1-0:ManagedCursorImpl$9@1245] - [prop/ns-quota/persistent/topic3c8347406-bbe5-40e9-9f08-eced5d838a42] reset position to 2:0 skipping from current read position 1:0 on cursor c1

    1. There are a lot of redundant reset mark delete position requests in the log.

image

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@sijie sijie added the type/bug label Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant