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/08/16 12:24:04 UTC

[GitHub] [pulsar] poorbarcode opened a new pull request, #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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

   Fixes 
   - #11145 
   - #10380
   - #17044
   
   Master Issue: #11145 #10380 #17044
   
   ### Motivation
   
   https://github.com/apache/pulsar/blob/4d7b1acff35a1a131ffeff34e8cec6007f6a2ec9/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java#L145-L150
   
   In addition to calling `internalTrimLedgers` directly in this unit test, the Broker also has scheduled tasks `consumedLedgersMonitor` calling `internalTrimLedgers`.
   
   (<strong>High light</strong>)See the code above, If `consumedLedgersMonitor` call `internalTrimLedgers` before `line:148`:
    the command `topics.getLastMessageId` will return `-1:-1:-1`, then the #11145 #10380 occurs.
   
   
   https://github.com/apache/pulsar/blob/4d7b1acff35a1a131ffeff34e8cec6007f6a2ec9/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java#L152-L161
   
   (<strong>High light</strong>)See the code above, If `consumedLedgersMonitor` call `internalTrimLedgers` before `line:161`:
    the command `managedLedger.getLedgersInfoAsList().size()` will return `1`, then the #17044 occurs.
   
   ### Modifications
   
   - Fix flaky test: Make `internalTrimLedgers` never trigger by `consumedLedgersMonitor` before `consumedLedgersMonitor` is triggered manually: disabled policy retention.
   
   https://github.com/apache/pulsar/blob/4d7b1acff35a1a131ffeff34e8cec6007f6a2ec9/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java#L94-L99
   
   - Try to solve another hidden Falky test: See the code above, I think `line:99` may be flaky, because we can't guarantee that `consumedLedgersMonitor --> internalTrimLedgers` will be executed later than `line:99`, so delete `line:99`
   
   
   ### 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 #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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

   /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 #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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

   /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 #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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

   /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 #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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

   /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 #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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

   /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 #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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

   /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] codelipenghui merged pull request #17116: [fix][flaky-test]ConsumedLedgersTrimTest

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


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