From 46c93b3e0d38ba50f46ad81ebedd520cca44fed3 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Wed, 6 Mar 2024 12:02:52 +0800 Subject: [PATCH 1/9] Add question template (#13843) --- .github/DISCUSSION_TEMPLATE/question.yml | 94 ++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .github/DISCUSSION_TEMPLATE/question.yml diff --git a/.github/DISCUSSION_TEMPLATE/question.yml b/.github/DISCUSSION_TEMPLATE/question.yml new file mode 100644 index 0000000000..7ffa771395 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/question.yml @@ -0,0 +1,94 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +title: "[Q/A][Java SDK (Component)] xxx" +body: +- type: markdown + attributes: + value: | + Dubbo logo + + Thank you for finding the time to report the problem! We really appreciate the community efforts to improve Dubbo. + + If you need to report a security issue, please visit [our security policy](https://github.com/apache/dubbo/security/policy). + + **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** + Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + +- type: checkboxes + attributes: + label: Pre-check + options: + - label: > + I am sure that all the content I provide is in English. + required: true + +- type: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + - "Go SDK (apache/dubbo-go)" + - "Go Samples (apache/dubbo-go-samples)" + - "Rust SDK (apache/dubbo-rust)" + - "Node.js SDK (apache/dubbo-js)" + - "Python SDK (apache/dubbo-python)" + - "Kubernetes Integration (apache/dubbo-kubernetes)" + - "Pixiu Gateway (apache/dubbo-go-pixiu)" + - "Pixiu Gateway Samples (apache/dubbo-go-pixiu-samples)" + - "Admin (apache/dubbo-admin)" + - "Website (apache/dubbo-website)" + - "Awesome (apache/dubbo-awesome)" + - "Initializer (apache/dubbo-intializer)" + - "Others (apache/dubbo-xxx)" + validations: + required: true + +- type: textarea + attributes: + label: Dubbo Version + description: "Which Dubbo version, JDK version and operating system did you use?" + placeholder: "Example: Dubbo Java 3.2.12, OpenJDK 1.8, Ubuntu 20.04" + +- type: textarea + attributes: + label: Details + description: Anything you want to know? + validations: + required: true + +- type: checkboxes + attributes: + label: Code of Conduct + description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. + options: + - label: > + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + required: true + +- type: markdown + attributes: + value: "Thanks for completing our form!" From 783522e01380324d9d29dd3b32395863596cdebd Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Wed, 6 Mar 2024 15:07:14 +0800 Subject: [PATCH 2/9] Add general template (#13848) --- .github/DISCUSSION_TEMPLATE/general.yml | 88 ++++++++++++++++++++++++ .github/DISCUSSION_TEMPLATE/question.yml | 10 +-- .github/ISSUE_TEMPLATE/1-bug.yml | 18 ++++- .github/ISSUE_TEMPLATE/2-feature.yml | 16 +++++ 4 files changed, 123 insertions(+), 9 deletions(-) create mode 100644 .github/DISCUSSION_TEMPLATE/general.yml diff --git a/.github/DISCUSSION_TEMPLATE/general.yml b/.github/DISCUSSION_TEMPLATE/general.yml new file mode 100644 index 0000000000..b61c1bf057 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/general.yml @@ -0,0 +1,88 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +title: "[General][Java SDK (Component)] xxx" +body: +- type: markdown + attributes: + value: | + Dubbo logo + + Thank you for finding the time to share your idea! We really appreciate the community efforts to improve Dubbo. + + If you need to report a security issue, please visit [our security policy](https://github.com/apache/dubbo/security/policy). + + **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** + Remember that non-English idea is quite not friendly for everyone, and might unable to get the response! + +- type: checkboxes + attributes: + label: Pre-check + options: + - label: > + I am sure that all the content I provide is in English. + required: true + +- type: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + - "Go SDK (apache/dubbo-go)" + - "Go Samples (apache/dubbo-go-samples)" + - "Rust SDK (apache/dubbo-rust)" + - "Node.js SDK (apache/dubbo-js)" + - "Python SDK (apache/dubbo-python)" + - "Kubernetes Integration (apache/dubbo-kubernetes)" + - "Pixiu Gateway (apache/dubbo-go-pixiu)" + - "Pixiu Gateway Samples (apache/dubbo-go-pixiu-samples)" + - "Admin (apache/dubbo-admin)" + - "Website (apache/dubbo-website)" + - "Awesome (apache/dubbo-awesome)" + - "Initializer (apache/dubbo-intializer)" + - "Others (apache/dubbo-xxx)" + validations: + required: true + +- type: textarea + attributes: + label: Details + description: Anything you want to ask? + validations: + required: true + +- type: checkboxes + attributes: + label: Code of Conduct + description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. + options: + - label: > + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + required: true + +- type: markdown + attributes: + value: "Thanks for completing our form!" diff --git a/.github/DISCUSSION_TEMPLATE/question.yml b/.github/DISCUSSION_TEMPLATE/question.yml index 7ffa771395..17aadb9ab9 100644 --- a/.github/DISCUSSION_TEMPLATE/question.yml +++ b/.github/DISCUSSION_TEMPLATE/question.yml @@ -22,12 +22,12 @@ body: value: | Dubbo logo - Thank you for finding the time to report the problem! We really appreciate the community efforts to improve Dubbo. + Thank you for finding the time to report the question! We really appreciate the community efforts to improve Dubbo. If you need to report a security issue, please visit [our security policy](https://github.com/apache/dubbo/security/policy). **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** - Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + Remember that non-English question is quite not friendly for everyone, and might unable to get the response! - type: checkboxes attributes: @@ -66,12 +66,6 @@ body: validations: required: true -- type: textarea - attributes: - label: Dubbo Version - description: "Which Dubbo version, JDK version and operating system did you use?" - placeholder: "Example: Dubbo Java 3.2.12, OpenJDK 1.8, Ubuntu 20.04" - - type: textarea attributes: label: Details diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml index e7d06e48ec..5bff100dd8 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.yml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -58,7 +58,23 @@ body: issues. required: true -- type: input +- type: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + validations: + required: true + +- type: textarea attributes: label: Dubbo Version description: "Which Dubbo version, JDK version and operating system did you use?" diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index 501122efcd..d0d6bba7b5 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -53,6 +53,22 @@ body: feature requirement. required: true +- type: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + validations: + required: true + - type: textarea attributes: label: Descriptions From be19912ad4f0f135a34c12ebf2a7b860e2b25ffa Mon Sep 17 00:00:00 2001 From: YuLuo Date: Thu, 7 Mar 2024 10:06:40 +0800 Subject: [PATCH 3/9] chore: move pr tmpl to .github folder (#13850) --- PULL_REQUEST_TEMPLATE.md => .github/PULL_REQUEST_TEMPLATE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename PULL_REQUEST_TEMPLATE.md => .github/PULL_REQUEST_TEMPLATE.md (100%) diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md From d4a1e0d9bbd3ba65a1e3a3eaf6f68b9037c33030 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Thu, 7 Mar 2024 11:56:20 +0800 Subject: [PATCH 4/9] Readme update (#13851) --- README.md | 80 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 8137d2a8d4..975deece80 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,10 @@ ![License](https://img.shields.io/github/license/alibaba/dubbo.svg) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/apache/dubbo.svg)](http://isitmaintained.com/project/apache/dubbo "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/apache/dubbo.svg)](http://isitmaintained.com/project/apache/dubbo "Percentage of issues still open") -[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Apache%20Dubbo%20is%20a%20high-performance%2C%20java%20based%2C%20open%20source%20RPC%20framework.&url=http://dubbo.apache.org/&via=ApacheDubbo&hashtags=rpc,java,dubbo,micro-service) -[![Twitter Follow](https://img.shields.io/twitter/follow/ApacheDubbo.svg?label=Follow&style=social&logoWidth=0)](https://twitter.com/intent/follow?screen_name=ApacheDubbo) -[![Gitter](https://badges.gitter.im/alibaba/dubbo.svg)](https://gitter.im/alibaba/dubbo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) Apache Dubbo is a high-performance, Java-based open-source RPC framework. Please visit the [official site](http://dubbo.apache.org) for the quick start guide and documentation, as well as the [wiki](https://github.com/apache/dubbo/wiki) for news, FAQ, and release notes. -We are now collecting Dubbo user info to help us to improve Dubbo further. Kindly support us by providing your usage information on [issue#9436: Wanted: who's using dubbo](https://github.com/apache/dubbo/issues/9436), thanks :) +We are now collecting Dubbo user info to help us to improve Dubbo further. Kindly support us by providing your usage information on [Wanted: who's using dubbo](https://github.com/apache/dubbo/discussions/13842), thanks :) ## Architecture @@ -186,34 +183,55 @@ To avoid intermittent test failures (i.e., flaky tests), it is recommended to ha * Minimum of 2CPUs. * Minimum of 2Gb of RAM. -## Contact +### How does the Dubbo Community collaborate? -* Mailing list: - * dev list: for dev/user discussion. [subscribe](mailto:dev-subscribe@dubbo.apache.org), [unsubscribe](mailto:dev-unsubscribe@dubbo.apache.org), [archive](https://lists.apache.org/list.html?dev@dubbo.apache.org), [guide](https://github.com/apache/dubbo/wiki/Mailing-list-subscription-guide) +The Dubbo Community primarily communicates on GitHub through issues, discussions, and pull requests. -* Bugs: [Issues](https://github.com/apache/dubbo/issues/new?template=dubbo-issue-report-template.md) -* Gitter: [Gitter channel](https://gitter.im/alibaba/dubbo) -* Twitter: [@ApacheDubbo](https://twitter.com/ApacheDubbo) +- Issues: We use issues to track bugs and tasks. Any **work-related** item is associated with an issue. +- Discussions: We use discussions for questions, early proposals, and announcements. Any **idea-related** item is associated with a discussion. +- Pull Requests: We use pull requests to merge a set of changes from contributors into Dubbo. -## Contributing +We have also implemented [a project board](https://github.com/orgs/apache/projects/337) to monitor all the items. -See [CONTRIBUTING](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md) for details on submitting patches and the contribution workflow. +Any essential changes should be discussed on the mailing list before they happen. -### How can I contribute? +### Seeking for help -* Take a look at issues with tags marked [`Good first issue`](https://github.com/apache/dubbo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or [`Help wanted`](https://github.com/apache/dubbo/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). -* Join the discussion on the mailing list, subscription [guide](https://github.com/apache/dubbo/wiki/Mailing-list-subscription-guide). -* Answer questions on [issues](https://github.com/apache/dubbo/issues). -* Fix bugs reported on [issues](https://github.com/apache/dubbo/issues), and send us a pull request. -* Review the existing [pull request](https://github.com/apache/dubbo/pulls). -* Improve the [website](https://github.com/apache/dubbo-website), typically we need - * blog post - * translation on documentation - * use cases around the integration of Dubbo in enterprise systems. -* Improve the [dubbo-admin/dubbo-monitor](https://github.com/apache/dubbo-admin). -* Contribute to the projects listed in [ecosystem](https://github.com/dubbo). -* Other forms of contribution not explicitly enumerated above. -* If you would like to contribute, please send an email to dev@dubbo.apache.org to let us know! +If you have questions such as: + +- What is Dubbo? +- How do I use Dubbo? +- Why did an unexpected result occur? + +Please start a discussion at https://github.com/apache/dubbo/discussions. + +However, if you encounter the following situations: + +- You're certain there's a bug that Dubbo needs to fix, +- You believe a feature could be enhanced, +- You have a detailed proposal for improving Dubbo, + +Please open an issue at https://github.com/apache/dubbo/issues. + +To ask effective questions, we recommend reading **[How To Ask Questions The Smart Way](https://github.com/selfteaching/How-To-Ask-Questions-The-Smart-Way/blob/master/How-To-Ask-Questions-The-Smart-Way.md)** first. + +### Contribution + +- Browse the "help wanted" tasks in the [Dubbo project board](https://github.com/orgs/apache/projects/337). +- Participate in discussions on the mailing list. See the subscription [guide](https://github.com/apache/dubbo/wiki/Mailing-list-subscription-guide). +- Respond to queries in the [discussions](https://github.com/apache/dubbo/issues). +- Resolve bugs reported in [issues](https://github.com/apache/dubbo/issues) and send us a pull request. +- Review existing [pull requests](https://github.com/apache/dubbo/pulls). +- Enhance the [website](https://github.com/apache/dubbo-website). We typically need: + - Blog posts + - Translations for documentation + - Use cases showcasing Dubbo integration in enterprise systems. +- Improve the [dubbo-admin](https://github.com/apache/dubbo-admin). +- Contribute to the projects listed in the [ecosystem](https://github.com/apache/?q=dubbo&type=all&language=&sort=). +- Any other forms of contribution not listed above are also welcome. +- If you're interested in contributing, please send an email to [dev@dubbo.apache.org](mailto:dev@dubbo.apache.org) to let us know! + +For further details, please refer our [guide](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md) about how to contribute Dubbo. ## Reporting bugs @@ -223,12 +241,20 @@ Please follow the [template](https://github.com/apache/dubbo/issues/new?template Please report security vulnerabilities to [us](mailto:security@dubbo.apache.org) privately. +## Contact + +* Mailing list: + * dev list: for dev/user discussion. [subscribe](mailto:dev-subscribe@dubbo.apache.org), [unsubscribe](mailto:dev-unsubscribe@dubbo.apache.org), [archive](https://lists.apache.org/list.html?dev@dubbo.apache.org), [guide](https://github.com/apache/dubbo/wiki/Mailing-list-subscription-guide) + +* Bugs: [Issues](https://github.com/apache/dubbo/issues/new?template=dubbo-issue-report-template.md) +* Gitter: [Gitter channel](https://gitter.im/alibaba/dubbo) +* Twitter: [@ApacheDubbo](https://twitter.com/ApacheDubbo) + ## Dubbo ecosystem * [Dubbo Ecosystem Entry](https://github.com/apache?utf8=%E2%9C%93&q=dubbo&type=&language=) - A GitHub group `dubbo` to gather all Dubbo relevant projects not appropriate in [apache](https://github.com/apache) group yet * [Dubbo Website](https://github.com/apache/dubbo-website) - Apache Dubbo official website * [Dubbo Samples](https://github.com/apache/dubbo-samples) - samples for Apache Dubbo -* [Dubbo Spring Boot](https://github.com/apache/dubbo-spring-boot-project) - Spring Boot Project for Dubbo * [Dubbo Admin](https://github.com/apache/dubbo-admin) - The reference implementation for Dubbo admin * [Dubbo Awesome](https://github.com/apache/dubbo-awesome) - Dubbo's slides and video links in Meetup From 002a6a1b3e3a7533fedd2bc2d3e72920d96f47e5 Mon Sep 17 00:00:00 2001 From: Tritone Date: Fri, 8 Mar 2024 10:11:43 +0800 Subject: [PATCH 5/9] 1.The word "shutdown" is a noun. The verb is spelled with a space. (#13855) --- .../common/threadpool/support/AbortPolicyWithReport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java b/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java index 1f2e82e77e..d65211eff9 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java @@ -119,7 +119,7 @@ public class AbortPolicyWithReport extends ThreadPoolExecutor.AbortPolicy { // 0-1 - Thread pool is EXHAUSTED! logger.warn(COMMON_THREAD_POOL_EXHAUSTED, "too much client requesting provider", "", msg); - if (Boolean.parseBoolean(url.getParameter(DUMP_ENABLE, "true"))) { + if (Boolean.parseBoolean(url.getParameter(DUMP_ENABLE, Boolean.TRUE.toString()))) { dumpJStack(); } @@ -190,7 +190,7 @@ public class AbortPolicyWithReport extends ThreadPoolExecutor.AbortPolicy { }); } finally { guard.release(); - // must shutdown thread pool ,if not will lead to OOM + // must shut down thread pool ,if not will lead to OOM if (pool != null) { pool.shutdown(); } From 2f6b4c0c436b34741780ff4c7bd934e1e9e743a5 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Fri, 8 Mar 2024 14:03:52 +0800 Subject: [PATCH 6/9] Update issue template labels --- .github/ISSUE_TEMPLATE/1-bug.yml | 2 +- .github/ISSUE_TEMPLATE/2-feature.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml index 5bff100dd8..e3a2b40685 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.yml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -18,7 +18,7 @@ name: Bug Report description: File a bug report title: "[Bug] " -labels: ["status/need-triage"] +labels: ["type/need-triage", "component/need-triage"] projects: ["apache/337"] body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index d0d6bba7b5..702836ad13 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -18,7 +18,7 @@ name: Feature Request description: Create a Feature Request for Dubbo title: "[Feature] " -labels: ["status/need-triage"] +labels: ["type/need-triage", "component/need-triage"] projects: ["apache/337"] body: - type: markdown From d50adb7c837448358ae980c7f90cd43daf6eab8b Mon Sep 17 00:00:00 2001 From: hyhnet Date: Sun, 10 Mar 2024 11:22:59 +0800 Subject: [PATCH 7/9] fix typos (#13858) Co-authored-by: Cyrus --- .../src/main/java/org/apache/dubbo/config/ModuleConfig.java | 2 +- .../src/main/java/org/apache/dubbo/container/Main.java | 2 +- .../processing/builder/PrimitiveTypeDefinitionBuilder.java | 2 +- .../java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java | 2 +- .../boot/actuate/endpoint/metadata/AbstractDubboMetadata.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java index 743345394d..51fb4706ff 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java @@ -218,7 +218,7 @@ public class ModuleConfig extends AbstractConfig { /** * Whether start module in background. - * If start in backgound, do not await finish on Spring ContextRefreshedEvent. + * If start in background, do not await finish on Spring ContextRefreshedEvent. * * @see org.apache.dubbo.config.spring.context.DubboDeployApplicationListener */ diff --git a/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java b/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java index c9eca15c10..9845e778c3 100644 --- a/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java +++ b/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java @@ -64,7 +64,7 @@ public class Main { for (int i = 0; i < args.length; i++) { containers.add(LOADER.getExtension(args[i])); } - logger.info("Use container type(" + Arrays.toString(args) + ") to run dubbo serivce."); + logger.info("Use container type(" + Arrays.toString(args) + ") to run dubbo service."); if ("true".equals(System.getProperty(SHUTDOWN_HOOK_KEY))) { Runtime.getRuntime().addShutdownHook(new Thread("dubbo-container-shutdown-hook") { diff --git a/dubbo-metadata/dubbo-metadata-processor/src/main/java/org/apache/dubbo/metadata/annotation/processing/builder/PrimitiveTypeDefinitionBuilder.java b/dubbo-metadata/dubbo-metadata-processor/src/main/java/org/apache/dubbo/metadata/annotation/processing/builder/PrimitiveTypeDefinitionBuilder.java index e8577723dd..80f4ff8efd 100644 --- a/dubbo-metadata/dubbo-metadata-processor/src/main/java/org/apache/dubbo/metadata/annotation/processing/builder/PrimitiveTypeDefinitionBuilder.java +++ b/dubbo-metadata/dubbo-metadata-processor/src/main/java/org/apache/dubbo/metadata/annotation/processing/builder/PrimitiveTypeDefinitionBuilder.java @@ -27,7 +27,7 @@ import java.util.Map; import static org.apache.dubbo.metadata.annotation.processing.util.TypeUtils.isPrimitiveType; /** - * {@link TypeBuilder} for Java {@link PrimitiveType primitve type} + * {@link TypeBuilder} for Java {@link PrimitiveType primitive type} * * @since 2.7.6 */ diff --git a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java index 14a6fbf733..9723b2f4d0 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java +++ b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java @@ -436,7 +436,7 @@ class ExchangeCodecTest extends TelnetCodecTest { Assertions.assertEquals(response.getStatus(), obj.getStatus()); Assertions.assertEquals(response.isHeartbeat(), obj.isHeartbeat()); Assertions.assertEquals(person, obj.getResult()); - // encode response verson ?? + // encode response version ?? // Assertions.assertEquals(response.getProtocolVersion(), obj.getVersion()); future.cancel(); diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/AbstractDubboMetadata.java b/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/AbstractDubboMetadata.java index 5a3f332dd6..07a3ab4cd5 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/AbstractDubboMetadata.java +++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/main/java/org/apache/dubbo/spring/boot/actuate/endpoint/metadata/AbstractDubboMetadata.java @@ -43,7 +43,7 @@ import static org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncl import static org.springframework.util.ClassUtils.isPrimitiveOrWrapper; /** - * Abstract Dubbo Meatadata + * Abstract Dubbo Metadata * * @since 2.7.0 */ From 36e0cf5490f9ea289a9d809694b0b2347106a515 Mon Sep 17 00:00:00 2001 From: aofall <10182210+aofall@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:00:16 +0800 Subject: [PATCH 8/9] fix(#13305): RpcContext local address info get null on custom filter (#13751) * fix(#13305): RpcContext local address info get null on custom filter * fix ci build failed * fix ci build failed --- .../rpc/cluster/filter/support/ConsumerContextFilter.java | 6 +----- .../org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java | 2 ++ .../org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/filter/support/ConsumerContextFilter.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/filter/support/ConsumerContextFilter.java index 674e4a61e4..8ee541e291 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/filter/support/ConsumerContextFilter.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/filter/support/ConsumerContextFilter.java @@ -19,7 +19,6 @@ package org.apache.dubbo.rpc.cluster.filter.support; import org.apache.dubbo.common.extension.Activate; import org.apache.dubbo.common.extension.ExtensionLoader; import org.apache.dubbo.common.utils.CollectionUtils; -import org.apache.dubbo.common.utils.NetUtils; import org.apache.dubbo.rpc.AsyncRpcResult; import org.apache.dubbo.rpc.Filter; import org.apache.dubbo.rpc.Invocation; @@ -63,10 +62,7 @@ public class ConsumerContextFilter implements ClusterFilter, ClusterFilter.Liste @Override public Result invoke(Invoker invoker, Invocation invocation) throws RpcException { - RpcContext.getServiceContext() - .setInvoker(invoker) - .setInvocation(invocation) - .setLocalAddress(NetUtils.getLocalHost(), 0); + RpcContext.getServiceContext().setInvoker(invoker).setInvocation(invocation); RpcContext context = RpcContext.getClientAttachment(); context.setAttachment(REMOTE_APPLICATION_KEY, invoker.getUrl().getApplication()); diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java index 2b2463defe..8b6eabe3c8 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java @@ -34,6 +34,7 @@ import org.apache.dubbo.rpc.Invocation; import org.apache.dubbo.rpc.InvokeMode; import org.apache.dubbo.rpc.Invoker; import org.apache.dubbo.rpc.Result; +import org.apache.dubbo.rpc.RpcContext; import org.apache.dubbo.rpc.RpcException; import org.apache.dubbo.rpc.RpcInvocation; import org.apache.dubbo.rpc.protocol.AbstractInvoker; @@ -98,6 +99,7 @@ public class DubboInvoker extends AbstractInvoker { } else { currentClient = exchangeClients.get(index.getAndIncrement() % exchangeClients.size()); } + RpcContext.getServiceContext().setLocalAddress(currentClient.getLocalAddress()); try { boolean isOneway = RpcUtils.isOneway(getUrl(), invocation); diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java index 32789bb0d5..fd1c413626 100644 --- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java +++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java @@ -155,6 +155,7 @@ public class TripleInvoker extends AbstractInvoker { isSync(methodDescriptor, invocation) ? new ThreadlessExecutor() : streamExecutor; ClientCall call = new TripleClientCall( connectionClient, callbackExecutor, getUrl().getOrDefaultFrameworkModel(), writeQueue); + RpcContext.getServiceContext().setLocalAddress(connectionClient.getLocalAddress()); AsyncRpcResult result; try { switch (methodDescriptor.getRpcType()) { From 501bdfaaef53c02ced2799c87ca64b9ecbd29507 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Tue, 12 Mar 2024 11:25:14 +0800 Subject: [PATCH 9/9] Fix memory leak in ScopeBeanFactory (#13901) --- .../apache/dubbo/common/beans/factory/ScopeBeanFactory.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/beans/factory/ScopeBeanFactory.java b/dubbo-common/src/main/java/org/apache/dubbo/common/beans/factory/ScopeBeanFactory.java index 0da12b3893..e57b501316 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/beans/factory/ScopeBeanFactory.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/beans/factory/ScopeBeanFactory.java @@ -25,11 +25,13 @@ import org.apache.dubbo.common.logger.ErrorTypeAwareLogger; import org.apache.dubbo.common.logger.LoggerFactory; import org.apache.dubbo.common.resource.Disposable; import org.apache.dubbo.common.utils.ConcurrentHashMapUtils; +import org.apache.dubbo.common.utils.ConcurrentHashSet; import org.apache.dubbo.common.utils.StringUtils; import org.apache.dubbo.rpc.model.ScopeModelAccessor; import java.util.ArrayList; import java.util.List; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.atomic.AtomicBoolean; @@ -53,7 +55,7 @@ public class ScopeBeanFactory { private final List registeredBeanInfos = new CopyOnWriteArrayList<>(); private InstantiationStrategy instantiationStrategy; private final AtomicBoolean destroyed = new AtomicBoolean(); - private List> registeredClasses = new ArrayList<>(); + private final Set> registeredClasses = new ConcurrentHashSet<>(); public ScopeBeanFactory(ScopeBeanFactory parent, ExtensionAccessor extensionAccessor) { this.parent = parent; @@ -299,7 +301,7 @@ public class ScopeBeanFactory { } } - public List> getRegisteredClasses() { + public Set> getRegisteredClasses() { return registeredClasses; } }