dovecot-2.2: fts-lucene: When deleting corrupted lucene-indexes/...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 21 12:50:23 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/58eaff87a81b
changeset: 17741:58eaff87a81b
user: Timo Sirainen <tss at iki.fi>
date: Thu Aug 21 14:49:34 2014 +0200
description:
fts-lucene: When deleting corrupted lucene-indexes/ directory, don't rmdir it.
This at least avoids errors with NFS when some of the files are still open
inside it by other processes.
diffstat:
src/plugins/fts-lucene/lucene-wrapper.cc | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r 9cdf42df4c4b -r 58eaff87a81b src/plugins/fts-lucene/lucene-wrapper.cc
--- a/src/plugins/fts-lucene/lucene-wrapper.cc Thu Aug 21 14:48:41 2014 +0200
+++ b/src/plugins/fts-lucene/lucene-wrapper.cc Thu Aug 21 14:49:34 2014 +0200
@@ -268,8 +268,7 @@
err.number() == CL_ERR_IO)) {
/* delete corrupted index. most IO errors are also about
missing files and other such corruption.. */
- if (unlink_directory(index->path,
- UNLINK_DIRECTORY_FLAG_RMDIR) < 0 &&
+ if (unlink_directory(index->path, 0) < 0 &&
errno != ENOENT)
i_error("unlink_directory(%s) failed: %m", index->path);
rescan_clear_unseen_mailboxes(index, NULL);
@@ -415,7 +414,7 @@
return ret;
/* settings changed, rebuild index */
- if (unlink_directory(index->path, UNLINK_DIRECTORY_FLAG_RMDIR) < 0) {
+ if (unlink_directory(index->path, 0) < 0) {
i_error("unlink_directory(%s) failed: %m", index->path);
ret = -1;
} else {
More information about the dovecot-cvs
mailing list