Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

gitserver: Prevent concurrent writes to errs#57316

Merged
eseliger merged 1 commit into
mainfrom
es/conc-sysinfo
Oct 3, 2023
Merged

gitserver: Prevent concurrent writes to errs#57316
eseliger merged 1 commit into
mainfrom
es/conc-sysinfo

Conversation

@eseliger

@eseliger eseliger commented Oct 3, 2023

Copy link
Copy Markdown
Member

This change switches to conc for the pooling, to prevent multiple go routines potentially writing to the same errs slice.

Test plan

Manually checked the endpoint still works.

This change switches to conc for the pooling, to prevent multiple go routines potentially writing to the same errs slice.
@eseliger eseliger requested review from a team and BolajiOlajide October 3, 2023 16:52
@cla-bot cla-bot Bot added the cla-signed label Oct 3, 2023

@ggilmore ggilmore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why did our race detector not see this?

Also, should this be backported?

@eseliger

eseliger commented Oct 3, 2023

Copy link
Copy Markdown
Member Author

Why did our race detector not see this?

Do we still run with -race in bazel? Also, not sure if this is covered in a test 🤔

Also, should this be backported?

I think so, but I don't think it has to be for the .0 release so we can do that EoW - WDYT?

@ggilmore

ggilmore commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

Why did our race detector not see this?

Do we still run with -race in bazel? Also, not sure if this is covered in a test 🤔

Also, should this be backported?

I think so, but I don't think it has to be for the .0 release so we can do that EoW - WDYT?

https://github.com/sourcegraph/sourcegraph/pull/57318

@eseliger eseliger merged commit 8f8eff9 into main Oct 3, 2023
@eseliger eseliger deleted the es/conc-sysinfo branch October 3, 2023 22:19
@eseliger eseliger added backport 5.2 backport/bugfix Standard patches to fix bugs labels Oct 6, 2023
sourcegraph-release-bot pushed a commit that referenced this pull request Oct 6, 2023
This change switches to conc for the pooling, to prevent multiple go routines potentially writing to the same errs slice.

(cherry picked from commit 8f8eff9)
keegancsmith pushed a commit that referenced this pull request Oct 6, 2023
gitserver: Prevent concurrent writes to errs (#57316)

This change switches to conc for the pooling, to prevent multiple go routines potentially writing to the same errs slice.

(cherry picked from commit 8f8eff9)

Co-authored-by: Erik Seliger <erikseliger@me.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants