aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc84
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc89
-rw-r--r--src/core/lib/surface/alarm.cc137
-rw-r--r--src/core/lib/surface/alarm_internal.h40
-rw-r--r--src/core/lib/surface/init.cc1
-rw-r--r--src/core/lib/surface/version.cc4
6 files changed, 128 insertions, 227 deletions
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index 0315a29d15..e5b2815af8 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -66,8 +66,8 @@ typedef struct {
grpc_pollset_set* interested_parties;
/** Closures used by the combiner */
- grpc_closure dns_ares_on_retry_timer_locked;
- grpc_closure dns_ares_on_resolved_locked;
+ grpc_closure dns_ares_on_next_resolution_timer_closure;
+ grpc_closure dns_ares_on_resolved_closure;
/** Combiner guarding the rest of the state */
grpc_combiner* combiner;
@@ -85,12 +85,15 @@ typedef struct {
grpc_channel_args** target_result;
/** current (fully resolved) result */
grpc_channel_args* resolved_result;
- /** retry timer */
- bool have_retry_timer;
- grpc_timer retry_timer;
+ /** next resolution timer */
+ bool have_next_resolution_timer;
+ grpc_timer next_resolution_timer;
/** retry backoff state */
grpc_core::ManualConstructor<grpc_core::BackOff> backoff;
-
+ /** min resolution period. Max one resolution will happen per period */
+ grpc_millis min_time_between_resolutions;
+ /** when was the last resolution? -1 if no resolution has happened yet */
+ grpc_millis last_resolution_timestamp;
/** currently resolving addresses */
grpc_lb_addresses* lb_addresses;
/** currently resolving service config */
@@ -100,6 +103,7 @@ typedef struct {
static void dns_ares_destroy(grpc_resolver* r);
static void dns_ares_start_resolving_locked(ares_dns_resolver* r);
+static void dns_ares_maybe_start_resolving_locked(ares_dns_resolver* r);
static void dns_ares_maybe_finish_next_locked(ares_dns_resolver* r);
static void dns_ares_shutdown_locked(grpc_resolver* r);
@@ -114,8 +118,8 @@ static const grpc_resolver_vtable dns_ares_resolver_vtable = {
static void dns_ares_shutdown_locked(grpc_resolver* resolver) {
ares_dns_resolver* r = (ares_dns_resolver*)resolver;
- if (r->have_retry_timer) {
- grpc_timer_cancel(&r->retry_timer);
+ if (r->have_next_resolution_timer) {
+ grpc_timer_cancel(&r->next_resolution_timer);
}
if (r->pending_request != nullptr) {
grpc_cancel_ares_request(r->pending_request);
@@ -131,19 +135,20 @@ static void dns_ares_shutdown_locked(grpc_resolver* resolver) {
static void dns_ares_channel_saw_error_locked(grpc_resolver* resolver) {
ares_dns_resolver* r = (ares_dns_resolver*)resolver;
if (!r->resolving) {
- dns_ares_start_resolving_locked(r);
+ dns_ares_maybe_start_resolving_locked(r);
}
}
-static void dns_ares_on_retry_timer_locked(void* arg, grpc_error* error) {
+static void dns_ares_on_next_resolution_timer_locked(void* arg,
+ grpc_error* error) {
ares_dns_resolver* r = (ares_dns_resolver*)arg;
- r->have_retry_timer = false;
+ r->have_next_resolution_timer = false;
if (error == GRPC_ERROR_NONE) {
if (!r->resolving) {
dns_ares_start_resolving_locked(r);
}
}
- GRPC_RESOLVER_UNREF(&r->base, "retry-timer");
+ GRPC_RESOLVER_UNREF(&r->base, "next_resolution_timer");
}
static bool value_in_json_array(grpc_json* array, const char* value) {
@@ -270,21 +275,22 @@ static void dns_ares_on_resolved_locked(void* arg, grpc_error* error) {
grpc_millis timeout = next_try - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
- GPR_ASSERT(!r->have_retry_timer);
- r->have_retry_timer = true;
- GRPC_RESOLVER_REF(&r->base, "retry-timer");
+ GPR_ASSERT(!r->have_next_resolution_timer);
+ r->have_next_resolution_timer = true;
+ GRPC_RESOLVER_REF(&r->base, "next_resolution_timer");
if (timeout > 0) {
gpr_log(GPR_DEBUG, "retrying in %" PRIdPTR " milliseconds", timeout);
} else {
gpr_log(GPR_DEBUG, "retrying immediately");
}
- grpc_timer_init(&r->retry_timer, next_try,
- &r->dns_ares_on_retry_timer_locked);
+ grpc_timer_init(&r->next_resolution_timer, next_try,
+ &r->dns_ares_on_next_resolution_timer_closure);
}
if (r->resolved_result != nullptr) {
grpc_channel_args_destroy(r->resolved_result);
}
r->resolved_result = result;
+ r->last_resolution_timestamp = grpc_core::ExecCtx::Get()->Now();
r->resolved_version++;
dns_ares_maybe_finish_next_locked(r);
GRPC_RESOLVER_UNREF(&r->base, "dns-resolving");
@@ -299,7 +305,7 @@ static void dns_ares_next_locked(grpc_resolver* resolver,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
- dns_ares_start_resolving_locked(r);
+ dns_ares_maybe_start_resolving_locked(r);
} else {
dns_ares_maybe_finish_next_locked(r);
}
@@ -313,7 +319,7 @@ static void dns_ares_start_resolving_locked(ares_dns_resolver* r) {
r->service_config_json = nullptr;
r->pending_request = grpc_dns_lookup_ares(
r->dns_server, r->name_to_resolve, r->default_port, r->interested_parties,
- &r->dns_ares_on_resolved_locked, &r->lb_addresses,
+ &r->dns_ares_on_resolved_closure, &r->lb_addresses,
true /* check_grpclb */,
r->request_service_config ? &r->service_config_json : nullptr);
}
@@ -331,6 +337,35 @@ static void dns_ares_maybe_finish_next_locked(ares_dns_resolver* r) {
}
}
+static void dns_ares_maybe_start_resolving_locked(ares_dns_resolver* r) {
+ if (r->last_resolution_timestamp >= 0) {
+ const grpc_millis earliest_next_resolution =
+ r->last_resolution_timestamp + r->min_time_between_resolutions;
+ const grpc_millis ms_until_next_resolution =
+ earliest_next_resolution - grpc_core::ExecCtx::Get()->Now();
+ if (ms_until_next_resolution > 0) {
+ const grpc_millis last_resolution_ago =
+ grpc_core::ExecCtx::Get()->Now() - r->last_resolution_timestamp;
+ gpr_log(GPR_DEBUG,
+ "In cooldown from last resolution (from %" PRIdPTR
+ " ms ago). Will resolve again in %" PRIdPTR " ms",
+ last_resolution_ago, ms_until_next_resolution);
+ if (!r->have_next_resolution_timer) {
+ r->have_next_resolution_timer = true;
+ GRPC_RESOLVER_REF(&r->base, "next_resolution_timer_cooldown");
+ grpc_timer_init(&r->next_resolution_timer, ms_until_next_resolution,
+ &r->dns_ares_on_next_resolution_timer_closure);
+ }
+ // TODO(dgq): remove the following two lines once Pick First stops
+ // discarding subchannels after selecting.
+ ++r->resolved_version;
+ dns_ares_maybe_finish_next_locked(r);
+ return;
+ }
+ }
+ dns_ares_start_resolving_locked(r);
+}
+
static void dns_ares_destroy(grpc_resolver* gr) {
gpr_log(GPR_DEBUG, "dns_ares_destroy");
ares_dns_resolver* r = (ares_dns_resolver*)gr;
@@ -375,12 +410,17 @@ static grpc_resolver* dns_ares_create(grpc_resolver_args* args,
.set_jitter(GRPC_DNS_RECONNECT_JITTER)
.set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
r->backoff.Init(grpc_core::BackOff(backoff_options));
- GRPC_CLOSURE_INIT(&r->dns_ares_on_retry_timer_locked,
- dns_ares_on_retry_timer_locked, r,
+ GRPC_CLOSURE_INIT(&r->dns_ares_on_next_resolution_timer_closure,
+ dns_ares_on_next_resolution_timer_locked, r,
grpc_combiner_scheduler(r->base.combiner));
- GRPC_CLOSURE_INIT(&r->dns_ares_on_resolved_locked,
+ GRPC_CLOSURE_INIT(&r->dns_ares_on_resolved_closure,
dns_ares_on_resolved_locked, r,
grpc_combiner_scheduler(r->base.combiner));
+ const grpc_arg* period_arg = grpc_channel_args_find(
+ args->args, GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS);
+ r->min_time_between_resolutions =
+ grpc_channel_arg_get_integer(period_arg, {1000, 0, INT_MAX});
+ r->last_resolution_timestamp = -1;
return &r->base;
}
diff --git a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
index d071c3ca42..2c798188d1 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
@@ -19,11 +19,13 @@
#include <grpc/support/port_platform.h>
#include <inttypes.h>
-#include <string.h>
+#include <climits>
+#include <cstring>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/string_util.h>
+#include <grpc/support/time.h>
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
@@ -65,13 +67,16 @@ typedef struct {
grpc_channel_args** target_result;
/** current (fully resolved) result */
grpc_channel_args* resolved_result;
- /** retry timer */
- bool have_retry_timer;
- grpc_timer retry_timer;
- grpc_closure on_retry;
+ /** next resolution timer */
+ bool have_next_resolution_timer;
+ grpc_timer next_resolution_timer;
+ grpc_closure next_resolution_closure;
/** retry backoff state */
grpc_core::ManualConstructor<grpc_core::BackOff> backoff;
-
+ /** min resolution period. Max one resolution will happen per period */
+ grpc_millis min_time_between_resolutions;
+ /** when was the last resolution? -1 if no resolution has happened yet */
+ grpc_millis last_resolution_timestamp;
/** currently resolving addresses */
grpc_resolved_addresses* addresses;
} dns_resolver;
@@ -79,6 +84,7 @@ typedef struct {
static void dns_destroy(grpc_resolver* r);
static void dns_start_resolving_locked(dns_resolver* r);
+static void maybe_start_resolving_locked(dns_resolver* r);
static void dns_maybe_finish_next_locked(dns_resolver* r);
static void dns_shutdown_locked(grpc_resolver* r);
@@ -92,8 +98,8 @@ static const grpc_resolver_vtable dns_resolver_vtable = {
static void dns_shutdown_locked(grpc_resolver* resolver) {
dns_resolver* r = (dns_resolver*)resolver;
- if (r->have_retry_timer) {
- grpc_timer_cancel(&r->retry_timer);
+ if (r->have_next_resolution_timer) {
+ grpc_timer_cancel(&r->next_resolution_timer);
}
if (r->next_completion != nullptr) {
*r->target_result = nullptr;
@@ -106,7 +112,7 @@ static void dns_shutdown_locked(grpc_resolver* resolver) {
static void dns_channel_saw_error_locked(grpc_resolver* resolver) {
dns_resolver* r = (dns_resolver*)resolver;
if (!r->resolving) {
- dns_start_resolving_locked(r);
+ maybe_start_resolving_locked(r);
}
}
@@ -118,23 +124,19 @@ static void dns_next_locked(grpc_resolver* resolver,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
- dns_start_resolving_locked(r);
+ maybe_start_resolving_locked(r);
} else {
dns_maybe_finish_next_locked(r);
}
}
-static void dns_on_retry_timer_locked(void* arg, grpc_error* error) {
+static void dns_on_next_resolution_timer_locked(void* arg, grpc_error* error) {
dns_resolver* r = (dns_resolver*)arg;
-
- r->have_retry_timer = false;
- if (error == GRPC_ERROR_NONE) {
- if (!r->resolving) {
- dns_start_resolving_locked(r);
- }
+ r->have_next_resolution_timer = false;
+ if (error == GRPC_ERROR_NONE && !r->resolving) {
+ dns_start_resolving_locked(r);
}
-
- GRPC_RESOLVER_UNREF(&r->base, "retry-timer");
+ GRPC_RESOLVER_UNREF(&r->base, "next_resolution_timer");
}
static void dns_on_resolved_locked(void* arg, grpc_error* error) {
@@ -166,17 +168,16 @@ static void dns_on_resolved_locked(void* arg, grpc_error* error) {
grpc_millis timeout = next_try - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
- GPR_ASSERT(!r->have_retry_timer);
- r->have_retry_timer = true;
- GRPC_RESOLVER_REF(&r->base, "retry-timer");
+ GPR_ASSERT(!r->have_next_resolution_timer);
+ r->have_next_resolution_timer = true;
+ GRPC_RESOLVER_REF(&r->base, "next_resolution_timer");
if (timeout > 0) {
gpr_log(GPR_DEBUG, "retrying in %" PRIdPTR " milliseconds", timeout);
} else {
gpr_log(GPR_DEBUG, "retrying immediately");
}
- GRPC_CLOSURE_INIT(&r->on_retry, dns_on_retry_timer_locked, r,
- grpc_combiner_scheduler(r->base.combiner));
- grpc_timer_init(&r->retry_timer, next_try, &r->on_retry);
+ grpc_timer_init(&r->next_resolution_timer, next_try,
+ &r->next_resolution_closure);
}
if (r->resolved_result != nullptr) {
grpc_channel_args_destroy(r->resolved_result);
@@ -189,6 +190,35 @@ static void dns_on_resolved_locked(void* arg, grpc_error* error) {
GRPC_RESOLVER_UNREF(&r->base, "dns-resolving");
}
+static void maybe_start_resolving_locked(dns_resolver* r) {
+ if (r->last_resolution_timestamp >= 0) {
+ const grpc_millis earliest_next_resolution =
+ r->last_resolution_timestamp + r->min_time_between_resolutions;
+ const grpc_millis ms_until_next_resolution =
+ earliest_next_resolution - grpc_core::ExecCtx::Get()->Now();
+ if (ms_until_next_resolution > 0) {
+ const grpc_millis last_resolution_ago =
+ grpc_core::ExecCtx::Get()->Now() - r->last_resolution_timestamp;
+ gpr_log(GPR_DEBUG,
+ "In cooldown from last resolution (from %" PRIdPTR
+ " ms ago). Will resolve again in %" PRIdPTR " ms",
+ last_resolution_ago, ms_until_next_resolution);
+ if (!r->have_next_resolution_timer) {
+ r->have_next_resolution_timer = true;
+ GRPC_RESOLVER_REF(&r->base, "next_resolution_timer_cooldown");
+ grpc_timer_init(&r->next_resolution_timer, ms_until_next_resolution,
+ &r->next_resolution_closure);
+ }
+ // TODO(dgq): remove the following two lines once Pick First stops
+ // discarding subchannels after selecting.
+ ++r->resolved_version;
+ dns_maybe_finish_next_locked(r);
+ return;
+ }
+ }
+ dns_start_resolving_locked(r);
+}
+
static void dns_start_resolving_locked(dns_resolver* r) {
GRPC_RESOLVER_REF(&r->base, "dns-resolving");
GPR_ASSERT(!r->resolving);
@@ -199,6 +229,7 @@ static void dns_start_resolving_locked(dns_resolver* r) {
GRPC_CLOSURE_CREATE(dns_on_resolved_locked, r,
grpc_combiner_scheduler(r->base.combiner)),
&r->addresses);
+ r->last_resolution_timestamp = grpc_core::ExecCtx::Get()->Now();
}
static void dns_maybe_finish_next_locked(dns_resolver* r) {
@@ -251,6 +282,14 @@ static grpc_resolver* dns_create(grpc_resolver_args* args,
.set_jitter(GRPC_DNS_RECONNECT_JITTER)
.set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
r->backoff.Init(grpc_core::BackOff(backoff_options));
+ const grpc_arg* period_arg = grpc_channel_args_find(
+ args->args, GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS);
+ r->min_time_between_resolutions =
+ grpc_channel_arg_get_integer(period_arg, {1000, 0, INT_MAX});
+ r->last_resolution_timestamp = -1;
+ GRPC_CLOSURE_INIT(&r->next_resolution_closure,
+ dns_on_next_resolution_timer_locked, r,
+ grpc_combiner_scheduler(r->base.combiner));
return &r->base;
}
diff --git a/src/core/lib/surface/alarm.cc b/src/core/lib/surface/alarm.cc
deleted file mode 100644
index f6ea016c33..0000000000
--- a/src/core/lib/surface/alarm.cc
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- *
- * Copyright 2015 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include <grpc/support/port_platform.h>
-
-#include <inttypes.h>
-
-#include "src/core/lib/surface/alarm_internal.h"
-
-#include <grpc/grpc.h>
-#include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
-#include "src/core/lib/iomgr/timer.h"
-#include "src/core/lib/surface/completion_queue.h"
-
-grpc_core::DebugOnlyTraceFlag grpc_trace_alarm_refcount(false,
- "alarm_refcount");
-
-struct grpc_alarm {
- gpr_refcount refs;
- grpc_timer alarm;
- grpc_closure on_alarm;
- grpc_cq_completion completion;
- /** completion queue where events about this alarm will be posted */
- grpc_completion_queue* cq;
- /** user supplied tag */
- void* tag;
-};
-
-static void alarm_ref(grpc_alarm* alarm) { gpr_ref(&alarm->refs); }
-
-static void alarm_unref(grpc_alarm* alarm) {
- if (gpr_unref(&alarm->refs)) {
- grpc_core::ExecCtx exec_ctx;
- if (alarm->cq != nullptr) {
- GRPC_CQ_INTERNAL_UNREF(alarm->cq, "alarm");
- }
-
- gpr_free(alarm);
- }
-}
-
-#ifndef NDEBUG
-static void alarm_ref_dbg(grpc_alarm* alarm, const char* reason,
- const char* file, int line) {
- if (grpc_trace_alarm_refcount.enabled()) {
- gpr_atm val = gpr_atm_no_barrier_load(&alarm->refs.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "Alarm:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", alarm, val,
- val + 1, reason);
- }
-
- alarm_ref(alarm);
-}
-
-static void alarm_unref_dbg(grpc_alarm* alarm, const char* reason,
- const char* file, int line) {
- if (grpc_trace_alarm_refcount.enabled()) {
- gpr_atm val = gpr_atm_no_barrier_load(&alarm->refs.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "Alarm:%p Unref %" PRIdPTR " -> %" PRIdPTR " %s", alarm, val,
- val - 1, reason);
- }
-
- alarm_unref(alarm);
-}
-#endif
-
-static void alarm_end_completion(void* arg, grpc_cq_completion* c) {
- grpc_alarm* alarm = (grpc_alarm*)arg;
- GRPC_ALARM_UNREF(alarm, "dequeue-end-op");
-}
-
-static void alarm_cb(void* arg, grpc_error* error) {
- grpc_alarm* alarm = (grpc_alarm*)arg;
-
- /* We are queuing an op on completion queue. This means, the alarm's structure
- cannot be destroyed until the op is dequeued. Adding an extra ref
- here and unref'ing when the op is dequeued will achieve this */
- GRPC_ALARM_REF(alarm, "queue-end-op");
- grpc_cq_end_op(alarm->cq, alarm->tag, error, alarm_end_completion,
- (void*)alarm, &alarm->completion);
-}
-
-grpc_alarm* grpc_alarm_create(void* reserved) {
- grpc_alarm* alarm = (grpc_alarm*)gpr_malloc(sizeof(grpc_alarm));
-
-#ifndef NDEBUG
- if (grpc_trace_alarm_refcount.enabled()) {
- gpr_log(GPR_DEBUG, "Alarm:%p created (ref: 1)", alarm);
- }
-#endif
-
- gpr_ref_init(&alarm->refs, 1);
- grpc_timer_init_unset(&alarm->alarm);
- alarm->cq = nullptr;
- GRPC_CLOSURE_INIT(&alarm->on_alarm, alarm_cb, alarm,
- grpc_schedule_on_exec_ctx);
- return alarm;
-}
-
-void grpc_alarm_set(grpc_alarm* alarm, grpc_completion_queue* cq,
- gpr_timespec deadline, void* tag, void* reserved) {
- grpc_core::ExecCtx exec_ctx;
-
- GRPC_CQ_INTERNAL_REF(cq, "alarm");
- alarm->cq = cq;
- alarm->tag = tag;
-
- GPR_ASSERT(grpc_cq_begin_op(cq, tag));
- grpc_timer_init(&alarm->alarm, grpc_timespec_to_millis_round_up(deadline),
- &alarm->on_alarm);
-}
-
-void grpc_alarm_cancel(grpc_alarm* alarm, void* reserved) {
- grpc_core::ExecCtx exec_ctx;
- grpc_timer_cancel(&alarm->alarm);
-}
-
-void grpc_alarm_destroy(grpc_alarm* alarm, void* reserved) {
- grpc_alarm_cancel(alarm, reserved);
- GRPC_ALARM_UNREF(alarm, "alarm_destroy");
-}
diff --git a/src/core/lib/surface/alarm_internal.h b/src/core/lib/surface/alarm_internal.h
deleted file mode 100644
index 99e981234d..0000000000
--- a/src/core/lib/surface/alarm_internal.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Copyright 2015-2017 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef GRPC_CORE_LIB_SURFACE_ALARM_INTERNAL_H
-#define GRPC_CORE_LIB_SURFACE_ALARM_INTERNAL_H
-
-#include <grpc/support/log.h>
-#include "src/core/lib/debug/trace.h"
-
-extern grpc_core::DebugOnlyTraceFlag grpc_trace_alarm_refcount;
-
-#ifndef NDEBUG
-
-#define GRPC_ALARM_REF(a, reason) alarm_ref_dbg(a, reason, __FILE__, __LINE__)
-#define GRPC_ALARM_UNREF(a, reason) \
- alarm_unref_dbg(a, reason, __FILE__, __LINE__)
-
-#else /* !defined(NDEBUG) */
-
-#define GRPC_ALARM_REF(a, reason) alarm_ref(a)
-#define GRPC_ALARM_UNREF(a, reason) alarm_unref(a)
-
-#endif /* defined(NDEBUG) */
-
-#endif /* GRPC_CORE_LIB_SURFACE_ALARM_INTERNAL_H */
diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc
index b9eefda0ec..7f7947faaa 100644
--- a/src/core/lib/surface/init.cc
+++ b/src/core/lib/surface/init.cc
@@ -42,7 +42,6 @@
#include "src/core/lib/iomgr/timer_manager.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_internal.h"
-#include "src/core/lib/surface/alarm_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/channel_init.h"
diff --git a/src/core/lib/surface/version.cc b/src/core/lib/surface/version.cc
index 19498a6df7..153b6e0297 100644
--- a/src/core/lib/surface/version.cc
+++ b/src/core/lib/surface/version.cc
@@ -21,6 +21,6 @@
#include <grpc/grpc.h>
-const char* grpc_version_string(void) { return "5.0.0-dev"; }
+const char* grpc_version_string(void) { return "6.0.0-dev"; }
-const char* grpc_g_stands_for(void) { return "glamorous"; }
+const char* grpc_g_stands_for(void) { return "glossy"; }