Merge pull request #17782 from yashykt/filterstatuscodeflake

Fix TSAN issue in filter_status_code test
reviewable/pr17549/r13
Yash Tibrewal 6 years ago committed by GitHub
commit 998eb37d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/core/end2end/tests/filter_status_code.cc

@ -260,6 +260,7 @@ typedef struct final_status_data {
static void server_start_transport_stream_op_batch( static void server_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* op) { grpc_call_element* elem, grpc_transport_stream_op_batch* op) {
auto* data = static_cast<final_status_data*>(elem->call_data); auto* data = static_cast<final_status_data*>(elem->call_data);
gpr_mu_lock(&g_mu);
if (data->call == g_server_call_stack) { if (data->call == g_server_call_stack) {
if (op->send_initial_metadata) { if (op->send_initial_metadata) {
auto* batch = op->payload->send_initial_metadata.send_initial_metadata; auto* batch = op->payload->send_initial_metadata.send_initial_metadata;
@ -270,6 +271,7 @@ static void server_start_transport_stream_op_batch(
} }
} }
} }
gpr_mu_unlock(&g_mu);
grpc_call_next_op(elem, op); grpc_call_next_op(elem, op);
} }

Loading…
Cancel
Save