You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/24 02:17:58 UTC

[GitHub] [pulsar] mattisonchao commented on a change in pull request #14829: [fix] filter the virtual NIC with relative path

mattisonchao commented on a change in pull request #14829:
URL: https://github.com/apache/pulsar/pull/14829#discussion_r833860715



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java
##########
@@ -227,10 +227,10 @@ public int getNicCount() {
     }
 
     private boolean isPhysicalNic(Path path) {
-        if (path.toString().contains("/virtual/")) {
-            return false;
-        }
         try {
+            if (path.toString().contains("/virtual/") || path.toRealPath().toString().contains("/virtual/")) {

Review comment:
       Maybe we don't need to check `path.toString().contains("/virtual/")` again after you add `path.toRealPath().toString().contains("/virtual/")`. 
   
   Thank you, and let me know what you think.




-- 
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: commits-unsubscribe@pulsar.apache.org

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