From e3a42a6c2dd9f5c4f98b72b36a27cf14b88a3bfb Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 30 Apr 2021 10:55:53 +0200 Subject: [PATCH] MINOR: map: show the current and next pattern version in "show map" 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map.c b/src/map.c index 490f8bb69..21dc545d9 100644 --- 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