summaryrefslogtreecommitdiff
path: root/zookeeper-client
diff options
context:
space:
mode:
authorJie Huang <jiehuang@fb.com>2020-03-24 19:38:46 -0700
committerMichael Han <hanm@apache.org>2020-03-24 19:38:46 -0700
commite87bad6774e7269ef21a156aff9dad089ef54794 (patch)
tree0e2911d9db4b4f5793b1267637f8165aa92ef3b9 /zookeeper-client
parent4d8caf9851f63073145996fd4a535278014d01be (diff)
downloadzookeeper-e87bad6774e7269ef21a156aff9dad089ef54794.tar.gz
ZOOKEEPER-3683: Discard requests that are delayed longer than a confi…
…gured threshold Author: Jie Huang <jiehuang@fb.com> Author: Ivailo Nedelchev <nedelchev@fb.com> Reviewers: Michael Han <hanm@apache.org>, Allan Lyu <fangmin@apache.org>, Damien Diederen <dd@crosstwine.com> Closes #1211 from jhuan31/ZOOKEEPER-3683
Diffstat (limited to 'zookeeper-client')
-rw-r--r--zookeeper-client/zookeeper-client-c/include/zookeeper.h3
-rw-r--r--zookeeper-client/zookeeper-client-c/src/zookeeper.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/zookeeper-client/zookeeper-client-c/include/zookeeper.h b/zookeeper-client/zookeeper-client-c/include/zookeeper.h
index 243fac284..d33a44695 100644
--- a/zookeeper-client/zookeeper-client-c/include/zookeeper.h
+++ b/zookeeper-client/zookeeper-client-c/include/zookeeper.h
@@ -140,7 +140,8 @@ enum ZOO_ERRORS {
ZEPHEMERALONLOCALSESSION = -120, /*!< Attempt to create ephemeral node on a local session */
ZNOWATCHER = -121, /*!< The watcher couldn't be found */
ZRECONFIGDISABLED = -123, /*!< Attempts to perform a reconfiguration operation when reconfiguration feature is disabled */
- ZSESSIONCLOSEDREQUIRESASLAUTH = -124 /*!< The session has been closed by server because server requires client to do SASL authentication, but client is not configured with SASL authentication or configuted with SASL but failed (i.e. wrong credential used.). */
+ ZSESSIONCLOSEDREQUIRESASLAUTH = -124, /*!< The session has been closed by server because server requires client to do SASL authentication, but client is not configured with SASL authentication or configuted with SASL but failed (i.e. wrong credential used.). */
+ ZTHROTTLEDOP = -127 /*!< Operation was throttled and not executed at all. please, retry! */
};
#ifdef __cplusplus
diff --git a/zookeeper-client/zookeeper-client-c/src/zookeeper.c b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
index 0c143e7bb..2b8053e5a 100644
--- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c
+++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c
@@ -4902,6 +4902,8 @@ const char* zerror(int c)
return "the watcher couldn't be found";
case ZRECONFIGDISABLED:
return "attempts to perform a reconfiguration operation when reconfiguration feature is disable";
+ case ZTHROTTLEDOP:
+ return "Operation was throttled due to high load";
}
if (c > 0) {
return strerror(c);