Skip to content
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: solve the problem of getting nil context in the goroutine caused by the context being recycled #2348

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

littlejiancc
Copy link
Contributor

… by the context being recycled

What type of this PR

/kind bug

What this PR does / why we need it:

When use context of echo in the goroutine, if another request coming when the goroutine is not finish, the context will be recycled, so the context is nil.
image

Which issue(s) this PR fixes:

  • Fixes #your-issue_number
  • [Erda Cloud Issue Link](paste your link here)

Specified Reviewers:

/assign @sfwn

ChangeLog

Language Changelog
🇺🇸 English
🇨🇳 中文

Need cherry-pick to release versions?

Add comment like /cherry-pick release/1.0 when this PR is merged.

For details on the cherry pick process, see the cherry pick requests section under CONTRIBUTING.md.

@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #2348 (3d8bc8e) into master (9e4f431) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2348      +/-   ##
==========================================
- Coverage   15.92%   15.90%   -0.02%     
==========================================
  Files        1193     1195       +2     
  Lines      118011   118228     +217     
==========================================
+ Hits        18794    18810      +16     
- Misses      97242    97500     +258     
+ Partials     1975     1918      -57     
Impacted Files Coverage Δ
...omponents/cmp-dashboard-nodes/nodeFilter/render.go 18.94% <0.00%> (-15.67%) ⬇️
modules/cmp/metrics/metrics.go 24.15% <0.00%> (-7.82%) ⬇️
...ules/scheduler/executor/plugins/k8s/statefulset.go 51.55% <0.00%> (-5.49%) ⬇️
modules/cmp/cache/cache.go 64.56% <0.00%> (-2.56%) ⬇️
.../components/cmp-dashboard-nodes/cpuTable/render.go 12.50% <0.00%> (-2.26%) ⬇️
modules/cmp/steve/middleware/audit.go 32.48% <0.00%> (-2.11%) ⬇️
modules/extensions/loghub/index/query/provider.go 9.43% <0.00%> (-1.93%) ⬇️
modules/cmp/metrics/metricsReq.go 62.22% <0.00%> (-1.93%) ⬇️
...mponents/cmp-dashboard-nodes/common/table/table.go 13.83% <0.00%> (-1.93%) ⬇️
.../cmp-dashboard-workload-detail/podsTable/render.go 22.77% <0.00%> (-1.85%) ⬇️
... and 20 more

@littlejiancc littlejiancc force-pushed the feature/gittar-bugfix branch from 63027df to 3d8bc8e Compare October 12, 2021 13:09
Copy link
Contributor

@hoozecn hoozecn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@hoozecn
Copy link
Contributor

hoozecn commented Oct 13, 2021

/cherry-pick release/1.3

@erda-bot
Copy link
Member

Automated cherry pick can ONLY be triggered when this PR is MERGED!

@hoozecn hoozecn merged commit e52bb30 into erda-project:master Oct 13, 2021
@hoozecn
Copy link
Contributor

hoozecn commented Oct 13, 2021

/cherry-pick release/1.3

erda-bot pushed a commit to erda-bot/erda that referenced this pull request Oct 13, 2021
johnlanni pushed a commit that referenced this pull request Oct 14, 2021
… by the context being recycled (#2348) (#2353)

Co-authored-by: littlejian <17816869670@163.com>
@littlejiancc littlejiancc deleted the feature/gittar-bugfix branch January 6, 2022 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants