[Rt-commit] rt branch, 4.0/fulltext-indexer-errors, created. rt-4.0.12-17-g47d3ba0

Ruslan Zakirov ruz at bestpractical.com
Thu May 16 10:07:17 EDT 2013


The branch, 4.0/fulltext-indexer-errors has been created
        at  47d3ba0aca137ffdfdfdfac5f118b584177f24b8 (commit)

- Log -----------------------------------------------------------------
commit 47d3ba0aca137ffdfdfdfac5f118b584177f24b8
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu May 16 18:04:17 2013 +0400

    codes can mean other errors
    
    We switched from matching errstr to codes, but codes are shared
    between a few errors, so our guess about problem can be wrong.
    
    Assume that in most cases guess is correct, but still publish
    DB's error message.

diff --git a/sbin/rt-fulltext-indexer.in b/sbin/rt-fulltext-indexer.in
index 9ad6d26..ca1d584 100644
--- a/sbin/rt-fulltext-indexer.in
+++ b/sbin/rt-fulltext-indexer.in
@@ -375,9 +375,9 @@ sub process_pg {
     my $status = eval { $dbh->do( $query, undef, $$text, $attachment->id ) };
     unless ( $status ) {
         if ( $dbh->err == 7  && $dbh->state eq '54000' ) {
-            warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains too many unique words";
+            warn "Attachment @{[$attachment->id]} cannot be indexed. Most probably it contains too many unique words. Error: ". $dbh->errstr;
         } elsif ( $dbh->err == 7 && $dbh->state eq '22021' ) {
-            warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains invalid UTF8 bytes";
+            warn "Attachment @{[$attachment->id]} cannot be indexed. Most probably it contains invalid UTF8 bytes. Error: ". $dbh->errstr;
         } else {
             die "error: ". $dbh->errstr;
         }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list