MINOR: map: show the current and next pattern version in "show map"
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Apr 2021 08:55:53 +0000 (10:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Apr 2021 13:36:31 +0000 (15:36 +0200)
The "show map" command wasn't updated when pattern generations were
added for atomic reloads, let's report them in the "show map" command
that lists all known maps. It will be useful for users.

src/map.c

index 490f8bb..21dc545 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -437,9 +437,9 @@ static int cli_io_handler_pats_list(struct appctx *appctx)
                        /* Build messages. If the reference is used by another category than
                         * the listed categories, display the information in the message.
                         */
-                       chunk_appendf(&trash, "%d (%s) %s\n", appctx->ctx.map.ref->unique_id,
+                       chunk_appendf(&trash, "%d (%s) %s. curr_ver=%u next_ver=%u\n", appctx->ctx.map.ref->unique_id,
                                      appctx->ctx.map.ref->reference ? appctx->ctx.map.ref->reference : "",
-                                     appctx->ctx.map.ref->display);
+                                     appctx->ctx.map.ref->display, appctx->ctx.map.ref->curr_gen, appctx->ctx.map.ref->next_gen);
 
                        if (ci_putchk(si_ic(si), &trash) == -1) {
                                /* let's try again later from this stream. We add ourselves into