-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 config data race #5634
Merged
Merged
fix config data race #5634
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The tests won't pass till the config change has been bubbled. |
Stebalien
force-pushed
the
fix/config-data-race
branch
from
December 14, 2018 00:20
7407a66
to
e9f98ed
Compare
Stebalien
force-pushed
the
fix/config-data-race
branch
from
December 14, 2018 00:24
e9f98ed
to
87b6615
Compare
Stebalien
commented
Dec 14, 2018
*r.config = *updated // copy so caller cannot modify this private config | ||
// Do not use `*r.config = ...`. This will modify the *shared* config | ||
// returned by `r.Config`. | ||
r.config = updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual race.
Stebalien
force-pushed
the
fix/config-data-race
branch
2 times, most recently
from
December 20, 2018 16:35
9219ec8
to
9e0bc2d
Compare
eingenito
approved these changes
Dec 20, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
License: MIT Signed-off-by: Steven Allen <[email protected]>
This fixes a data-race in the config. This does not fix #4942 as there's still a logical race: parallel config updates clobber each other. License: MIT Signed-off-by: Steven Allen <[email protected]>
Stebalien
force-pushed
the
fix/config-data-race
branch
from
December 20, 2018 18:07
9e0bc2d
to
56b6277
Compare
hacdias
pushed a commit
to ipfs/boxo
that referenced
this pull request
Jan 27, 2023
fix config data race This commit was moved from ipfs/kubo@9e8cc06
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the data-race in the config. Depends on: ipfs/go-ipfs-config#16.
This does not fix #4942 as there's still a logical race: parallel config updates clobber each other.
However, we'll still need the Clone function for the new
--dry-run
flag introduced in #5455.