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/07/29 20:38:51 UTC

[GitHub] [pulsar] poorbarcode opened a new pull request, #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

poorbarcode opened a new pull request, #16878:
URL: https://github.com/apache/pulsar/pull/16878

   Fixes #9919
   
   Master Issue: #9919
   
   ### Motivation
   
   This is a stubborn problem and it still exists.
   
   recent failure: https://github.com/apache/pulsar/runs/7564370916?check_suite_focus=true#step:10:950
   
   and this one: https://github.com/apache/pulsar/pull/16841/checks?check_run_id=7566225112
   
   Why is this test unstable? 
   
   - The ledgerHandle of the cursor, is not accurately closed, even if it is closed, there is no guarantee that `create ledgerHandle` will not run after `cursor.persistentToLedger`.
   
   https://github.com/apache/pulsar/blob/2d6b534ef72824ffb5b2f76568ca8346bbc058c6/pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/ManagedCursorMetricsTest.java#L98-L100
   
   - This line of below could not guarantee that `cursor.persistentToLedger` has been completed, only that the client has received a response.
   
   https://github.com/apache/pulsar/blob/2d6b534ef72824ffb5b2f76568ca8346bbc058c6/pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/ManagedCursorMetricsTest.java#L108
   
   ### Modifications
   
   I made the following changes in this PR: 
   
   1. Fixed flaky test `ManagedCursorMetricsTest.testManagedCursorMetrics`.
   2. Add more test cases. Only `brk_ml_cursor_persistZookeeperErrors` is left incomplete now, I write the reason in the code comment.
   3. Improves performance, use `@BeforeClass` instead of `BeforeMethod(alwaysRun=true)`
   
   ### Documentation
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [x] `doc-not-needed` 
   (Please explain why)
     
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)


-- 
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] poorbarcode commented on pull request #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #16878:
URL: https://github.com/apache/pulsar/pull/16878#issuecomment-1239003323

   Hi @Jason918 
   
   > Can you help open a new PR to merge this to branch-2.10?
   
   yes, it is https://github.com/apache/pulsar/pull/17504. Note that the `branch-master` logic changes cause the test code for `branch-2.10` to be a little different


-- 
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] poorbarcode commented on pull request #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #16878:
URL: https://github.com/apache/pulsar/pull/16878#issuecomment-1200076001

   /pulsarbot rerun-failure-checks


-- 
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] poorbarcode commented on pull request #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #16878:
URL: https://github.com/apache/pulsar/pull/16878#issuecomment-1200348592

   /pulsarbot rerun-failure-checks


-- 
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] Jason918 commented on pull request #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

Posted by GitBox <gi...@apache.org>.
Jason918 commented on PR #16878:
URL: https://github.com/apache/pulsar/pull/16878#issuecomment-1235036532

   @poorbarcode Can you help open a new PR to merge this to branch-2.10? 


-- 
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] poorbarcode commented on pull request #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #16878:
URL: https://github.com/apache/pulsar/pull/16878#issuecomment-1200398404

   /pulsarbot rerun-failure-checks


-- 
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] poorbarcode commented on pull request #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #16878:
URL: https://github.com/apache/pulsar/pull/16878#issuecomment-1202052531

   @lhotari  Could you take a look ?


-- 
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] Technoboy- merged pull request #16878: [fix][flaky-test]ManagedCursorMetricsTest.testManagedCursorMetrics

Posted by GitBox <gi...@apache.org>.
Technoboy- merged PR #16878:
URL: https://github.com/apache/pulsar/pull/16878


-- 
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