[dovecot/core] fe7a56: lib-storage: Fix error logging after mail_storage_...

GitHub noreply at github.com
Fri Aug 25 16:30:10 EEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: fe7a56906e8bdf6e42cc981b4a62e31bac4a30f4
      https://github.com/dovecot/core/commit/fe7a56906e8bdf6e42cc981b4a62e31bac4a30f4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/lib-storage/mail-storage.c
    M src/lib-storage/test-mail-storage.c

  Log Message:
  -----------
  lib-storage: Fix error logging after mail_storage_set_internal_error()

The function doesn't actually set the last_internal_error and it also
doesn't update last_error_is_internal, so calling
mail_storage_get_last_internal_error() afterwards could be returning an
error for some different older error.

Since there's no parameter to set the internal error string, just reset
last_error_is_internal=FALSE.


  Commit: 0bab015a5a4560a272104130c6581a6c7296f8c2
      https://github.com/dovecot/core/commit/0bab015a5a4560a272104130c6581a6c7296f8c2
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/lib-storage/mail-storage.c

  Log Message:
  -----------
  lib-storage: mailbox_set_index_error() - Set internal error string to index's error


  Commit: 041f22a112458c3e868a450fe405ff056929efc6
      https://github.com/dovecot/core/commit/041f22a112458c3e868a450fe405ff056929efc6
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/lib-storage/mail-storage.c

  Log Message:
  -----------
  lib-storage: mail_set_mail_cache_corrupted() - set also internal error string


  Commit: 5f9ee4f6e043d184cd9891ef64a3cbd9eecce6f2
      https://github.com/dovecot/core/commit/5f9ee4f6e043d184cd9891ef64a3cbd9eecce6f2
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/lib-storage/index/index-mail.c

  Log Message:
  -----------
  lib-storage: index_mail_set_cache_corrupted() - Don't reset internal error string

It's already set correctly by the earlier functions.


  Commit: 34902486e270728379fd147ca9d7b8d366fcd0e6
      https://github.com/dovecot/core/commit/34902486e270728379fd147ca9d7b8d366fcd0e6
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/lib-storage/mail-storage-private.h
    M src/lib-storage/mail-storage.c

  Log Message:
  -----------
  lib-storage: Add mail_storage_set_index_error()


  Commit: 18122b1fb9aa58945ed12d7020e91fbf4f04a0cc
      https://github.com/dovecot/core/commit/18122b1fb9aa58945ed12d7020e91fbf4f04a0cc
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/lib-storage/index/dbox-multi/mdbox-map.c
    M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c

  Log Message:
  -----------
  mdbox: Use mail_storage_set_index_error() instead of poorly duplicating it


  Commit: 68f7668b9315dd6c9e3d61c04d6da08e1ac3624f
      https://github.com/dovecot/core/commit/68f7668b9315dd6c9e3d61c04d6da08e1ac3624f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/director/doveadm-connection.c

  Log Message:
  -----------
  director: Cleanup - Move all doveadm commands into an array.


  Commit: 6f5310d61cb7235ae5b3f42a3cd27605ace770c4
      https://github.com/dovecot/core/commit/6f5310d61cb7235ae5b3f42a3cd27605ace770c4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/director/doveadm-connection.c

  Log Message:
  -----------
  director: Cleanup - Doveadm commands now return enum doveadm_director_cmd_ret


  Commit: 6ecc5475f7efd4dcdf4ce727191693de24c5cf51
      https://github.com/dovecot/core/commit/6ecc5475f7efd4dcdf4ce727191693de24c5cf51
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/director/doveadm-connection.c
    M src/director/doveadm-connection.h
    M src/director/main.c

  Log Message:
  -----------
  director: doveadm HOST-* commands now wait for ring sync before returning OK

This should make it easier for tests and maybe for scripts in general, so
they won't think the command failed when it just takes a while to finish.


  Commit: 02e78eb1e4fbe13d0bd815d3d3fc7200f88a1fc4
      https://github.com/dovecot/core/commit/02e78eb1e4fbe13d0bd815d3d3fc7200f88a1fc4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-08-25 (Fri, 25 Aug 2017)

  Changed paths:
    M src/director/doveadm-connection.c

  Log Message:
  -----------
  director: Run director/host changing doveadm commands only after ring is synced

If the ring sync is still pending, the doveadm command may become reverted.
This doesn't fully prevent problems caused by sending doveadm commands
simultaneously to multiple directors, but it should prevent issues when
only a single director is used for doveadm commands.

It would have been nice to enable this also for HOST/DIRECTOR-LIST commands,
but they don't support returning a ring timeout error without changing the
protocol. It's a bit too much effort to change that for now.


Compare: https://github.com/dovecot/core/compare/4078733e58f1...02e78eb1e4fb


More information about the dovecot-cvs mailing list