[dovecot/core] f83fd8: lib: Add FILE_LOCK_SLOW_WARNING_MSECS environment.

GitHub noreply at github.com
Mon Oct 24 11:30:12 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: f83fd83f9c6708d198748e714aa947cad9362c02
      https://github.com/dovecot/core/commit/f83fd83f9c6708d198748e714aa947cad9362c02
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib/file-dotlock.c
    M src/lib/file-lock.c
    M src/lib/file-lock.h

  Log Message:
  -----------
  lib: Add FILE_LOCK_SLOW_WARNING_MSECS environment.

Log a warning if any locking takes longer than the specified number of
milliseconds. This can be enabled globally with:

import_environment = $import_environment FILE_LOCK_SLOW_WARNING_MSECS=1000


  Commit: d327ea02dc39399e8b231d0c833ed94c3be20bce
      https://github.com/dovecot/core/commit/d327ea02dc39399e8b231d0c833ed94c3be20bce
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib/ioloop.c
    M src/lib/ioloop.h

  Log Message:
  -----------
  lib: Added ioloop_global_wait_usecs

This is helpful when multiple ioloops aren't used and
io_loop_get_wait_usecs() can't be easily used for all of them.


  Commit: e55b5cf82e6d109c658e0b5049cae1ba8edd3b91
      https://github.com/dovecot/core/commit/e55b5cf82e6d109c658e0b5049cae1ba8edd3b91
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib-dict/dict-client.c

  Log Message:
  -----------
  dict-client: Fix logging how much time was spent in other ioloops in slow lookup warnings.

The warning's idea is to show why the lookup could have been slow. We
differentiate between time spent in dict_wait() waiting only for the
dict result and time spent in other ioloops waiting for potentially other
things as well (and time spent waiting for locks during this time).

The previous code didn't work right when multiple ioloops were used, which
happened sometimes.

Also changed %u to %d just in case some calculation is wrong. It's nicer to
get a slightly negative value rather than a huge positive one.


  Commit: 86ab71bf134573e45dd9ab6bde9d55da4c44fc48
      https://github.com/dovecot/core/commit/86ab71bf134573e45dd9ab6bde9d55da4c44fc48
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib-http/http-client-connection.c
    M src/lib-http/http-client-private.h
    M src/lib-http/http-client-request.c

  Log Message:
  -----------
  lib-http: Add ioloop and lock wait information to timeout messages.

It'll now log for example:
9007 Request timed out (Request sent 7.087 secs ago, 0.076 in other ioloops, 7.012 in locks, connected 7.087 secs ago)

Which points out that the problem wasn't really with the HTTP, but with
locking. This likely should be fixed in some way also in lib-http so that
it gives a bit of extra time for reading the request, but that's a separate
fix.


Compare: https://github.com/dovecot/core/compare/1c783b6d9cbd...86ab71bf1345


More information about the dovecot-cvs mailing list