devabhishekpal commented on code in PR #1363:
URL: https://github.com/apache/ratis/pull/1363#discussion_r2914613468
##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java:
##########
@@ -341,20 +340,37 @@ private boolean haveTooManyPendingRequests() {
}
static class StreamObservers {
- private final CallStreamObserver<AppendEntriesRequestProto> appendLog;
- private final CallStreamObserver<AppendEntriesRequestProto> heartbeat;
+ private final ClientCallStreamObserver<AppendEntriesRequestProto>
appendLog;
+ private final ClientCallStreamObserver<AppendEntriesRequestProto>
heartbeat;
private final TimeDuration waitForReady;
+ private final TimeDuration completeGracePeriod;
private volatile boolean running = true;
+ private final ScheduledExecutorService closer =
+ Executors.newSingleThreadScheduledExecutor(r -> {
+ Thread t = new Thread(r, "grpc-log-appender-stream-closer");
+ t.setDaemon(true);
+ return t;
+ });
+
+// private final AtomicBoolean closing = new AtomicBoolean(false);
Review Comment:
nit: can be removed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]