You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2017/11/09 08:27:57 UTC

[GitHub] sijie commented on a change in pull request #706: Bookies should not queue read request indefinitely

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_r149891325
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieRequestProcessor.java
 ##########
 @@ -288,7 +292,24 @@ private void processAddRequestV3(final BookkeeperProtocol.Request r, final Chann
         if (null == writeThreadPool) {
             write.run();
         } else {
-            writeThreadPool.submitOrdered(r.getAddRequest().getLedgerId(), write);
+            try {
+                writeThreadPool.submitOrdered(r.getAddRequest().getLedgerId(), write);
+            } catch (RejectedExecutionException e) {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Failed to process request to add entry at {}:{}. Too many pending requests",
+                            r.getAddRequest().getLedgerId(), r.getAddRequest().getEntryId());
+                }
+                BookkeeperProtocol.AddResponse.Builder addResponse = BookkeeperProtocol.AddResponse.newBuilder() //
 
 Review comment:
   nit: removing the 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:
users@infra.apache.org


With regards,
Apache Git Services