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 2020/09/23 17:05:23 UTC

[GitHub] [skywalking] Jargon96 opened a new issue #5549: something wrong in plugin Mysql

Jargon96 opened a new issue #5549:
URL: https://github.com/apache/skywalking/issues/5549


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [x] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
   v8.1.0  JDK 1.8
   - Which company or project?
   
   - What happened?
   When I was developing the dbcp plugin, I found that mysql getconnection is recognized as closed.
   
   ![image](https://user-images.githubusercontent.com/40067375/94044375-a0d52600-fe00-11ea-9594-eaec7e65089c.png)
   e
   
   Examples are as follows
   https://github.com/Jargon96/skywalking/tree/dbcp-2.x-plugin/test/plugin/scenarios/dbcp-2.x-scenario
   
   ___
   ### Requirement or improvement
   - After finishing the dbcp plugin, I want to try to fix it.
   


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

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



[GitHub] [skywalking] Jargon96 commented on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
Jargon96 commented on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698073583


   
   
   
   > Why do we need a connection pool plugin? Meanwhile, I can't see the `#getConnection` method being traced. For a connection pool, the most important thing is from the time of getting a connection and returning back.
   > 
   > Please don't post things in different places, you submit an issue here, but without context.
   > 
   > ![image](https://user-images.githubusercontent.com/5441976/94086304-24146d00-fe3d-11ea-8f32-d07908e761d8.png)
   > 
   > This span is collected by the MySQL plugin, what do you mean wrong? I am confused. All things I am looking at are your plugin doesn't work at all. You should debug locally than only checking the status from the UI.
   
   Dear Sir, thank you for your reply. I didn't explain clearly, please forgive me. 
   * About picture
   This picture above is generated before I add dbcp plugin.  
   The picture below is generated after adding the plugin
   ![image](https://user-images.githubusercontent.com/40067375/94093134-14058900-fe4f-11ea-876c-06a7920179d6.png)
   
   * About MySQL plugin
   I only executed one statement. In my opinion, the above /Mysql/JDBI/Connection/close should be /Mysql/JDBI/Connection/get
   
   * About DBCP plugin
   I have implemented monitoring the time to create the pool, close the pool, get the connection from the pool, and close the connection from the pool.  Is this appropriate?
   
   
   
   


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

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



[GitHub] [skywalking] Jargon96 commented on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
Jargon96 commented on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698125134


   > No, this seems not a right process. The pool should be initialized in the bootstrap stage, and only get and return/close in the process.
   > If you are not familiar with the connection pool, why do you try to build a connection pool tracing plugin?
   I apologize for the lack of project experience, I am a student participant in Open Source Promotion Plan-Summer 2020. >_<
   
   > I think you don't understand how the JDBC works, `close` could be called anytime if the connection wants to. We build the operation name of MySQL span like this `return connectionInfo.getDBType() + "/JDBI/" + statementName + "/" + methodName;`.
   Thank you, sir.  I'm a little confused if connection is borrowed from pool,  connection should not  close twice when borrow connection from pool only once(forgive me. maybe my question is also beacuse I don't understand how the JDBC works)
   
   thanks for your time!


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

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



[GitHub] [skywalking] wu-sheng commented on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698156600


   > I apologize for the lack of project experience, I am a student participant in Open Source Promotion Plan-Summer 2020. >_<
   
   OK, then I would recommend you to contact your mentor, and reading some materials about the usage of the connection pool.
   
   > Thank you, sir. I'm a little confused if connection is borrowed from pool, connection should not close twice when borrow connection from pool only once(forgive me. maybe my question is also beacuse I don't understand how the JDBC works)
   
   Writing the plugin means you have experience with the targeting library. You know how it works, and how you should use it. Your questions are around that part. Contact your mentor, and read more documents, real codes about the connection pool, you will know what is going on and should have a better design of the demo app to do the test.


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

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



[GitHub] [skywalking] wu-sheng commented on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698156600


   > I apologize for the lack of project experience, I am a student participant in Open Source Promotion Plan-Summer 2020. >_<
   
   OK, then I would recommend you to contact your mentor, and reading some materials about the usage of the connection pool.
   
   > Thank you, sir. I'm a little confused if connection is borrowed from pool, connection should not close twice when borrow connection from pool only once(forgive me. maybe my question is also beacuse I don't understand how the JDBC works)
   
   Writing the plugin means you have experience with the targeting library. You know how it works, and how you should use it. Your questions are around that part. Contact your mentor, and read more documents, real codes about the connection pool, you will know what is going on and should have a better design of the demo app to do the test.


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

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



[GitHub] [skywalking] wu-sheng closed issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #5549:
URL: https://github.com/apache/skywalking/issues/5549


   


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

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



[GitHub] [skywalking] Jargon96 commented on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
Jargon96 commented on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698125134


   > No, this seems not a right process. The pool should be initialized in the bootstrap stage, and only get and return/close in the process.
   > If you are not familiar with the connection pool, why do you try to build a connection pool tracing plugin?
   I apologize for the lack of project experience, I am a student participant in Open Source Promotion Plan-Summer 2020. >_<
   
   > I think you don't understand how the JDBC works, `close` could be called anytime if the connection wants to. We build the operation name of MySQL span like this `return connectionInfo.getDBType() + "/JDBI/" + statementName + "/" + methodName;`.
   Thank you, sir.  I'm a little confused if connection is borrowed from pool,  connection should not  close twice when borrow connection from pool only once(forgive me. maybe my question is also beacuse I don't understand how the JDBC works)
   
   thanks for your time!


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

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



[GitHub] [skywalking] wu-sheng commented on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698077008


   I think you don't understand how the JDBC works, `close` could be called anytime if the connection wants to.  We build the operation name of MySQL span like this `return connectionInfo.getDBType() + "/JDBI/" + statementName + "/" + methodName;`. 
   
   > I have implemented monitoring the time to create the pool, close the pool, get the connection from the pool, and close the connection from the pool. Is this appropriate?
   
   No, this seems not a right process. The pool should be initialized in the bootstrap stage, and only `get` and `return/close` in the process. 
   If you are not familiar with the connection pool, why do you try to build a connection pool tracing plugin?


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

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



[GitHub] [skywalking] wu-sheng closed issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #5549:
URL: https://github.com/apache/skywalking/issues/5549


   


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

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



[GitHub] [skywalking] Jargon96 edited a comment on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
Jargon96 edited a comment on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698125134






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

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



[GitHub] [skywalking] Jargon96 edited a comment on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
Jargon96 edited a comment on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698125134






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

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



[GitHub] [skywalking] wu-sheng commented on issue #5549: Something wrong in plugin Mysql

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5549:
URL: https://github.com/apache/skywalking/issues/5549#issuecomment-698036355


   Why do we need a connection pool plugin? Meanwhile, I can't see the `#getConnection` method being traced. For a connection pool, the most important thing is from the time of getting a connection and returning back.
   
   Please don't post things in different places, you submit an issue here, but without context.
   
   ![image](https://user-images.githubusercontent.com/5441976/94086304-24146d00-fe3d-11ea-8f32-d07908e761d8.png)
   
   This span is collected by the MySQL plugin, what do you mean wrong? I am confused. All things I am looking at are your plugin doesn't work at all. You should debug locally than only checking the status from the UI.


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

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