[dovecot/core] 402f9b: lib-sql: Add API support for asynchronously iterat...

GitHub noreply at github.com
Tue Jul 18 12:00:10 EEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 402f9bcf48cbccc17fdb5f3ea411a7967aed0fd0
      https://github.com/dovecot/core/commit/402f9bcf48cbccc17fdb5f3ea411a7967aed0fd0
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M src/lib-sql/driver-cassandra.c
    M src/lib-sql/driver-mysql.c
    M src/lib-sql/driver-pgsql.c
    M src/lib-sql/driver-sqlite.c
    M src/lib-sql/driver-test.c
    M src/lib-sql/sql-api-private.h
    M src/lib-sql/sql-api.c
    M src/lib-sql/sql-api.h

  Log Message:
  -----------
  lib-sql: Add API support for asynchronously iterating over rows.

sql_query() can already do an async lookup, but the full result needs
to be available immediately. This can be inefficient for large results.
Add a new SQL_RESULT_NEXT_MORE return value and sql_result_more() for
asynchronously requesting more results.

This changes the API a bit, but isn't done by default by any drivers yet.
Also callers that can't handle this are hopefully checking for "ret < 0",
which allows them to handle such an async-more request as an error
instead.

sql_result_next_row() will be changed to return enum in a separate commit to
keep backwards compatibility in v2.2.x.


  Commit: 55bfcb67afb940235a0015b7de3637d62935a31d
      https://github.com/dovecot/core/commit/55bfcb67afb940235a0015b7de3637d62935a31d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

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

  Log Message:
  -----------
  dict-sql: Add support for sql_result_more()


  Commit: a5f2707224b10f26e3d478a2b11e8d01f1b8f609
      https://github.com/dovecot/core/commit/a5f2707224b10f26e3d478a2b11e8d01f1b8f609
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M src/lib-sql/driver-cassandra.c

  Log Message:
  -----------
  cassandra: Add wrapper functions in preparation for following commits

No functional changes. Shrinks the following commits.


  Commit: dd3d20d9b5821077164183a260af9bde0db3ff3f
      https://github.com/dovecot/core/commit/dd3d20d9b5821077164183a260af9bde0db3ff3f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M src/lib-sql/driver-cassandra.c

  Log Message:
  -----------
  cassandra: Add page_size setting to enable paged results for queries


  Commit: caf029d36a826106e48b8682f15ea0fc01fdd8f4
      https://github.com/dovecot/core/commit/caf029d36a826106e48b8682f15ea0fc01fdd8f4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2017-07-17 (Mon, 17 Jul 2017)

  Changed paths:
    M src/lib-sql/driver-cassandra.c

  Log Message:
  -----------
  cassandra: Improve logging for multipage queries

warn_timeout is applied to both individual page requests as well as the sum
of all the page requests.


Compare: https://github.com/dovecot/core/compare/7b19478fa346...caf029d36a82


More information about the dovecot-cvs mailing list