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/03/07 03:57:05 UTC

[GitHub] [pulsar] shibd opened a new pull request #14572: [Flaky-test]: Flush produce before close it.

shibd opened a new pull request #14572:
URL: https://github.com/apache/pulsar/pull/14572


   ### Motivation
   
   #14558 
   
   In the test, the producer sends it async. We should flush it before produce close it. Otherwise, the quantity pulled by consumers may not meet expectations.
   
   ### Modifications
   
   - Flush produce before close it.
   
   ### 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] lhotari edited a comment on pull request #14572: [Flaky-test]: Flush produce before close it.

Posted by GitBox <gi...@apache.org>.
lhotari edited a comment on pull request #14572:
URL: https://github.com/apache/pulsar/pull/14572#issuecomment-1060255584


   > There's another little question, Why is there no flush before close the producer now?
   
   @shibd Good question. The javadoc of Producer#close says "No more writes will be accepted from this producer. Waits until all pending write request are persisted." 
   https://github.com/apache/pulsar/blob/7385ff32e5e11edbeca9adb6f06de0adeab53ece/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Producer.java#L169
   The assumption would be that this would result in a flush under the covers. However when looking at the implementation code, I cannot find how the documented behavior is ensured. It seems that everything in progress is cancelled immediately. There are bug reports #12195 and #11780 about the issue.
   


-- 
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] shibd commented on pull request #14572: [Flaky-test]: Flush produce before close it.

Posted by GitBox <gi...@apache.org>.
shibd commented on pull request #14572:
URL: https://github.com/apache/pulsar/pull/14572#issuecomment-1060271599


   > @shibd Good question. The javadoc of Producer#close says "No more writes will be accepted from this producer. Waits until all pending write request are persisted."
   > 
   > https://github.com/apache/pulsar/blob/7385ff32e5e11edbeca9adb6f06de0adeab53ece/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Producer.java#L169
   > 
   > 
   > The assumption would be that this would result in a flush under the covers. However when looking at the implementation code, I cannot find how the documented behavior is ensured. It seems that everything in progress is cancelled immediately. There are bug reports #12195 and #11780 about the issue.
   
   Thanks for your reply, I'll 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] lhotari commented on pull request #14572: [Flaky-test]: Flush produce before close it.

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


   > There's another little question, Why is there no flush before close the producer now?
   
   @shibd Good question. The javadoc of Producer#close says "No more writes will be accepted from this producer. Waits until all pending write request are persisted." 
   https://github.com/apache/pulsar/blob/7385ff32e5e11edbeca9adb6f06de0adeab53ece/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Producer.java#L169
   The assumption would be that this would result in a flush under the covers. However when looking at the implementation code, I cannot find how the documented behavior is ensured. It seems that everything in progress is cancelled immediately. There is a bug report #11780 about it and perhaps also other reports about the same issue.
   


-- 
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 #14572: [Flaky-test]: Flush produce before close it.

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


   


-- 
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] shibd commented on pull request #14572: [Flaky-test]: Flush produce before close it.

Posted by GitBox <gi...@apache.org>.
shibd commented on pull request #14572:
URL: https://github.com/apache/pulsar/pull/14572#issuecomment-1060163924


   @codelipenghui @JipeiWang @lhotari  PTAL.
   
   There's another little question, Why is there no flush before close the producer now?
   
   


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