]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: snapshot: restart on the event ID and not the stream ID
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Sep 2018 09:51:51 +0000 (11:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Sep 2018 13:00:43 +0000 (15:00 +0200)
The snapshots have the ability to restart a partial dump and they use
the stream ID as the restart point. Since it's purely HTTP, let's use
the event ID instead.

include/types/applet.h
src/proto_http.c

index d4172bd3333fd170dca7192f0b2ed2ee707c5477..38908600aa390c931aa15586ea64e4f8f90007ab 100644 (file)
@@ -132,7 +132,7 @@ struct appctx {
                        int iid;                /* if >= 0, ID of the proxy to filter on */
                        struct proxy *px;       /* current proxy being dumped, NULL = not started yet. */
                        unsigned int flag;      /* bit0: buffer being dumped, 0 = req, 1 = resp ; bit1=skip req ; bit2=skip resp. */
-                       unsigned int sid;       /* session ID of error being dumped */
+                       unsigned int ev_id;     /* event ID of error being dumped */
                        int ptr;                /* <0: headers, >=0 : text pointer to restart from */
                        int bol;                /* pointer to beginning of current line */
                } errors;
index cf759fbdd595dbe76af044034df7e4c176b53e7a..b6d429ba16e5d1816440e30af7c3dfaf83a0a5b3 100644 (file)
@@ -12784,10 +12784,10 @@ static int cli_io_handler_show_errors(struct appctx *appctx)
                                return 0;
                        }
                        appctx->ctx.errors.ptr = 0;
-                       appctx->ctx.errors.sid = es->sid;
+                       appctx->ctx.errors.ev_id = es->ev_id;
                }
 
-               if (appctx->ctx.errors.sid != es->sid) {
+               if (appctx->ctx.errors.ev_id != es->ev_id) {
                        /* the snapshot changed while we were dumping it */
                        chunk_appendf(&trash,
                                     "  WARNING! update detected on this snapshot, dump interrupted. Please re-check!\n");