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/03/27 07:45:23 UTC

[GitHub] wu-sheng opened a new pull request #994: Make sure module provider can't find other service in prepare stage.

wu-sheng opened a new pull request #994: Make sure module provider can't find other service in prepare stage.
URL: https://github.com/apache/incubator-skywalking/pull/994
 
 
   Please answer these questions before submitting pull request
   
   - Why submit this pull request?
   - [ ] Bug fix
   - [x] New feature provided
   - [ ] Improve performance
   
   - Related issues
   #991
   ___
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   
   #991 brings me some thoughts, the ModuleManager allowed #find Service in prepare stage, which makes the #991. But it is hard to find out at first place, because in some JVM, it accidently works.
   
   So I add this assert to make sure error happens every time. Such as, I invode #find in StorageModuleEsProvider#prepare method, this happens
   ```
   Exception in thread "main" java.lang.AssertionError: Still in preparing stage.
   	at org.apache.skywalking.apm.collector.core.module.ModuleManager.assertPreparedStage(ModuleManager.java:90)
   	at org.apache.skywalking.apm.collector.core.module.ModuleManager.find(ModuleManager.java:81)
   	at org.apache.skywalking.apm.collector.storage.es.StorageModuleEsProvider.prepare(StorageModuleEsProvider.java:184)
   	at org.apache.skywalking.apm.collector.core.module.Module.prepare(Module.java:87)
   	at org.apache.skywalking.apm.collector.core.module.ModuleManager.init(ModuleManager.java:57)
   	at org.apache.skywalking.apm.collector.boot.CollectorBootStartUp.main(CollectorBootStartUp.java:43)
   ```
   

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