Skip to content

Commit

Permalink
broker/log.c: drop redundant rank setting
Browse files Browse the repository at this point in the history
Problem: logbuf_initialize() calls flux_attr_set_cacheonly()
on the "rank" attribute.  The call to create_dummyattrs()
right after logbuf_initialize() handles this and there is
no reason to have it set early.

Drop this call.
  • Loading branch information
garlick committed Dec 19, 2019
1 parent a17adf7 commit c88fe33
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/broker/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,13 +668,6 @@ static void logbuf_finalize (void *arg)
/* FIXME: need logbuf_unregister_attrs() */
}

static int fake_rank (flux_t *h, uint32_t rank)
{
char buf[16];
snprintf (buf, sizeof (buf), "%u", rank);
return flux_attr_set_cacheonly (h, "rank", buf);
}

int logbuf_initialize (flux_t *h, uint32_t rank, attr_t *attrs)
{
logbuf_t *logbuf = logbuf_create ();
Expand All @@ -684,8 +677,6 @@ int logbuf_initialize (flux_t *h, uint32_t rank, attr_t *attrs)
logbuf->rank = rank;
if (logbuf_register_attrs (logbuf, attrs) < 0)
goto error;
if (fake_rank (h, rank) < 0)
goto error;
if (flux_msg_handler_addvec (h, htab, logbuf, &logbuf->handlers) < 0)
goto error;
flux_log_set_appname (h, "broker");
Expand Down

0 comments on commit c88fe33

Please sign in to comment.