You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/22 12:10:24 UTC

[GitHub] [rocketmq-client-go] aireet opened a new pull request, #863: [feat] /safely producer ctx

aireet opened a new pull request, #863:
URL: https://github.com/apache/rocketmq-client-go/pull/863

   ## What is the purpose of the change
   
   when i use interceptor for build my apm, i got panic in async producer, so I think it can be safely
   
   XXXXX
   
   ## Brief changelog
   
   XX
   
   ## Verifying this change
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-client-go] ShannonDing merged pull request #863: [ISSUE #876] Safely checking context in trace producer.

Posted by GitBox <gi...@apache.org>.
ShannonDing merged PR #863:
URL: https://github.com/apache/rocketmq-client-go/pull/863


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-client-go] codecov-commenter commented on pull request #863: [feat] /safely producer ctx

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #863:
URL: https://github.com/apache/rocketmq-client-go/pull/863#issuecomment-1195472492

   # [Codecov](https://codecov.io/gh/apache/rocketmq-client-go/pull/863?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#863](https://codecov.io/gh/apache/rocketmq-client-go/pull/863?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4fe4a77) into [master](https://codecov.io/gh/apache/rocketmq-client-go/commit/129701aef56b3bf215b230ed9285ccb17dc18fe9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (129701a) will **increase** coverage by `0.01%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 4fe4a77 differs from pull request most recent head f8c1bbd. Consider uploading reports for the commit f8c1bbd to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #863      +/-   ##
   ==========================================
   + Coverage   25.00%   25.01%   +0.01%     
   ==========================================
     Files          51       51              
     Lines        6632     6640       +8     
   ==========================================
   + Hits         1658     1661       +3     
   - Misses       4750     4755       +5     
     Partials      224      224              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq-client-go/pull/863?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [primitive/ctx.go](https://codecov.io/gh/apache/rocketmq-client-go/pull/863/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJpbWl0aXZlL2N0eC5nbw==) | `0.00% <0.00%> (ø)` | |
   | [producer/interceptor.go](https://codecov.io/gh/apache/rocketmq-client-go/pull/863/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvZHVjZXIvaW50ZXJjZXB0b3IuZ28=) | `0.00% <0.00%> (ø)` | |
   | [producer/producer.go](https://codecov.io/gh/apache/rocketmq-client-go/pull/863/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvZHVjZXIvcHJvZHVjZXIuZ28=) | `28.35% <ø> (+0.35%)` | :arrow_up: |
   
   Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-client-go] WJL3333 commented on a diff in pull request #863: [feat] /safely producer ctx

Posted by GitBox <gi...@apache.org>.
WJL3333 commented on code in PR #863:
URL: https://github.com/apache/rocketmq-client-go/pull/863#discussion_r928109194


##########
producer/interceptor.go:
##########
@@ -54,7 +54,7 @@ func newTraceInterceptor(traceCfg *primitive.TraceConfig) primitive.Interceptor
 		beginT := time.Now()
 		err := next(ctx, req, reply)
 
-		producerCtx := primitive.GetProducerCtx(ctx)
+		producerCtx, _ := primitive.GetProducerCtx(ctx)

Review Comment:
   what if producerCtx not exist, i see ignore exist return value here



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-client-go] aireet commented on a diff in pull request #863: [feat] /safely producer ctx

Posted by GitBox <gi...@apache.org>.
aireet commented on code in PR #863:
URL: https://github.com/apache/rocketmq-client-go/pull/863#discussion_r929913193


##########
producer/interceptor.go:
##########
@@ -54,7 +54,7 @@ func newTraceInterceptor(traceCfg *primitive.TraceConfig) primitive.Interceptor
 		beginT := time.Now()
 		err := next(ctx, req, reply)
 
-		producerCtx := primitive.GetProducerCtx(ctx)
+		producerCtx, _ := primitive.GetProducerCtx(ctx)

Review Comment:
   i will commit again later



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org