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/31 22:56:20 UTC

[GitHub] [pulsar] poorbarcode opened a new pull request, #17380: [fix][flaky-test]CompactedTopicTest.testReadCompleteMessagesDuringTopicUnloading

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

   ### Motivation
   
   ![截屏2022-08-30 18 29 31](https://user-images.githubusercontent.com/25195800/187793261-bc2014c4-895e-4935-ad01-511e8557be3e.png)
   
   <strong>(High light)</strong>  The `reader` created later than calling `triggerCompaction`. Before the reader creates, the task “Clear the ledger that has been consumed” maybe already executed asynchronously.
   
   https://github.com/apache/pulsar/blob/d4beae72d608bafaebe7ac1cff0a258238e84f10/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactedTopicTest.java#L754-L778
   
   
   The error execution flow is as follows: 
   
   producer: 
   - send 1000 messages ( ledger-1 )
   -  unload the topic.
   - send 1000 messages (ledger-2)
   
   reader:
   - read 500 messages
   - auto acknowledgment
   - calculate the next read position: 
     - `getNextValidPosition(position)` At this time the ledger-1 has been deleted, so `getNextValidPosition(position)` will return `(originalLedger+1:0)`
   - read `(ledger-2:0)`, then error occur
   
   
   ### Modifications
   
   - Create a consumer to generate a durable cursor, to avoid deleting the ledger before the reader receives.
   - Make the reader creates before calling `triggerCompaction`
   
   ### Documentation
   
   - [ ] `doc-required` 
     
   - [x] `doc-not-needed` 
   
   - [ ] `doc` 
   
   - [ ] `doc-complete`


-- 
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 #17380: [fix][flaky-test]CompactedTopicTest.testReadCompleteMessagesDuringTopicUnloading

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

   /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] lhotari commented on pull request #17380: [fix][flaky-test]CompactedTopicTest.testReadCompleteMessagesDuringTopicUnloading

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

   Thank you @poorbarcode 


-- 
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] lhotari merged pull request #17380: [fix][flaky-test]CompactedTopicTest.testReadCompleteMessagesDuringTopicUnloading

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


-- 
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 #17380: [fix][flaky-test]CompactedTopicTest.testReadCompleteMessagesDuringTopicUnloading

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

   /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 #17380: [fix][flaky-test]CompactedTopicTest.testReadCompleteMessagesDuringTopicUnloading

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

   rebase master


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