Mercurial > dovecot > core-2.2
view src/lib-storage/index/index-sort-private.h @ 21604:fb8ef6e2c2fe
lib-storage: Add mail_sort_max_read_count setting.
This controls how many slow mail accesses sorting can perform before it
fails:
a NO [LIMIT] Requested sort would have taken too long
The SORT reply is still returned, but it's likely not correct.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 17 Feb 2017 19:07:53 +0200 |
parents | a90f51ba2e9c |
children |
line wrap: on
line source
#ifndef INDEX_SORT_PRIVATE_H #define INDEX_SORT_PRIVATE_H #include "index-sort.h" struct mail_search_sort_program { struct mailbox_transaction_context *t; enum mail_sort_type sort_program[MAX_SORT_PROGRAM_SIZE]; struct mail *temp_mail; unsigned int slow_mails_left; void (*sort_list_add)(struct mail_search_sort_program *program, struct mail *mail); void (*sort_list_finish)(struct mail_search_sort_program *program); void *context; ARRAY_TYPE(uint32_t) seqs; unsigned int iter_idx; bool failed; }; /* Returns 1 on success, 0 if mail is already expunged, -1 on other errors. */ int index_sort_header_get(struct mail_search_sort_program *program, uint32_t seq, enum mail_sort_type sort_type, string_t *dest); int index_sort_node_cmp_type(struct mail_search_sort_program *program, const enum mail_sort_type *sort_program, uint32_t seq1, uint32_t seq2); void index_sort_list_init_string(struct mail_search_sort_program *program); void index_sort_list_add_string(struct mail_search_sort_program *program, struct mail *mail); void index_sort_list_finish_string(struct mail_search_sort_program *program); #endif