Skip to content

Commit 3910112

Browse files
committed
comments
Signed-off-by: dayshah <[email protected]>
1 parent e19f7e4 commit 3910112

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/ray/rpc/client_call.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ class ClientCallManager {
364364
/// The main event loop, to which the callback functions will be posted.
365365
instrumented_io_context &main_service_;
366366

367-
/// The number of polling threads.
367+
/// The number of threads that are polling for replies and creating the proto reply
368+
/// objects.
368369
int num_threads_;
369370

370371
/// Whether to record stats for these client calls.

src/ray/rpc/grpc_server.h

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,32 +162,47 @@ class GrpcServer {
162162

163163
/// Name of this server, used for logging and debugging purpose.
164164
const std::string name_;
165+
165166
/// Port of this server.
166167
int port_;
168+
167169
/// Listen to localhost (127.0.0.1) only if it's true, otherwise listen to all network
168170
/// interfaces (0.0.0.0)
169171
const bool listen_to_localhost_only_;
172+
170173
/// Token representing ID of this cluster.
171174
ClusterID cluster_id_;
175+
172176
/// Authentication token for token-based authentication.
173177
std::optional<AuthenticationToken> auth_token_;
178+
174179
/// Indicates whether this server is in shutdown state.
175180
std::atomic<bool> is_shutdown_;
181+
176182
/// The `grpc::Service` objects which should be registered to `ServerBuilder`.
177183
std::vector<std::unique_ptr<grpc::Service>> grpc_services_;
184+
178185
/// The `GrpcService`(defined below) objects which contain grpc::Service objects not in
179186
/// the above vector.
180187
std::vector<std::unique_ptr<GrpcService>> services_;
188+
181189
/// The `ServerCallFactory` objects.
182190
std::vector<std::unique_ptr<ServerCallFactory>> server_call_factories_;
183-
/// The number of completion queues the server is polling from.
191+
192+
/// The number of threads and completion queues the server is polling from for incoming
193+
/// requests. These threads are also responsible for creating the proto request objects.
184194
int num_threads_;
195+
185196
/// The `ServerCompletionQueue` object used for polling events.
186197
std::vector<std::unique_ptr<grpc::ServerCompletionQueue>> cqs_;
198+
187199
/// The `Server` object.
188200
std::unique_ptr<grpc::Server> server_;
189-
/// The polling threads used to check the completion queues.
201+
202+
/// The polling threads used to check the completion queues and create the proto request
203+
/// objects.
190204
std::vector<std::thread> polling_threads_;
205+
191206
/// The interval to send a new gRPC keepalive timeout from server -> client.
192207
/// gRPC server cannot get the ping response within the time, it triggers
193208
/// the watchdog timer fired error, which will close the connection.

0 commit comments

Comments
 (0)