Skip to content

Commit

Permalink
sqliterepo: make election debug messages clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
fvennetier committed Nov 5, 2021
1 parent b2e92bf commit 89be978
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sqliterepo/election.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ struct election_member_s
GCond *cond;

/* Since when do we loop between pending states. That value is used by
* client threads to decide wether to wait (or not) for a final state. */
* client threads to decide whether to wait (or not) for a final state. */
gint64 when_unstable;

/* last time the status was changed */
Expand Down Expand Up @@ -933,11 +933,13 @@ static void
member_descr(const struct election_member_s *m, gchar *d, gsize ds)
{
g_snprintf(d, ds,
"%d/%s "
"%"G_GINT32_FORMAT"/%"G_GINT32_FORMAT"/%s %u %u/%u/%u/%u [%s] [%s.%s]",
m->step, _step2str(m->step),
m->local_id, m->master_id,
(m->master_url ? m->master_url : "-"),
"%s local_id=%"G_GINT32_FORMAT
" master_id=%"G_GINT32_FORMAT" (%s) "
"refcount=%u pipefrom=%u "
"getvers_pending=%u getvers_error=%u getvers_concurrent=%u "
"zk_node=%s [%s.%s]",
_step2str(m->step), m->local_id,
m->master_id, (m->master_url ? m->master_url : "-"),
m->refcount, m->pending_PIPEFROM,
m->pending_GETVERS, m->errors_GETVERS, m->concurrent_GETVERS,
m->key, m->inline_name.base, m->inline_name.type);
Expand Down

0 comments on commit 89be978

Please sign in to comment.