sijie commented on a change in pull request #706: Bookies should not queue read 
request indefinitely
URL: https://github.com/apache/bookkeeper/pull/706#discussion_r149891426
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieRequestProcessor.java
 ##########
 @@ -316,7 +337,25 @@ private void processReadRequestV3(final 
BookkeeperProtocol.Request r, final Chan
             if (null == readThreadPool) {
                 read.run();
             } else {
-                readThreadPool.submitOrdered(r.getReadRequest().getLedgerId(), 
read);
+                try {
+                    
readThreadPool.submitOrdered(r.getReadRequest().getLedgerId(), read);
+                } catch (RejectedExecutionException e) {
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Failed to process request to read entry at 
{}:{}. Too many pending requests",
+                                r.getReadRequest().getLedgerId(), 
r.getReadRequest().getEntryId());
+                    }
+                    BookkeeperProtocol.ReadResponse.Builder readResponse =
+                            BookkeeperProtocol.ReadResponse.newBuilder() //
 
 Review comment:
   nit: removing trailing "//"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to