Skip to content

Commit

Permalink
Merge pull request #5887 from grondo/issue#5885
Browse files Browse the repository at this point in the history
librlist: sort rlist before generating R
  • Loading branch information
mergify[bot] committed Apr 16, 2024
2 parents ad01b85 + c1a19fc commit f3efc58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/librlist/rlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,6 +1709,10 @@ json_t *rlist_to_R (struct rlist *rl)
if (!rl)
return NULL;

/* Reset default sort to order nodes by "rank" */
zlistx_set_comparator (rl->nodes, by_rank);
zlistx_sort (rl->nodes);

if (!(R_lite = rlist_compressed (rl)))
goto fail;

Expand Down

0 comments on commit f3efc58

Please sign in to comment.