hangc0276 commented on code in PR #4176:
URL: https://github.com/apache/bookkeeper/pull/4176#discussion_r1461497748
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java:
##########
@@ -2030,7 +2031,23 @@ public boolean isReadWorkerThreadsThrottlingEnabled() {
return getBoolean(READ_WORKER_THREADS_THROTTLING_ENABLED, true);
}
+ /**
+ * Set timout millis for pending read request.
+ * @param timeoutMillis timout millis of pending read request.
+ * @return server configuration
+ */
+ public ServerConfiguration setReadEntryPendingTimeoutMillis(long
timeoutMillis) {
+ setProperty(READ_ENTRY_PENDING_TIMEOUT_MILLIS, timeoutMillis);
+ return this;
+ }
+ /**
+ * Get timout millis for pending read request.
+ * @return timout millis
+ */
+ public long getReadEntryPendingTimeoutMillis() {
Review Comment:
Why set the timeout to 5 seconds by default? Pulsar sets the timeout to 30s
https://github.com/apache/pulsar/blob/3fa85f038aac0bb416d6821a61709adfdc1a1c49/conf/broker.conf#L955
Adding the timeout on the server side will save IOs to disk, but it will
make the configuration more complex because the user needs to care about the
configuration on both the server and client side.
What's more, if Pulsar different namespace configures different bk client
read timeout configurations, it will be hard for the server to match the
readTimeout with the client.
--
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]