Compare commits

..

132 Commits

Author SHA1 Message Date
dependabot[bot] 11d5bd9ffa
Bump org.apache.maven.plugins:maven-dependency-plugin (#14364)
Bumps [org.apache.maven.plugins:maven-dependency-plugin](https://github.com/apache/maven-dependency-plugin) from 3.7.0 to 3.7.1.
- [Release notes](https://github.com/apache/maven-dependency-plugin/releases)
- [Commits](https://github.com/apache/maven-dependency-plugin/compare/maven-dependency-plugin-3.7.0...maven-dependency-plugin-3.7.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-dependency-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 17:54:45 +08:00
dependabot[bot] 30bf8c4de8
Bump org.apache.maven.plugins:maven-clean-plugin from 3.3.2 to 3.4.0 (#14367)
Bumps [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/apache/maven-clean-plugin/releases)
- [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.3.2...maven-clean-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-clean-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 17:54:38 +08:00
dependabot[bot] 865e8b05cf
Bump org.apache.maven:maven-plugin-api from 3.9.7 to 3.9.8 (#14363)
Bumps [org.apache.maven:maven-plugin-api](https://github.com/apache/maven) from 3.9.7 to 3.9.8.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.9.7...maven-3.9.8)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-plugin-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 17:54:31 +08:00
dependabot[bot] 2dc0f9a374
Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.1 to 3.4.2 (#14365)
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.4.1...maven-jar-plugin-3.4.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 17:54:21 +08:00
dependabot[bot] d98b1e821f
Bump org.apache.maven:maven-core from 3.9.7 to 3.9.8 (#14366)
Bumps [org.apache.maven:maven-core](https://github.com/apache/maven) from 3.9.7 to 3.9.8.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.9.7...maven-3.9.8)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 17:53:37 +08:00
dependabot[bot] 04c16fa944
Bump org.springframework.security:spring-security-bom (#14362)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 5.8.12 to 5.8.13.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.8.12...5.8.13)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 17:53:28 +08:00
Albumen Kevin 7d5fa50783
Fix metrics unable to retrieve lazy inited executor status (#14348)
* Fix metrics unable to retrieve lazy inited executor status

* Enhance
2024-06-24 09:26:45 +08:00
Albumen Kevin 99601a6198 Bump version to 3.2.15-SNAPSHOT 2024-06-23 19:39:50 +08:00
Albumen Kevin 0a48e9d8dc Merge branch '3.2.14-release' into apache-3.2 2024-06-23 19:39:19 +08:00
caoyanan666 4be8594bde
fix(3.2): injvm invoker throws ClassCastException (#14346)
* fix injvm invoker throws ClassCastException

* fix unit test

* fix unit test

* fix NPE

---------

Co-authored-by: caoyanan <caoyanan@growingio.com>
2024-06-20 09:41:36 +08:00
dependabot[bot] 9d333ba906
Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.2.5 to 3.3.0 (#14329)
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.2.5 to 3.3.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.5...surefire-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 09:46:55 +08:00
dependabot[bot] c61cc9f719
Bump io.micrometer:micrometer-bom from 1.13.0 to 1.13.1 (#14331)
Bumps [io.micrometer:micrometer-bom](https://github.com/micrometer-metrics/micrometer) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 09:46:44 +08:00
dependabot[bot] cd89d192b6
Bump io.projectreactor:reactor-core from 3.6.6 to 3.6.7 (#14333)
Bumps [io.projectreactor:reactor-core](https://github.com/reactor/reactor-core) from 3.6.6 to 3.6.7.
- [Release notes](https://github.com/reactor/reactor-core/releases)
- [Commits](https://github.com/reactor/reactor-core/compare/v3.6.6...v3.6.7)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:51:24 +08:00
dependabot[bot] 8200f3ed2e
Bump org.apache.maven.plugins:maven-release-plugin from 3.0.1 to 3.1.0 (#14332)
Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.1...maven-release-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:51:05 +08:00
dependabot[bot] b76e0597f5
Bump spring_version from 5.3.36 to 5.3.37 (#14330)
Bumps `spring_version` from 5.3.36 to 5.3.37.

Updates `org.springframework:spring-test` from 5.3.36 to 5.3.37
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.36...v5.3.37)

Updates `org.springframework:spring-framework-bom` from 5.3.36 to 5.3.37
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.36...v5.3.37)

---
updated-dependencies:
- dependency-name: org.springframework:spring-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:50:59 +08:00
dependabot[bot] 87ab5a6964
Bump io.micrometer:micrometer-core from 1.13.0 to 1.13.1 (#14327)
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:50:41 +08:00
dependabot[bot] 61effff7e8
Bump org.apache.maven.plugins:maven-dependency-plugin (#14325)
Bumps [org.apache.maven.plugins:maven-dependency-plugin](https://github.com/apache/maven-dependency-plugin) from 3.6.1 to 3.7.0.
- [Release notes](https://github.com/apache/maven-dependency-plugin/releases)
- [Commits](https://github.com/apache/maven-dependency-plugin/compare/maven-dependency-plugin-3.6.1...maven-dependency-plugin-3.7.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-dependency-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:50:34 +08:00
dependabot[bot] 086cdd942c
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.5 to 3.3.0 (#14326)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.5 to 3.3.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.5...surefire-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:50:25 +08:00
dependabot[bot] dc2465fff7
Bump io.micrometer:micrometer-tracing-bom from 1.3.0 to 1.3.1 (#14328)
Bumps [io.micrometer:micrometer-tracing-bom](https://github.com/micrometer-metrics/tracing) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/micrometer-metrics/tracing/releases)
- [Commits](https://github.com/micrometer-metrics/tracing/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-tracing-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:50:16 +08:00
dependabot[bot] 0ccd5a1953
Bump netty4_version from 4.1.110.Final to 4.1.111.Final (#14324)
Bumps `netty4_version` from 4.1.110.Final to 4.1.111.Final.

Updates `io.netty:netty-all` from 4.1.110.Final to 4.1.111.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.110.Final...netty-4.1.111.Final)

Updates `io.netty:netty-bom` from 4.1.110.Final to 4.1.111.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.110.Final...netty-4.1.111.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-all
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: io.netty:netty-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:50:07 +08:00
Albumen Kevin 293711e591
Update 3.3 scheduled workflow (#14322) 2024-06-17 10:17:31 +08:00
Albumen Kevin 5ad25875b9 Prepare 3.2.14 release 2024-06-17 09:49:19 +08:00
Albumen Kevin b9825cdbd0 Update serialize blocked list 2024-06-17 09:48:29 +08:00
dependabot[bot] 79fa89bac7
Bump net.bytebuddy:byte-buddy from 1.14.15 to 1.14.17 (#14275)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.15 to 1.14.17.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.15...byte-buddy-1.14.17)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 09:47:49 +08:00
dependabot[bot] 3e53e32053
Bump io.opentelemetry:opentelemetry-bom from 1.38.0 to 1.39.0 (#14304)
Bumps [io.opentelemetry:opentelemetry-bom](https://github.com/open-telemetry/opentelemetry-java) from 1.38.0 to 1.39.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-java/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-java/compare/v1.38.0...v1.39.0)

---
updated-dependencies:
- dependency-name: io.opentelemetry:opentelemetry-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 23:35:17 +08:00
dependabot[bot] d7ac348f64
Bump org.apache.maven.plugins:maven-checkstyle-plugin (#14305)
Bumps [org.apache.maven.plugins:maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.3.1 to 3.4.0.
- [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.3.1...maven-checkstyle-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 23:34:58 +08:00
dependabot[bot] 14fd38f1b7
Bump org.apache.maven.shared:maven-common-artifact-filters (#14306)
Bumps [org.apache.maven.shared:maven-common-artifact-filters](https://github.com/apache/maven-common-artifact-filters) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/apache/maven-common-artifact-filters/releases)
- [Commits](https://github.com/apache/maven-common-artifact-filters/compare/maven-common-artifact-filters-3.3.2...maven-common-artifact-filters-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.shared:maven-common-artifact-filters
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 23:34:34 +08:00
xixingya d3eef04759
fix DubboRelaxedBinding2AutoConfiguration and DubboAutoConfiguration created too early. (#14255) 2024-06-06 22:34:20 +08:00
aofall a534350541
fix: Support disable Curator EnsembleTracker in ServiceDiscovery (#14285) 2024-06-05 11:39:27 +08:00
xiaosheng 48ad387ace
⬆️ upgrade micrometer tracing to 1.3.0 (#14284)
* ⬆️ upgrade micrometer tracing to 1.3.0

* ⬆️ upgrade micrometer tracing to 1.3.0
2024-06-04 23:17:13 +08:00
liaozan 523a4189b8
Move dubbo versions file from META-INF/versions to META-INF/dubbo-version (#14247)
* Move dubbo versions file from META-INF/versions to META-INF/dubbo-versions

* Make 'META-INF/dubbo-versions' as constants
2024-06-04 22:59:16 +08:00
aofall 473ea36b04
fix: Support close the Curator EnsembleTracker (#14281) 2024-06-04 12:54:44 +08:00
dependabot[bot] 9fde4c9e60
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.4.1 to 3.5.0 (#14277)
Bumps [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.4.1...enforcer-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 11:39:36 +08:00
dependabot[bot] 8fee3db28f
Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.3 to 3.7.0 (#14274)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.3 to 3.7.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.3...maven-javadoc-plugin-3.7.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 11:39:24 +08:00
dependabot[bot] 26113503e8
Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.3 to 3.6.0 (#14271)
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.3...maven-shade-plugin-3.6.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 11:39:15 +08:00
dependabot[bot] a581afbb2c
Bump org.apache.maven.plugin-tools:maven-plugin-annotations (#14276)
Bumps [org.apache.maven.plugin-tools:maven-plugin-annotations](https://github.com/apache/maven-plugin-tools) from 3.13.0 to 3.13.1.
- [Release notes](https://github.com/apache/maven-plugin-tools/releases)
- [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.13.0...maven-plugin-tools-3.13.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 11:38:51 +08:00
dependabot[bot] 913a9aac33
Bump org.apache.maven.plugins:maven-plugin-plugin from 3.13.0 to 3.13.1 (#14278)
Bumps [org.apache.maven.plugins:maven-plugin-plugin](https://github.com/apache/maven-plugin-tools) from 3.13.0 to 3.13.1.
- [Release notes](https://github.com/apache/maven-plugin-tools/releases)
- [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.13.0...maven-plugin-tools-3.13.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-plugin-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 11:38:41 +08:00
dependabot[bot] 0baba8646b
Bump bytebuddy.version from 1.14.15 to 1.14.17 (#14273)
Bumps `bytebuddy.version` from 1.14.15 to 1.14.17.

Updates `net.bytebuddy:byte-buddy` from 1.14.15 to 1.14.17
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.15...byte-buddy-1.14.17)

Updates `net.bytebuddy:byte-buddy-agent` from 1.14.15 to 1.14.17
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.15...byte-buddy-1.14.17)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 11:38:33 +08:00
dependabot[bot] 600f869ad7
Bump com.alibaba.fastjson2:fastjson2 from 2.0.49 to 2.0.51 (#14272)
Bumps [com.alibaba.fastjson2:fastjson2](https://github.com/alibaba/fastjson2) from 2.0.49 to 2.0.51.
- [Release notes](https://github.com/alibaba/fastjson2/releases)
- [Commits](https://github.com/alibaba/fastjson2/compare/2.0.49...2.0.51)

---
updated-dependencies:
- dependency-name: com.alibaba.fastjson2:fastjson2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 11:38:23 +08:00
caoyanan666 95f9984571
fix triple reactor call throws "Too many response for unary method" exception (#14261)
Co-authored-by: caoyanan <caoyanan@growingio.com>
2024-05-31 16:26:59 +08:00
aofall d35d7eb30c
fix: Disable accesslog while the config is false (#14257) 2024-05-31 15:05:16 +08:00
王聪洋 63e5bef4fa
fix opentelemetry version change (#14252)
* fix opentelemetry version change

* format code
2024-05-30 18:03:15 +08:00
Albumen Kevin 6ad71e676c Bump version to 3.2.14-SNAPSHOT 2024-05-29 15:01:57 +08:00
Albumen Kevin da53578c57 Merge branch '3.2.13-release' into apache-3.2 2024-05-29 15:01:08 +08:00
yuanxingke 000db7c40a
fix: when url has param with question mark,parse param wrong (#14235) 2024-05-28 10:55:46 +08:00
dependabot[bot] 2ddf0fdec4
Bump org.apache.maven:maven-plugin-api from 3.9.6 to 3.9.7 (#14244)
Bumps [org.apache.maven:maven-plugin-api](https://github.com/apache/maven) from 3.9.6 to 3.9.7.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.9.6...maven-3.9.7)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-plugin-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:53:06 +08:00
dependabot[bot] 61bfa07a49
Bump org.apache.commons:commons-compress from 1.26.1 to 1.26.2 (#14243)
Bumps org.apache.commons:commons-compress from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:52:56 +08:00
dependabot[bot] d1969ff18b
Bump spring_version from 5.3.35 to 5.3.36 (#14242)
Bumps `spring_version` from 5.3.35 to 5.3.36.

Updates `org.springframework:spring-test` from 5.3.35 to 5.3.36
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.35...v5.3.36)

Updates `org.springframework:spring-framework-bom` from 5.3.35 to 5.3.36
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.35...v5.3.36)

---
updated-dependencies:
- dependency-name: org.springframework:spring-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:52:43 +08:00
dependabot[bot] 1fd974efbf
Bump netty4_version from 4.1.109.Final to 4.1.110.Final (#14241)
Bumps `netty4_version` from 4.1.109.Final to 4.1.110.Final.

Updates `io.netty:netty-all` from 4.1.109.Final to 4.1.110.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.109.Final...netty-4.1.110.Final)

Updates `io.netty:netty-bom` from 4.1.109.Final to 4.1.110.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.109.Final...netty-4.1.110.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-all
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: io.netty:netty-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:52:29 +08:00
dependabot[bot] c517fd5d62
Bump com.github.codemonstur:embedded-redis from 1.1.0 to 1.4.3 (#14240)
Bumps [com.github.codemonstur:embedded-redis](https://github.com/codemonstur/embedded-redis) from 1.1.0 to 1.4.3.
- [Release notes](https://github.com/codemonstur/embedded-redis/releases)
- [Commits](https://github.com/codemonstur/embedded-redis/compare/embedded-redis-1.1.0...embedded-redis-1.4.3)

---
updated-dependencies:
- dependency-name: com.github.codemonstur:embedded-redis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:52:16 +08:00
dependabot[bot] 98edd118ae
Bump net.bytebuddy:byte-buddy from 1.14.15 to 1.14.16 (#14238)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.15 to 1.14.16.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.15...byte-buddy-1.14.16)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:52:08 +08:00
dependabot[bot] 89cc36e2b3
Bump jakarta.validation:jakarta.validation-api from 3.0.2 to 3.1.0 (#14239)
Bumps [jakarta.validation:jakarta.validation-api](https://github.com/jakartaee/validation) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/jakartaee/validation/releases)
- [Commits](https://github.com/jakartaee/validation/compare/3.0.2...3.1.0)

---
updated-dependencies:
- dependency-name: jakarta.validation:jakarta.validation-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:51:59 +08:00
dependabot[bot] e6f0dfe000
Bump org.apache.maven:maven-core from 3.9.6 to 3.9.7 (#14237)
Bumps [org.apache.maven:maven-core](https://github.com/apache/maven) from 3.9.6 to 3.9.7.
- [Release notes](https://github.com/apache/maven/releases)
- [Commits](https://github.com/apache/maven/compare/maven-3.9.6...maven-3.9.7)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:51:52 +08:00
Albumen Kevin 3609ddb225 Disable RedisMetadataReportTest on Windows 2024-05-24 11:11:44 +08:00
Albumen Kevin bb376dbdd7 Prepare 3.2.13 release 2024-05-24 10:36:08 +08:00
Albumen Kevin 65215ed8a0 Try fix redis server in windows env 2024-05-24 10:34:55 +08:00
xiaosheng 23599941e7
⬆️ upgrade micrometer to 1.13 (#14228)
* ⬆️ upgrade micrometer to 1.13

* ⬆️ upgrade micrometer to 1.13
2024-05-24 09:52:04 +08:00
stellar a6c61175c5
fix:embedded-redis need update version to run on macos Sonoma (#14072) (#14074) (#14227) 2024-05-23 11:03:18 +08:00
b12b23cbf0
fix: not initialize MetricsReporter if not support prometheus (#14225)
* fix: not initialize if not support prometheus

* add method isImportPrometheus test

---------

Co-authored-by: yuanhongbo <yuanhongbo@cai-inc.com>
2024-05-22 11:10:19 +08:00
王聪洋 cc95b52dfb
Com.google.code.gson gson 2.11.0 (#14224)
* Bump com.google.code.gson:gson from 2.10.1 to 2.11.0

Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.10.1 to 2.11.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.10.1...gson-parent-2.11.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix testcase

* format code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 18:57:10 +08:00
Lee hong 189d76be5d
check child is json or not in zookeeper.it will be continue if not. (#14166)
* check child is json or not.it will be continue if not.

* try to save code format problem.

* child could be json array.so child could start with { or [.

* fix the problem of it will continue some message to make zookeeper outtime.

* try to continue the string without warn.

* format the code.

* catch the exception of JSONException.

* try to fix java.lang.NoClassDefFoundError because of JSONException.

* add isJson method and implement it in JSON.

* implement the checkJson method and use it in ZookeeperRegistry

* format the code.

* add some test case.

* format the code.

* format the code.

* format the code.

* format the code.

* format the code.

* format the code.

* format the code.

* format the code.

* format the code.

* add some information.

* format the code.

* add human friendly comment.

* format the code.

* format the code.

---------

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
Co-authored-by: Jermaine Hua <crazyhzm@gmail.com>
2024-05-21 11:36:53 +08:00
zrlw e21244a431
check whether property name is safe based on the last fragment kebab-case comparison (#14208) 2024-05-21 10:20:51 +08:00
dependabot[bot] 57b87029a6
Bump org.graalvm.buildtools:native-maven-plugin from 0.10.1 to 0.10.2 (#14217)
Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/graalvm/native-build-tools/releases)
- [Commits](https://github.com/graalvm/native-build-tools/compare/0.10.1...0.10.2)

---
updated-dependencies:
- dependency-name: org.graalvm.buildtools:native-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:09:33 +08:00
dependabot[bot] 75f0eb4a15
Bump io.projectreactor:reactor-core from 3.6.5 to 3.6.6 (#14212)
Bumps [io.projectreactor:reactor-core](https://github.com/reactor/reactor-core) from 3.6.5 to 3.6.6.
- [Release notes](https://github.com/reactor/reactor-core/releases)
- [Commits](https://github.com/reactor/reactor-core/compare/v3.6.5...v3.6.6)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:04:45 +08:00
dependabot[bot] b867f9ebd7
Bump spring_version from 5.3.34 to 5.3.35 (#14211)
Bumps `spring_version` from 5.3.34 to 5.3.35.

Updates `org.springframework:spring-test` from 5.3.34 to 5.3.35
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.34...v5.3.35)

Updates `org.springframework:spring-framework-bom` from 5.3.34 to 5.3.35
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.34...v5.3.35)

---
updated-dependencies:
- dependency-name: org.springframework:spring-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:04:37 +08:00
dependabot[bot] d64fbf8b94
Bump grpc.version from 1.63.0 to 1.64.0 (#14213)
Bumps `grpc.version` from 1.63.0 to 1.64.0.

Updates `io.grpc:grpc-core` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-stub` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-protobuf` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-context` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-netty-shaded` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-netty` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-grpclb` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-context
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty-shaded
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:04:18 +08:00
dependabot[bot] a6187b8e93
Bump org.codehaus.mojo:build-helper-maven-plugin from 3.5.0 to 3.6.0 (#14214)
Bumps [org.codehaus.mojo:build-helper-maven-plugin](https://github.com/mojohaus/build-helper-maven-plugin) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/mojohaus/build-helper-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/build-helper-maven-plugin/compare/3.5.0...3.6.0)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:build-helper-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:04:08 +08:00
dependabot[bot] 43ae6a7aba
Bump commons-logging:commons-logging from 1.3.1 to 1.3.2 (#14215)
Bumps commons-logging:commons-logging from 1.3.1 to 1.3.2.

---
updated-dependencies:
- dependency-name: commons-logging:commons-logging
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:03:58 +08:00
dependabot[bot] faabbf6435
Bump io.micrometer:micrometer-core from 1.12.5 to 1.13.0 (#14219)
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.12.5 to 1.13.0.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.5...v1.13.0)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:03:50 +08:00
dependabot[bot] 9968834e62
Bump bytebuddy.version from 1.14.14 to 1.14.15 (#14179)
Bumps `bytebuddy.version` from 1.14.14 to 1.14.15.

Updates `net.bytebuddy:byte-buddy` from 1.14.14 to 1.14.15
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.14...byte-buddy-1.14.15)

Updates `net.bytebuddy:byte-buddy-agent` from 1.14.14 to 1.14.15
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.14...byte-buddy-1.14.15)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:49:23 +08:00
dependabot[bot] 4cd9a98395
Bump net.bytebuddy:byte-buddy from 1.14.14 to 1.14.15 (#14184)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.14 to 1.14.15.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.14...byte-buddy-1.14.15)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:49:13 +08:00
dependabot[bot] 80b145db3e
Bump org.testcontainers:testcontainers from 1.19.7 to 1.19.8 (#14183)
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.7 to 1.19.8.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.7...1.19.8)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:48:31 +08:00
dependabot[bot] cd78bba7b7
Bump org.aspectj:aspectjweaver from 1.9.22 to 1.9.22.1 (#14181)
Bumps [org.aspectj:aspectjweaver](https://github.com/eclipse/org.aspectj) from 1.9.22 to 1.9.22.1.
- [Release notes](https://github.com/eclipse/org.aspectj/releases)
- [Commits](https://github.com/eclipse/org.aspectj/commits)

---
updated-dependencies:
- dependency-name: org.aspectj:aspectjweaver
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:48:23 +08:00
caoyanan666 5d1c0eae1c
fix(3.2): Triple Reactor OneToMany Handler null pointer fix and DubboFilter support (#14125)
* ReactorDubbo3TripleStub.mustache add schema registry

* Triple Reactor OneToMany Handler null pointer fix and DubboFilter support

* trigger ci

* Adjust the order

* trigger ci

* ServerTripleReactorSubscriber meaningful

---------

Co-authored-by: caoyanan <caoyanan@growingio.com>
Co-authored-by: Ken Liu <ken.lj.hz@gmail.com>
2024-05-11 14:49:28 +08:00
Jermaine Hua 1e6a84e16a
Bump org.apache.maven.plugins:maven-plugin-plugin from 3.10.2 to 3.13.0 (#14174)
Signed-off-by: “JermaineHua” <crazyhzm@gmail.com>
2024-05-11 14:40:56 +08:00
Kaiyao Ke 8e2eb332a1
fixed non-idempotent unit tests (#14172) 2024-05-11 00:27:46 +08:00
jkoChen 5d916cd2c1
fix: fix the signature error when using reflection to access the org.springframework.core.annotation.AnnotatedElementUtils#getMergedAnnotation method (#14156)
Fix the problem,the method
org.apache.dubbo.config.spring.util.AnnotationUtils#tryGetMergedAnnotation
utilizes reflection to access
org.springframework.core.annotation.AnnotatedElementUtils#getMergedAnnotation.
However, there is a signature mismatch in the method's input parameters,
which leads to an inability to retrieve the correct method.
Consequently, this results in the failure to obtain the
mergedAnnotation.

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
2024-05-08 15:20:54 +08:00
Kaiyao Ke 84193247be
fix non-idempotent unit test (#14135) 2024-05-08 14:38:48 +08:00
caoyanan666 1abe9f8087
fix(3.2): The oneToOne method of the ReactorServerCalls class will cause the request to hang when the result is Mono Empty (#14121)
* Fix triple reactor request hung when result is Mono Empty

* code format

* fix compile

---------

Co-authored-by: caoyanan <caoyanan@growingio.com>
2024-05-08 14:17:18 +08:00
TomlongTK dfd135eb95
Fix the problem of multiple namespaces in MetadataReport (#13971)
* Fix the problem of multiple namespaces in MetadataReport

* refine

* Remove registry config setting

* Add some unit tests

* Revert getId

* Fix cache key
2024-05-08 14:09:08 +08:00
zrlw 8863604619
trim application name of old mapping content (#14133)
* trim application name of old mapping content

* trim and filter out empty name at ServiceNameMapping#getAppNames

* remove unused import
2024-05-08 11:59:26 +08:00
TomlongTK faefee2cb2
Optimize convertToNumber method (#14159) 2024-05-08 11:51:00 +08:00
hanpen24 9d659eba44
Fix channel leakage in onConnected and onGoaway methods (#14100) 2024-05-08 11:36:08 +08:00
caoyanan666 7f6decaf19
ReactorDubbo3TripleStub.mustache add schema registry (#14035)
Co-authored-by: caoyanan <caoyanan@growingio.com>
Co-authored-by: Ken Liu <ken.lj.hz@gmail.com>
2024-05-08 11:32:43 +08:00
YuLuo a3e43fe99b
optimise: create http client by connection pool (#14079) 2024-05-08 11:19:49 +08:00
Chenjp c24eca7e1e
Update gitignore - Eclipse IDE specific conf (#14099)
Those Ecilpse-IDE specific files are generated by mvn eclipse:eclipse.
2024-05-08 11:06:02 +08:00
dependabot[bot] 0fc6a30684
Bump jackson_version from 2.17.0 to 2.17.1 (#14153)
Bumps `jackson_version` from 2.17.0 to 2.17.1.

Updates `com.fasterxml.jackson.core:jackson-core` from 2.17.0 to 2.17.1
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.17.0...jackson-core-2.17.1)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.17.0 to 2.17.1
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.17.0 to 2.17.1

Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.17.0 to 2.17.1
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:52:01 +08:00
dependabot[bot] 66bea58c13
Bump org.apache.maven.plugin-tools:maven-plugin-annotations (#14154)
Bumps [org.apache.maven.plugin-tools:maven-plugin-annotations](https://github.com/apache/maven-plugin-tools) from 3.12.0 to 3.13.0.
- [Release notes](https://github.com/apache/maven-plugin-tools/releases)
- [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.12.0...maven-plugin-tools-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:51:50 +08:00
dependabot[bot] 14c67845ee
Bump net.bytebuddy:byte-buddy from 1.14.13 to 1.14.14 (#14142)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.13 to 1.14.14.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.13...byte-buddy-1.14.14)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:50:49 +08:00
dependabot[bot] 5db5fa9035
Bump bytebuddy.version from 1.14.13 to 1.14.14 (#14140)
Bumps `bytebuddy.version` from 1.14.13 to 1.14.14.

Updates `net.bytebuddy:byte-buddy` from 1.14.13 to 1.14.14
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.13...byte-buddy-1.14.14)

Updates `net.bytebuddy:byte-buddy-agent` from 1.14.13 to 1.14.14
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.13...byte-buddy-1.14.14)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:50:41 +08:00
dependabot[bot] 35780baa39
Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.2 to 3.5.3 (#14141)
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.2...maven-shade-plugin-3.5.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:50:31 +08:00
dependabot[bot] b2fb0e8e1e
Bump io.micrometer:micrometer-bom from 1.12.4 to 1.12.5 (#14086)
Bumps [io.micrometer:micrometer-bom](https://github.com/micrometer-metrics/micrometer) from 1.12.4 to 1.12.5.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.4...v1.12.5)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:49:13 +08:00
dependabot[bot] 53141b152f
Bump spring_version from 5.3.33 to 5.3.34 (#14109)
Bumps `spring_version` from 5.3.33 to 5.3.34.

Updates `org.springframework:spring-test` from 5.3.33 to 5.3.34
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.33...v5.3.34)

Updates `org.springframework:spring-framework-bom` from 5.3.33 to 5.3.34
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.33...v5.3.34)

---
updated-dependencies:
- dependency-name: org.springframework:spring-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:49:02 +08:00
dependabot[bot] 1b69c61992
Bump org.apache.maven.plugins:maven-jar-plugin from 3.3.0 to 3.4.1 (#14115)
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.3.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.3.0...maven-jar-plugin-3.4.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 09:47:48 +08:00
dependabot[bot] 0b7d980b51
Bump com.alibaba.fastjson2:fastjson2 from 2.0.48 to 2.0.49 (#14087)
Bumps [com.alibaba.fastjson2:fastjson2](https://github.com/alibaba/fastjson2) from 2.0.48 to 2.0.49.
- [Release notes](https://github.com/alibaba/fastjson2/releases)
- [Commits](https://github.com/alibaba/fastjson2/compare/2.0.48...2.0.49)

---
updated-dependencies:
- dependency-name: com.alibaba.fastjson2:fastjson2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 15:16:35 +08:00
Albumen Kevin d16f0ca310
Sync BitList for all the operations (#14057)
* Sync BitList for all the operations

* Fix style
2024-05-06 14:33:10 +08:00
dependabot[bot] 20f252d147
Bump netty4_version from 4.1.108.Final to 4.1.109.Final (#14108)
Bumps `netty4_version` from 4.1.108.Final to 4.1.109.Final.

Updates `io.netty:netty-all` from 4.1.108.Final to 4.1.109.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.108.Final...netty-4.1.109.Final)

Updates `io.netty:netty-bom` from 4.1.108.Final to 4.1.109.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.108.Final...netty-4.1.109.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-all
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: io.netty:netty-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 23:38:35 +08:00
dependabot[bot] be7c863aed
Bump ch.qos.logback:logback-core from 1.5.3 to 1.5.6 (#14110)
Bumps [ch.qos.logback:logback-core](https://github.com/qos-ch/logback) from 1.5.3 to 1.5.6.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.5.3...v_1.5.6)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 23:38:05 +08:00
dependabot[bot] e9296eca1d
Bump io.micrometer:micrometer-core from 1.12.4 to 1.12.5 (#14112)
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.12.4 to 1.12.5.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.4...v1.12.5)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 23:37:12 +08:00
dependabot[bot] 7588d0e5b2
Bump io.projectreactor:reactor-core from 3.6.4 to 3.6.5 (#14111)
Bumps [io.projectreactor:reactor-core](https://github.com/reactor/reactor-core) from 3.6.4 to 3.6.5.
- [Release notes](https://github.com/reactor/reactor-core/releases)
- [Commits](https://github.com/reactor/reactor-core/compare/v3.6.4...v3.6.5)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 23:36:12 +08:00
dependabot[bot] efe219b770
Bump commons-io:commons-io from 2.16.0 to 2.16.1 (#14114)
Bumps commons-io:commons-io from 2.16.0 to 2.16.1.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 23:35:13 +08:00
dependabot[bot] 8e141cc958
Bump io.micrometer:micrometer-tracing-bom from 1.2.4 to 1.2.5 (#14116)
Bumps [io.micrometer:micrometer-tracing-bom](https://github.com/micrometer-metrics/tracing) from 1.2.4 to 1.2.5.
- [Release notes](https://github.com/micrometer-metrics/tracing/releases)
- [Commits](https://github.com/micrometer-metrics/tracing/compare/v1.2.4...v1.2.5)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-tracing-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 23:33:28 +08:00
dependabot[bot] ac8a9b65b7
Bump org.springframework.security:spring-security-bom (#14117)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 5.8.11 to 5.8.12.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.8.11...5.8.12)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 23:29:05 +08:00
Wang Chengming 0a1ad55bff
compatible service discovery, export noting suffix servicename, eg: ${interface}:${version} (#14096)
compatible service discovery, export noting suffix servicename, eg: {interface}:${version}

code format

compatible service discovery, export noting suffix servicename, eg: {interface}:${version}

Co-authored-by: 呈铭 <beck.wcm@antgroup.com>
2024-04-22 19:42:47 +08:00
aofall ca7151e531
fix: Bytebuf resource leak (#14071) 2024-04-16 14:24:28 +08:00
Chenjp 155c2f2c18
Update .ignore to exclude log files. (#14064)
Ignore custom-access.log and its rotated files.
2024-04-13 13:03:50 +08:00
aamingaa 6b3f54383f
upgrade version (#14066) 2024-04-11 16:47:51 +08:00
aamingaa aedf4d7192
change snapshot version (#14065) 2024-04-11 16:15:50 +08:00
aamingaa e825cb1117
update to 3.2.12 2024-04-11 14:51:52 +08:00
dependabot[bot] 45b5d44064
Bump com.alibaba.nacos:nacos-client from 2.3.1 to 2.3.2 (#14042)
Bumps [com.alibaba.nacos:nacos-client](https://github.com/alibaba/nacos) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/alibaba/nacos/releases)
- [Changelog](https://github.com/alibaba/nacos/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/alibaba/nacos/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: com.alibaba.nacos:nacos-client
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 09:48:39 +08:00
dependabot[bot] 16bca1e42c
Bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to 3.3.1 (#14049)
Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.0 to 3.3.1.
- [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.3.0...maven-source-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:35:52 +08:00
dependabot[bot] f987d50047
Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12 (#14047)
Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.11...v0.8.12)

---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:35:45 +08:00
dependabot[bot] 3608f384c2
Bump org.apache.maven.plugin-tools:maven-plugin-annotations (#14048)
Bumps [org.apache.maven.plugin-tools:maven-plugin-annotations](https://github.com/apache/maven-plugin-tools) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/apache/maven-plugin-tools/releases)
- [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.11.0...maven-plugin-tools-3.12.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:35:36 +08:00
dependabot[bot] 029650668f
Bump bytebuddy.version from 1.14.12 to 1.14.13 (#14046)
Bumps `bytebuddy.version` from 1.14.12 to 1.14.13.

Updates `net.bytebuddy:byte-buddy` from 1.14.12 to 1.14.13
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.12...byte-buddy-1.14.13)

Updates `net.bytebuddy:byte-buddy-agent` from 1.14.12 to 1.14.13
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.12...byte-buddy-1.14.13)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:35:28 +08:00
dependabot[bot] 1689109725
Bump spring_version from 5.3.25 to 5.3.33 (#14041)
Bumps `spring_version` from 5.3.25 to 5.3.33.

Updates `org.springframework:spring-test` from 5.3.25 to 5.3.33
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.25...v5.3.33)

Updates `org.springframework:spring-framework-bom` from 3.2.18.RELEASE to 5.3.33
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v3.2.18.RELEASE...v5.3.33)

---
updated-dependencies:
- dependency-name: org.springframework:spring-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:35:19 +08:00
dependabot[bot] cf0529f7ae
Bump grpc.version from 1.62.2 to 1.63.0 (#14044)
Bumps `grpc.version` from 1.62.2 to 1.63.0.

Updates `io.grpc:grpc-core` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-stub` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-protobuf` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-context` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-netty-shaded` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-netty` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-grpclb` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-context
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty-shaded
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:35:00 +08:00
heliang666s 3e4fda20bb
Update the comment content in pom.xml to be consistent (#14039) 2024-04-08 16:34:36 +08:00
caoyanan666 95439fb23c
fix(3.2): triple AbstractServerCallListener NPE (#14009)
* fix NPE

* Optimize the handling of exceptions in response

---------

Co-authored-by: caoyanan <caoyanan@growingio.com>
2024-04-07 14:56:35 +08:00
hanpen24 f03823eec1
Use ExecutorService instead of event loop for Netty connection (#13904)
* Use ExecutorService instead of event loop for Netty connection

This change addresses the issue of the event loop being blocked for an extended period, improving overall performance and responsiveness.

* fix log getConnectAddress

* applay format

* applay format

* applay format

* applay format

* applay format

* Use an independent ExecutorService

* Use ScheduledExecutorService for scheduling tasks

* delete unnecessary files

* Modify to stop ExecutorService using shutdownNow

* Modify to use ScheduledExecutor managed by FrameworkExecutorRepository

* Synchronize reconnectDuration with HeaderExchangeClient's reconnectDuration

* get framework model directly

use awaitility
2024-04-07 10:31:23 +08:00
dependabot[bot] 40280a2c29
Bump commons-io:commons-io from 2.15.1 to 2.16.0 (#14020)
Bumps commons-io:commons-io from 2.15.1 to 2.16.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 14:39:43 +08:00
dependabot[bot] b472712f05
Bump org.apache.tomcat.embed:tomcat-embed-core from 8.5.99 to 8.5.100 (#14019)
Bumps org.apache.tomcat.embed:tomcat-embed-core from 8.5.99 to 8.5.100.

---
updated-dependencies:
- dependency-name: org.apache.tomcat.embed:tomcat-embed-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 16:44:35 +08:00
dependabot[bot] b44ca6b51f
Bump net.bytebuddy:byte-buddy from 1.14.12 to 1.14.13 (#14018)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.12 to 1.14.13.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.12...byte-buddy-1.14.13)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 16:44:13 +08:00
icodening ec443043e2
fix triple stub calling grpc server fail (#14012) 2024-04-01 11:03:29 +08:00
jean pierre Lerbscher 00812ce41c
Fix Sonar issue s2293 The diamond operator ('<>') should be used (#14005) 2024-03-29 11:40:06 +08:00
dependabot[bot] 4be3587dd1
Bump org.apache.maven.plugins:maven-assembly-plugin from 3.7.0 to 3.7.1 (#13992)
Bumps [org.apache.maven.plugins:maven-assembly-plugin](https://github.com/apache/maven-assembly-plugin) from 3.7.0 to 3.7.1.
- [Release notes](https://github.com/apache/maven-assembly-plugin/releases)
- [Commits](https://github.com/apache/maven-assembly-plugin/compare/maven-assembly-plugin-3.7.0...maven-assembly-plugin-3.7.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-assembly-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:07:11 +08:00
dependabot[bot] 1f74ffd969
Bump org.springframework.security:spring-security-bom (#13993)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 5.8.10 to 5.8.11.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.8.10...5.8.11)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:07:02 +08:00
dependabot[bot] 9e18589e81
Bump netty4_version from 4.1.107.Final to 4.1.108.Final (#13988)
Bumps `netty4_version` from 4.1.107.Final to 4.1.108.Final.

Updates `io.netty:netty-all` from 4.1.107.Final to 4.1.108.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.107.Final...netty-4.1.108.Final)

Updates `io.netty:netty-bom` from 4.1.107.Final to 4.1.108.Final
- [Commits](https://github.com/netty/netty/compare/netty-4.1.107.Final...netty-4.1.108.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-all
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: io.netty:netty-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:06:53 +08:00
dependabot[bot] d7d46e635c
Bump com.alibaba.fastjson2:fastjson2 from 2.0.47 to 2.0.48 (#13989)
Bumps [com.alibaba.fastjson2:fastjson2](https://github.com/alibaba/fastjson2) from 2.0.47 to 2.0.48.
- [Release notes](https://github.com/alibaba/fastjson2/releases)
- [Commits](https://github.com/alibaba/fastjson2/compare/2.0.47...2.0.48)

---
updated-dependencies:
- dependency-name: com.alibaba.fastjson2:fastjson2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:06:44 +08:00
dependabot[bot] 59b3c9c9dc
Bump org.aspectj:aspectjweaver from 1.9.21.2 to 1.9.22 (#13991)
Bumps [org.aspectj:aspectjweaver](https://github.com/eclipse/org.aspectj) from 1.9.21.2 to 1.9.22.
- [Release notes](https://github.com/eclipse/org.aspectj/releases)
- [Commits](https://github.com/eclipse/org.aspectj/commits)

---
updated-dependencies:
- dependency-name: org.aspectj:aspectjweaver
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:06:38 +08:00
dependabot[bot] f4d75450b0
Bump swagger_version from 1.6.13 to 1.6.14 (#13990)
Bumps `swagger_version` from 1.6.13 to 1.6.14.

Updates `io.swagger:swagger-annotations` from 1.6.13 to 1.6.14

Updates `io.swagger:swagger-jaxrs` from 1.6.13 to 1.6.14

---
updated-dependencies:
- dependency-name: io.swagger:swagger-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.swagger:swagger-jaxrs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:06:31 +08:00
dependabot[bot] fa07b61710
Bump org.apache.maven.plugins:maven-compiler-plugin (#13986)
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:06:20 +08:00
dependabot[bot] 1bdcc57860
Bump commons-logging:commons-logging from 1.3.0 to 1.3.1 (#13987)
Bumps commons-logging:commons-logging from 1.3.0 to 1.3.1.

---
updated-dependencies:
- dependency-name: commons-logging:commons-logging
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 19:06:12 +08:00
1461 changed files with 16979 additions and 54190 deletions

View File

@ -19,8 +19,8 @@
dubbo
dubbo-auth
dubbo-apache-release
dubbo-all-shaded
dubbo-bom
dubbo-build-tools
dubbo-cluster
dubbo-common
dubbo-compatible
@ -28,12 +28,13 @@ dubbo-compiler
dubbo-config
dubbo-config-api
dubbo-config-spring
dubbo-config-spring6
dubbo-configcenter
dubbo-configcenter-file
dubbo-configcenter-apollo
dubbo-configcenter-nacos
dubbo-configcenter-zookeeper
dubbo-container
dubbo-container-api
dubbo-container-spring
dubbo-core-spi
dubbo-dependencies
dubbo-dependencies-all
@ -41,13 +42,13 @@ dubbo-dependencies-bom
dubbo-dependencies-zookeeper
dubbo-dependencies-zookeeper-curator5
dubbo-distribution
dubbo-filter
dubbo-filter-cache
dubbo-filter-validation
dubbo-kubernetes
dubbo-maven-plugin
dubbo-metadata
dubbo-metadata-api
dubbo-metadata-rest
dubbo-metadata-definition-protobuf
dubbo-metadata-processor
dubbo-metadata-report-nacos
@ -60,9 +61,11 @@ dubbo-metrics-metadata
dubbo-metrics-prometheus
dubbo-metrics-registry
dubbo-metrics-config-center
dubbo-metrics-netty
dubbo-metrics-event
dubbo-monitor
dubbo-monitor-api
dubbo-monitor-default
dubbo-native
dubbo-native-plugin
dubbo-parent
dubbo-plugin
dubbo-qos
@ -74,14 +77,11 @@ dubbo-registry-multicast
dubbo-registry-multiple
dubbo-registry-nacos
dubbo-registry-zookeeper
dubbo-xds
dubbo-remoting
dubbo-remoting-api
dubbo-remoting-http
dubbo-remoting-http12
dubbo-remoting-netty
dubbo-remoting-netty4
dubbo-remoting-zookeeper-api
dubbo-remoting-zookeeper
dubbo-remoting-zookeeper-curator5
dubbo-rpc
@ -102,25 +102,16 @@ dubbo-spring-boot-actuator-compatible
dubbo-spring-boot-autoconfigure
dubbo-spring-boot-autoconfigure-compatible
dubbo-spring-boot-compatible
dubbo-observability-spring-boot-starters
dubbo-observability-spring-boot-autoconfigure
dubbo-tracing-brave-zipkin-spring-boot-starter
dubbo-tracing-otel-zipkin-spring-boot-starter
dubbo-tracing-otel-otlp-spring-boot-starter
dubbo-observability-spring-boot-starter
dubbo-spring-boot-observability-starters
dubbo-spring-boot-observability-autoconfigure
dubbo-spring-boot-tracing-brave-zipkin-starter
dubbo-spring-boot-tracing-otel-zipkin-starter
dubbo-spring-boot-tracing-otel-otlp-starter
dubbo-spring-boot-observability-starter
dubbo-spring-boot-starter
dubbo-spring-boot-starters
dubbo-spring-boot-interceptor
dubbo-nacos-spring-boot-starter
dubbo-zookeeper-spring-boot-starter
dubbo-zookeeper-curator5-spring-boot-starter
dubbo-sentinel-spring-boot-starter
dubbo-seata-spring-boot-starter
dubbo-spring-security
dubbo-tracing
dubbo-xds
dubbo-plugin-loom
dubbo-rest-jaxrs
dubbo-rest-servlet
dubbo-rest-spring

View File

@ -1,8 +1,21 @@
## What is the purpose of the change?
## What is the purpose of the change
## Brief changelog
## Verifying this change
<!-- Follow this checklist to help us incorporate your contribution quickly and easily: -->
## Checklist
- [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
- [x] Make sure gitHub actions can pass. [Why the workflow is failing and how to fix it?](./CONTRIBUTING.md)
- [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
- [ ] Add some description to [dubbo-website](https://github.com/apache/dubbo-website) project if you are requesting to add a feature.
- [ ] GitHub Actions works fine on your own branch.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/dubbo/wiki/Software-donation-guide).

View File

@ -97,7 +97,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: 8
- uses: actions/cache@v3
name: "Cache local Maven repository"
with:
@ -238,7 +238,7 @@ jobs:
openssl rsautl -decrypt -in ${{ github.workspace }}/.tmp/encrypted-sonarcloud-token -out ${{ github.workspace }}/.tmp/decrypted-sonarcloud-token -inkey ${{ github.workspace }}/.tmp/rsa/rsa_private.pem
- name: "Test with Maven with SonarCloud Scan"
if: ${{ github.repository == 'apache/dubbo' }}
timeout-minutes: 90
timeout-minutes: 70
env:
# Needed to get some information about the pull request, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -247,7 +247,7 @@ jobs:
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_dubbo -DtrimStackTrace=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper -Dsonar.coverage.jacoco.xmlReportPaths=dubbo-test/dubbo-dependencies-all/target/site/jacoco-aggregate/jacoco.xml -Dsonar.login=${SONAR_TOKEN}
- name: "Test with Maven without SonarCloud Scan"
if: ${{ github.repository != 'apache/dubbo' }}
timeout-minutes: 90
timeout-minutes: 70
run: |
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -DtrimStackTrace=false -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
- name: "Upload coverage result"

View File

@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
java-version: 21
- uses: actions/cache@v3
name: "Cache local Maven repository"
with:

View File

@ -41,7 +41,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: 8
- uses: actions/cache@v3
name: "Cache local Maven repository"
with:
@ -132,7 +132,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
jdk: [ 17, 21 ]
jdk: [ 8, 11, 17, 21 ]
env:
DISABLE_FILE_SYSTEM_TEST: true
steps:
@ -175,7 +175,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
jdk: [ 17, 21 ]
jdk: [ 8, 11, 17, 21 ]
env:
DISABLE_FILE_SYSTEM_TEST: true
DUBBO_DEFAULT_SERIALIZATION: fastjson2

5
.gitignore vendored
View File

@ -11,6 +11,8 @@ target/
.settings/
.project
.classpath
.externalToolBuilders
maven-eclipse.xml
# idea ignore
.idea/
@ -50,3 +52,6 @@ dubbo-demo/dubbo-demo-triple/build/*
.git.exec.error
# log files generated by testcase.
dubbo-rpc/dubbo-rpc-api/custom-access.log*

View File

@ -95,15 +95,11 @@ header:
- 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/MatchingGroupIdFilter.java'
- 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/RunArguments.java'
- 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/RunProcess.java'
- 'dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/generate/BasicJsonWriter.java'
- 'dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/api/ExecutableMode.java'
- 'dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/api/MemberCategory.java'
- 'dubbo-native/src/main/java/org/apache/dubbo/aot/generate/BasicJsonWriter.java'
- 'dubbo-native/src/main/java/org/apache/dubbo/aot/generate/ExecutableMode.java'
- 'dubbo-native/src/main/java/org/apache/dubbo/aot/generate/MemberCategory.java'
- 'dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/aggregate/DubboMergingDigest.java'
- 'dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/aggregate/DubboAbstractTDigest.java'
- 'dubbo-common/src/main/java/org/apache/dubbo/common/logger/helpers/FormattingTuple.java'
- 'dubbo-common/src/main/java/org/apache/dubbo/common/logger/helpers/MessageFormatter.java'
- 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/protoc/DubboProtocCompilerMojo.java'
- 'dubbo-plugin/dubbo-compiler/src/main/java/org/apache/dubbo/gen/utils/ProtoTypeMap.java'
comment: on-failure
@ -202,26 +198,10 @@ dependency:
license: Apache-2.0
- name: org.sonatype.plexus:plexus-cipher
license: Apache-2.0
- name: com.alibaba.csp:sentinel-apache-dubbo3-adapter
license: Apache-2.0
- name: com.alibaba.csp:sentinel-transport-simple-http
license: Apache-2.0
- name: com.alibaba.csp:sentinel-transport-common
license: Apache-2.0
- name: com.alibaba.csp:sentinel-datasource-extension
license: Apache-2.0
- name: com.alibaba.csp:sentinel-core
license: Apache-2.0
- name: com.google.protobuf:protobuf-java
license: BSD 3-clause
- name: com.google.protobuf:protobuf-java-util
license: BSD 3-clause
- name: org.antlr:antlr4
license: BSD 3-clause
- name: org.antlr:antlr-runtime
license: BSD 3-clause
- name: org.antlr:ST4
license: BSD 3-clause
# multi license
- name: org.javassist:javassist
license: Apache-2.0

20
NOTICE
View File

@ -16,23 +16,3 @@ Copyright 2014 The Netty Project
This product contains code form the t-digest Project:
The code for the t-digest was originally authored by Ted Dunning
Adrien Grand contributed the heart of the AVLTreeDigest (https://github.com/jpountz)
This product contains the following code copied from Maven Protocol Buffers Plugin:
dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/protoc/DubboProtocCompilerMojo.java
Maven Protocol Buffers Plugin
=============================
Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.
This product contains the following code copied from grpc-java-contrib:
dubbo-plugin/dubbo-compiler/src/main/java/org/apache/dubbo/gen/utils/ProtoTypeMap.java
Some portions of this file Copyright (c) 2019, Salesforce.com, Inc. and licensed under the BSD 3-Clause License
grpc-java-contrib
====================
Copyright (c) 2019, Salesforce.com, Inc.
All rights reserved.

236
README.md
View File

@ -1,68 +1,187 @@
# Apache Dubbo Project
[![Build and Test For PR](https://github.com/apache/dubbo/actions/workflows/build-and-test-pr.yml/badge.svg)](https://github.com/apache/dubbo/actions/workflows/build-and-test-pr.yml)
[![Codecov](https://codecov.io/gh/apache/dubbo/branch/3.3/graph/badge.svg)](https://codecov.io/gh/apache/dubbo)
[![Codecov](https://codecov.io/gh/apache/dubbo/branch/3.2/graph/badge.svg)](https://codecov.io/gh/apache/dubbo)
![Maven](https://img.shields.io/maven-central/v/org.apache.dubbo/dubbo.svg)
![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")
Apache Dubbo is an easy-to-use Web and RPC framework that provides multiple
language implementations(Java, [Go](https://github.com/apache/dubbo-go), [Rust](https://github.com/apache/dubbo-rust), [Node.js](https://github.com/apache/dubbo-js), [Web](https://github.com/apache/dubbo-js)) for communication, service discovery, traffic management,
observability, security, tools, and best practices for building enterprise-ready microservices.
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 [Wanted: who's using dubbo](https://github.com/apache/dubbo/discussions/13842), thanks :)
## Architecture
![Architecture](https://dubbo.apache.org/imgs/architecture.png)
* Consumer and provider communicate with each other using RPC protocol like triple, tcp, rest, etc.
* Consumers automatically trace provider instances registered in registries(Zookeeper, Nacos) and distribute traffic among them by following traffic strategies.
* Rich features for monitoring and managing the cluster with dynamic configuration, metrics, tracing, security, and visualized console.
## Features
* Transparent interface based RPC
* Intelligent load balancing
* Automatic service registration and discovery
* High extensibility
* Runtime traffic routing
* Visualized service governance
## Getting started
Follow the instructions below to learn how to:
### Programming with lightweight RPC API
[5 minutes step-by-step guide](https://dubbo.apache.org/zh-cn/overview/quickstart/rpc/java)
The following code snippet comes from [Dubbo Samples](https://github.com/apache/dubbo-samples.git). You may clone the sample project and step into the `dubbo-samples-api` subdirectory before proceeding.
Dubbo supports building RPC services with only a few lines of code while depending only on a lightweight SDK (<10MB). The protocol on the wire can be [Triple](https://dubbo.apache.org/zh-cn/overview/reference/protocols/triple/)(fully gRPC compatible and HTTP-friendly), Dubbo2(TCP), REST, or any protocol of your choice.
```bash
git clone https://github.com/apache/dubbo-samples.git
cd dubbo-samples/1-basic/dubbo-samples-api
```
There's a [README](https://github.com/apache/dubbo-samples/blob/389cd612f1ea57ee6e575005b32f195c442c35a2/1-basic/dubbo-samples-api/README.md) file under `dubbo-samples-api` directory. We recommend referencing the samples in that directory by following the below-mentioned instructions:
### Maven dependency
```xml
<properties>
<dubbo.version>3.2.13-SNAPSHOT</dubbo.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-zookeeper</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
</dependency>
</dependencies>
```
### Define service interfaces
```java
package org.apache.dubbo.samples.api;
public interface GreetingsService {
String sayHi(String name);
}
```
*See [api/GreetingsService.java](https://github.com/apache/dubbo-samples/blob/389cd612f1ea57ee6e575005b32f195c442c35a2/1-basic/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java) on GitHub.*
### Implement service interface for the provider
```java
package org.apache.dubbo.samples.provider;
import org.apache.dubbo.samples.api.GreetingsService;
public class GreetingsServiceImpl implements GreetingsService {
@Override
public String sayHi(String name) {
return "hi, " + name;
}
}
```
*See [provider/GreetingsServiceImpl.java](https://github.com/apache/dubbo-samples/blob/389cd612f1ea57ee6e575005b32f195c442c35a2/1-basic/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java) on GitHub.*
### Start service provider
```java
package org.apache.dubbo.samples.provider;
### Building a microservice application with Spring Boot
[5 minutes step-by-step guide](https://dubbo.apache.org/zh-cn/overview/quickstart/microservice)
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.ServiceConfig;
import org.apache.dubbo.samples.api.GreetingsService;
It's highly recommended to start your microservice application with the Spring Boot Starter `dubbo-spring-boot-starter` provided by Dubbo. With only a single dependency and yaml file, and optionally a bunch of other useful spring boot starters, you can enable all of the Dubo features like service discovery, observability, tracing, etc.
import java.util.concurrent.CountDownLatch;
Next, learn how to [deploy](https://dubbo.apache.org/zh-cn/overview/tasks/deploy/), [monitor](https://dubbo.apache.org/zh-cn/overview/tasks/observability/), and [manage the traffic](https://dubbo.apache.org/zh-cn/overview/tasks/traffic-management/) of your Dubbo application and cluster.
public class Application {
private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
## More Features
Get more details by visiting the links below to get your hands dirty with some well-designed tasks on our website.
public static void main(String[] args) throws Exception {
ServiceConfig<GreetingsService> service = new ServiceConfig<>();
service.setApplication(new ApplicationConfig("first-dubbo-provider"));
service.setRegistry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181"));
service.setInterface(GreetingsService.class);
service.setRef(new GreetingsServiceImpl());
service.export();
* [Launch a Dubbo project](https://dubbo.apache.org/zh-cn/overview/tasks/develop/template/)
* [RPC protocols](https://dubbo.apache.org/zh-cn/overview/core-features/protocols/)
* [Traffic management](https://dubbo.apache.org/zh-cn/overview/core-features/traffic/)
* [Service discovery](https://dubbo.apache.org/zh-cn/overview/core-features/service-discovery/)
* [Observability](https://dubbo.apache.org/zh-cn/overview/core-features/observability/)
* [Extensibility](https://dubbo.apache.org/zh-cn/overview/core-features/extensibility/)
* [Security](https://dubbo.apache.org/zh-cn/overview/core-features/security/)
* [Visualized console and control plane](https://dubbo.apache.org/zh-cn/overview/reference/admin/)
* [Kubernetes and Service mesh](https://dubbo.apache.org/zh-cn/overview/core-features/service-mesh/)
System.out.println("dubbo service started");
new CountDownLatch(1).await();
}
}
```
## Which Dubbo version should I use?
| **Dubbo3** | **JDK** | **Dependencies** | **Description** |
| --- | --- | --- | --- |
| 3.3.0-beta| 1.8 17 | [dependency list](https://github.com/apache/dubbo/blob/3.3/dubbo-dependencies-bom/pom.xml#L94) | **- Unstable version** <br/> **- Features** <br/> &nbsp;&nbsp; - Triple - gRPC and cURL compatible.<br/> &nbsp;&nbsp; - Rest-style programming support.<br/> &nbsp;&nbsp; - Spring Boot Starters. |
| 3.2.5 | 1.8 17 | [dependency list](https://github.com/apache/dubbo/blob/dubbo-3.2.5/dubbo-dependencies-bom/pom.xml#L94) | **- Stable version (active)** <br/> **- Features** <br/> &nbsp;&nbsp;- Out-of-box metrics and tracing support.<br/> &nbsp;&nbsp;- Threadpool Isolation<br/> &nbsp;&nbsp;- 30% performance<br/> &nbsp;&nbsp;- Native Image|
| 3.1.11 | 1.8 11 | [dependency list](https://github.com/apache/dubbo/blob/dubbo-3.2.11/dubbo-dependencies-bom/pom.xml#L94) | **Stable version (not active)** |
*See [provider/Application.java](https://github.com/apache/dubbo-samples/blob/389cd612f1ea57ee6e575005b32f195c442c35a2/1-basic/dubbo-samples-spring-xml/src/main/java/org/apache/dubbo/samples/provider/Application.java) on GitHub.*
| **Dubbo2** | **JDK** | **Dependencies** | **Description** |
| --- | --- | --- | --- |
| 2.7.23 | 1.8 | [dependency list](https://github.com/apache/dubbo/blob/dubbo-2.7.23/dubbo-dependencies-bom/pom.xml#L92) | EOL |
| 2.6.x, 2.5.x | 1.6 1.7 | | EOL |
### Build and run the provider
## Contributing
See [CONTRIBUTING](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md) for details on submitting patches and the contribution workflow.
```bash
mvn clean package
mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.provider.Application exec:java
```
### Call remote service in the consumer
```java
package org.apache.dubbo.samples.client;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ReferenceConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.samples.api.GreetingsService;
public class Application {
private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
public static void main(String[] args) {
ReferenceConfig<GreetingsService> reference = new ReferenceConfig<>();
reference.setApplication(new ApplicationConfig("first-dubbo-consumer"));
reference.setRegistry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181"));
reference.setInterface(GreetingsService.class);
GreetingsService service = reference.get();
String message = service.sayHi("dubbo");
System.out.println(message);
}
}
```
*See [client/Application.java](https://github.com/apache/dubbo-samples/blob/389cd612f1ea57ee6e575005b32f195c442c35a2/1-basic/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/client/Application.java) on GitHub.*
### Build and run the consumer
```bash
mvn clean package
mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.client.Application exec:java
```
The consumer will print out `hi, dubbo` on the screen.
### Next steps
* [Your first Dubbo application](https://dubbo.apache.org/en/blog/2018/08/07/dubbo-101/) - A 101 tutorial to reveal more details, with the same code above.
* [Dubbo user manual](https://dubbo.apache.org/en/overview/what/) - How to use Dubbo and all its features.
* [Dubbo developer guide](https://dubbo.apache.org/en/docs3-v2/java-sdk/) - How to involve in Dubbo development.
* [Dubbo admin manual](https://dubbo.apache.org/en/docs/v2.7/admin/ops/) - How to admin and manage Dubbo services.
## Building
If you want to try out the cutting-edge features, you can build with the following commands. (Java 1.8 is needed to build the master branch)
```
mvn clean install
```
## Recommended Test Environment
To avoid intermittent test failures (i.e., flaky tests), it is recommended to have a machine or virtual machine with the following specifications:
* Minimum of 2CPUs.
* Minimum of 2Gb of RAM.
### How does the Dubbo Community collaborate?
@ -123,39 +242,13 @@ 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
* WeChat: apachedubbo
* DingTalk group: 37290003945
* Mailing list: [guide](https://dubbo.apache.org/zh-cn/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)
* Security issues: please mail to [us](mailto:security@dubbo.apache.org) privately.
## Contributing
See [CONTRIBUTING](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md) for details on submitting patches and the contribution workflow.
### How can I contribute?
* 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!
## Reporting bugs
Please follow the [template](https://github.com/apache/dubbo/issues/new?template=dubbo-issue-report-template.md) for reporting any issues.
## Reporting a security vulnerability
Please report security vulnerabilities to [us](mailto:security@dubbo.apache.org) privately.
## Dubbo ecosystem
@ -175,4 +268,5 @@ Please report security vulnerabilities to [us](mailto:security@dubbo.apache.org)
* [Erlang](https://github.com/apache/dubbo-erlang)
## License
Apache Dubbo is licensed under the Apache License Version 2.0. See the [LICENSE](https://github.com/apache/dubbo/blob/master/LICENSE) file for details.
Apache Dubbo software is licensed under the Apache License Version 2.0. See the [LICENSE](https://github.com/apache/dubbo/blob/master/LICENSE) file for details.

View File

@ -29,5 +29,6 @@ ignore:
- "**/dubbo-test/**"
- "**/dubbo-compatible/**"
- "**/dubbo-native/**"
- "**/dubbo-native-plugin/**"
- "**/dubbo-common/src/main/java/org/apache/dubbo/common/json/*.java" # internal JSON impl is deprecate, ignore test coverage for them
- "**/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/AnnotationBean.java" # Deprecated

89
dubbo-build-tools/pom.xml Normal file
View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-build-tools</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
<palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
</properties>
<profiles>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<!--- newer versions of plugins requires JDK 11 -->
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat>
<version>${palantirJavaFormat.version}</version>
</palantirJavaFormat>
<removeUnusedImports />
<importOrder>
<file>dubbo-importorder.txt</file>
</importOrder>
<licenseHeader>
<file>checkstyle-header.txt</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-shared-resources</artifactId>
<version>${dubbo-shared-resources.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>${spotless.action}</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -13,10 +13,4 @@
* 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.
*/
package org.apache.dubbo.xds.istio;
public interface XdsEnv {
String getCluster();
}
*/

View File

@ -92,11 +92,6 @@
<artifactId>micrometer-tracing-integration-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>

View File

@ -17,7 +17,10 @@
package org.apache.dubbo.rpc.cluster;
import org.apache.dubbo.common.beans.factory.ScopeBeanFactory;
import org.apache.dubbo.rpc.AdaptiveMetrics;
import org.apache.dubbo.rpc.cluster.merger.MergerFactory;
import org.apache.dubbo.rpc.cluster.router.RouterSnapshotSwitcher;
import org.apache.dubbo.rpc.cluster.router.mesh.route.MeshRuleManager;
import org.apache.dubbo.rpc.cluster.support.ClusterUtils;
import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.FrameworkModel;
@ -34,9 +37,14 @@ public class ClusterScopeModelInitializer implements ScopeModelInitializer {
@Override
public void initializeApplicationModel(ApplicationModel applicationModel) {
ScopeBeanFactory beanFactory = applicationModel.getBeanFactory();
beanFactory.registerBean(MergerFactory.class);
beanFactory.registerBean(ClusterUtils.class);
beanFactory.registerBean(AdaptiveMetrics.class);
}
@Override
public void initializeModuleModel(ModuleModel moduleModel) {}
public void initializeModuleModel(ModuleModel moduleModel) {
ScopeBeanFactory beanFactory = moduleModel.getBeanFactory();
beanFactory.registerBean(MeshRuleManager.class);
}
}

View File

@ -21,7 +21,6 @@ import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.Protocol;
import org.apache.dubbo.rpc.RpcException;
import java.util.List;
@ -99,8 +98,4 @@ public interface Directory<T> extends Node {
default boolean isNotificationReceived() {
return false;
}
default Protocol getProtocol() {
return null;
}
}

View File

@ -1,38 +0,0 @@
/*
* 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.
*/
package org.apache.dubbo.rpc.cluster;
import org.apache.dubbo.common.beans.factory.ScopeBeanFactory;
import org.apache.dubbo.rpc.cluster.merger.MergerFactory;
import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.FrameworkModel;
import org.apache.dubbo.rpc.model.ModuleModel;
import org.apache.dubbo.rpc.model.ScopeModelInitializer;
public class MergeableClusterScopeModelInitializer implements ScopeModelInitializer {
@Override
public void initializeFrameworkModel(FrameworkModel frameworkModel) {}
@Override
public void initializeApplicationModel(ApplicationModel applicationModel) {
ScopeBeanFactory beanFactory = applicationModel.getBeanFactory();
beanFactory.registerBean(MergerFactory.class);
}
@Override
public void initializeModuleModel(ModuleModel moduleModel) {}
}

View File

@ -212,7 +212,7 @@ public class SingleRouterChain<T> {
public RouterSnapshotNode<T> buildRouterSnapshot(
URL url, BitList<Invoker<T>> availableInvokers, Invocation invocation) {
BitList<Invoker<T>> resultInvokers = availableInvokers.clone();
RouterSnapshotNode<T> parentNode = new RouterSnapshotNode<T>("Parent", resultInvokers.clone());
RouterSnapshotNode<T> parentNode = new RouterSnapshotNode<>("Parent", resultInvokers.clone());
parentNode.setNodeOutputInvokers(resultInvokers.clone());
// 1. route state router
@ -227,7 +227,7 @@ public class SingleRouterChain<T> {
return parentNode;
}
RouterSnapshotNode<T> commonRouterNode = new RouterSnapshotNode<T>("CommonRouter", resultInvokers.clone());
RouterSnapshotNode<T> commonRouterNode = new RouterSnapshotNode<>("CommonRouter", resultInvokers.clone());
parentNode.appendNode(commonRouterNode);
List<Invoker<T>> commonRouterResult = resultInvokers;
@ -237,7 +237,7 @@ public class SingleRouterChain<T> {
List<Invoker<T>> inputInvokers = new ArrayList<>(commonRouterResult);
RouterSnapshotNode<T> currentNode =
new RouterSnapshotNode<T>(router.getClass().getSimpleName(), inputInvokers);
new RouterSnapshotNode<>(router.getClass().getSimpleName(), inputInvokers);
// append to router node chain
commonRouterNode.appendNode(currentNode);

View File

@ -223,7 +223,7 @@ public abstract class AbstractConfigurator implements Configurator {
}
private Set<String> genConditionKeys() {
Set<String> conditionKeys = new HashSet<String>();
Set<String> conditionKeys = new HashSet<>();
conditionKeys.add(CATEGORY_KEY);
conditionKeys.add(Constants.CHECK_KEY);
conditionKeys.add(DYNAMIC_KEY);

View File

@ -14,9 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.tracing.filter;
package org.apache.dubbo.rpc.cluster.filter.support;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.metrics.observation.DefaultDubboClientObservationConvention;
import org.apache.dubbo.metrics.observation.DubboClientContext;
import org.apache.dubbo.metrics.observation.DubboClientObservationConvention;
import org.apache.dubbo.metrics.observation.DubboObservationDocumentation;
import org.apache.dubbo.rpc.BaseFilter;
import org.apache.dubbo.rpc.Filter;
import org.apache.dubbo.rpc.Invocation;
@ -26,10 +30,6 @@ import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.cluster.filter.ClusterFilter;
import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.ScopeModelAware;
import org.apache.dubbo.tracing.DefaultDubboClientObservationConvention;
import org.apache.dubbo.tracing.DubboClientObservationConvention;
import org.apache.dubbo.tracing.DubboObservationDocumentation;
import org.apache.dubbo.tracing.context.DubboClientContext;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationRegistry;
@ -39,19 +39,21 @@ import static org.apache.dubbo.common.constants.CommonConstants.CONSUMER;
/**
* A {@link Filter} that creates an {@link Observation} around the outgoing message.
*/
@Activate(
group = CONSUMER,
order = Integer.MIN_VALUE + 50,
onClass = "io.micrometer.observation.NoopObservationRegistry")
@Activate(group = CONSUMER, order = -1, onClass = "io.micrometer.observation.NoopObservationRegistry")
public class ObservationSenderFilter implements ClusterFilter, BaseFilter.Listener, ScopeModelAware {
private final ObservationRegistry observationRegistry;
private ObservationRegistry observationRegistry;
private final DubboClientObservationConvention clientObservationConvention;
private DubboClientObservationConvention clientObservationConvention;
public ObservationSenderFilter(ApplicationModel applicationModel) {
observationRegistry = applicationModel.getBeanFactory().getBean(ObservationRegistry.class);
clientObservationConvention = applicationModel.getBeanFactory().getBean(DubboClientObservationConvention.class);
applicationModel.getApplicationConfigManager().getTracing().ifPresent(cfg -> {
if (Boolean.TRUE.equals(cfg.getEnabled())) {
observationRegistry = applicationModel.getBeanFactory().getBean(ObservationRegistry.class);
clientObservationConvention =
applicationModel.getBeanFactory().getBean(DubboClientObservationConvention.class);
}
});
}
@Override
@ -75,9 +77,6 @@ public class ObservationSenderFilter implements ClusterFilter, BaseFilter.Listen
if (observation == null) {
return;
}
if (appResponse != null && appResponse.hasException()) {
observation.error(appResponse.getException());
}
observation.stop();
}

View File

@ -46,8 +46,7 @@ public class ConsistentHashLoadBalance extends AbstractLoadBalance {
*/
public static final String HASH_ARGUMENTS = "hash.arguments";
private final ConcurrentMap<String, ConsistentHashSelector<?>> selectors =
new ConcurrentHashMap<String, ConsistentHashSelector<?>>();
private final ConcurrentMap<String, ConsistentHashSelector<?>> selectors = new ConcurrentHashMap<>();
@SuppressWarnings("unchecked")
@Override
@ -75,7 +74,7 @@ public class ConsistentHashLoadBalance extends AbstractLoadBalance {
private final int[] argumentIndex;
ConsistentHashSelector(List<Invoker<T>> invokers, String methodName, int identityHashCode) {
this.virtualInvokers = new TreeMap<Long, Invoker<T>>();
this.virtualInvokers = new TreeMap<>();
this.identityHashCode = identityHashCode;
URL url = invokers.get(0).getUrl();
this.replicaNumber = url.getMethodParameter(methodName, HASH_NODES, 160);

View File

@ -32,7 +32,7 @@ public class MapMerger implements Merger<Map<?, ?>> {
if (ArrayUtils.isEmpty(items)) {
return Collections.emptyMap();
}
Map<Object, Object> result = new HashMap<Object, Object>();
Map<Object, Object> result = new HashMap<>();
Stream.of(items).filter(Objects::nonNull).forEach(result::putAll);
return result;
}

View File

@ -36,7 +36,7 @@ public class MergerFactory implements ScopeModelAware {
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(MergerFactory.class);
private ConcurrentMap<Class<?>, Merger<?>> MERGER_CACHE = new ConcurrentHashMap<Class<?>, Merger<?>>();
private ConcurrentMap<Class<?>, Merger<?>> MERGER_CACHE = new ConcurrentHashMap<>();
private ScopeModel scopeModel;
@Override

View File

@ -32,7 +32,7 @@ public class SetMerger implements Merger<Set<?>> {
if (ArrayUtils.isEmpty(items)) {
return Collections.emptySet();
}
Set<Object> result = new HashSet<Object>();
Set<Object> result = new HashSet<>();
Stream.of(items).filter(Objects::nonNull).forEach(result::addAll);
return result;
}

View File

@ -30,6 +30,6 @@ public class ConditionStateRouterFactory extends CacheableStateRouterFactory {
@Override
protected <T> StateRouter<T> createRouter(Class<T> interfaceClass, URL url) {
return new ConditionStateRouter<T>(url);
return new ConditionStateRouter<>(url);
}
}

View File

@ -32,6 +32,6 @@ public class ServiceStateRouterFactory extends CacheableStateRouterFactory {
@Override
protected <T> StateRouter<T> createRouter(Class<T> interfaceClass, URL url) {
return new ServiceStateRouter<T>(url);
return new ServiceStateRouter<>(url);
}
}

View File

@ -1,37 +0,0 @@
/*
* 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.
*/
package org.apache.dubbo.rpc.cluster.router.mesh;
import org.apache.dubbo.common.beans.factory.ScopeBeanFactory;
import org.apache.dubbo.rpc.cluster.router.mesh.route.MeshRuleManager;
import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.FrameworkModel;
import org.apache.dubbo.rpc.model.ModuleModel;
import org.apache.dubbo.rpc.model.ScopeModelInitializer;
public class MeshScopeModelInitializer implements ScopeModelInitializer {
@Override
public void initializeFrameworkModel(FrameworkModel frameworkModel) {}
@Override
public void initializeApplicationModel(ApplicationModel applicationModel) {}
public void initializeModuleModel(ModuleModel moduleModel) {
ScopeBeanFactory beanFactory = moduleModel.getBeanFactory();
beanFactory.registerBean(MeshRuleManager.class);
}
}

View File

@ -136,7 +136,7 @@ public class MeshRuleCache<T> {
Collections.unmodifiableMap(totalSubsetMap),
unmatchedInvokers);
} else {
return new MeshRuleCache<T>(
return new MeshRuleCache<>(
Collections.emptyList(), Collections.emptyMap(), Collections.emptyMap(), invokers);
}
}

View File

@ -30,6 +30,6 @@ public class MockStateRouterFactory implements StateRouterFactory {
@Override
public <T> StateRouter<T> getRouter(Class<T> interfaceClass, URL url) {
return new MockInvokersSelector<T>(url);
return new MockInvokersSelector<>(url);
}
}

View File

@ -93,23 +93,23 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
// Provided by BitList only
public List<E> getOriginList() {
public synchronized List<E> getOriginList() {
return originList;
}
public void addIndex(int index) {
public synchronized void addIndex(int index) {
this.rootSet.set(index);
}
public int totalSetSize() {
public synchronized int totalSetSize() {
return this.originList.size();
}
public boolean indexExist(int index) {
public synchronized boolean indexExist(int index) {
return this.rootSet.get(index);
}
public E getByIndex(int index) {
public synchronized E getByIndex(int index) {
return this.originList.get(index);
}
@ -120,7 +120,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
* @param target target bitList
* @return this bitList only contains those elements contain in both two list and source bitList's tailList
*/
public BitList<E> and(BitList<E> target) {
public synchronized BitList<E> and(BitList<E> target) {
rootSet.and(target.rootSet);
if (target.getTailList() != null) {
target.getTailList().forEach(this::addToTailList);
@ -128,28 +128,28 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
return this;
}
public BitList<E> or(BitList<E> target) {
public synchronized BitList<E> or(BitList<E> target) {
BitSet resultSet = (BitSet) rootSet.clone();
resultSet.or(target.rootSet);
return new BitList<>(originList, resultSet, tailList);
}
public boolean hasMoreElementInTailList() {
public synchronized boolean hasMoreElementInTailList() {
return CollectionUtils.isNotEmpty(tailList);
}
public List<E> getTailList() {
public synchronized List<E> getTailList() {
return tailList;
}
public void addToTailList(E e) {
public synchronized void addToTailList(E e) {
if (tailList == null) {
tailList = new LinkedList<>();
}
tailList.add(e);
}
public E randomSelectOne() {
public synchronized E randomSelectOne() {
int originSize = originList.size();
int tailSize = tailList != null ? tailList.size() : 0;
int totalSize = originSize + tailSize;
@ -181,18 +181,18 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
// Provided by JDK List interface
@Override
public int size() {
public synchronized int size() {
return rootSet.cardinality() + (CollectionUtils.isNotEmpty(tailList) ? tailList.size() : 0);
}
@Override
public boolean contains(Object o) {
public synchronized boolean contains(Object o) {
int idx = originList.indexOf(o);
return (idx >= 0 && rootSet.get(idx)) || (CollectionUtils.isNotEmpty(tailList) && tailList.contains(o));
}
@Override
public Iterator<E> iterator() {
public synchronized Iterator<E> iterator() {
return new BitListIterator<>(this, 0);
}
@ -205,7 +205,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
* Notice: It is not recommended adding duplicated element.
*/
@Override
public boolean add(E e) {
public synchronized boolean add(E e) {
int index = originList.indexOf(e);
if (index > -1) {
rootSet.set(index);
@ -225,7 +225,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
* If the element is not contained in originList, try to remove from tailList.
*/
@Override
public boolean remove(Object o) {
public synchronized boolean remove(Object o) {
int idx = originList.indexOf(o);
if (idx > -1 && rootSet.get(idx)) {
rootSet.set(idx, false);
@ -242,7 +242,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
* This may change the default behaviour when adding new element later.
*/
@Override
public void clear() {
public synchronized void clear() {
rootSet.clear();
// to remove references
originList = Collections.emptyList();
@ -252,7 +252,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public E get(int index) {
public synchronized E get(int index) {
int bitIndex = -1;
if (index < 0) {
throw new IndexOutOfBoundsException();
@ -272,7 +272,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public E remove(int index) {
public synchronized E remove(int index) {
int bitIndex = -1;
if (index >= rootSet.cardinality()) {
if (CollectionUtils.isNotEmpty(tailList)) {
@ -290,7 +290,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public int indexOf(Object o) {
public synchronized int indexOf(Object o) {
int bitIndex = -1;
for (int i = 0; i < rootSet.cardinality(); i++) {
bitIndex = rootSet.nextSetBit(bitIndex + 1);
@ -311,7 +311,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
@Override
@SuppressWarnings("unchecked")
public boolean addAll(Collection<? extends E> c) {
public synchronized boolean addAll(Collection<? extends E> c) {
if (c instanceof BitList) {
rootSet.or(((BitList<? extends E>) c).rootSet);
if (((BitList<? extends E>) c).hasMoreElementInTailList()) {
@ -325,7 +325,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public int lastIndexOf(Object o) {
public synchronized int lastIndexOf(Object o) {
int bitIndex = -1;
int index = -1;
if (CollectionUtils.isNotEmpty(tailList)) {
@ -344,22 +344,22 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public boolean isEmpty() {
public synchronized boolean isEmpty() {
return this.rootSet.isEmpty() && CollectionUtils.isEmpty(tailList);
}
@Override
public ListIterator<E> listIterator() {
public synchronized ListIterator<E> listIterator() {
return new BitListIterator<>(this, 0);
}
@Override
public ListIterator<E> listIterator(int index) {
public synchronized ListIterator<E> listIterator(int index) {
return new BitListIterator<>(this, index);
}
@Override
public BitList<E> subList(int fromIndex, int toIndex) {
public synchronized BitList<E> subList(int fromIndex, int toIndex) {
BitSet resultSet = (BitSet) rootSet.clone();
List<E> copiedTailList = tailList == null ? null : new LinkedList<>(tailList);
if (toIndex < size()) {
@ -414,7 +414,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public boolean hasNext() {
public synchronized boolean hasNext() {
if (isInTailList) {
return tailListIterator.hasNext();
} else {
@ -428,7 +428,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public E next() {
public synchronized E next() {
if (isInTailList) {
if (tailListIterator.hasNext()) {
index += 1;
@ -457,7 +457,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public boolean hasPrevious() {
public synchronized boolean hasPrevious() {
if (isInTailList) {
boolean hasPreviousInTailList = tailListIterator.hasPrevious();
if (hasPreviousInTailList) {
@ -471,7 +471,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public E previous() {
public synchronized E previous() {
if (isInTailList) {
boolean hasPreviousInTailList = tailListIterator.hasPrevious();
if (hasPreviousInTailList) {
@ -503,17 +503,17 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public int nextIndex() {
public synchronized int nextIndex() {
return hasNext() ? index + 1 : index;
}
@Override
public int previousIndex() {
public synchronized int previousIndex() {
return index;
}
@Override
public void remove() {
public synchronized void remove() {
if (lastReturnedIndex == -1) {
throw new IllegalStateException();
} else {
@ -533,17 +533,17 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public void set(E e) {
public synchronized void set(E e) {
throw new UnsupportedOperationException("Set method is not supported in BitListIterator!");
}
@Override
public void add(E e) {
public synchronized void add(E e) {
throw new UnsupportedOperationException("Add method is not supported in BitListIterator!");
}
}
public ArrayList<E> cloneToArrayList() {
public synchronized ArrayList<E> cloneToArrayList() {
if (rootSet.cardinality() == originList.size() && (CollectionUtils.isEmpty(tailList))) {
return new ArrayList<>(originList);
}
@ -553,7 +553,7 @@ public class BitList<E> extends AbstractList<E> implements Cloneable {
}
@Override
public BitList<E> clone() {
public synchronized BitList<E> clone() {
return new BitList<>(
originList, (BitSet) rootSet.clone(), tailList == null ? null : new LinkedList<>(tailList));
}

View File

@ -36,7 +36,6 @@ import org.apache.dubbo.rpc.cluster.router.state.BitList;
import org.apache.dubbo.rpc.cluster.router.tag.model.TagRouterRule;
import org.apache.dubbo.rpc.cluster.router.tag.model.TagRuleParser;
import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
@ -53,7 +52,6 @@ public class TagStateRouter<T> extends AbstractStateRouter<T> implements Configu
public static final String NAME = "TAG_ROUTER";
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(TagStateRouter.class);
private static final String RULE_SUFFIX = ".tag-router";
public static final char TAG_SEPERATOR = '|';
private volatile TagRouterRule tagRouterRule;
private String application;
@ -121,8 +119,7 @@ public class TagStateRouter<T> extends AbstractStateRouter<T> implements Configu
// if we are requesting for a Provider with a specific tag
if (StringUtils.isNotEmpty(tag)) {
Map<String, Set<String>> tagnameToAddresses = tagRouterRuleCopy.getTagnameToAddresses();
Set<String> addresses = selectAddressByTagLevel(tagnameToAddresses, tag, isForceUseTag(invocation));
Set<String> addresses = tagRouterRuleCopy.getTagnameToAddresses().get(tag);
// filter by dynamic tag group first
if (addresses != null) { // null means tag not set
result = filterInvoker(invokers, invoker -> addressMatches(invoker.getUrl(), addresses));
@ -339,34 +336,4 @@ public class TagStateRouter<T> extends AbstractStateRouter<T> implements Configu
public void setTagRouterRule(TagRouterRule tagRouterRule) {
this.tagRouterRule = tagRouterRule;
}
/**
* select addresses by tag with level
* <p>
* example:
* selector=beta|team1|partner1
* step1.select tagAddresses with selector=beta|team1|partner1, if result is empty, then run step2
* step2.select tagAddresses with selector=beta|team1, if result is empty, then run step3
* step3.select tagAddresses with selector=beta, if result is empty, result is null
* </p>
*
* @param tagAddresses
* @param tagSelector eg: beta|team1|partner1
* @return
*/
public static Set<String> selectAddressByTagLevel(
Map<String, Set<String>> tagAddresses, String tagSelector, boolean isForce) {
if (isForce || StringUtils.isNotContains(tagSelector, TAG_SEPERATOR)) {
return tagAddresses.get(tagSelector);
}
String[] selectors = StringUtils.split(tagSelector, TAG_SEPERATOR);
for (int i = selectors.length; i > 0; i--) {
String selectorTmp = StringUtils.join(selectors, TAG_SEPERATOR, 0, i);
Set<String> addresses = tagAddresses.get(selectorTmp);
if (CollectionUtils.isNotEmpty(addresses)) {
return addresses;
}
}
return null;
}
}

View File

@ -31,6 +31,6 @@ public class TagStateRouterFactory extends CacheableStateRouterFactory {
@Override
protected <T> StateRouter<T> createRouter(Class<T> interfaceClass, URL url) {
return new TagStateRouter<T>(url);
return new TagStateRouter<>(url);
}
}

View File

@ -63,8 +63,8 @@ public class FailoverClusterInvoker<T> extends AbstractClusterInvoker<T> {
int len = calculateInvokeTimes(methodName);
// retry loop.
RpcException le = null; // last exception.
List<Invoker<T>> invoked = new ArrayList<Invoker<T>>(copyInvokers.size()); // invoked invokers.
Set<String> providers = new HashSet<String>(len);
List<Invoker<T>> invoked = new ArrayList<>(copyInvokers.size()); // invoked invokers.
Set<String> providers = new HashSet<>(len);
for (int i = 0; i < len; i++) {
// Reselect before retry to avoid a change of candidate `invokers`.
// NOTE: if `invokers` changed, then `invoked` also lose accuracy.

View File

@ -26,6 +26,6 @@ public class MergeableCluster extends AbstractCluster {
@Override
public <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
return new MergeableClusterInvoker<T>(directory);
return new MergeableClusterInvoker<>(directory);
}
}

View File

@ -21,7 +21,6 @@ import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.ConfigUtils;
import org.apache.dubbo.rpc.AsyncRpcResult;
import org.apache.dubbo.rpc.Constants;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.Result;
@ -43,6 +42,8 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.CLUSTER_FAILED_GROUP_MERGE;
import static org.apache.dubbo.rpc.Constants.ASYNC_KEY;
import static org.apache.dubbo.rpc.Constants.MERGER_KEY;
/**
@ -94,7 +95,7 @@ public class MergeableClusterInvoker<T> extends AbstractClusterInvoker<T> {
Map<String, Result> results = new HashMap<>();
for (final Invoker<T> invoker : invokers) {
RpcInvocation subInvocation = new RpcInvocation(invocation, invoker);
subInvocation.setAttachment(Constants.ASYNC_KEY, "true");
subInvocation.setAttachment(ASYNC_KEY, "true");
try {
results.put(invoker.getUrl().getServiceKey(), invokeWithContext(invoker, subInvocation));
} catch (RpcException e) {
@ -122,7 +123,7 @@ public class MergeableClusterInvoker<T> extends AbstractClusterInvoker<T> {
Result r = asyncResult.get(Integer.MAX_VALUE, TimeUnit.MILLISECONDS);
if (r.hasException()) {
log.error(
LoggerCodeConstants.CLUSTER_FAILED_GROUP_MERGE,
CLUSTER_FAILED_GROUP_MERGE,
"Invoke " + getGroupDescFromServiceKey(entry.getKey()) + " failed: "
+ r.getException().getMessage(),
"",

View File

@ -27,6 +27,6 @@ public class ZoneAwareCluster extends AbstractCluster {
@Override
protected <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
return new ZoneAwareClusterInvoker<T>(directory);
return new ZoneAwareClusterInvoker<>(directory);
}
}

View File

@ -23,7 +23,6 @@ import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.common.utils.ConfigUtils;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.common.utils.SystemPropertyConfigUtils;
import org.apache.dubbo.rpc.AsyncRpcResult;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.InvokeMode;
@ -48,8 +47,8 @@ import static org.apache.dubbo.rpc.cluster.Constants.INVOCATION_NEED_MOCK;
public class MockClusterInvoker<T> implements ClusterInvoker<T> {
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(MockClusterInvoker.class);
private static final boolean setFutureWhenSync = Boolean.parseBoolean(SystemPropertyConfigUtils.getSystemProperty(
CommonConstants.ThirdPartyProperty.SET_FUTURE_IN_SYNC_MODE, "true"));
private static final boolean setFutureWhenSync =
Boolean.parseBoolean(System.getProperty(CommonConstants.SET_FUTURE_IN_SYNC_MODE, "true"));
private final Directory<T> directory;

View File

@ -35,7 +35,7 @@ public class MockClusterWrapper implements Cluster {
@Override
public <T> Invoker<T> join(Directory<T> directory, boolean buildFilterChain) throws RpcException {
return new MockClusterInvoker<T>(directory, this.cluster.join(directory, buildFilterChain));
return new MockClusterInvoker<>(directory, this.cluster.join(directory, buildFilterChain));
}
public Cluster getCluster() {

View File

@ -1 +0,0 @@
callback-consumer-context=org.apache.dubbo.rpc.cluster.filter.support.CallbackConsumerContextFilter

View File

@ -8,4 +8,4 @@ forking=org.apache.dubbo.rpc.cluster.support.ForkingCluster
available=org.apache.dubbo.rpc.cluster.support.AvailableCluster
mergeable=org.apache.dubbo.rpc.cluster.support.MergeableCluster
broadcast=org.apache.dubbo.rpc.cluster.support.BroadcastCluster
zone-aware=org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareCluster
zone-aware=org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareCluster

View File

@ -1,4 +1,6 @@
consumercontext=org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter
consumer-classloader=org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter
router-snapshot=org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter
observationsender=org.apache.dubbo.rpc.cluster.filter.support.ObservationSenderFilter
metricsClusterFilter=org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter
metricsConsumerFilter=org.apache.dubbo.rpc.cluster.filter.support.MetricsConsumerFilter

View File

@ -1,3 +1,4 @@
attachment=org.apache.dubbo.rpc.cluster.router.condition.matcher.attachment.AttachmentConditionMatcherFactory
argument=org.apache.dubbo.rpc.cluster.router.condition.matcher.argument.ArgumentConditionMatcherFactory
param=org.apache.dubbo.rpc.cluster.router.condition.matcher.param.UrlParamConditionMatcherFactory

View File

@ -1,8 +1,8 @@
mock=org.apache.dubbo.rpc.cluster.router.mock.MockStateRouterFactory
tag=org.apache.dubbo.rpc.cluster.router.tag.TagStateRouterFactory
condition=org.apache.dubbo.rpc.cluster.router.condition.ConditionStateRouterFactory
service=org.apache.dubbo.rpc.cluster.router.condition.config.ServiceStateRouterFactory
app=org.apache.dubbo.rpc.cluster.router.condition.config.AppStateRouterFactory
provider-app=org.apache.dubbo.rpc.cluster.router.condition.config.ProviderAppStateRouterFactory
standard-mesh-rule=org.apache.dubbo.rpc.cluster.router.mesh.route.StandardMeshRuleRouterFactory
script-app=org.apache.dubbo.rpc.cluster.router.script.config.AppScriptRouterFactory
tag=org.apache.dubbo.rpc.cluster.router.tag.TagStateRouterFactory
mock=org.apache.dubbo.rpc.cluster.router.mock.MockStateRouterFactory
standard-mesh-rule=org.apache.dubbo.rpc.cluster.router.mesh.route.StandardMeshRuleRouterFactory

View File

@ -1,3 +1 @@
dubbo-cluster=org.apache.dubbo.rpc.cluster.ClusterScopeModelInitializer
dubbo-cluster-mergeable=org.apache.dubbo.rpc.cluster.MergeableClusterScopeModelInitializer
mesh=org.apache.dubbo.rpc.cluster.router.mesh.MeshScopeModelInitializer

View File

@ -0,0 +1,264 @@
/*
* 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.
*/
package org.apache.dubbo.rpc.cluster;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.config.configcenter.ConfigChangeType;
import org.apache.dubbo.common.config.configcenter.ConfigChangedEvent;
import org.apache.dubbo.common.config.configcenter.DynamicConfiguration;
import org.apache.dubbo.common.url.component.ServiceConfigURL;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.cluster.filter.DemoService;
import org.apache.dubbo.rpc.cluster.router.RouterSnapshotSwitcher;
import org.apache.dubbo.rpc.cluster.router.condition.config.AppStateRouter;
import org.apache.dubbo.rpc.cluster.router.condition.config.ListenableStateRouter;
import org.apache.dubbo.rpc.cluster.router.condition.config.ServiceStateRouter;
import org.apache.dubbo.rpc.cluster.router.mesh.route.MeshAppRuleListener;
import org.apache.dubbo.rpc.cluster.router.mesh.route.MeshRuleManager;
import org.apache.dubbo.rpc.cluster.router.state.BitList;
import org.apache.dubbo.rpc.model.FrameworkModel;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.TAG_KEY;
import static org.apache.dubbo.rpc.cluster.router.mesh.route.MeshRuleConstants.MESH_RULE_DATA_ID_SUFFIX;
import static org.mockito.Mockito.when;
class RouterChainTest {
/**
* verify the router and state router loaded by default
*/
@Test
void testBuildRouterChain() {
RouterChain<DemoService> routerChain = createRouterChanin();
Assertions.assertEquals(0, routerChain.getRouters().size());
Assertions.assertEquals(7, routerChain.getStateRouters().size());
}
private RouterChain<DemoService> createRouterChanin() {
Map<String, String> parameters = new HashMap<>();
parameters.put(INTERFACE_KEY, DemoService.class.getName());
parameters.put("registry", "zookeeper");
URL url = new ServiceConfigURL("dubbo", "127.0.0.1", 20881, DemoService.class.getName(), parameters);
RouterChain<DemoService> routerChain = RouterChain.buildChain(DemoService.class, url);
return routerChain;
}
@Test
void testRoute() {
RouterChain<DemoService> routerChain = createRouterChanin();
// mockInvoker will be filtered out by MockInvokersSelector
Invoker<DemoService> mockInvoker = createMockInvoker();
// invoker1 will be filtered out by MeshStateRouter
Map<String, String> map1 = new HashMap<>();
map1.put("env-sign", "yyyyyyy");
Invoker<DemoService> invoker1 = createNormalInvoker(map1);
// invoker2 will be filtered out by TagStateRouter
Map<String, String> map2 = new HashMap<>();
map2.put("env-sign", "xxx");
map2.put("tag1", "hello");
Invoker<DemoService> invoker2 = createNormalInvoker(map2);
// invoker3 will be filtered out by AppStateRouter
Map<String, String> map3 = new HashMap<>();
map3.put("env-sign", "xxx");
map3.put("tag1", "hello");
map3.put(TAG_KEY, "TAG_");
Invoker<DemoService> invoker3 = createNormalInvoker(map3);
// invoker4 will be filtered out by ServiceStateRouter
Map<String, String> map4 = new HashMap<>();
map4.put("env-sign", "xxx");
map4.put("tag1", "hello");
map4.put(TAG_KEY, "TAG_");
map4.put("timeout", "5000");
Invoker<DemoService> invoker4 = createNormalInvoker(map4);
// invoker5 is the only one returned at the end that is not filtered out
Map<String, String> map5 = new HashMap<>();
map5.put("env-sign", "xxx");
map5.put("tag1", "hello");
map5.put(TAG_KEY, "TAG_");
map5.put("timeout", "5000");
map5.put("serialization", "hessian2");
Invoker<DemoService> invoker5 = createNormalInvoker(map5);
BitList<Invoker<DemoService>> invokers =
new BitList<>(Arrays.asList(mockInvoker, invoker1, invoker2, invoker3, invoker4, invoker5));
routerChain.setInvokers(invokers, () -> {});
// mesh rule for MeshStateRouter
MeshRuleManager meshRuleManager =
mockInvoker.getUrl().getOrDefaultModuleModel().getBeanFactory().getBean(MeshRuleManager.class);
ConcurrentHashMap<String, MeshAppRuleListener> appRuleListeners = meshRuleManager.getAppRuleListeners();
MeshAppRuleListener meshAppRuleListener =
appRuleListeners.get(invoker1.getUrl().getRemoteApplication());
ConfigChangedEvent configChangedEvent = new ConfigChangedEvent(
"demo-route" + MESH_RULE_DATA_ID_SUFFIX,
DynamicConfiguration.DEFAULT_GROUP,
MESH_RULE1 + "---\n" + MESH_RULE2,
ConfigChangeType.ADDED);
meshAppRuleListener.process(configChangedEvent);
// condition rule for AppStateRouter&ServiceStateRouter
ListenableStateRouter serviceRouter = routerChain.getStateRouters().stream()
.filter(s -> s instanceof ServiceStateRouter)
.map(s -> (ListenableStateRouter) s)
.findAny()
.orElse(null);
ConfigChangedEvent serviceConditionEvent = new ConfigChangedEvent(
DynamicConfiguration.getRuleKey(mockInvoker.getUrl()) + ".condition-router",
DynamicConfiguration.DEFAULT_GROUP,
SERVICE_CONDITION_RULE,
ConfigChangeType.ADDED);
serviceRouter.process(serviceConditionEvent);
ListenableStateRouter appRouter = routerChain.getStateRouters().stream()
.filter(s -> s instanceof AppStateRouter)
.map(s -> (ListenableStateRouter) s)
.findAny()
.orElse(null);
ConfigChangedEvent appConditionEvent = new ConfigChangedEvent(
"app.condition-router", DynamicConfiguration.DEFAULT_GROUP, APP_CONDITION_RULE, ConfigChangeType.ADDED);
appRouter.process(appConditionEvent);
// prepare consumerUrl and RpcInvocation
URL consumerUrl = URL.valueOf("consumer://localhost/DemoInterface?remote.application=app1");
RpcInvocation rpcInvocation = new RpcInvocation();
rpcInvocation.setServiceName("DemoService");
rpcInvocation.setObjectAttachment("trafficLabel", "xxx");
rpcInvocation.setObjectAttachment(TAG_KEY, "TAG_");
RpcContext.getServiceContext().setNeedPrintRouterSnapshot(true);
RouterSnapshotSwitcher routerSnapshotSwitcher =
FrameworkModel.defaultModel().getBeanFactory().getBean(RouterSnapshotSwitcher.class);
routerSnapshotSwitcher.addEnabledService("org.apache.dubbo.demo.DemoService");
// route
List<Invoker<DemoService>> result = routerChain
.getSingleChain(consumerUrl, invokers, rpcInvocation)
.route(consumerUrl, invokers, rpcInvocation);
Assertions.assertEquals(result.size(), 1);
Assertions.assertTrue(result.contains(invoker5));
String snapshotLog =
"[ Parent (Input: 6) (Current Node Output: 6) (Chain Node Output: 1) ] Input: localhost:9103,localhost:9103,localhost:9103,localhost:9103,localhost:9103 -> Chain Node Output: localhost:9103...\n"
+ " [ MockInvokersSelector (Input: 6) (Current Node Output: 5) (Chain Node Output: 1) Router message: invocation.need.mock not set. Return normal Invokers. ] Current Node Output: localhost:9103,localhost:9103,localhost:9103,localhost:9103,localhost:9103\n"
+ " [ StandardMeshRuleRouter (Input: 5) (Current Node Output: 4) (Chain Node Output: 1) Router message: Match App: app Subset: isolation ] Current Node Output: localhost:9103,localhost:9103,localhost:9103,localhost:9103\n"
+ " [ TagStateRouter (Input: 4) (Current Node Output: 3) (Chain Node Output: 1) Router message: Disable Tag Router. Reason: tagRouterRule is invalid or disabled ] Current Node Output: localhost:9103,localhost:9103,localhost:9103\n"
+ " [ ServiceStateRouter (Input: 3) (Current Node Output: 3) (Chain Node Output: 1) Router message: null ] Current Node Output: localhost:9103,localhost:9103,localhost:9103\n"
+ " [ ConditionStateRouter (Input: 3) (Current Node Output: 2) (Chain Node Output: 2) Router message: Match return. ] Current Node Output: localhost:9103,localhost:9103\n"
+ " [ ProviderAppStateRouter (Input: 2) (Current Node Output: 2) (Chain Node Output: 1) Router message: Directly return. Reason: Invokers from previous router is empty or conditionRouters is empty. ] Current Node Output: localhost:9103,localhost:9103\n"
+ " [ AppStateRouter (Input: 2) (Current Node Output: 2) (Chain Node Output: 1) Router message: null ] Current Node Output: localhost:9103,localhost:9103\n"
+ " [ ConditionStateRouter (Input: 2) (Current Node Output: 1) (Chain Node Output: 1) Router message: Match return. ] Current Node Output: localhost:9103\n"
+ " [ AppScriptStateRouter (Input: 1) (Current Node Output: 1) (Chain Node Output: 1) Router message: Directly return from script router. Reason: Invokers from previous router is empty or script is not enabled. Script rule is: null ] Current Node Output: localhost:9103";
String[] snapshot = routerSnapshotSwitcher.cloneSnapshot();
Assertions.assertTrue(snapshot[0].contains(snapshotLog));
RpcContext.getServiceContext().setNeedPrintRouterSnapshot(false);
result = routerChain
.getSingleChain(consumerUrl, invokers, rpcInvocation)
.route(consumerUrl, invokers, rpcInvocation);
Assertions.assertEquals(result.size(), 1);
Assertions.assertTrue(result.contains(invoker5));
routerChain.destroy();
Assertions.assertEquals(routerChain.getRouters().size(), 0);
Assertions.assertEquals(routerChain.getStateRouters().size(), 0);
}
private Invoker<DemoService> createMockInvoker() {
URL url = URL.valueOf("mock://localhost:9103/DemoInterface?remote.application=app");
Invoker<DemoService> invoker = Mockito.mock(Invoker.class);
when(invoker.getUrl()).thenReturn(url);
return invoker;
}
private Invoker<DemoService> createNormalInvoker(Map<String, String> parameters) {
URL url = URL.valueOf("dubbo://localhost:9103/DemoInterface?remote.application=app");
if (CollectionUtils.isNotEmptyMap(parameters)) {
url = url.addParameters(parameters);
}
Invoker<DemoService> invoker = Mockito.mock(Invoker.class);
when(invoker.getUrl()).thenReturn(url);
return invoker;
}
private static final String MESH_RULE1 =
"apiVersion: service.dubbo.apache.org/v1alpha1\n" + "kind: DestinationRule\n"
+ "metadata: { name: demo-route }\n"
+ "spec:\n"
+ " host: demo\n"
+ " subsets:\n"
+ " - labels: { env-sign: xxx, tag1: hello }\n"
+ " name: isolation\n"
+ " - labels: { env-sign: yyy }\n"
+ " name: testing-trunk\n"
+ " - labels: { env-sign: zzz }\n"
+ " name: testing\n"
+ " trafficPolicy:\n"
+ " loadBalancer: { simple: ROUND_ROBIN }\n"
+ "\n";
private static final String MESH_RULE2 =
"apiVersion: service.dubbo.apache.org/v1alpha1\n" + "kind: VirtualService\n"
+ "metadata: { name: demo-route }\n"
+ "spec:\n"
+ " dubbo:\n"
+ " - routedetail:\n"
+ " - match:\n"
+ " - attachments: \n"
+ " dubboContext: {trafficLabel: {regex: xxx}}\n"
+ " name: xxx-project\n"
+ " route:\n"
+ " - destination: {host: demo, subset: isolation}\n"
+ " services:\n"
+ " - {regex: DemoService}\n"
+ " hosts: [demo]\n";
private static final String APP_CONDITION_RULE = "scope: application\n" + "force: true\n"
+ "runtime: false\n"
+ "enabled: true\n"
+ "priority: 1\n"
+ "key: demo-consumer\n"
+ "conditions:\n"
+ "- => serialization=hessian2";
private static final String SERVICE_CONDITION_RULE = "scope: service\n" + "force: true\n"
+ "runtime: false\n"
+ "enabled: true\n"
+ "priority: 1\n"
+ "key: org.apache.dubbo.demo.DemoService\n"
+ "conditions:\n"
+ "- => timeout=5000";
}

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.tracing.filter;
package org.apache.dubbo.rpc.cluster.filter;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.TracingConfig;
@ -23,7 +23,6 @@ import org.apache.dubbo.rpc.BaseFilter;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.tracing.MockInvocation;
import io.micrometer.tracing.test.SampleTestRunner;
import org.junit.jupiter.api.AfterEach;

View File

@ -14,22 +14,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.tracing.filter;
package org.apache.dubbo.rpc.cluster.filter;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.cluster.filter.ClusterFilter;
import org.apache.dubbo.rpc.cluster.filter.support.ObservationSenderFilter;
import org.apache.dubbo.rpc.model.ApplicationModel;
import io.micrometer.common.KeyValues;
import io.micrometer.core.tck.MeterRegistryAssert;
import io.micrometer.tracing.test.SampleTestRunner;
import io.micrometer.tracing.test.simple.SpansAssert;
import org.assertj.core.api.BDDAssertions;
class ObservationSenderFilterTest extends AbstractObservationFilterTest {
@Override
public SampleTestRunnerConsumer yourCode() {
public SampleTestRunner.SampleTestRunnerConsumer yourCode() {
return (buildingBlocks, meterRegistry) -> {
setupConfig();
setupAttachments();

View File

@ -22,6 +22,8 @@ import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@ -576,4 +578,44 @@ class BitListTest {
set.add(new LinkedList<>(Arrays.asList("A", "B", "C", "D", "E", "F", "G")));
Assertions.assertEquals(2, set.size());
}
@Test
void testConcurrent() throws InterruptedException {
for (int i = 0; i < 100000; i++) {
BitList<String> bitList = new BitList<>(Collections.singletonList("test"));
bitList.remove("test");
CountDownLatch countDownLatch = new CountDownLatch(1);
CountDownLatch countDownLatch2 = new CountDownLatch(2);
Thread thread1 = new Thread(() -> {
try {
countDownLatch.await();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
bitList.add("test");
countDownLatch2.countDown();
});
AtomicReference<BitList<String>> ref = new AtomicReference<>();
Thread thread2 = new Thread(() -> {
try {
countDownLatch.await();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
ref.set(bitList.clone());
countDownLatch2.countDown();
});
thread1.start();
thread2.start();
countDownLatch.countDown();
countDownLatch2.await();
Assertions.assertDoesNotThrow(() -> ref.get().iterator().hasNext());
}
}
}

View File

@ -18,10 +18,12 @@ package org.apache.dubbo.rpc.cluster.router.tag;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.beans.factory.ScopeBeanFactory;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.utils.Holder;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.cluster.router.MockInvoker;
import org.apache.dubbo.rpc.cluster.router.mesh.util.TracingContextProvider;
import org.apache.dubbo.rpc.cluster.router.state.BitList;
import org.apache.dubbo.rpc.cluster.router.state.StateRouter;
import org.apache.dubbo.rpc.cluster.router.tag.model.TagRouterRule;
@ -30,12 +32,10 @@ import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.ModuleModel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.Sets;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@ -48,6 +48,7 @@ class TagStateRouterTest {
private URL url;
private ModuleModel originModel;
private ModuleModel moduleModel;
private Set<TracingContextProvider> tracingContextProviders;
@BeforeEach
public void setup() {
@ -58,6 +59,11 @@ class TagStateRouterTest {
ScopeBeanFactory beanFactory = Mockito.spy(originBeanFactory);
when(moduleModel.getBeanFactory()).thenReturn(beanFactory);
ExtensionLoader<TracingContextProvider> extensionLoader = Mockito.mock(ExtensionLoader.class);
tracingContextProviders = new HashSet<>();
when(extensionLoader.getSupportedExtensionInstances()).thenReturn(tracingContextProviders);
when(moduleModel.getExtensionLoader(TracingContextProvider.class)).thenReturn(extensionLoader);
url = URL.valueOf("test://localhost/DemoInterface").setScopeModel(moduleModel);
}
@ -258,44 +264,4 @@ class TagStateRouterTest {
TagRouterRule tagRouterRule = TagRuleParser.parse(tagRouterRuleConfig);
return tagRouterRule;
}
@Test
public void tagMultiLevelTest() {
String tagSelector = "beta|team1|partner1";
Set<String> address1 = Sets.newHashSet("192.168.5.1:20880");
Map<String, Set<String>> tagAddresses = new HashMap<>();
tagAddresses.put("beta", address1);
Assertions.assertEquals(address1, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
Set<String> address2 = Sets.newHashSet("192.168.5.2:20880");
tagAddresses.put("beta|team1", address2);
Assertions.assertEquals(address2, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
Set<String> address3 = Sets.newHashSet("192.168.5.3:20880");
tagAddresses.put("beta|team1|partner1", address3);
Assertions.assertEquals(address3, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
tagSelector = "beta";
Assertions.assertEquals(address1, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
tagSelector = "beta|team1";
Assertions.assertEquals(address2, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
tagSelector = "beta|team1|partner1";
Assertions.assertEquals(address3, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
tagSelector = "beta2";
Assertions.assertNull(TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
tagSelector = "beta|team2";
Assertions.assertEquals(address1, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
tagSelector = "beta|team1|partner2";
Assertions.assertEquals(address2, TagStateRouter.selectAddressByTagLevel(tagAddresses, tagSelector, false));
}
@Test
public void tagLevelForceTest() {
Set<String> addresses = Sets.newHashSet("192.168.1.223:20880");
Map<String, Set<String>> tagAddresses = new HashMap<>();
tagAddresses.put("beta", addresses);
Set<String> selectedAddresses = TagStateRouter.selectAddressByTagLevel(tagAddresses, "beta", true);
Assertions.assertEquals(addresses, selectedAddresses);
}
}

View File

@ -60,6 +60,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.MONITOR_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_KEY;
import static org.apache.dubbo.rpc.cluster.Constants.CLUSTER_AVAILABLE_CHECK_KEY;
import static org.apache.dubbo.rpc.cluster.Constants.INVOCATION_NEED_MOCK;
import static org.apache.dubbo.rpc.cluster.Constants.REFER_KEY;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.same;
@ -579,5 +580,25 @@ class AbstractClusterInvokerTest {
}
}
/**
* Test mock invoker selector works as expected
*/
@Test
void testMockedInvokerSelect() {
initlistsize5();
invokers.add(mockedInvoker1);
initDic();
RpcInvocation mockedInvocation = new RpcInvocation();
mockedInvocation.setMethodName("sayHello");
mockedInvocation.setAttachment(INVOCATION_NEED_MOCK, "true");
List<Invoker<IHelloService>> mockedInvokers = dic.list(mockedInvocation);
Assertions.assertEquals(1, mockedInvokers.size());
List<Invoker<IHelloService>> invokers = dic.list(invocation);
Assertions.assertEquals(5, invokers.size());
}
public static interface IHelloService {}
}

View File

@ -18,7 +18,6 @@ package org.apache.dubbo.rpc.cluster.support;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.logger.Level;
import org.apache.dubbo.common.utils.DubboAppender;
import org.apache.dubbo.common.utils.LogUtil;
import org.apache.dubbo.rpc.AppResponse;
@ -35,6 +34,7 @@ import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.log4j.Level;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;

View File

@ -1,24 +0,0 @@
/*
* 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.
*/
package org.apache.dubbo.rpc.cluster.support;
import org.apache.dubbo.common.extension.SPI;
@SPI
public interface Greeting {
String hello();
}

View File

@ -1,190 +0,0 @@
/*
* 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.
*/
package org.apache.dubbo.rpc.cluster.support;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.metrics.event.MetricsDispatcher;
import org.apache.dubbo.rpc.Invocation;
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.cluster.LoadBalance;
import org.apache.dubbo.rpc.cluster.directory.StaticDirectory;
import org.apache.dubbo.rpc.model.ApplicationModel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.apache.dubbo.common.constants.CommonConstants.ENABLE_CONNECTIVITY_VALIDATION;
import static org.apache.dubbo.rpc.cluster.Constants.CLUSTER_AVAILABLE_CHECK_KEY;
import static org.apache.dubbo.rpc.cluster.Constants.INVOCATION_NEED_MOCK;
import static org.apache.dubbo.rpc.cluster.Constants.REFER_KEY;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
/**
* AbstractClusterInvokerTest
*/
@SuppressWarnings("rawtypes")
class MockAbstractClusterInvokerTest {
List<Invoker<IHelloService>> invokers = new ArrayList<Invoker<IHelloService>>();
List<Invoker<IHelloService>> selectedInvokers = new ArrayList<Invoker<IHelloService>>();
AbstractClusterInvoker<IHelloService> cluster;
AbstractClusterInvoker<IHelloService> cluster_nocheck;
StaticDirectory<IHelloService> dic;
RpcInvocation invocation = new RpcInvocation();
URL url = URL.valueOf(
"registry://localhost:9090/org.apache.dubbo.rpc.cluster.support.AbstractClusterInvokerTest.IHelloService?refer="
+ URL.encode("application=abstractClusterInvokerTest"));
URL consumerUrl = URL.valueOf(
"dubbo://localhost?application=abstractClusterInvokerTest&refer=application%3DabstractClusterInvokerTest");
Invoker<IHelloService> invoker1;
Invoker<IHelloService> invoker2;
Invoker<IHelloService> invoker3;
Invoker<IHelloService> invoker4;
Invoker<IHelloService> invoker5;
Invoker<IHelloService> mockedInvoker1;
@BeforeAll
public static void setUpBeforeClass() throws Exception {
System.setProperty(ENABLE_CONNECTIVITY_VALIDATION, "false");
}
@AfterEach
public void teardown() throws Exception {
RpcContext.removeContext();
}
@AfterAll
public static void afterClass() {
System.clearProperty(ENABLE_CONNECTIVITY_VALIDATION);
}
@SuppressWarnings({"unchecked"})
@BeforeEach
public void setUp() throws Exception {
ApplicationModel.defaultModel().getBeanFactory().registerBean(MetricsDispatcher.class);
Map<String, Object> attributes = new HashMap<>();
attributes.put("application", "abstractClusterInvokerTest");
url = url.putAttribute(REFER_KEY, attributes);
invocation.setMethodName("sayHello");
invoker1 = mock(Invoker.class);
invoker2 = mock(Invoker.class);
invoker3 = mock(Invoker.class);
invoker4 = mock(Invoker.class);
invoker5 = mock(Invoker.class);
mockedInvoker1 = mock(Invoker.class);
URL turl = URL.valueOf("test://test:11/test");
given(invoker1.isAvailable()).willReturn(false);
given(invoker1.getInterface()).willReturn(IHelloService.class);
given(invoker1.getUrl()).willReturn(turl.setPort(1).addParameter("name", "invoker1"));
given(invoker2.isAvailable()).willReturn(true);
given(invoker2.getInterface()).willReturn(IHelloService.class);
given(invoker2.getUrl()).willReturn(turl.setPort(2).addParameter("name", "invoker2"));
given(invoker3.isAvailable()).willReturn(false);
given(invoker3.getInterface()).willReturn(IHelloService.class);
given(invoker3.getUrl()).willReturn(turl.setPort(3).addParameter("name", "invoker3"));
given(invoker4.isAvailable()).willReturn(true);
given(invoker4.getInterface()).willReturn(IHelloService.class);
given(invoker4.getUrl()).willReturn(turl.setPort(4).addParameter("name", "invoker4"));
given(invoker5.isAvailable()).willReturn(false);
given(invoker5.getInterface()).willReturn(IHelloService.class);
given(invoker5.getUrl()).willReturn(turl.setPort(5).addParameter("name", "invoker5"));
given(mockedInvoker1.isAvailable()).willReturn(false);
given(mockedInvoker1.getInterface()).willReturn(IHelloService.class);
given(mockedInvoker1.getUrl()).willReturn(turl.setPort(999).setProtocol("mock"));
invokers.add(invoker1);
dic = new StaticDirectory<IHelloService>(url, invokers, null);
cluster = new AbstractClusterInvoker(dic) {
@Override
protected Result doInvoke(Invocation invocation, List invokers, LoadBalance loadbalance)
throws RpcException {
return null;
}
};
cluster_nocheck =
new AbstractClusterInvoker(
dic, url.addParameterIfAbsent(CLUSTER_AVAILABLE_CHECK_KEY, Boolean.FALSE.toString())) {
@Override
protected Result doInvoke(Invocation invocation, List invokers, LoadBalance loadbalance)
throws RpcException {
return null;
}
};
}
private void initlistsize5() {
invokers.clear();
selectedInvokers
.clear(); // Clear first, previous test case will make sure that the right invoker2 will be used.
invokers.add(invoker1);
invokers.add(invoker2);
invokers.add(invoker3);
invokers.add(invoker4);
invokers.add(invoker5);
}
private void initDic() {
dic.notify(invokers);
dic.buildRouterChain();
}
/**
* Test mock invoker selector works as expected
*/
@Test
void testMockedInvokerSelect() {
initlistsize5();
invokers.add(mockedInvoker1);
initDic();
RpcInvocation mockedInvocation = new RpcInvocation();
mockedInvocation.setMethodName("sayHello");
mockedInvocation.setAttachment(INVOCATION_NEED_MOCK, "true");
List<Invoker<IHelloService>> mockedInvokers = dic.list(mockedInvocation);
Assertions.assertEquals(1, mockedInvokers.size());
List<Invoker<IHelloService>> invokers = dic.list(invocation);
Assertions.assertEquals(5, invokers.size());
}
public static interface IHelloService {}
}

View File

@ -62,7 +62,7 @@ class MockProviderRpcExceptionTest {
.addParameter("invoke_return_error", "true")
.addParameter(
REFER_KEY,
URL.encode(PATH_KEY + "=" + IHelloRpcService.class.getName()
URL.encode(PATH_KEY + "=" + MockProviderRpcExceptionTest.IHelloRpcService.class.getName()
+ "&" + "mock=true"
+ "&" + "proxy=jdk"));
Invoker<IHelloRpcService> cluster = getClusterInvoker(url);

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="DUBBO" class="org.apache.dubbo.common.utils.DubboAppender">
<param name="File" value="../dubbo.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n"/>
</layout>
</appender>
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n"/>
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="DUBBO"/>
<appender-ref ref="CONSOLE"/>
</root>
</log4j:configuration>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<Configuration status="WARN">
<Appenders>
<Dubbo name="Dubbo" fileName="../dubbo.log">
<PatternLayout pattern="[%d{HH:mm:ss:SSS}] %5p %t %c{2}: %m%n%ex" charset="UTF-8"/>
</Dubbo>
<Console name="Console" target="SYSTEM_OUT" follow="true">
<PatternLayout pattern="%d{HH:mm:ss.SSS} |-%highlight{%-5p} [%t] %40.40c:%-3L -| %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect,org.junit,org.mockito)}" charset="UTF-8"/>
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Dubbo"/>
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>

View File

@ -99,17 +99,6 @@
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>

View File

@ -1295,6 +1295,19 @@ public /*final**/ class URL implements Serializable {
return serviceNameBuilder.toString();
}
/**
* The format is "{interface}:[version]"
*
* @return
*/
public String getCompatibleColonSeparatedKey() {
StringBuilder serviceNameBuilder = new StringBuilder();
serviceNameBuilder.append(this.getServiceInterface());
compatibleAppend(serviceNameBuilder, VERSION_KEY);
compatibleAppend(serviceNameBuilder, GROUP_KEY);
return serviceNameBuilder.toString();
}
private void append(StringBuilder target, String parameterName, boolean first) {
String parameterValue = this.getParameter(parameterName);
if (!isBlank(parameterValue)) {
@ -1307,6 +1320,14 @@ public /*final**/ class URL implements Serializable {
}
}
private void compatibleAppend(StringBuilder target, String parameterName) {
String parameterValue = this.getParameter(parameterName);
if (!isBlank(parameterValue)) {
target.append(':');
target.append(parameterValue);
}
}
/**
* The format of return value is '{group}/{interfaceName}:{version}'
*
@ -1376,6 +1397,10 @@ public /*final**/ class URL implements Serializable {
return buildString(true, false, true, true);
}
public String toServiceString(String... parameters) {
return buildString(true, true, true, true, parameters);
}
@Deprecated
public String getServiceName() {
return getServiceInterface();

View File

@ -16,6 +16,7 @@
*/
package org.apache.dubbo.common;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.StringUtils;
@ -60,7 +61,7 @@ public final class Version {
public static final int LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT = 2000200; // 2.0.2
public static final int HIGHEST_PROTOCOL_VERSION = 2009900; // 2.0.99
private static final Map<String, Integer> VERSION2INT = new HashMap<String, Integer>();
private static final Map<String, Integer> VERSION2INT = new HashMap<>();
static {
// get dubbo version and last commit id
@ -84,7 +85,8 @@ public final class Version {
}
private static void tryLoadVersionFromResource() throws IOException {
Enumeration<URL> configLoader = Version.class.getClassLoader().getResources("META-INF/versions/dubbo-common");
Enumeration<URL> configLoader =
Version.class.getClassLoader().getResources(CommonConstants.DUBBO_VERSIONS_KEY + "/dubbo-common");
if (configLoader.hasMoreElements()) {
URL url = configLoader.nextElement();
try (BufferedReader reader =
@ -312,7 +314,7 @@ public final class Version {
private static void checkArtifact(String artifactId) throws IOException {
Enumeration<URL> artifactEnumeration =
Version.class.getClassLoader().getResources("META-INF/versions/" + artifactId);
Version.class.getClassLoader().getResources(CommonConstants.DUBBO_VERSIONS_KEY + artifactId);
while (artifactEnumeration.hasMoreElements()) {
URL url = artifactEnumeration.nextElement();
try (BufferedReader reader =
@ -348,7 +350,7 @@ public final class Version {
private static Set<String> loadArtifactIds() throws IOException {
Enumeration<URL> artifactsEnumeration =
Version.class.getClassLoader().getResources("META-INF/versions/.artifacts");
Version.class.getClassLoader().getResources(CommonConstants.DUBBO_VERSIONS_KEY + "/.artifacts");
Set<String> artifactIds = new HashSet<>();
while (artifactsEnumeration.hasMoreElements()) {
URL url = artifactsEnumeration.nextElement();

View File

@ -1,37 +0,0 @@
/*
* 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.
*/
package org.apache.dubbo.common.aot;
import org.apache.dubbo.common.utils.SystemPropertyConfigUtils;
import static org.apache.dubbo.common.constants.CommonConstants.ThirdPartyProperty.GRAALVM_NATIVEIMAGE_IMAGECODE;
public abstract class NativeDetector {
/**
* See https://github.com/oracle/graal/blob/master/sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/ImageInfo.java
*/
private static final boolean IMAGE_CODE =
(SystemPropertyConfigUtils.getSystemProperty(GRAALVM_NATIVEIMAGE_IMAGECODE) != null);
/**
* Returns {@code true} if invoked in the context of image building or during image runtime, else {@code false}.
*/
public static boolean inNativeImage() {
return IMAGE_CODE;
}
}

View File

@ -35,7 +35,7 @@ import java.util.Map;
public final class JavaBeanSerializeUtil {
private static final Logger logger = LoggerFactory.getLogger(JavaBeanSerializeUtil.class);
private static final Map<String, Class<?>> TYPES = new HashMap<String, Class<?>>();
private static final Map<String, Class<?>> TYPES = new HashMap<>();
private static final String ARRAY_PREFIX = "[";
private static final String REFERENCE_TYPE_PREFIX = "L";
private static final String REFERENCE_TYPE_SUFFIX = ";";
@ -72,7 +72,7 @@ public final class JavaBeanSerializeUtil {
if (obj instanceof JavaBeanDescriptor) {
return (JavaBeanDescriptor) obj;
}
IdentityHashMap<Object, JavaBeanDescriptor> cache = new IdentityHashMap<Object, JavaBeanDescriptor>();
IdentityHashMap<Object, JavaBeanDescriptor> cache = new IdentityHashMap<>();
return createDescriptorIfAbsent(obj, accessor, cache);
}
@ -209,7 +209,7 @@ public final class JavaBeanSerializeUtil {
if (beanDescriptor == null) {
return null;
}
IdentityHashMap<JavaBeanDescriptor, Object> cache = new IdentityHashMap<JavaBeanDescriptor, Object>();
IdentityHashMap<JavaBeanDescriptor, Object> cache = new IdentityHashMap<>();
Object result = instantiateForDeserialize(beanDescriptor, loader, cache);
deserializeInternal(result, beanDescriptor, loader, cache);
return result;

View File

@ -120,7 +120,7 @@ public abstract class Mixin {
Class<?> neighbor = null;
// impl methods.
Set<String> worked = new HashSet<String>();
Set<String> worked = new HashSet<>();
for (int i = 0; i < ics.length; i++) {
if (!Modifier.isPublic(ics[i].getModifiers())) {
String npkg = ics[i].getPackage().getName();

View File

@ -42,8 +42,8 @@ import javassist.CtMethod;
* Wrapper.
*/
public abstract class Wrapper {
private static final ConcurrentMap<Class<?>, Wrapper> WRAPPER_MAP =
new ConcurrentHashMap<Class<?>, Wrapper>(); // class wrapper map
// class wrapper map
private static final ConcurrentMap<Class<?>, Wrapper> WRAPPER_MAP = new ConcurrentHashMap<>();
private static final String[] EMPTY_STRING_ARRAY = new String[0];
private static final String[] OBJECT_METHODS = new String[] {"getClass", "hashCode", "toString", "equals"};
private static final Wrapper OBJECT_WRAPPER = new Wrapper() {

View File

@ -162,6 +162,14 @@ public class FileCacheStore {
FileCacheStoreFactory.removeCache(cacheFilePath);
}
/**
* for unit test only
*/
@Deprecated
protected String getCacheFilePath() {
return cacheFilePath;
}
public static Builder newBuilder() {
return new Builder();
}

View File

@ -19,7 +19,6 @@ package org.apache.dubbo.common.cache;
import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.ConcurrentHashMapUtils;
import org.apache.dubbo.common.utils.SystemPropertyConfigUtils;
import java.io.File;
import java.io.IOException;
@ -31,11 +30,11 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import static org.apache.dubbo.common.constants.CommonConstants.SystemProperty.USER_HOME;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_CACHE_PATH_INACCESSIBLE;
/**
@ -83,7 +82,7 @@ public final class FileCacheStoreFactory {
public static FileCacheStore getInstance(String basePath, String cacheName, boolean enableFileCache) {
if (basePath == null) {
// default case: ~/.dubbo
basePath = SystemPropertyConfigUtils.getSystemProperty(USER_HOME) + File.separator + ".dubbo";
basePath = System.getProperty("user.home") + File.separator + ".dubbo";
}
if (basePath.endsWith(File.separator)) {
basePath = basePath.substring(0, basePath.length() - 1);
@ -208,6 +207,14 @@ public final class FileCacheStoreFactory {
cacheMap.remove(cacheFileName);
}
/**
* for unit test only
*/
@Deprecated
static Map<String, FileCacheStore> getCacheMap() {
return cacheMap;
}
private static class PathNotExclusiveException extends Exception {
public PathNotExclusiveException(String msg) {
super(msg);

View File

@ -18,7 +18,6 @@ package org.apache.dubbo.common.compact;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.common.utils.SystemPropertyConfigUtils;
import java.lang.annotation.Annotation;
@ -39,18 +38,17 @@ public class Dubbo2CompactUtils {
private static void initEnabled() {
try {
String fromProp =
SystemPropertyConfigUtils.getSystemProperty(CommonConstants.DubboProperty.DUBBO2_COMPACT_ENABLE);
String fromProp = System.getProperty(CommonConstants.DUBBO2_COMPACT_ENABLE);
if (StringUtils.isNotEmpty(fromProp)) {
enabled = Boolean.parseBoolean(fromProp);
return;
}
String fromEnv = System.getenv(CommonConstants.DubboProperty.DUBBO2_COMPACT_ENABLE);
String fromEnv = System.getenv(CommonConstants.DUBBO2_COMPACT_ENABLE);
if (StringUtils.isNotEmpty(fromEnv)) {
enabled = Boolean.parseBoolean(fromEnv);
return;
}
fromEnv = System.getenv(StringUtils.toOSStyleKey(CommonConstants.DubboProperty.DUBBO2_COMPACT_ENABLE));
fromEnv = System.getenv(StringUtils.toOSStyleKey(CommonConstants.DUBBO2_COMPACT_ENABLE));
enabled = !StringUtils.isNotEmpty(fromEnv) || Boolean.parseBoolean(fromEnv);
} catch (Throwable t) {
enabled = true;

View File

@ -392,7 +392,7 @@ public class ClassUtils {
}
public static <K, V> Map<K, V> toMap(Map.Entry<K, V>[] entries) {
Map<K, V> map = new HashMap<K, V>();
Map<K, V> map = new HashMap<>();
if (entries != null && entries.length > 0) {
for (Map.Entry<K, V> entry : entries) {
map.put(entry.getKey(), entry.getValue());

View File

@ -31,10 +31,9 @@ import java.io.StringReader;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
@ -43,6 +42,7 @@ import java.util.Set;
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_SERVER_SHUTDOWN_TIMEOUT;
import static org.apache.dubbo.common.constants.CommonConstants.SHUTDOWN_WAIT_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.SHUTDOWN_WAIT_SECONDS_KEY;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_PROPERTY_TYPE_MISMATCH;
/**
* Utilities for manipulating configurations from different sources
@ -57,18 +57,18 @@ public final class ConfigurationUtils {
}
private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(ConfigurationUtils.class);
private static final List<String> securityKey;
private static final Set<String> securityKey;
private static volatile long expectedShutdownTime = Long.MAX_VALUE;
static {
List<String> keys = new LinkedList<>();
Set<String> keys = new HashSet<>();
keys.add("accesslog");
keys.add("router");
keys.add("rule");
keys.add("runtime");
keys.add("type");
securityKey = Collections.unmodifiableList(keys);
securityKey = Collections.unmodifiableSet(keys);
}
/**
@ -213,11 +213,15 @@ public final class ConfigurationUtils {
properties.load(new StringReader(content));
properties.stringPropertyNames().forEach(k -> {
boolean deny = false;
for (String key : securityKey) {
if (k.contains(key)) {
deny = true;
break;
}
// check whether property name is safe or not based on the last fragment kebab-case comparison.
String[] fragments = k.split("\\.");
if (securityKey.contains(StringUtils.convertToSplitName(fragments[fragments.length - 1], "-"))) {
deny = true;
logger.warn(
COMMON_PROPERTY_TYPE_MISMATCH,
"security properties are not allowed to be set",
"",
String.format("'%s' is not allowed to be set as it is on the security key list.", k));
}
if (!deny) {
map.put(k, properties.getProperty(k));
@ -282,8 +286,7 @@ public final class ConfigurationUtils {
for (Map.Entry<String, V> entry : copy.entrySet()) {
String key = entry.getKey();
V val = entry.getValue();
if ((StringUtils.startsWithIgnoreCase(key, prefix)
|| StringUtils.startsWithIgnoreCase(key, StringUtils.toOSStyleKey(prefix)))
if (StringUtils.startsWithIgnoreCase(key, prefix)
&& key.length() > prefix.length()
&& !ConfigurationUtils.isEmptyValue(val)) {
@ -323,8 +326,7 @@ public final class ConfigurationUtils {
}
for (Map.Entry<String, V> entry : copy.entrySet()) {
String key = entry.getKey();
if ((StringUtils.startsWithIgnoreCase(key, prefix)
|| StringUtils.startsWithIgnoreCase(key, StringUtils.toOSStyleKey(prefix)))
if (StringUtils.startsWithIgnoreCase(key, prefix)
&& key.length() > prefix.length()
&& !ConfigurationUtils.isEmptyValue(entry.getValue())) {
return true;

View File

@ -25,7 +25,6 @@ import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.ConfigUtils;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.common.utils.SystemPropertyConfigUtils;
import org.apache.dubbo.config.AbstractConfig;
import org.apache.dubbo.config.context.ConfigConfigurationAdapter;
import org.apache.dubbo.rpc.model.ScopeModel;
@ -97,12 +96,10 @@ public class Environment extends LifecycleAdapter implements ApplicationExt {
*/
@Deprecated
private void loadMigrationRule() {
if (Boolean.parseBoolean(SystemPropertyConfigUtils.getSystemProperty(
CommonConstants.DubboProperty.DUBBO_MIGRATION_FILE_ENABLE, "false"))) {
String path =
SystemPropertyConfigUtils.getSystemProperty(CommonConstants.DubboProperty.DUBBO_MIGRATION_KEY);
if (Boolean.parseBoolean(System.getProperty(CommonConstants.DUBBO_MIGRATION_FILE_ENABLE, "false"))) {
String path = System.getProperty(CommonConstants.DUBBO_MIGRATION_KEY);
if (StringUtils.isEmpty(path)) {
path = System.getenv(CommonConstants.DubboProperty.DUBBO_MIGRATION_KEY);
path = System.getenv(CommonConstants.DUBBO_MIGRATION_KEY);
if (StringUtils.isEmpty(path)) {
path = CommonConstants.DEFAULT_DUBBO_MIGRATION_FILE;
}

View File

@ -17,6 +17,7 @@
package org.apache.dubbo.common.config.configcenter;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.config.configcenter.file.FileSystemDynamicConfiguration;
import org.apache.dubbo.common.utils.StringUtils;
import java.util.Collection;
@ -29,7 +30,7 @@ import static org.apache.dubbo.common.utils.PathUtils.normalize;
/**
* An abstract implementation of {@link DynamicConfiguration} is like "tree-structure" path :
* <ul>
* <li>{@link org.apache.dubbo.common.config.configcenter.file.FileSystemDynamicConfiguration "file"}</li>
* <li>{@link FileSystemDynamicConfiguration "file"}</li>
* <li>{@link org.apache.dubbo.configcenter.support.zookeeper.ZookeeperDynamicConfiguration "zookeeper"}</li>
* </ul>
*

View File

@ -22,7 +22,6 @@ import org.apache.dubbo.common.config.configcenter.ConfigChangedEvent;
import org.apache.dubbo.common.config.configcenter.ConfigurationListener;
import org.apache.dubbo.common.config.configcenter.DynamicConfiguration;
import org.apache.dubbo.common.config.configcenter.TreePathDynamicConfiguration;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.function.ThrowableConsumer;
import org.apache.dubbo.common.function.ThrowableFunction;
import org.apache.dubbo.common.lang.ShutdownHookCallbacks;
@ -30,7 +29,6 @@ import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.NamedThreadFactory;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.common.utils.SystemPropertyConfigUtils;
import org.apache.dubbo.rpc.model.ScopeModel;
import org.apache.dubbo.rpc.model.ScopeModelUtil;
@ -86,8 +84,7 @@ public class FileSystemDynamicConfiguration extends TreePathDynamicConfiguration
public static final String CONFIG_CENTER_ENCODING_PARAM_NAME = PARAM_NAME_PREFIX + "encoding";
public static final String DEFAULT_CONFIG_CENTER_DIR_PATH =
SystemPropertyConfigUtils.getSystemProperty(CommonConstants.SystemProperty.USER_HOME) + File.separator
+ ".dubbo" + File.separator + "config-center";
System.getProperty("user.home") + File.separator + ".dubbo" + File.separator + "config-center";
public static final int DEFAULT_THREAD_POOL_SIZE = 1;

View File

@ -24,6 +24,7 @@ import java.util.concurrent.ExecutorService;
import java.util.regex.Pattern;
public interface CommonConstants {
String DUBBO = "dubbo";
String TRIPLE = "tri";
@ -60,8 +61,14 @@ public interface CommonConstants {
String DISABLED_KEY = "disabled";
String DUBBO_PROPERTIES_KEY = "dubbo.properties.file";
String DEFAULT_DUBBO_PROPERTIES = "dubbo.properties";
String DUBBO_MIGRATION_KEY = "dubbo.migration.file";
String DUBBO_MIGRATION_FILE_ENABLE = "dubbo.migration-file.enable";
String DEFAULT_DUBBO_MIGRATION_FILE = "dubbo-migration.yaml";
String ANY_VALUE = "*";
@ -121,8 +128,6 @@ public interface CommonConstants {
String THREAD_POOL_EXHAUSTED_LISTENERS_KEY = "thread-pool-exhausted-listeners";
String JSON_CHECK_LEVEL_KEY = "jsonCheckLevel";
String THREADS_KEY = "threads";
String QUEUES_KEY = "queues";
@ -263,12 +268,14 @@ public interface CommonConstants {
String $INVOKE = "$invoke";
String $INVOKE_ASYNC = "$invokeAsync";
String GENERIC_PARAMETER_DESC = "Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/Object;";
/**
* echo call
*/
String $ECHO = "$echo";
/**
* package version in the manifest
*/
@ -279,13 +286,19 @@ public interface CommonConstants {
int MAX_PROXY_COUNT = 65535;
String MONITOR_KEY = "monitor";
String BACKGROUND_KEY = "background";
String CLUSTER_KEY = "cluster";
String MERGEABLE_CLUSTER_NAME = "mergeable";
String USERNAME_KEY = "username";
String PASSWORD_KEY = "password";
String HOST_KEY = "host";
String PORT_KEY = "port";
String DUBBO_IP_TO_BIND = "DUBBO_IP_TO_BIND";
/**
@ -293,25 +306,41 @@ public interface CommonConstants {
*/
String BROADCAST_CLUSTER = "broadcast";
/**
* The property name for {@link NetworkInterface#getDisplayName() the name of network interface} that
* the Dubbo application prefers
*
* @since 2.7.6
*/
String DUBBO_PREFERRED_NETWORK_INTERFACE = "dubbo.network.interface.preferred";
@Deprecated
String SHUTDOWN_WAIT_SECONDS_KEY = "dubbo.service.shutdown.wait.seconds";
String SHUTDOWN_WAIT_KEY = "dubbo.service.shutdown.wait";
String DUBBO_PROTOCOL = "dubbo";
String DUBBO_LABELS = "dubbo.labels";
String DUBBO_ENV_KEYS = "dubbo.env.keys";
String CONFIG_CONFIGFILE_KEY = "config-file";
String CONFIG_ENABLE_KEY = "highest-priority";
String CONFIG_NAMESPACE_KEY = "namespace";
String CHECK_KEY = "check";
String BACKLOG_KEY = "backlog";
String HEARTBEAT_EVENT = null;
String MOCK_HEARTBEAT_EVENT = "H";
String READONLY_EVENT = "R";
String WRITEABLE_EVENT = "W";
String REFERENCE_FILTER_KEY = "reference.filter";
@ -425,6 +454,12 @@ public interface CommonConstants {
*/
String DEFAULT_SERVICE_NAME_MAPPING_PROPERTIES_PATH = "META-INF/dubbo/service-name-mapping.properties";
String CLASS_DESERIALIZE_BLOCK_ALL = "dubbo.security.serialize.blockAllClassExceptAllow";
String CLASS_DESERIALIZE_ALLOWED_LIST = "dubbo.security.serialize.allowedClassList";
String CLASS_DESERIALIZE_BLOCKED_LIST = "dubbo.security.serialize.blockedClassList";
String ENABLE_NATIVE_JAVA_GENERIC_SERIALIZE = "dubbo.security.serialize.generic.native-java-enable";
String SERIALIZE_BLOCKED_LIST_FILE_PATH = "security/serialize.blockedlist";
@ -442,6 +477,7 @@ public interface CommonConstants {
String REGISTRY_DELAY_NOTIFICATION_KEY = "delay-notification";
String CACHE_CLEAR_TASK_INTERVAL = "dubbo.application.url.cache.task.interval";
String CACHE_CLEAR_WAITING_THRESHOLD = "dubbo.application.url.cache.clear.waiting";
String CLUSTER_INTERCEPTOR_COMPATIBLE_KEY = "dubbo.application.cluster.interceptor.compatible";
@ -455,6 +491,8 @@ public interface CommonConstants {
String DEFAULT_VERSION = "0.0.0";
String CLASS_DESERIALIZE_OPEN_CHECK = "dubbo.security.serialize.openCheckClass";
String ROUTER_KEY = "router";
String EXPORT_ASYNC_KEY = "export-async";
@ -482,6 +520,11 @@ public interface CommonConstants {
*/
String URL_MERGE_PROCESSOR_KEY = "url-merge-processor";
/**
* use native image to compile dubbo's identifier
*/
String NATIVE = "native";
String DUBBO_MONITOR_ADDRESS = "dubbo.monitor.address";
String SERVICE_NAME_MAPPING_KEY = "service-name-mapping";
@ -490,6 +533,16 @@ public interface CommonConstants {
String SERVICE_MODEL = "serviceModel";
/**
* The property name for {@link NetworkInterface#getDisplayName() the name of network interface} that
* the Dubbo application will be ignored
*
* @since 2.7.6
*/
String DUBBO_NETWORK_IGNORED_INTERFACE = "dubbo.network.interface.ignored";
String OS_NAME_KEY = "os.name";
String OS_LINUX_PREFIX = "linux";
String OS_WIN_PREFIX = "win";
@ -534,6 +587,10 @@ public interface CommonConstants {
String INJVM_IGNORE_SAME_MODULE_KEY = "injvm.ignore.same-module";
String SET_FUTURE_IN_SYNC_MODE = "future.sync.set";
String CLEAR_FUTURE_AFTER_GET = "future.clear.once";
String NATIVE_STUB = "nativestub";
String METADATA = "metadata";
@ -542,6 +599,8 @@ public interface CommonConstants {
String OPTIMIZER_KEY = "optimizer";
String PREFER_JSON_FRAMEWORK_NAME = "dubbo.json-framework.prefer";
/**
* @since 3.1.0
*/
@ -575,12 +634,25 @@ public interface CommonConstants {
String SERVICE_EXECUTOR = "service-executor";
String EXECUTOR_MANAGEMENT_MODE = "executor-management-mode";
String EXECUTOR_MANAGEMENT_MODE_DEFAULT = "default";
String EXECUTOR_MANAGEMENT_MODE_ISOLATION = "isolation";
/**
* used in JVMUtil.java ,Control stack print lines, default is 32 lines
*/
String DUBBO_JSTACK_MAXLINE = "dubbo.jstack-dump.max-line";
String ENCODE_IN_IO_THREAD_KEY = "encode.in.io";
boolean DEFAULT_ENCODE_IN_IO_THREAD = false;
/**
* @since 3.2.0
*/
String BYTE_ACCESSOR_KEY = "byte.accessor";
String PAYLOAD = "payload";
String DUBBO_METRICS_CONFIGCENTER_ENABLE = "dubbo.metrics.configcenter.enable";
@ -591,161 +663,11 @@ public interface CommonConstants {
String DUBBO_PACKABLE_METHOD_FACTORY = "dubbo.application.parameters." + PACKABLE_METHOD_FACTORY_KEY;
String DUBBO_TAG_HEADER = "dubbo-tag";
String DUBBO_MANUAL_REGISTER_KEY = "dubbo.application.manual-register";
String REST_SERVICE_DEPLOYER_URL_ATTRIBUTE_KEY = "restServiceDeployerAttributeKey";
String DUBBO2_COMPACT_ENABLE = "dubbo.compact.enable";
String POD_NAMESPACE = "POD_NAMESPACE";
String ZOOKEEPER_ENSEMBLE_TRACKER_KEY = "zookeeper.ensemble.tracker";
String CLUSTER_DOMAIN = "CLUSTER_DOMAIN";
String EXT_PROTOCOL = "ext.protocol";
String IS_EXTRA = "isExtra";
/**
* System-related VM properties
*/
interface SystemProperty {
String USER_HOME = "user.home";
String SYSTEM_JAVA_VERSION = "java.version";
String SYSTEM_JAVA_IO_TMPDIR = "java.io.tmpdir";
String SYSTEM_LINE_SEPARATOR = "line.separator";
String SERIALIZATION_SECURITY_CHECK_KEY = "serialization.security.check";
String SYSTEM_BYTE_ACCESSOR_KEY = "byte.accessor";
String SYSTEM_OS_NAME = "os.name";
String SYSTEM_OS_VERSION = "os.version";
String JAVA_RUNTIME_NAME = "java.runtime.name";
String JAVA_RUNTIME_VERSION = "java.runtime.version";
String JAVA_VM_NAME = "java.vm.name";
String JAVA_VM_VERSION = "java.vm.version";
String JAVA_VM_INFO = "java.vm.info";
String JAVA_HOME = "java.home";
String OS_ARCH = "os.arch";
String SYSTEM_FILE_ENCODING = "file.encoding";
String SYSTEM_TCP_RESPONSE_TIMEOUT = "sun.rmi.transport.tcp.responseTimeout";
}
/**
* Third-party-related VM properties
*/
interface ThirdPartyProperty {
String NETTY_EPOLL_ENABLE_KEY = "netty.epoll.enable";
String SET_FUTURE_IN_SYNC_MODE = "future.sync.set";
String CLEAR_FUTURE_AFTER_GET = "future.clear.once";
String APOLLO_ADDR_KEY = "apollo.meta";
String APOLLO_CLUSTER_KEY = "apollo.cluster";
String APOLLO_ENV_KEY = "env";
String APOLLO_APPID_KEY = "app.id";
String NACOS_SERVICE_NAME_SEPARATOR = "nacos.service.name.separator";
String GRAALVM_NATIVEIMAGE_IMAGECODE = "org.graalvm.nativeimage.imagecode";
/**
* The JVM arguments to set if it can use embedded zookeeper, the default value is {@code true}.
*/
String ZOOKEEPER_CONFIG_ENABLE_EMBEDDED = "enableEmbeddedZookeeper";
}
/**
* Dubbo custom VM properties
*/
interface DubboProperty {
String DUBBO_MIGRATION_FILE_ENABLE = "dubbo.migration-file.enable";
String DUBBO_MIGRATION_KEY = "dubbo.migration.file";
String DUBBO_APPLICATION_LOGGER = "dubbo.application.logger";
String DUBBO_PROPERTIES_KEY = "dubbo.properties.file";
String DUBBO_PREFER_JSON_FRAMEWORK_NAME = "dubbo.json-framework.prefer";
/**
* used in JVMUtil.java ,Control stack print lines, default is 32 lines
*/
String DUBBO_JSTACK_MAXLINE = "dubbo.jstack-dump.max-line";
/**
* The property name for {@link NetworkInterface#getDisplayName() the name of network interface} that
* the Dubbo application will be ignored
*
* @since 2.7.6
*/
String DUBBO_NETWORK_IGNORED_INTERFACE = "dubbo.network.interface.ignored";
/**
* The property name for {@link NetworkInterface#getDisplayName() the name of network interface} that
* the Dubbo application prefers
*
* @since 2.7.6
*/
String DUBBO_PREFERRED_NETWORK_INTERFACE = "dubbo.network.interface.preferred";
String DUBBO_CLASS_DESERIALIZE_ALLOWED_LIST = "dubbo.security.serialize.allowedClassList";
String DUBBO_CLASS_DESERIALIZE_BLOCKED_LIST = "dubbo.security.serialize.blockedClassList";
String DUBBO_CLASS_DESERIALIZE_OPEN_CHECK = "dubbo.security.serialize.openCheckClass";
String DUBBO_CLASS_DESERIALIZE_BLOCK_ALL = "dubbo.security.serialize.blockAllClassExceptAllow";
String DUBBO_RESOLVE_FILE = "dubbo.resolve.file";
String DUBBO_IP_TO_REGISTRY = "DUBBO_IP_TO_REGISTRY";
String DUBBO_MONITOR_ADDRESS = "dubbo.monitor.address";
String DUBBO_CONTAINER_KEY = "dubbo.container";
String DUBBO_SHUTDOWN_HOOK_KEY = "dubbo.shutdown.hook";
String DUBBO_SPRING_CONFIG = "dubbo.spring.config";
String DUBBO_MAPPING_CACHE_FILEPATH = "dubbo.mapping.cache.filePath";
String DUBBO_MAPPING_CACHE_FILENAME = "dubbo.mapping.cache.fileName";
String DUBBO_MAPPING_CACHE_ENTRYSIZE = "dubbo.mapping.cache.entrySize";
String DUBBO_MAPPING_CACHE_MAXFILESIZE = "dubbo.mapping.cache.maxFileSize";
String DUBBO_META_CACHE_FILEPATH = "dubbo.meta.cache.filePath";
String DUBBO_META_CACHE_FILENAME = "dubbo.meta.cache.fileName";
String DUBBO_META_CACHE_ENTRYSIZE = "dubbo.meta.cache.entrySize";
String DUBBO_META_CACHE_MAXFILESIZE = "dubbo.meta.cache.maxFileSize";
String DUBBO_USE_SECURE_RANDOM_ID = "dubbo.application.use-secure-random-request-id";
String DUBBO_CLOSE_TIMEOUT_CONFIG_KEY = "dubbo.protocol.default-close-timeout";
String DUBBO_HEARTBEAT_CONFIG_KEY = "dubbo.protocol.default-heartbeat";
String DUBBO_DEFAULT_REMOTING_SERIALIZATION_PROPERTY = "DUBBO_DEFAULT_SERIALIZATION";
String DUBBO_HESSIAN_ALLOW_NON_SERIALIZABLE = "dubbo.hessian.allowNonSerializable";
String DUBBO_HESSIAN_WHITELIST = "dubbo.application.hessian2.whitelist";
String DUBBO_HESSIAN_ALLOW = "dubbo.application.hessian2.allow";
String DUBBO_HESSIAN_DENY = "dubbo.application.hessian2.deny";
String DUBBO_MANUAL_REGISTER_KEY = "dubbo.application.manual-register";
String DUBBO2_COMPACT_ENABLE = "dubbo.compact.enable";
}
String DUBBO_VERSIONS_KEY = "META-INF/dubbo-versions";
}

View File

@ -91,8 +91,6 @@ public interface LoggerCodeConstants {
String VULNERABILITY_WARNING = "0-28";
String COMMON_NOT_FOUND_TRACER_DEPENDENCY = "0-29";
// Registry module
String REGISTRY_ADDRESS_INVALID = "1-1";

View File

@ -47,8 +47,6 @@ public interface MetricsConstants {
String TAG_CHANGE_TYPE = "change.type";
String TAG_ERROR_CODE = "error";
String ENABLE_JVM_METRICS_KEY = "enable.jvm";
String ENABLE_COLLECTOR_SYNC_KEY = "enable.collector.sync";

View File

@ -141,5 +141,11 @@ public interface RegistryConstants {
String ENABLE_EMPTY_PROTECTION_KEY = "enable-empty-protection";
boolean DEFAULT_ENABLE_EMPTY_PROTECTION = false;
String REGISTER_CONSUMER_URL_KEY = "register-consumer-url";
String REGISTRY_PROTOCOL_TYPE = "registry-protocol-type";
/**
* export noting suffix servicename
* by default, dubbo export servicename is "${interface}:${version}:", this servicename with ':' suffix
* for compatible, we should export noting suffix servicename, eg: ${interface}:${version}
*/
String NACOE_REGISTER_COMPATIBLE = "nacos.register-compatible";
}

View File

@ -24,7 +24,6 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_MONITOR_EXCEPTION;
import static org.apache.dubbo.common.deploy.DeployState.COMPLETION;
import static org.apache.dubbo.common.deploy.DeployState.FAILED;
import static org.apache.dubbo.common.deploy.DeployState.PENDING;
import static org.apache.dubbo.common.deploy.DeployState.STARTED;
@ -57,17 +56,12 @@ public abstract class AbstractDeployer<E extends ScopeModel> implements Deployer
@Override
public boolean isRunning() {
return state == STARTING || state == STARTED || state == COMPLETION;
return state == STARTING || state == STARTED;
}
@Override
public boolean isStarted() {
return state == STARTED || state == COMPLETION;
}
@Override
public boolean isCompletion() {
return state == COMPLETION;
return state == STARTED;
}
@Override
@ -141,22 +135,6 @@ public abstract class AbstractDeployer<E extends ScopeModel> implements Deployer
}
}
protected void setCompletion() {
this.state = COMPLETION;
for (DeployListener<E> listener : listeners) {
try {
listener.onCompletion(scopeModel);
} catch (Throwable e) {
logger.error(
COMMON_MONITOR_EXCEPTION,
"",
"",
getIdentifier() + " an exception occurred when handle completion event",
e);
}
}
}
protected void setStopping() {
this.state = STOPPING;
for (DeployListener<E> listener : listeners) {

View File

@ -48,9 +48,7 @@ public interface ApplicationDeployer extends Deployer<ApplicationModel> {
/**
* Register application instance and start internal services
*/
void prepareApplicationInstance(ModuleModel moduleModel);
void exportMetadataService();
void prepareApplicationInstance();
/**
* Register application instance and start internal services

View File

@ -24,35 +24,13 @@ public interface DeployListener<E extends ScopeModel> {
*/
void onInitialize(E scopeModel);
/**
* Triggered before starting module.
*/
void onStarting(E scopeModel);
/**
* Triggered before registering and exposing the service.
*/
void onStarted(E scopeModel);
/**
* Triggered after deployer startup is complete.
*/
default void onCompletion(E scopeModel) {}
/**
* Triggered before the app is destroyed,
* can do some customized things before offline the service and destroy reference.
*/
void onStopping(E scopeModel);
/**
* Triggered after the application is destroyed,
* can do some customized things after the service is offline and the reference is destroyed.
*/
void onStopped(E scopeModel);
/**
* Useful to do something when deployer was failed.
*/
void onFailure(E scopeModel, Throwable cause);
}

View File

@ -28,9 +28,6 @@ public class DeployListenerAdapter<E extends ScopeModel> implements DeployListen
@Override
public void onStarted(E scopeModel) {}
@Override
public void onCompletion(E scopeModel) {}
@Override
public void onStopping(E scopeModel) {}

View File

@ -40,11 +40,6 @@ public enum DeployState {
*/
STARTED,
/**
* Completion
*/
COMPLETION,
/**
* Stopping
*/

View File

@ -55,8 +55,6 @@ public interface Deployer<E extends ScopeModel> {
*/
boolean isStarted();
boolean isCompletion();
/**
* @return true if the component is starting.
* @see #isStarted()

View File

@ -50,8 +50,4 @@ public interface ModuleDeployer extends Deployer<ModuleModel> {
* Whether start in background, do not await finish
*/
boolean isBackground();
boolean hasRegistryInteraction();
ApplicationDeployer getApplicationDeployer();
}

View File

@ -16,9 +16,6 @@
*/
package org.apache.dubbo.common.extension;
import java.util.Collections;
import java.util.List;
/**
* Uniform accessor for extension
*/
@ -27,7 +24,7 @@ public interface ExtensionAccessor {
ExtensionDirector getExtensionDirector();
default <T> ExtensionLoader<T> getExtensionLoader(Class<T> type) {
return getExtensionDirector().getExtensionLoader(type);
return this.getExtensionDirector().getExtensionLoader(type);
}
default <T> T getExtension(Class<T> type, String name) {
@ -44,21 +41,4 @@ public interface ExtensionAccessor {
ExtensionLoader<T> extensionLoader = getExtensionLoader(type);
return extensionLoader != null ? extensionLoader.getDefaultExtension() : null;
}
default <T> List<T> getActivateExtensions(Class<T> type) {
ExtensionLoader<T> extensionLoader = getExtensionLoader(type);
return extensionLoader != null ? extensionLoader.getActivateExtensions() : Collections.emptyList();
}
default <T> T getFirstActivateExtension(Class<T> type) {
ExtensionLoader<T> extensionLoader = getExtensionLoader(type);
if (extensionLoader == null) {
throw new IllegalArgumentException("ExtensionLoader for [" + type + "] is not found");
}
List<T> extensions = extensionLoader.getActivateExtensions();
if (extensions.isEmpty()) {
throw new IllegalArgumentException("No activate extensions for [" + type + "] found");
}
return extensions.get(0);
}
}

View File

@ -18,7 +18,6 @@ package org.apache.dubbo.common.extension;
import org.apache.dubbo.common.Extension;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.aot.NativeDetector;
import org.apache.dubbo.common.beans.support.InstantiationStrategy;
import org.apache.dubbo.common.compact.Dubbo2ActivateUtils;
import org.apache.dubbo.common.compact.Dubbo2CompactUtils;
@ -36,6 +35,7 @@ import org.apache.dubbo.common.utils.CollectionUtils;
import org.apache.dubbo.common.utils.ConcurrentHashSet;
import org.apache.dubbo.common.utils.ConfigUtils;
import org.apache.dubbo.common.utils.Holder;
import org.apache.dubbo.common.utils.NativeUtils;
import org.apache.dubbo.common.utils.ReflectUtils;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.rpc.model.ApplicationModel;
@ -1451,7 +1451,7 @@ public class ExtensionLoader<T> {
// Adaptive Classes' ClassLoader should be the same with Real SPI interface classes' ClassLoader
ClassLoader classLoader = type.getClassLoader();
try {
if (NativeDetector.inNativeImage()) {
if (NativeUtils.isNative()) {
return classLoader.loadClass(type.getName() + "$Adaptive");
}
} catch (Throwable ignore) {

View File

@ -16,13 +16,8 @@
*/
package org.apache.dubbo.common.io;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* Stream utils.
@ -234,51 +229,4 @@ public class StreamUtils {
is.skip(is.available());
}
}
public static void copy(InputStream in, OutputStream out) throws IOException {
if (in.getClass() == ByteArrayInputStream.class) {
copy((ByteArrayInputStream) in, out);
return;
}
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = in.read(buffer)) != -1) {
out.write(buffer, 0, bytesRead);
}
}
public static void copy(ByteArrayInputStream in, OutputStream out) throws IOException {
int len = in.available();
byte[] buffer = new byte[len];
in.read(buffer, 0, len);
out.write(buffer, 0, len);
}
public static byte[] readBytes(InputStream in) throws IOException {
if (in.getClass() == ByteArrayInputStream.class) {
return readBytes((ByteArrayInputStream) in);
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = in.read(buffer)) != -1) {
out.write(buffer, 0, bytesRead);
}
return out.toByteArray();
}
public static byte[] readBytes(ByteArrayInputStream in) throws IOException {
int len = in.available();
byte[] bytes = new byte[len];
in.read(bytes, 0, len);
return bytes;
}
public static String toString(InputStream in) throws IOException {
return new String(readBytes(in), StandardCharsets.UTF_8);
}
public static String toString(InputStream in, Charset charset) throws IOException {
return new String(readBytes(in), charset);
}
}

View File

@ -62,19 +62,6 @@ public class GsonUtils {
}
}
public static String toJson(Object obj) throws RuntimeException {
if (!isSupportGson()) {
throw new RuntimeException("Gson is not supported. Please import Gson in JVM env.");
}
try {
return getGson().toJson(obj);
} catch (JsonSyntaxException ex) {
throw new RuntimeException(String.format(
"Generic serialization [%s] Json syntax exception thrown when parsing (object:%s ) error:%s",
GENERIC_SERIALIZATION_GSON, obj, ex.getMessage()));
}
}
private static Gson getGson() {
if (gsonCache == null || !(gsonCache instanceof Gson)) {
synchronized (GsonUtils.class) {

View File

@ -16,16 +16,15 @@
*/
package org.apache.dubbo.common.json;
import org.apache.dubbo.common.extension.SPI;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
@SPI
public interface JsonUtil {
public interface JSON {
boolean isSupport();
boolean isJson(String json);
<T> T toJavaObject(String json, Type type);
<T> List<T> toJavaList(String json, Class<T> clazz);
@ -40,10 +39,6 @@ public interface JsonUtil {
Map<String, ?> getObject(Map<String, ?> obj, String key);
Object convertObject(Object obj, Type type);
Object convertObject(Object obj, Class<?> clazz);
Double getNumberAsDouble(Map<String, ?> obj, String key);
Integer getNumberAsInteger(Map<String, ?> obj, String key);

View File

@ -16,7 +16,7 @@
*/
package org.apache.dubbo.common.json.impl;
import org.apache.dubbo.common.json.JsonUtil;
import org.apache.dubbo.common.json.JSON;
import org.apache.dubbo.common.utils.CollectionUtils;
import java.util.HashMap;
@ -24,7 +24,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
public abstract class AbstractJsonUtilImpl implements JsonUtil {
public abstract class AbstractJSONImpl implements JSON {
@Override
public boolean isSupport() {
try {

View File

@ -19,9 +19,17 @@ package org.apache.dubbo.common.json.impl;
import java.lang.reflect.Type;
import java.util.List;
import com.alibaba.fastjson2.JSONValidator;
import com.alibaba.fastjson2.JSONWriter;
public class FastJson2Impl extends AbstractJsonUtilImpl {
public class FastJson2Impl extends AbstractJSONImpl {
@Override
public boolean isJson(String json) {
JSONValidator validator = JSONValidator.from(json);
return validator.validate();
}
@Override
public <T> T toJavaObject(String json, Type type) {
return com.alibaba.fastjson2.JSON.parseObject(json, type);
@ -36,14 +44,4 @@ public class FastJson2Impl extends AbstractJsonUtilImpl {
public String toJson(Object obj) {
return com.alibaba.fastjson2.JSON.toJSONString(obj, JSONWriter.Feature.WriteEnumsUsingName);
}
@Override
public Object convertObject(Object obj, Type type) {
return com.alibaba.fastjson2.util.TypeUtils.cast(obj, type);
}
@Override
public Object convertObject(Object obj, Class<?> clazz) {
return com.alibaba.fastjson2.util.TypeUtils.cast(obj, clazz);
}
}

View File

@ -19,10 +19,19 @@ package org.apache.dubbo.common.json.impl;
import java.lang.reflect.Type;
import java.util.List;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
public class FastJsonImpl extends AbstractJsonUtilImpl {
public class FastJsonImpl extends AbstractJSONImpl {
@Override
public boolean isJson(String json) {
try {
Object obj = com.alibaba.fastjson.JSON.parse(json);
return obj instanceof com.alibaba.fastjson.JSONObject || obj instanceof com.alibaba.fastjson.JSONArray;
} catch (com.alibaba.fastjson.JSONException e) {
return false;
}
}
@Override
public <T> T toJavaObject(String json, Type type) {
@ -38,14 +47,4 @@ public class FastJsonImpl extends AbstractJsonUtilImpl {
public String toJson(Object obj) {
return com.alibaba.fastjson.JSON.toJSONString(obj, SerializerFeature.DisableCircularReferenceDetect);
}
@Override
public Object convertObject(Object obj, Type type) {
return com.alibaba.fastjson.util.TypeUtils.cast(obj, type, ParserConfig.getGlobalInstance());
}
@Override
public Object convertObject(Object obj, Class<?> clazz) {
return com.alibaba.fastjson.util.TypeUtils.cast(obj, clazz, ParserConfig.getGlobalInstance());
}
}

View File

@ -20,12 +20,25 @@ import java.lang.reflect.Type;
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
public class GsonImpl extends AbstractJsonUtilImpl {
public class GsonImpl extends AbstractJSONImpl {
// weak reference of com.google.gson.Gson, prevent throw exception when init
private volatile Object gsonCache = null;
@Override
public boolean isJson(String json) {
try {
JsonElement jsonElement = JsonParser.parseString(json);
return jsonElement.isJsonObject() || jsonElement.isJsonArray();
} catch (JsonSyntaxException e) {
return false;
}
}
@Override
public <T> T toJavaObject(String json, Type type) {
return getGson().fromJson(json, type);
@ -42,18 +55,6 @@ public class GsonImpl extends AbstractJsonUtilImpl {
return getGson().toJson(obj);
}
@Override
public Object convertObject(Object obj, Type type) {
Gson gson = getGson();
return gson.fromJson(gson.toJsonTree(obj), type);
}
@Override
public Object convertObject(Object obj, Class<?> clazz) {
Gson gson = getGson();
return gson.fromJson(gson.toJsonTree(obj), clazz);
}
private Gson getGson() {
if (gsonCache == null || !(gsonCache instanceof Gson)) {
synchronized (this) {

View File

@ -20,17 +20,29 @@ import java.lang.reflect.Type;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
public class JacksonImpl extends AbstractJsonUtilImpl {
public class JacksonImpl extends AbstractJSONImpl {
private final ObjectMapper objectMapper = new ObjectMapper();
private volatile Object jacksonCache = null;
@Override
public boolean isJson(String json) {
try {
JsonNode node = objectMapper.readTree(json);
return node.isObject() || node.isArray();
} catch (JsonProcessingException e) {
return false;
}
}
@Override
public <T> T toJavaObject(String json, Type type) {
try {
@ -59,17 +71,6 @@ public class JacksonImpl extends AbstractJsonUtilImpl {
}
}
@Override
public Object convertObject(Object obj, Type type) {
JsonMapper mapper = getJackson();
return mapper.convertValue(obj, mapper.constructType(type));
}
@Override
public Object convertObject(Object obj, Class<?> clazz) {
return getJackson().convertValue(obj, clazz);
}
private JsonMapper getJackson() {
if (jacksonCache == null || !(jacksonCache instanceof JsonMapper)) {
synchronized (this) {

View File

@ -1,30 +0,0 @@
/*
* 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.
*/
package org.apache.dubbo.common.logger;
/**
* Loggers that can register to listen to log messages.
*/
public interface ListenableLogger extends ErrorTypeAwareLogger {
/**
* Register a listener to this loggerand get notified when a log happens.
*
* @param listener log listener
*/
void registerListen(LogListener listener);
}

View File

@ -30,14 +30,6 @@ public interface Logger {
*/
void trace(String msg);
/**
* Logs a message with trace log level.
*
* @param msg log this message
* @param arguments a list of arguments
*/
void trace(String msg, Object... arguments);
/**
* Logs an error with trace log level.
*
@ -60,14 +52,6 @@ public interface Logger {
*/
void debug(String msg);
/**
* Logs a message with debug log level.
*
* @param msg log this message
* @param arguments a list of arguments
*/
void debug(String msg, Object... arguments);
/**
* Logs an error with debug log level.
*
@ -90,14 +74,6 @@ public interface Logger {
*/
void info(String msg);
/**
* Logs a message with info log level.
*
* @param msg log this message
* @param arguments a list of arguments
*/
void info(String msg, Object... arguments);
/**
* Logs an error with info log level.
*
@ -120,14 +96,6 @@ public interface Logger {
*/
void warn(String msg);
/**
* Logs a message with warn log level.
*
* @param msg log this message
* @param arguments a list of arguments
*/
void warn(String msg, Object... arguments);
/**
* Logs a message with warn log level.
*
@ -150,14 +118,6 @@ public interface Logger {
*/
void error(String msg);
/**
* Logs a message with error log level.
*
* @param msg log this message
* @param arguments a list of arguments
*/
void error(String msg, Object... arguments);
/**
* Logs an error with error log level.
*

View File

@ -16,7 +16,6 @@
*/
package org.apache.dubbo.common.logger;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.logger.jcl.JclLoggerAdapter;
import org.apache.dubbo.common.logger.jdk.JdkLoggerAdapter;
import org.apache.dubbo.common.logger.log4j.Log4jLoggerAdapter;
@ -25,7 +24,6 @@ import org.apache.dubbo.common.logger.slf4j.Slf4jLoggerAdapter;
import org.apache.dubbo.common.logger.support.FailsafeErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.support.FailsafeLogger;
import org.apache.dubbo.common.utils.ConcurrentHashMapUtils;
import org.apache.dubbo.common.utils.SystemPropertyConfigUtils;
import org.apache.dubbo.rpc.model.FrameworkModel;
import java.io.File;
@ -49,8 +47,7 @@ public class LoggerFactory {
// search common-used logging frameworks
static {
String logger =
SystemPropertyConfigUtils.getSystemProperty(CommonConstants.DubboProperty.DUBBO_APPLICATION_LOGGER, "");
String logger = System.getProperty("dubbo.application.logger", "");
switch (logger) {
case Slf4jLoggerAdapter.NAME:
setLoggerAdapter(new Slf4jLoggerAdapter());

View File

@ -1,63 +0,0 @@
/*
* Copyright (c) 2004-2011 QOS.ch
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package org.apache.dubbo.common.logger.helpers;
/**
* Holds the results of formatting done by {@link MessageFormatter}.
* This is a copy of org.slf4j.helpers.FormattingTuple from slf4j-api.
*
* @author Joern Huxhorn
*/
public class FormattingTuple {
static public FormattingTuple NULL = new FormattingTuple(null);
private String message;
private Throwable throwable;
private Object[] argArray;
public FormattingTuple(String message) {
this(message, null, null);
}
public FormattingTuple(String message, Object[] argArray, Throwable throwable) {
this.message = message;
this.throwable = throwable;
this.argArray = argArray;
}
public String getMessage() {
return message;
}
public Object[] getArgArray() {
return argArray;
}
public Throwable getThrowable() {
return throwable;
}
}

Some files were not shown because too many files have changed in this diff Show More