Skip to content

Commit

Permalink
Automated rollback of commit 61977f4.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Breaks a test of Bazel on Windows: http://ci.bazel.io/view/Dashboard/job/bazel-tests/1078/testReport/src_test_py_bazel_bazel_clean_test/exe/src_test_py_bazel_bazel_clean_test_exe/

Fixes bazelbuild#3882.

*** Original change description ***

Don't release the client lock while the server executes a command.  The
server still doesn't support concurrency, even for commands like 'help',
so there's no benefit from releasing it.

This also improves progress messages.  Today the client may print

WARNING: Running Blaze server needs to be killed, because the startup options are different.

and then wait indefinitely while the server finishes processing a
request.  With this change, an explanation for the delay is given.

RELNOTES: None.
GO...

***

RELNOTES: None.
PiperOrigin-RevId: 171689429
  • Loading branch information
lberki authored and hlopko committed Oct 11, 2017
1 parent 79676a2 commit a9c46e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/cpp/blaze.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,11 @@ unsigned int GrpcBlazeServer::Communicate() {
std::unique_ptr<grpc::ClientReader<command_server::RunResponse>> reader(
client_->Run(&context, request));

// Release the server lock because the gRPC handles concurrent clients just
// fine. Note that this may result in two "waiting for other client" messages
// (one during server startup and one emitted by the server)
blaze::ReleaseLock(&blaze_lock_);

std::thread cancel_thread(&GrpcBlazeServer::CancelThread, this);
bool command_id_set = false;
bool pipe_broken = false;
Expand Down

0 comments on commit a9c46e5

Please sign in to comment.