You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ji...@apache.org on 2022/07/29 11:55:05 UTC

[pulsar] branch branch-2.7 updated (78cba462b0d -> eb4645d777b)

This is an automated email from the ASF dual-hosted git repository.

jianghaiting pushed a change to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git


    from 78cba462b0d Update/fix Swagger Annotation for param: authoritative (#16222)
     new 89942884679 Skip unnecessary DNS resolution when creating AuthenticationDataHttp instance (#15221)
     new eb4645d777b Improve skipping of DNS resolution when creating AuthenticationDataHttp instance (#15228)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[pulsar] 02/02: Improve skipping of DNS resolution when creating AuthenticationDataHttp instance (#15228)

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jianghaiting pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit eb4645d777be097c1354f7c2b447caf0b5180ec8
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Wed Apr 20 11:54:51 2022 +0300

    Improve skipping of DNS resolution when creating AuthenticationDataHttp instance (#15228)
    
    - improves solution added in #15221
      - It's better to use the JDK provided InetSocketAddress.createUnresolved method
        to prevent unnecessary DNS resolution
    
    (cherry picked from commit e71b98ae157c4c108802661eaa72913e9c9e0bef)
---
 .../apache/pulsar/broker/authentication/AuthenticationDataHttp.java  | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
index a0f81832af7..7be5846efdc 100644
--- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
+++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
@@ -18,7 +18,6 @@
  */
 package org.apache.pulsar.broker.authentication;
 
-import io.netty.util.NetUtil;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
 
@@ -34,9 +33,7 @@ public class AuthenticationDataHttp implements AuthenticationDataSource {
             throw new IllegalArgumentException();
         }
         this.request = request;
-        this.remoteAddress =
-                new InetSocketAddress(NetUtil.createInetAddressFromIpAddressString(request.getRemoteAddr()),
-                        request.getRemotePort());
+        this.remoteAddress = InetSocketAddress.createUnresolved(request.getRemoteAddr(), request.getRemotePort());
     }
 
     /*


[pulsar] 01/02: Skip unnecessary DNS resolution when creating AuthenticationDataHttp instance (#15221)

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jianghaiting pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 8994288467979ba0c558a58f1b6d3876effcc77d
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Wed Apr 20 06:08:36 2022 +0300

    Skip unnecessary DNS resolution when creating AuthenticationDataHttp instance (#15221)
    
    (cherry picked from commit 14991c93533927c35dd3cba74fe52ba3d57f244b)
---
 .../apache/pulsar/broker/authentication/AuthenticationDataHttp.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
index a990b9e0a06..a0f81832af7 100644
--- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
+++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
@@ -18,6 +18,7 @@
  */
 package org.apache.pulsar.broker.authentication;
 
+import io.netty.util.NetUtil;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
 
@@ -33,7 +34,9 @@ public class AuthenticationDataHttp implements AuthenticationDataSource {
             throw new IllegalArgumentException();
         }
         this.request = request;
-        this.remoteAddress = new InetSocketAddress(request.getRemoteAddr(), request.getRemotePort());
+        this.remoteAddress =
+                new InetSocketAddress(NetUtil.createInetAddressFromIpAddressString(request.getRemoteAddr()),
+                        request.getRemotePort());
     }
 
     /*