From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: kostja@tarantool.org Subject: [tarantool-patches] [PATCH 1/7] swim: drop swim_info() function Date: Wed, 15 May 2019 02:06:19 +0300 [thread overview] Message-ID: <48add4439cbc964c3c591d8b843be03f8de2a254.1557875116.git.v.shpilevoy@tarantool.org> (raw) In-Reply-To: <cover.1557875116.git.v.shpilevoy@tarantool.org> Swim_info() was a function to dump SWIM instance info to a Lua table without explicit usage of Lua. But now all the info can be taken from 1) self member and member API, 2) cached cfg options as a Lua table in a forthcoming Lua API - this is how box.cfg.<index> works. --- src/lib/swim/swim.c | 20 -------------------- src/lib/swim/swim.h | 5 ----- 2 files changed, 25 deletions(-) diff --git a/src/lib/swim/swim.c b/src/lib/swim/swim.c index fa6b3a379..006c265b3 100644 --- a/src/lib/swim/swim.c +++ b/src/lib/swim/swim.c @@ -35,7 +35,6 @@ #include "uri/uri.h" #include "fiber.h" #include "msgpuck.h" -#include "info/info.h" #include "assoc.h" #include "sio.h" #define HEAP_FORWARD_DECLARATION @@ -1911,25 +1910,6 @@ swim_broadcast(struct swim *swim, int port) return 0; } -void -swim_info(struct swim *swim, struct info_handler *info) -{ - info_begin(info); - for (mh_int_t node = mh_first(swim->members), - end = mh_end(swim->members); node != end; - node = mh_next(swim->members, node)) { - struct swim_member *m = - *mh_swim_table_node(swim->members, node); - info_table_begin(info, swim_inaddr_str(&m->addr)); - info_append_str(info, "status", - swim_member_status_strs[m->status]); - info_append_str(info, "uuid", tt_uuid_str(&m->uuid)); - info_append_int(info, "incarnation", (int64_t) m->incarnation); - info_table_end(info); - } - info_end(info); -} - int swim_size(const struct swim *swim) { diff --git a/src/lib/swim/swim.h b/src/lib/swim/swim.h index 331bd14f0..044558dc8 100644 --- a/src/lib/swim/swim.h +++ b/src/lib/swim/swim.h @@ -38,7 +38,6 @@ extern "C" { #endif -struct info_handler; struct swim; struct tt_uuid; struct swim_iterator; @@ -153,10 +152,6 @@ swim_probe_member(struct swim *swim, const char *uri); int swim_broadcast(struct swim *swim, int port); -/** Dump member statuses into @a info. */ -void -swim_info(struct swim *swim, struct info_handler *info); - /** Get SWIM member table size. */ int swim_size(const struct swim *swim); -- 2.20.1 (Apple Git-117)
next prev parent reply other threads:[~2019-05-14 23:06 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-14 23:06 [tarantool-patches] [PATCH 0/7] swim lua preparation, again Vladislav Shpilevoy 2019-05-14 23:06 ` Vladislav Shpilevoy [this message] 2019-05-15 2:00 ` [tarantool-patches] Re: [PATCH 1/7] swim: drop swim_info() function Konstantin Osipov 2019-05-14 23:06 ` [tarantool-patches] [PATCH 2/7] swim: encapsulate 'uint16' payload size inside swim.c Vladislav Shpilevoy 2019-05-15 2:02 ` [tarantool-patches] " Konstantin Osipov 2019-05-14 23:06 ` [tarantool-patches] [PATCH 3/7] swim: do not rebind when new 'port' is 0 Vladislav Shpilevoy 2019-05-15 2:02 ` [tarantool-patches] " Konstantin Osipov 2019-05-14 23:06 ` [tarantool-patches] [PATCH 4/7] swim: set 'left' status in self on swim_quit() Vladislav Shpilevoy 2019-05-15 2:03 ` [tarantool-patches] " Konstantin Osipov 2019-05-14 23:06 ` [tarantool-patches] [PATCH 5/7] msgpack: allow to pass 'struct ibuf *' into encode() Vladislav Shpilevoy 2019-05-15 2:05 ` [tarantool-patches] " Konstantin Osipov 2019-05-14 23:06 ` [tarantool-patches] [PATCH 6/7] msgpack: allow to pass 'const char *' into decode() Vladislav Shpilevoy 2019-05-15 2:05 ` [tarantool-patches] " Konstantin Osipov 2019-05-14 23:06 ` [tarantool-patches] [PATCH 7/7] Drop an unused function and class Vladislav Shpilevoy 2019-05-15 2:06 ` [tarantool-patches] " Konstantin Osipov 2019-05-15 10:02 ` [tarantool-patches] Re: [PATCH 0/7] swim lua preparation, again Vladislav Shpilevoy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=48add4439cbc964c3c591d8b843be03f8de2a254.1557875116.git.v.shpilevoy@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH 1/7] swim: drop swim_info() function' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox