You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/06/28 02:56:07 UTC
[GitHub] [skywalking] Yolo-Hao opened a new pull request #7185: optimize db.statement of jedis blocking api with timeout
Yolo-Hao opened a new pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185
<!--
⚠️ Please make sure to read this template first, pull requests that don't accord with this template
maybe closed without notice.
Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
-->
### Fix miss db.statement of jedis blocking api with a timeout parameter [#7170](https://github.com/apache/skywalking/issues/7170)
- [x] Add a unit test to verify that the fix works.
- [x] Explain briefly why the bug exists and how to fix it.
`JedisMethodInterceptor` only check `String` and `byte[]` as the first argument type, but some commands like `blpop` use `int` as timeout, so it won't have a `db.statement` tag in this case.
<!-- ==== 🔌 Remove this line WHEN AND ONLY WHEN you're adding a new plugin, follow the checklist 👇 ====
### Add an agent plugin to support <framework name>
- [ ] Add a test case for the new plugin, refer to [the doc](https://github.com/apache/skywalking/blob/master/docs/en/guides/Plugin-test.md)
- [ ] Add a component id in [the component-libraries.yml](https://github.com/apache/skywalking/blob/master/oap-server/server-bootstrap/src/main/resources/component-libraries.yml)
- [ ] Add a logo in [the UI repo](https://github.com/apache/skywalking-rocketbot-ui/tree/master/src/views/components/topology/assets)
==== 🔌 Remove this line WHEN AND ONLY WHEN you're adding a new plugin, follow the checklist 👆 ==== -->
<!-- ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👇 ====
### Improve the performance of <class or module or ...>
- [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking/blob/master/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
- [ ] The benchmark result.
```text
<Paste the benchmark results here>
```
- [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👆 ==== -->
<!-- ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👇 ====
### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [ ] Update the documentation to include this new feature.
- [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.
==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
- [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<7170>.
- [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/CHANGES.md).
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] Yolo-Hao commented on pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
Yolo-Hao commented on pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185#issuecomment-869547190
> Still need integration tests.
looking~
it's my first PR, so i am not familiar with all processes.
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185#issuecomment-869548775
I know, GitHub shows that.
1. This is the case you need to enhance, https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/jedis-scenario
2. http://skywalking.apache.org/docs/main/latest/en/guides/java-plugin-development-guide/#plugin-test-tool This is the doc you need to follow. Tests could be run locally in Linux(maybe Mac?)
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] Yolo-Hao closed pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
Yolo-Hao closed pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] Yolo-Hao commented on pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
Yolo-Hao commented on pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185#issuecomment-870201002
hi, afer test with more versions, i think this PR is worthless.
`2.4.x` and `2.5.x` need to ehance method `blpop (int timeout, ...)` and `blpop(String...keys)`,
but higher version like `2.6.x`, only need to enhance `blpop(String...keys)` because other methods will call it nested.
to solve it, we need to use witness class to distingush these versions, but it will create more instrumentation define class,
and just works for `blpop` and `brpop`, so i think is worthless, though current version will create two spans in one `blpop` call.
for user who just want to support `2.6.x` or higher, simply change `named("blpop")` to `named("blpop").and(takesArgument(0, String[].class))` and deal with it in `JedisMethodInterceptor`, it will works.
Thanks for your help
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] Yolo-Hao commented on pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
Yolo-Hao commented on pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185#issuecomment-870201002
hi, afer test with more versions, i think this PR is worthless.
`2.4.x` and `2.5.x` need to ehance method `blpop (int timeout, ...)` and `blpop(String...keys)`,
but higher version like `2.6.x`, only need to enhance `blpop(String...keys)` because other methods will call it nested.
to solve it, we need to use witness class to distingush these versions, but it will create more instrumentation define class,
and just works for `blpop` and `brpop`, so i think is worthless, though current version will create two spans in one `blpop` call.
for user who just want to support `2.6.x` or higher, simply change `named("blpop")` to `named("blpop").and(takesArgument(0, String[].class))` and deal with it in `JedisMethodInterceptor`, it will works.
Thanks for your help
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185#issuecomment-869545293
Still need integration tests.
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] Yolo-Hao closed pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
Yolo-Hao closed pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on pull request #7185: optimize db.statement of jedis blocking api with timeout
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #7185:
URL: https://github.com/apache/skywalking/pull/7185#issuecomment-869351357
Please update the changes.md in the root folder. And integration test hasn't not been updated with expected data. Could you update them too?
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org