From 7a572c9bb46cf52a5f7398be5b7268d0f64848e3 Mon Sep 17 00:00:00 2001 From: Michael Berlin Date: Sun, 16 Aug 2015 23:25:42 -0700 Subject: [PATCH] proto: Add filtered_replication_synced_until_timestamp to RealtimeStats. --- go/vt/proto/query/query.pb.go | 8 +++++++- proto/query.proto | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index abc0717206..3be9a634e5 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -799,10 +799,16 @@ type RealtimeStats struct { // we do not send queries to servers that are not healthy. HealthError string `protobuf:"bytes,1,opt,name=health_error" json:"health_error,omitempty"` // seconds_behind_master is populated for slaves only. It indicates - // how far behind on replication a slave currently is. It is used + // how far behind on (MySQL) replication a slave currently is. It is used // by clients for subset selection (so we don't try to send traffic // to tablets that are too far behind). + // TODO(mberlin): Let's switch it to int64 instead? SecondsBehindMaster uint32 `protobuf:"varint,2,opt,name=seconds_behind_master" json:"seconds_behind_master,omitempty"` + // filtered_replication_synced_until_timestamp is populated for the receiving + // master of an ongoing filtered replication only. + // It is used to find out how far the receiving master lags behind the + // source shard. + FilteredReplicationSyncedUntilTimestamp int64 `protobuf:"varint,4,opt,name=filtered_replication_synced_until_timestamp" json:"filtered_replication_synced_until_timestamp,omitempty"` // cpu_usage is used for load-based balancing CpuUsage float64 `protobuf:"fixed64,3,opt,name=cpu_usage" json:"cpu_usage,omitempty"` } diff --git a/proto/query.proto b/proto/query.proto index 73552eb923..42591d647d 100644 --- a/proto/query.proto +++ b/proto/query.proto @@ -281,12 +281,21 @@ message RealtimeStats { // we do not send queries to servers that are not healthy. string health_error = 1; + // TODO(mberlin): Add an health error for filtered replication? + // seconds_behind_master is populated for slaves only. It indicates - // how far behind on replication a slave currently is. It is used + // how far behind on (MySQL) replication a slave currently is. It is used // by clients for subset selection (so we don't try to send traffic // to tablets that are too far behind). + // TODO(mberlin): Let's switch it to int64 instead? uint32 seconds_behind_master = 2; + // filtered_replication_synced_until_timestamp is populated for the receiving + // master of an ongoing filtered replication only. + // It is used to find out how far the receiving master lags behind the + // source shard. + int64 filtered_replication_synced_until_timestamp = 4; + // cpu_usage is used for load-based balancing double cpu_usage = 3; }