Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug #25

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/fts-backend-xapian-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class XQuerySet
bool item_neg; // for the term
long qsize;
long limit;
bool display;

XQuerySet()
{
Expand All @@ -45,7 +44,6 @@ class XQuerySet
header=NULL;
text=NULL;
global_neg=false;
display=false;
}

XQuerySet(bool is_and, bool is_neg, long l)
Expand All @@ -57,7 +55,6 @@ class XQuerySet
text=NULL;
global_and=is_and;
global_neg=is_neg;
display=true;
}

~XQuerySet()
Expand Down Expand Up @@ -293,7 +290,7 @@ class XQuerySet

char *s = i_strdup(get_string().c_str());

if(display) { i_info("FTS Xapian: Query= %s",s); }
i_debug("FTS Xapian: Query= %s",s);

qp->set_database(*db);

Expand Down Expand Up @@ -452,7 +449,7 @@ static void fts_backend_xapian_oldbox(struct xapian_fts_backend *backend)
}
/* End Performance calculator*/

i_info("FTS Xapian: Done indexing '%s' (%ld msgs in %ld ms, rate: %.1f)",backend->oldbox,backend->perf_nb,dt,r);
i_debug("FTS Xapian: Done indexing '%s' (%ld msgs in %ld ms, rate: %.1f)",backend->oldbox,backend->perf_nb,dt,r);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is adequate, becuase if one need to put dovecot in debug mode, then all the debug messages comes, and fts debug gets lost. ALso performance data is quite usefull not in debug mode.

i_free(backend->oldbox);
backend->oldbox=NULL;
}
Expand Down
6 changes: 3 additions & 3 deletions src/fts-backend-xapian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,12 @@ static int fts_backend_xapian_lookup(struct fts_backend *_backend, struct mailbo

if((flags & FTS_LOOKUP_FLAG_AND_ARGS) != 0)
{
i_info("FTS Xapian: FLAG=AND");
i_debug("FTS Xapian: FLAG=AND");
is_and=true;
}
else
{
i_info("FTS Xapian: FLAG=OR");
i_debug("FTS Xapian: FLAG=OR");
}

XQuerySet * qs = new XQuerySet(is_and,false,backend->partial);
Expand Down Expand Up @@ -482,7 +482,7 @@ static int fts_backend_xapian_lookup(struct fts_backend *_backend, struct mailbo
/* Performance calc */
gettimeofday(&tp, NULL);
dt = tp.tv_sec * 1000 + tp.tv_usec / 1000 - dt;
i_info("FTS Xapian: %ld results in %ld ms",n,dt);
i_debug("FTS Xapian: %ld results in %ld ms",n,dt);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is adequate, becuase if one need to put dovecot in debug mode, then all the debug messages comes, and fts debug gets lost. ALso performance data is quite usefull not in debug mode.


return 0;
}
Expand Down