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 2019/05/26 11:54:01 UTC

[GitHub] [skywalking] SataQiu commented on a change in pull request #2756: mongodb-3.x-plugin: add support for previous versions of 3.3

SataQiu commented on a change in pull request #2756: mongodb-3.x-plugin: add support for previous versions of 3.3
URL: https://github.com/apache/skywalking/pull/2756#discussion_r287594615
 
 

 ##########
 File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/MongoDBMethodInterceptor.java
 ##########
 @@ -201,7 +201,13 @@ private String limitFilter(String filter) {
     public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
         Cluster cluster = (Cluster)allArguments[0];
         StringBuilder peers = new StringBuilder();
-        for (ServerDescription description : cluster.getDescription().getServerDescriptions()) {
+        Collection<ServerDescription> descriptions;
+        try {
+            descriptions = cluster.getDescription().getServerDescriptions();
+        } catch (Throwable t) {
+            descriptions = cluster.getDescription().getAll();
 
 Review comment:
   Thanks for your feeedback @wu-sheng 
   I think I need to refer to some current code about witness class.
   Any example code for using witness class?
   

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


With regards,
Apache Git Services