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/04/28 18:27:03 UTC

[GitHub] [pulsar-client-go] billowqiu opened a new pull request, #769: [bugfix] fix stuck when ProducerBlockedQuotaExceededException

billowqiu opened a new pull request, #769:
URL: https://github.com/apache/pulsar-client-go/pull/769

   *(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
   
   Fixes #768
   
   
   ### Motivation
   
   - fix stuck when ProducerBlockedQuotaExceededException
   
   ### Modifications
   
   - store the error when partitionProducer.grabCnx
   - fail fast when user call partitionProducer.Send
   - add some info log
   
   ### Verifying this change
   
   - see the issue #768
   
   ### Documentation
   


-- 
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-client-go] zzzming commented on a diff in pull request #769: [bugfix] fix stuck when ProducerBlockedQuotaExceededException

Posted by GitBox <gi...@apache.org>.
zzzming commented on code in PR #769:
URL: https://github.com/apache/pulsar-client-go/pull/769#discussion_r861272911


##########
pulsar/consumer_impl.go:
##########
@@ -423,6 +423,11 @@ func (c *consumer) Unsubscribe() error {
 }
 
 func (c *consumer) Receive(ctx context.Context) (message Message, err error) {
+	start := time.Now()
+	defer func() {
+		now := time.Now().UnixNano()
+		c.metrics.RecvTime.Observe(float64(now-start.UnixNano()) / 1.0e9)

Review Comment:
   Golang has a more standard way to calculate since time in seconds or any time unit. Here is an example.
   
   time.Since(startTime).Seconds()



-- 
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-client-go] billowqiu closed pull request #769: [bugfix] fix stuck when ProducerBlockedQuotaExceededException

Posted by GitBox <gi...@apache.org>.
billowqiu closed pull request #769: [bugfix] fix stuck when ProducerBlockedQuotaExceededException
URL: https://github.com/apache/pulsar-client-go/pull/769


-- 
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-client-go] liangyuanpeng commented on pull request #769: [bugfix] fix stuck when ProducerBlockedQuotaExceededException

Posted by GitBox <gi...@apache.org>.
liangyuanpeng commented on PR #769:
URL: https://github.com/apache/pulsar-client-go/pull/769#issuecomment-1121039661

   > My concern is there are too many debug level information logged as info, that can be unnecessary.
   
    +1,  We don't need too more info message


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