You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/12/08 09:45:38 UTC

[dubbo] branch 3.2 updated (0d2cab47c9 -> 5c082eaefa)

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

albumenj pushed a change to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git


    from 0d2cab47c9 Enhance isolate executor (#11069)
     add 850f719927 update(qos): support foreign ip whitelist. (#11051)
     add 3c68e9476e Fixes #11044,solve remoteApplicationName is null, in mesh mode with t… (#11058)
     add 2f55e72ac9 Add error code support of ListenerInvokerWrapper. (#11065)
     add 93e60093c5 Correct the error code inspector working branch in scheduled testing. (#11064)
     add c5815be7b6 Fix native image compile failure and run binary package failure (#11066)
     add 9b9b12033f Bump resteasy-jaxrs in /dubbo-dependencies-bom (#11071)
     add 1470c7ca1e Cache jvm system parameters to prevent each call from being executed, affecting performance (#10839)
     add a795ff73df Get system properties from context (#11082)
     add 7cccc4f193 opt some tri code (#11079)
     add 9713ad64b3 fix ssl npe (#11093)
     new 5c082eaefa Merge branch 'apache-3.1' into apache-3.2

The 1 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:
 .github/workflows/build-and-test-scheduled-3.1.yml |   1 +
 .github/workflows/build-and-test-scheduled-3.2.yml |   1 +
 .gitignore                                         |   6 +
 .../common/config/CompositeConfiguration.java      |  16 ++
 .../apache/dubbo/common/config/Configuration.java  |  32 ++--
 .../common/config/EnvironmentConfiguration.java    |  13 ++
 .../dubbo/common/config/InmemoryConfiguration.java |  10 ++
 .../config/OrderedPropertiesConfiguration.java     |  10 ++
 .../dubbo/common/config/PrefixedConfiguration.java |  13 ++
 .../common/config/PropertiesConfiguration.java     |  10 ++
 .../dubbo/common/config/SystemConfiguration.java   |  48 +++++-
 .../configcenter/AbstractDynamicConfiguration.java |   5 +
 .../configcenter/nop/NopDynamicConfiguration.java  |   5 +
 .../wrapper/CompositeDynamicConfiguration.java     |   5 +
 .../dubbo/common/constants/QosConstants.java       |   4 +
 .../org/apache/dubbo/config/AbstractConfig.java    |   7 +-
 .../org/apache/dubbo/config/ApplicationConfig.java |  25 +++
 .../java/org/apache/dubbo/config/Constants.java    |   3 +-
 .../config/context/ConfigConfigurationAdapter.java |  10 ++
 .../common/config/SystemConfigurationTest.java     |  18 +-
 .../common/utils/SerializeClassCheckerTest.java    |  32 ++--
 .../dubbo/config/bootstrap/MultiInstanceTest.java  |  37 ++--
 .../support/apollo/ApolloDynamicConfiguration.java |  10 ++
 .../support/nacos/NacosDynamicConfiguration.java   |  11 ++
 .../zookeeper/ZookeeperDynamicConfiguration.java   |  10 ++
 .../dubbo-demo-native-consumer/pom.xml             |  19 +++
 .../dubbo/demo/graalvm/consumer/Application.java   |  10 +-
 .../dubbo-demo-native-provider/pom.xml             |  20 +++
 .../dubbo/demo/graalvm/provider/Application.java   |  25 ++-
 dubbo-dependencies-bom/pom.xml                     |   2 +-
 .../kubernetes/KubernetesMeshEnvListener.java      |  16 +-
 .../META-INF/native-image/reflect-config.json      | 115 ++++++++++++-
 .../META-INF/native-image/resource-config.json     |   6 +
 .../pu/PortUnificationTransporter$Adaptive.java    |  36 ++--
 .../dubbo/qos/protocol/QosProtocolWrapper.java     |   4 +
 .../org/apache/dubbo/qos/pu/QosWireProtocol.java   |   3 +-
 .../java/org/apache/dubbo/qos/server/Server.java   |   7 +-
 .../server/handler/ForeignHostPermitHandler.java   |  94 ++++++++++
 .../qos/server/handler/LocalHostPermitHandler.java |  48 ------
 .../qos/server/handler/QosProcessHandler.java      |   6 +-
 .../handler/ForeignHostPermitHandlerTest.java      | 110 ++++++++++++
 .../server/handler/LocalHostPermitHandlerTest.java |  56 ------
 .../qos/server/handler/QosProcessHandlerTest.java  |   7 +-
 .../netty4/NettyPortUnificationServerHandler.java  |   4 +-
 .../java/org/apache/dubbo/rpc/AsyncRpcResult.java  |  11 +-
 .../apache/dubbo/rpc/filter/AccessLogFilter.java   |   4 +-
 .../dubbo/rpc/listener/ListenerInvokerWrapper.java |   4 +-
 .../apache/dubbo/rpc/protocol/AbstractInvoker.java |  11 +-
 .../protocol/dubbo/DecodeableRpcInvocation.java    |  14 +-
 .../dubbo/decode/DubboTelnetDecodeTest.java        | 189 +++++++++++----------
 .../tri/call/AbstractServerCallListener.java       |   2 +
 .../protocol/tri/stream/TripleServerStream.java    |  41 +++--
 .../dubbo/DefaultHessian2FactoryInitializer.java   |   2 +-
 .../hessian2/dubbo/Hessian2FactoryInitializer.java |   2 +
 54 files changed, 867 insertions(+), 343 deletions(-)
 create mode 100644 dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/ForeignHostPermitHandler.java
 delete mode 100644 dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/LocalHostPermitHandler.java
 create mode 100644 dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/server/handler/ForeignHostPermitHandlerTest.java
 delete mode 100644 dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/server/handler/LocalHostPermitHandlerTest.java


[dubbo] 01/01: Merge branch 'apache-3.1' into apache-3.2

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

albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git

commit 5c082eaefaad6d311efefd57a986030a73eb857d
Merge: 0d2cab47c9 9713ad64b3
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Dec 8 17:44:11 2022 +0800

    Merge branch 'apache-3.1' into apache-3.2
    
    # Conflicts:
    #       dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java
    #       dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
    #       dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java

 .github/workflows/build-and-test-scheduled-3.1.yml |   1 +
 .github/workflows/build-and-test-scheduled-3.2.yml |   1 +
 .gitignore                                         |   6 +
 .../common/config/CompositeConfiguration.java      |  16 ++
 .../apache/dubbo/common/config/Configuration.java  |  32 ++--
 .../common/config/EnvironmentConfiguration.java    |  13 ++
 .../dubbo/common/config/InmemoryConfiguration.java |  10 ++
 .../config/OrderedPropertiesConfiguration.java     |  10 ++
 .../dubbo/common/config/PrefixedConfiguration.java |  13 ++
 .../common/config/PropertiesConfiguration.java     |  10 ++
 .../dubbo/common/config/SystemConfiguration.java   |  48 +++++-
 .../configcenter/AbstractDynamicConfiguration.java |   5 +
 .../configcenter/nop/NopDynamicConfiguration.java  |   5 +
 .../wrapper/CompositeDynamicConfiguration.java     |   5 +
 .../dubbo/common/constants/QosConstants.java       |   4 +
 .../org/apache/dubbo/config/AbstractConfig.java    |   7 +-
 .../org/apache/dubbo/config/ApplicationConfig.java |  25 +++
 .../java/org/apache/dubbo/config/Constants.java    |   3 +-
 .../config/context/ConfigConfigurationAdapter.java |  10 ++
 .../common/config/SystemConfigurationTest.java     |  18 +-
 .../common/utils/SerializeClassCheckerTest.java    |  32 ++--
 .../dubbo/config/bootstrap/MultiInstanceTest.java  |  37 ++--
 .../support/apollo/ApolloDynamicConfiguration.java |  10 ++
 .../support/nacos/NacosDynamicConfiguration.java   |  11 ++
 .../zookeeper/ZookeeperDynamicConfiguration.java   |  10 ++
 .../dubbo-demo-native-consumer/pom.xml             |  19 +++
 .../dubbo/demo/graalvm/consumer/Application.java   |  10 +-
 .../dubbo-demo-native-provider/pom.xml             |  20 +++
 .../dubbo/demo/graalvm/provider/Application.java   |  25 ++-
 dubbo-dependencies-bom/pom.xml                     |   2 +-
 .../kubernetes/KubernetesMeshEnvListener.java      |  16 +-
 .../META-INF/native-image/reflect-config.json      | 115 ++++++++++++-
 .../META-INF/native-image/resource-config.json     |   6 +
 .../pu/PortUnificationTransporter$Adaptive.java    |  36 ++--
 .../dubbo/qos/protocol/QosProtocolWrapper.java     |   4 +
 .../org/apache/dubbo/qos/pu/QosWireProtocol.java   |   3 +-
 .../java/org/apache/dubbo/qos/server/Server.java   |   7 +-
 .../server/handler/ForeignHostPermitHandler.java   |  94 ++++++++++
 .../qos/server/handler/LocalHostPermitHandler.java |  48 ------
 .../qos/server/handler/QosProcessHandler.java      |   6 +-
 .../handler/ForeignHostPermitHandlerTest.java      | 110 ++++++++++++
 .../server/handler/LocalHostPermitHandlerTest.java |  56 ------
 .../qos/server/handler/QosProcessHandlerTest.java  |   7 +-
 .../netty4/NettyPortUnificationServerHandler.java  |   4 +-
 .../java/org/apache/dubbo/rpc/AsyncRpcResult.java  |  11 +-
 .../apache/dubbo/rpc/filter/AccessLogFilter.java   |   4 +-
 .../dubbo/rpc/listener/ListenerInvokerWrapper.java |   4 +-
 .../apache/dubbo/rpc/protocol/AbstractInvoker.java |  11 +-
 .../protocol/dubbo/DecodeableRpcInvocation.java    |  14 +-
 .../dubbo/decode/DubboTelnetDecodeTest.java        | 189 +++++++++++----------
 .../tri/call/AbstractServerCallListener.java       |   2 +
 .../protocol/tri/stream/TripleServerStream.java    |  41 +++--
 .../dubbo/DefaultHessian2FactoryInitializer.java   |   2 +-
 .../hessian2/dubbo/Hessian2FactoryInitializer.java |   2 +
 54 files changed, 867 insertions(+), 343 deletions(-)

diff --cc dubbo-common/src/main/java/org/apache/dubbo/common/config/EnvironmentConfiguration.java
index 8ab70dd0fa,c95e92864e..5fb32a5173
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/config/EnvironmentConfiguration.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/EnvironmentConfiguration.java
@@@ -34,17 -34,20 +34,30 @@@ public class EnvironmentConfiguration i
          return value;
      }
  
+     @Override
+     public Object getInternalProperty(String key, Object defaultValue) {
+         String value = System.getenv(key);
+         if (StringUtils.isEmpty(value)) {
+             value = System.getenv(StringUtils.toOSStyleKey(key));
+         }
+ 
+         if (StringUtils.isEmpty(value)) {
+             return defaultValue;
+         }
+         return value;
+     }
+ 
      public Map<String, String> getProperties() {
 +        return getenv();
 +    }
 +
 +    // Adapt to System api, design for unit test
 +
 +    protected String getenv(String key) {
 +        return System.getenv(key);
 +    }
 +
 +    protected Map<String, String> getenv() {
          return System.getenv();
      }
  }
diff --cc dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java
index d5c1cc0a7a,3f6c242732..79207eb586
--- a/dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java
+++ b/dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java
@@@ -18,22 -18,22 +18,22 @@@ package org.apache.dubbo.remoting.api.p
  import org.apache.dubbo.rpc.model.ScopeModel;
  import org.apache.dubbo.rpc.model.ScopeModelUtil;
  public class PortUnificationTransporter$Adaptive implements org.apache.dubbo.remoting.api.pu.PortUnificationTransporter {
- public org.apache.dubbo.remoting.api.connection.AbstractConnectionClient connect(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException {
 -public org.apache.dubbo.remoting.Client connect(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException {
--if (arg0 == null) throw new IllegalArgumentException("url == null");
--org.apache.dubbo.common.URL url = arg0;
--String extName = url.getParameter("client", url.getParameter("transporter", "netty4"));
--if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([client, transporter])");
--ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class);
--org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName);
--return extension.connect(arg0, arg1);
--}
--public org.apache.dubbo.remoting.api.pu.AbstractPortUnificationServer bind(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException {
--if (arg0 == null) throw new IllegalArgumentException("url == null");
--org.apache.dubbo.common.URL url = arg0;
--String extName = url.getParameter("server", url.getParameter("transporter", "netty4"));
--if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([server, transporter])");
--ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class);
--org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName);
--return extension.bind(arg0, arg1);
--}
++    public org.apache.dubbo.remoting.api.connection.AbstractConnectionClient connect(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException {
++        if (arg0 == null) throw new IllegalArgumentException("url == null");
++        org.apache.dubbo.common.URL url = arg0;
++        String extName = url.getParameter("client", url.getParameter("transporter", "netty4"));
++        if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([client, transporter])");
++        ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class);
++        org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName);
++        return extension.connect(arg0, arg1);
++    }
++    public org.apache.dubbo.remoting.api.pu.AbstractPortUnificationServer bind(org.apache.dubbo.common.URL arg0, org.apache.dubbo.remoting.ChannelHandler arg1) throws org.apache.dubbo.remoting.RemotingException {
++        if (arg0 == null) throw new IllegalArgumentException("url == null");
++        org.apache.dubbo.common.URL url = arg0;
++        String extName = url.getParameter("server", url.getParameter("transporter", "netty4"));
++        if(extName == null) throw new IllegalStateException("Failed to get extension (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter) name from url (" + url.toString() + ") use keys([server, transporter])");
++        ScopeModel scopeModel = ScopeModelUtil.getOrDefault(url.getScopeModel(), org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class);
++        org.apache.dubbo.remoting.api.pu.PortUnificationTransporter extension = (org.apache.dubbo.remoting.api.pu.PortUnificationTransporter)scopeModel.getExtensionLoader(org.apache.dubbo.remoting.api.pu.PortUnificationTransporter.class).getExtension(extName);
++        return extension.bind(arg0, arg1);
++    }
  }
diff --cc dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
index f75c9366eb,af997afe7d..156f89658a
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
@@@ -17,7 -17,7 +17,8 @@@
  package org.apache.dubbo.rpc.protocol.dubbo;
  
  
+ import org.apache.dubbo.common.config.ConfigurationUtils;
 +import org.apache.dubbo.common.utils.CacheableSupplier;
  import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
  import org.apache.dubbo.common.logger.LoggerFactory;
  import org.apache.dubbo.common.serialize.Cleanable;
diff --cc dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
index 6a4f698edb,61de32a9ba..3ced60f660
--- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
@@@ -56,7 -57,8 +57,8 @@@ public abstract class AbstractServerCal
          String remoteApp = (String) invocation.getAttributes()
              .remove(TripleHeaderEnum.CONSUMER_APP_NAME_KEY);
          if (null != remoteApp) {
 -            RpcContext.getServerContext().setRemoteApplicationName(remoteApp);
 +            RpcContext.getServiceContext().setRemoteApplicationName(remoteApp);
+             invocation.setAttachmentIfAbsent(REMOTE_APPLICATION_KEY, remoteApp);
          }
          final long stInMillis = System.currentTimeMillis();
          try {