You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/28 09:27:33 UTC
[GitHub] [pulsar] RobertIndie opened a new pull request #14489: [Test] Use precise backlog when getting stats in the test.
RobertIndie opened a new pull request #14489:
URL: https://github.com/apache/pulsar/pull/14489
Fix: #13952
### Motivation
#14000 didn't fix issue #13952 . The root cause is that the backlog obtained by the admin is not precise.
In the `BacklogQuotaManagerTest`, the message backlog in stats obtained from the admin may not be precise. This causes them to become flaky tests. We need to get the precise backlog in the test.
Here is a more deep investigation for #13952 :
```
2022-02-28T16:46:19,368+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [prop/ns-quota/persistent/topic3] Consumer c2 cursor ml-entries: 14 -- deleted-counter: 9 other counters: mdPos 4:-1 rdPos 4:0
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [prop/ns-quota/persistent/topic3] getNumberOfEntries. (4:-1..4:3] allEntries: 4
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [prop/ns-quota/persistent/topic3] Found 4 entries - deleted: 0
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - Precise result: 4
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.pulsar.broker.service.persistent.PersistentSubscription - stats.msgBacklog: 5
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [prop/ns-quota/persistent/topic3] Consumer c1 cursor ml-entries: 14 -- deleted-counter: 10 other counters: mdPos 4:-1 rdPos 4:0
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [prop/ns-quota/persistent/topic3] getNumberOfEntries. (4:-1..4:3] allEntries: 4
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [prop/ns-quota/persistent/topic3] Found 4 entries - deleted: 0
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - Precise result: 4
2022-02-28T16:46:19,369+0800 [pulsar-web-63-14] INFO org.apache.pulsar.broker.service.persistent.PersistentSubscription - stats.msgBacklog: 4
2022-02-28T16:46:19,371+0800 [pulsar-web-63-14] INFO org.eclipse.jetty.server.RequestLog - 127.0.0.1 - - [28/Feb/2022:16:46:19 +0800] "GET /admin/v2/persistent/prop/ns-quota/topic3/stats?getPreciseBacklog=false&subscriptionBacklogSize=false&getEarliestTimeInBacklog=false HTTP/1.1" 200 3878 "-" "Pulsar-Java-v2.10.0-SNAPSHOT" 4
```
In the above log, we can see that the backlog value obtained with the precise backlog turned on(shown in the log with `precise result`) is not the same as the inaccurate backlog value(shown in the log with `stats.msgBacklog`). This is the root cause of this flaky test.
### Modifications
* Use precise backlog when getting stats in the test.
### Documentation
- [x] `no-need-doc`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #14489: [Test] Use precise backlog when getting stats in the test.
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14489:
URL: https://github.com/apache/pulsar/pull/14489#issuecomment-1083988053
The pr had no activity for 30 days, mark with Stale label.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org