Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jie Huang committed Mar 24, 2020
1 parent 5b58aeb commit 8f836e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,9 @@ public enum Code implements CodeDeprecated {
* but client is not configured with SASL authentication or configuted with SASL but failed
* (i.e. wrong credential used.). */
SESSIONCLOSEDREQUIRESASLAUTH(-124),
/** Operation was throttled and not executed at all. please, retry! */
/** Operation was throttled and not executed at all. This error code indicates that zookeeper server
* is under heavy load and can't process incoming requests at full speed; please retry with back off.
*/
THROTTLEDOP (-127);

private static final Map<Integer, Code> lookup = new HashMap<Integer, Code>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private ProcessTxnResult applyRequest(Request request) {
}

public void processRequest(Request request) {
LOG.debug("Processing request:: " + request);
LOG.debug("Processing request:: {}", request);

// request.addRQRec(">final");
long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ public void submitRequest(Request request) {
LOG.debug("Shutdown in progress. Request cannot be processed");
dropRequest(request);
} else {
request.requestThrottleQueueTime = Time.currentElapsedTime();
submittedRequests.add(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ public static int getThrottledOpWaitTime() {
}

public static void setThrottledOpWaitTime(int time) {
LOG.info("throttledOpWaitTime set to " + time);
LOG.info("throttledOpWaitTime set to {}", time);
throttledOpWaitTime = time;
}

Expand Down

0 comments on commit 8f836e2

Please sign in to comment.