dovecot-2.2: fts: If Tika returns 500, retry it a couple of time...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 7 08:32:03 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/35d3777cc4d2
changeset: 18920:35d3777cc4d2
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 07 11:31:29 2015 +0300
description:
fts: If Tika returns 500, retry it a couple of times and then fallback to ignoring the problem.
diffstat:
src/plugins/fts/fts-parser-tika.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diffs (25 lines):
diff -r 98158ef015f7 -r 35d3777cc4d2 src/plugins/fts/fts-parser-tika.c
--- a/src/plugins/fts/fts-parser-tika.c Thu Aug 06 22:36:20 2015 +0300
+++ b/src/plugins/fts/fts-parser-tika.c Fri Aug 07 11:31:29 2015 +0300
@@ -103,6 +103,21 @@
}
parser->payload = i_stream_create_from_data("", 0);
break;
+ case 500:
+ /* Server Error - the problem could be anything (in Tika or
+ HTTP server or proxy) and might be retriable, but Tika has
+ trouble processing some documents and throws up this error
+ every time for those documents. So we try retrying this a
+ couple of times, but if that doesn't work we'll just ignore
+ it. */
+ if (http_client_request_try_retry(parser->http_req))
+ return;
+ i_info("fts_tika: PUT %s failed: %u %s - ignoring",
+ mail_user_plugin_getenv(parser->user, "fts_tika"),
+ response->status, response->reason);
+ parser->payload = i_stream_create_from_data("", 0);
+ break;
+
default:
i_error("fts_tika: PUT %s failed: %u %s",
mail_user_plugin_getenv(parser->user, "fts_tika"),
More information about the dovecot-cvs
mailing list