-
Notifications
You must be signed in to change notification settings - Fork 116
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
Address potential Persistent Settings Getters race. #3095
Conversation
d0f8b71
to
6b68dc5
Compare
Current implementation of using the fence fails https://source.corp.google.com/h/lbshell-internal/cobalt_src/+/COBALT:cobalt/base/task_runner_util.cc;l=50 |
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.
Nice!
25580e1
to
8300933
Compare
@briantting, I took another look at |
I don't think we want the blocking argument at all, we don't want anything to wait on disk writes. That was a quirk that was added purely so we could run tests and should no longer be needed with this refactor. |
@briantting I've gotten rid of the |
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
While Getters and SetterHelpers both use locks to prevent race conditions, Setters do not. Given that Setters run SetterHelpers through posted tasks, it is possible for Getters to run in-between Setters and SetterHelpers causing a race condition. To resolve this, effectively add Getters into the PostTask Queue by calling WaitForFence. Also refactor GetValues calls so that they are run by Setters rather than Getters to limit the number of deep copies made. Now that Getters and Setters no longer race, massively clean up the tests by removing the unwieldly and now unneeded closures. b/305057554
While Getters and SetterHelpers both use locks to prevent race conditions, Setters do not. Given that Setters run SetterHelpers through posted tasks, it is possible for Getters to run in-between Setters and SetterHelpers causing a race condition. To resolve this, effectively add Getters into the PostTask Queue by calling WaitForFence. Also refactor GetValues calls so that they are run by Setters rather than Getters to limit the number of deep copies made. Now that Getters and Setters no longer race, massively clean up the tests by removing the unwieldly and now unneeded closures. b/305057554 (cherry picked from commit feba187)
…ace. (#3213) Refer to the original PR: #3095 While Getters and SetterHelpers both use locks to prevent race conditions, Setters do not. Given that Setters run SetterHelpers through posted tasks, it is possible for Getters to run in-between Setters and SetterHelpers causing a race condition. To resolve this, effectively add Getters into the PostTask Queue by calling WaitForFence. Also refactor GetValues calls so that they are run by Setters rather than Getters to limit the number of deep copies made. Now that Getters and Setters no longer race, massively clean up the tests by removing the unwieldly and now unneeded closures. b/305057554 Co-authored-by: Brian Ting <[email protected]>
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: youtube#3095 b/305057554
Building off the work of @briantting: #3095 b/305057554
Building off the work of @briantting: #3095 b/305057554 (cherry picked from commit aeaed9d)
Refer to the original PR: #3173 Building off the work of @briantting: #3095 b/305057554 Co-authored-by: aee <[email protected]>
While Getters and SetterHelpers both use locks to prevent race
conditions, Setters do not. Given that Setters run SetterHelpers through
posted tasks, it is possible for Getters to run in-between Setters and
SetterHelpers causing a race condition. To resolve this, effectively add
Getters into the PostTask Queue by calling WaitForFence. Also refactor
GetValues calls so that they are run by Setters rather than Getters to
limit the number of deep copies made.
Now that Getters and Setters no longer race, massively clean up the
tests by removing the unwieldly and now unneeded closures.
b/305057554