You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@skywalking.apache.org by GitBox <gi...@apache.org> on 2018/02/07 02:12:16 UTC

[GitHub] carlvine500 opened a new pull request #794: bugfix:no data collected after application started 20+seconds

carlvine500 opened a new pull request #794: bugfix:no data collected after application started 20+seconds
URL: https://github.com/apache/incubator-skywalking/pull/794
 
 
   
   ### Bug fix
   - Bug description.
   skywalking can't collect data after application started 20+ seconds .eg :
   ```
   public class JedisTest {
       public static void main(String[] args) throws InterruptedException {
           Jedis j = new Jedis("xx.xx.xx.xx", 6379);
           for (int i = 0; i < 20; i++) {
               Thread.sleep(1000L);
               String users = j.get("users");
               System.out.println(users);
           }
           LockSupport.park();
       }
   }
   ```
   - reason?
   
   1.DiscoveryRestServiceClient.run() init run in 0 seconds, interval is 60 seconds.
   2.GRPCChannelManager.run() init run in 0 seconds, interval is 30 seconds.
   3.ServiceManager.bootedServices is HashMap , GRPCChannelManager.run() always before DiscoveryRestServiceClient.run()
   
   - How to fix?
   1.ServiceManager.bootedServices changed to LinckedHashMap , to make sure DiscoveryRestServiceClient.run() before GRPCChannelManager.run() 
   2.DiscoveryRestServiceClient.run() sychronized instead of asychronized
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services