From 2f30e9ad7fc533b258b95d2fc95db5bbb3a7514f Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Sun, 28 Jul 2019 20:36:15 -0500 Subject: [PATCH] etcdserver: document v2 usage in "publish" method Signed-off-by: Gyuho Lee --- etcdserver/server.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etcdserver/server.go b/etcdserver/server.go index 236696e81..81ed45afe 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -1980,6 +1980,12 @@ func (s *EtcdServer) sync(timeout time.Duration) { // static clientURLs of the server. // The function keeps attempting to register until it succeeds, // or its server is stopped. +// +// Use v2 store to encode member attributes, and apply through Raft +// but does not go through v2 API endpoint, which means even with v2 +// client handler disabled (e.g. --enable-v2=false), cluster can still +// process publish requests through rafthttp +// TODO: Deprecate v2 store func (s *EtcdServer) publish(timeout time.Duration) { b, err := json.Marshal(s.attributes) if err != nil {