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

Avoid racing in fake package #540

Merged
merged 3 commits into from
Mar 13, 2024
Merged

Avoid racing in fake package #540

merged 3 commits into from
Mar 13, 2024

Conversation

ywmei-brt1
Copy link
Collaborator

@ywmei-brt1 ywmei-brt1 commented Mar 13, 2024

Avoid racing in fake

re-client reproxy_test unit test has been suffering racing issues for long time,

This change will fix the data racing issue, and make most of the unit test there can run with t.parallel()

Test: import to re-client and run //internal/pkg/reproxy:reproxy_test with race detection.

GetFlattenedOutputs() takes the pointer of ec.resPb, and forward it to a long-running grpc call.

This will cause racing to happen in re-client unit test framework. See this one line change in re-client that face racing issue: tg/2184373

This change avoid the racing issue by make a deepcopy of resPb before forward it to grpc call.

Test: import to re-client and run  //internal/pkg/reproxy:reproxy_test with race detection.
GetFlattenedOutputs() takes the pointer of ec.resPb, and forward it to a long-running grpc call.

This will cause racing to happen in re-client unit test framework. See this one line change in re-client that face racing issue: tg/2184373

This change avoid the racing issue by make a deepcopy of resPb before forward it to grpc call.

Test: import to re-client and run  //internal/pkg/reproxy:reproxy_test with race detection.
re-client `reproxy_test` unit test has been having racing issue for long time, this change fix the data racing issue there and make most of the unit test there can run with t.parallel()

Test: import to re-client and run  //internal/pkg/reproxy:reproxy_test with race detection.
@ywmei-brt1 ywmei-brt1 changed the title Avoid racing in GetFlattenedOutputs() Avoid racing in fake package Mar 13, 2024
@mrahs mrahs merged commit ae0c076 into bazelbuild:master Mar 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants