-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Replace assignment behavior with copy operation to avoid OOM pro… #2182
Conversation
22edf19
to
89eea68
Compare
Codecov Report
@@ Coverage Diff @@
## 3.0 #2182 +/- ##
==========================================
- Coverage 44.38% 44.25% -0.13%
==========================================
Files 283 283
Lines 17109 17126 +17
==========================================
- Hits 7593 7579 -14
- Misses 8719 8751 +32
+ Partials 797 796 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
6c47b83
to
e20e220
Compare
Kudos, SonarCloud Quality Gate passed!
|
* 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166) * registry type support all * fix test * set default to interface * use default protocol registry * fix unit test * use swith to judge * add registry support all test * Resolve registry name conflicts * fix ut err * fix #2159 * del front * del front Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 (#2169) Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.6.0 to 0.6.2. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v0.6.0...v0.6.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: service discovery registry notify before return (#2168) * Fix: service discovery registry notify before return * format import * modify notify url * add judge about the existence of instance's metadata revision * build(deps): bump github.com/knadh/koanf from 1.4.4 to 1.4.5 (#2179) Bumps [github.com/knadh/koanf](https://github.com/knadh/koanf) from 1.4.4 to 1.4.5. - [Release notes](https://github.com/knadh/koanf/releases) - [Commits](knadh/koanf@v1.4.4...v1.4.5) --- updated-dependencies: - dependency-name: github.com/knadh/koanf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: Replace assignment behavior with copy operation to avoid OOM problem (#2182) * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.2 to 0.7.0 (#2185) Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.6.2 to 0.7.0. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v0.6.2...v0.7.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/nacos-group/nacos-sdk-go (#2183) Bumps [github.com/nacos-group/nacos-sdk-go](https://github.com/nacos-group/nacos-sdk-go) from 1.1.3 to 1.1.4. - [Release notes](https://github.com/nacos-group/nacos-sdk-go/releases) - [Commits](nacos-group/nacos-sdk-go@v1.1.3...v1.1.4) --- updated-dependencies: - dependency-name: github.com/nacos-group/nacos-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/knadh/koanf from 1.4.5 to 1.5.0 (#2187) Bumps [github.com/knadh/koanf](https://github.com/knadh/koanf) from 1.4.5 to 1.5.0. - [Release notes](https://github.com/knadh/koanf/releases) - [Commits](knadh/koanf@v1.4.5...v1.5.0) --- updated-dependencies: - dependency-name: github.com/knadh/koanf 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> * build(deps): bump go.etcd.io/etcd/client/v3 from 3.5.6 to 3.5.7 (#2190) Bumps [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd) from 3.5.6 to 3.5.7. - [Release notes](https://github.com/etcd-io/etcd/releases) - [Changelog](https://github.com/etcd-io/etcd/blob/main/Dockerfile-release.amd64) - [Commits](etcd-io/etcd@v3.5.6...v3.5.7) --- updated-dependencies: - dependency-name: go.etcd.io/etcd/client/v3 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> * build(deps): bump github.com/RoaringBitmap/roaring from 1.2.0 to 1.2.2 (#2188) Bumps [github.com/RoaringBitmap/roaring](https://github.com/RoaringBitmap/roaring) from 1.2.0 to 1.2.2. - [Release notes](https://github.com/RoaringBitmap/roaring/releases) - [Commits](RoaringBitmap/roaring@v1.2.0...v1.2.2) --- updated-dependencies: - dependency-name: github.com/RoaringBitmap/roaring 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> * build(deps): bump github.com/RoaringBitmap/roaring from 1.2.2 to 1.2.3 (#2195) Bumps [github.com/RoaringBitmap/roaring](https://github.com/RoaringBitmap/roaring) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/RoaringBitmap/roaring/releases) - [Commits](RoaringBitmap/roaring@v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: github.com/RoaringBitmap/roaring 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> * [ISSUE #2172] Fix/polaris governance (#2171) * 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166) * registry type support all * fix test * set default to interface * use default protocol registry * fix unit test * use swith to judge * add registry support all test * Resolve registry name conflicts * fix ut err * fix #2159 * del front * del front Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 (#2169) Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.6.0 to 0.6.2. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v0.6.0...v0.6.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor:polaris ability open judge * refactor:polaris ability open judge Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: bobtthp <gzqtianc@gmail.com> Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Dynamic update config for logger level & metric enable (#2180) * dynamically update logger level & metric enable * prometheus server start & shutdown * check nil * fix ci Co-authored-by: huangwenkang <642380437@qq> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: bobtthp <gzqtianc@gmail.com> Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leo Shen <694963063@qq.com> Co-authored-by: Jason Peng <lvs.pjx@gmail.com> Co-authored-by: liaochuntao <liaochuntao@live.com> Co-authored-by: Wenkang Huang <52915386+huangwenkan9@users.noreply.github.com> Co-authored-by: huangwenkang <642380437@qq>
When will we release it? Our memory won't hold |
@xuhuiliang-maybe We've released |
using v3.0.5-rc1 please. |
* [ISSUE #2123] Feat/polaris ratelimit (#2127) * feat:support polaris limit ability * [ISSUE #2172] Fix/polaris governance (#2171) * 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166) * registry type support all * fix test * set default to interface * use default protocol registry * fix unit test * use swith to judge * add registry support all test * Resolve registry name conflicts * fix ut err * fix #2159 * del front * del front Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 (#2169) Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.6.0 to 0.6.2. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v0.6.0...v0.6.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor:polaris ability open judge * refactor:polaris ability open judge Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: bobtthp <gzqtianc@gmail.com> Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Dynamic update config for logger level & metric enable (#2180) * dynamically update logger level & metric enable * prometheus server start & shutdown * check nil * fix ci Co-authored-by: huangwenkang <642380437@qq> * Revert "Dynamic update config for logger level & metric enable (#2180)" (#2199) This reverts commit 4c6a99b. * Revert "[ISSUE #2172] Fix/polaris governance (#2171)" (#2200) This reverts commit c1a0698. * sync: Merge the 3.0 branch into the master branch (#2201) * 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166) * registry type support all * fix test * set default to interface * use default protocol registry * fix unit test * use swith to judge * add registry support all test * Resolve registry name conflicts * fix ut err * fix #2159 * del front * del front Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 (#2169) Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.6.0 to 0.6.2. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v0.6.0...v0.6.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: service discovery registry notify before return (#2168) * Fix: service discovery registry notify before return * format import * modify notify url * add judge about the existence of instance's metadata revision * build(deps): bump github.com/knadh/koanf from 1.4.4 to 1.4.5 (#2179) Bumps [github.com/knadh/koanf](https://github.com/knadh/koanf) from 1.4.4 to 1.4.5. - [Release notes](https://github.com/knadh/koanf/releases) - [Commits](knadh/koanf@v1.4.4...v1.4.5) --- updated-dependencies: - dependency-name: github.com/knadh/koanf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: Replace assignment behavior with copy operation to avoid OOM problem (#2182) * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.2 to 0.7.0 (#2185) Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.6.2 to 0.7.0. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v0.6.2...v0.7.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/nacos-group/nacos-sdk-go (#2183) Bumps [github.com/nacos-group/nacos-sdk-go](https://github.com/nacos-group/nacos-sdk-go) from 1.1.3 to 1.1.4. - [Release notes](https://github.com/nacos-group/nacos-sdk-go/releases) - [Commits](nacos-group/nacos-sdk-go@v1.1.3...v1.1.4) --- updated-dependencies: - dependency-name: github.com/nacos-group/nacos-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/knadh/koanf from 1.4.5 to 1.5.0 (#2187) Bumps [github.com/knadh/koanf](https://github.com/knadh/koanf) from 1.4.5 to 1.5.0. - [Release notes](https://github.com/knadh/koanf/releases) - [Commits](knadh/koanf@v1.4.5...v1.5.0) --- updated-dependencies: - dependency-name: github.com/knadh/koanf 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> * build(deps): bump go.etcd.io/etcd/client/v3 from 3.5.6 to 3.5.7 (#2190) Bumps [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd) from 3.5.6 to 3.5.7. - [Release notes](https://github.com/etcd-io/etcd/releases) - [Changelog](https://github.com/etcd-io/etcd/blob/main/Dockerfile-release.amd64) - [Commits](etcd-io/etcd@v3.5.6...v3.5.7) --- updated-dependencies: - dependency-name: go.etcd.io/etcd/client/v3 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> * build(deps): bump github.com/RoaringBitmap/roaring from 1.2.0 to 1.2.2 (#2188) Bumps [github.com/RoaringBitmap/roaring](https://github.com/RoaringBitmap/roaring) from 1.2.0 to 1.2.2. - [Release notes](https://github.com/RoaringBitmap/roaring/releases) - [Commits](RoaringBitmap/roaring@v1.2.0...v1.2.2) --- updated-dependencies: - dependency-name: github.com/RoaringBitmap/roaring 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> * build(deps): bump github.com/RoaringBitmap/roaring from 1.2.2 to 1.2.3 (#2195) Bumps [github.com/RoaringBitmap/roaring](https://github.com/RoaringBitmap/roaring) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/RoaringBitmap/roaring/releases) - [Commits](RoaringBitmap/roaring@v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: github.com/RoaringBitmap/roaring 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> * [ISSUE #2172] Fix/polaris governance (#2171) * 解决 consumer 不断重连已下线的 provider meta service 问题 (#2166) * registry type support all * fix test * set default to interface * use default protocol registry * fix unit test * use swith to judge * add registry support all test * Resolve registry name conflicts * fix ut err * fix #2159 * del front * del front Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> * build(deps): bump github.com/hashicorp/vault/sdk from 0.6.0 to 0.6.2 (#2169) Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.6.0 to 0.6.2. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v0.6.0...v0.6.2) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor:polaris ability open judge * refactor:polaris ability open judge Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: bobtthp <gzqtianc@gmail.com> Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Dynamic update config for logger level & metric enable (#2180) * dynamically update logger level & metric enable * prometheus server start & shutdown * check nil * fix ci Co-authored-by: huangwenkang <642380437@qq> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: bobtthp <gzqtianc@gmail.com> Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leo Shen <694963063@qq.com> Co-authored-by: Jason Peng <lvs.pjx@gmail.com> Co-authored-by: liaochuntao <liaochuntao@live.com> Co-authored-by: Wenkang Huang <52915386+huangwenkan9@users.noreply.github.com> Co-authored-by: huangwenkang <642380437@qq> * ci --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: liaochuntao <liaochuntao@live.com> Co-authored-by: AlexStocks <alexstocks@foxmail.com> Co-authored-by: bobtthp <gzqtianc@gmail.com> Co-authored-by: bobtthp <bobtthp@bob-Mac-mini.local> Co-authored-by: bob <bob@bobdeMacBook-Pro.local> Co-authored-by: bobtthp <bobtthp@bob1.local> Co-authored-by: bob <bob@bob.local> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Wenkang Huang <52915386+huangwenkan9@users.noreply.github.com> Co-authored-by: huangwenkang <642380437@qq> Co-authored-by: Xuewei Niu <justxuewei@apache.org> Co-authored-by: Leo Shen <694963063@qq.com> Co-authored-by: Jason Peng <lvs.pjx@gmail.com> Co-authored-by: aqi <aqi@xiaoshijie.com>
What this PR does:
There is a risk of OOM in the assignment of params in MergeURL, which can be avoided by using copy behavior to avoid memory overflow. Initially, it is suspected that the problem is caused by mutual references between serviceURL and referenceURL.
After executing the test logic for more than 4 hours, no memory usage problems were found in MergeURL, even when restarting zk.

Here, the paramsKey will also be allocated on the heap through the closure, so the closure logic is split and the problem of closure references is solved by passing parameters.
I tested in @mengcaicheng's test environment and noticed that the memory usage of MergeURL has decreased significantly, but the total memory is still in a high state. Initially, it looks like the Clone logic is complex with closure logic inside.
Which issue(s) this PR fixes:
Fixes #2031
You should pay attention to items below to ensure your pr passes our ci test
We do not merge pr with ci tests failed