You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

  1. From c177ea7187bc1918a1900c1b0e3fc67c559987a2 Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Wed, 25 Jun 2014 15:36:04 +0200
  4. Subject: [PATCH 3/6] BUG/MINOR: counters: do not untrack counters before
  5. logging
  6. Baptiste Assmann reported a corner case in the releasing of stick-counters:
  7. we release content-aware counters before logging. In the past it was not a
  8. problem, but since now we can log them it, it prevents one from logging
  9. their value. Simply switching the log production and the release of the
  10. counter fixes the issue.
  11. This should be backported into 1.5.
  12. (cherry picked from commit d713bcc326da5d1ac80adab666d7710f3e37650c)
  13. ---
  14. src/proto_http.c | 3 ++-
  15. 1 file changed, 2 insertions(+), 1 deletion(-)
  16. diff --git a/src/proto_http.c b/src/proto_http.c
  17. index 5321f7d..d566bcc 100644
  18. --- a/src/proto_http.c
  19. +++ b/src/proto_http.c
  20. @@ -4808,7 +4808,6 @@ void http_end_txn_clean_session(struct session *s)
  21. s->logs.t_close = tv_ms_elapsed(&s->logs.tv_accept, &now);
  22. session_process_counters(s);
  23. - session_stop_content_counters(s);
  24. if (s->txn.status) {
  25. int n;
  26. @@ -4842,6 +4841,8 @@ void http_end_txn_clean_session(struct session *s)
  27. s->do_log(s);
  28. }
  29. + /* stop tracking content-based counters */
  30. + session_stop_content_counters(s);
  31. session_update_time_stats(s);
  32. s->logs.accept_date = date; /* user-visible date for logging */
  33. --
  34. 1.8.5.5