aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/client_config
diff options
context:
space:
mode:
authorGravatar Hongwei Wang <hongweiw@google.com>2015-07-17 17:38:34 -0700
committerGravatar Hongwei Wang <hongweiw@google.com>2015-07-17 17:38:34 -0700
commitb307ae280b974a927cd1319ffd974c1dd90ec95d (patch)
treee38b428e51ec491cc7aac5a78925540092079131 /src/core/client_config
parenteec3b9103baa784bbcd6be10d101ab53b1f169de (diff)
parentefccb3f5ce7cae89739d3a0474fcc0d6e2a5b12c (diff)
Merge branch 'master' into zookeeper
Diffstat (limited to 'src/core/client_config')
-rw-r--r--src/core/client_config/lb_policies/pick_first.h2
-rw-r--r--src/core/client_config/resolvers/zookeeper_resolver.c4
-rw-r--r--src/core/client_config/subchannel.c4
3 files changed, 4 insertions, 6 deletions
diff --git a/src/core/client_config/lb_policies/pick_first.h b/src/core/client_config/lb_policies/pick_first.h
index 94c2a9f0c7..31394985e5 100644
--- a/src/core/client_config/lb_policies/pick_first.h
+++ b/src/core/client_config/lb_policies/pick_first.h
@@ -36,6 +36,8 @@
#include "src/core/client_config/lb_policy.h"
+/** Returns a load balancing policy instance that picks up the first subchannel
+ * from \a subchannels to succesfully connect */
grpc_lb_policy *grpc_create_pick_first_lb_policy(grpc_subchannel **subchannels,
size_t num_subchannels);
diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/client_config/resolvers/zookeeper_resolver.c
index 758ca4d7bc..a0db6059b4 100644
--- a/src/core/client_config/resolvers/zookeeper_resolver.c
+++ b/src/core/client_config/resolvers/zookeeper_resolver.c
@@ -207,7 +207,6 @@ static char *zookeeper_parse_address(char *buffer, int buffer_len) {
grpc_json *json;
grpc_json *cur;
- gpr_log(GPR_INFO, buffer);
address = NULL;
json = grpc_json_parse_string_with_len(buffer, buffer_len);
if (json != NULL) {
@@ -231,7 +230,6 @@ static char *zookeeper_parse_address(char *buffer, int buffer_len) {
strcat(address, host);
strcat(address, ":");
strcat(address, port);
- gpr_log(GPR_INFO, address);
}
grpc_json_destroy(json);
}
@@ -259,7 +257,6 @@ static void zookeeper_resolve_address(zookeeper_resolver *r) {
/* Get zookeeper node of given path r->name
If not containing address(i.e. service node), get its children */
- gpr_log(GPR_INFO, r->name);
status = zoo_get(r->zookeeper_handle, r->name, GRPC_ZOOKEEPER_WATCH,
buffer, &buffer_len, NULL);
if (!status) {
@@ -291,7 +288,6 @@ static void zookeeper_resolve_address(zookeeper_resolver *r) {
strcat(path, r->name);
strcat(path, "/");
strcat(path, children.data[i]);
- gpr_log(GPR_INFO, path);
memset(buffer, 0, GRPC_MAX_ZOOKEEPER_BUFFER_SIZE);
status = zoo_get(r->zookeeper_handle, path, GRPC_ZOOKEEPER_WATCH,
buffer, &buffer_len, NULL);
diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c
index 6cf9062ab0..8cdad1015f 100644
--- a/src/core/client_config/subchannel.c
+++ b/src/core/client_config/subchannel.c
@@ -300,7 +300,7 @@ static void continue_connect(grpc_subchannel *c) {
}
static void start_connect(grpc_subchannel *c) {
- gpr_timespec now = gpr_now();
+ gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
c->next_attempt = now;
c->backoff_delta = gpr_time_from_seconds(1);
@@ -585,7 +585,7 @@ static void subchannel_connected(void *arg, int iomgr_success) {
c->have_alarm = 1;
c->next_attempt = gpr_time_add(c->next_attempt, c->backoff_delta);
c->backoff_delta = gpr_time_add(c->backoff_delta, c->backoff_delta);
- grpc_alarm_init(&c->alarm, c->next_attempt, on_alarm, c, gpr_now());
+ grpc_alarm_init(&c->alarm, c->next_attempt, on_alarm, c, gpr_now(GPR_CLOCK_REALTIME));
gpr_mu_unlock(&c->mu);
}
}