tracker r2097 - in branches/indexer-split: . src/libtracker-db src/tracker-indexer



Author: carlosg
Date: Tue Aug 19 09:13:55 2008
New Revision: 2097
URL: http://svn.gnome.org/viewvc/tracker?rev=2097&view=rev

Log:
2008-08-19  Carlos Garnacho  <carlos imendio com>

        * src/libtracker-db/tracker-db-index.c (indexer_update_word): Print
        error+cause if any insertion to the index fails.
        * src/tracker-indexer/tracker-indexer.c (create_update_item): Remove
        useless message, since there's already a similar one previous to it.


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/libtracker-db/tracker-db-index.c
   branches/indexer-split/src/tracker-indexer/tracker-indexer.c

Modified: branches/indexer-split/src/libtracker-db/tracker-db-index.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-index.c	(original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-index.c	Tue Aug 19 09:13:55 2008
@@ -585,7 +585,7 @@
 				DP_DOVER);
 
 		if (!result) {
-			g_warning ("Could not store word:'%s'", word);
+			g_warning ("Could not store word '%s': %s", word, dperrmsg (dpecode));
 			return FALSE;
 		}
 
@@ -667,24 +667,32 @@
 		 * overwrite the value with the new hits array
 		 */
 		if (old_hit_count < 1) {
-			dpout (index, word, -1);
+			result = dpout (index, word, -1);
 		} else {
-			dpput (index, 
-			       word, -1, 
-			       (char *) previous_hits, 
-			       old_hit_count * sizeof (TrackerDBIndexItem), 
-			       DP_DOVER);
+			result = dpput (index,
+					word, -1,
+					(char *) previous_hits,
+					old_hit_count * sizeof (TrackerDBIndexItem),
+					DP_DOVER);
+		}
+
+		if (!result) {
+			g_warning ("Could not modify word '%s': %s", word, dperrmsg (dpecode));
 		}
 	}
 	
 	/*  Append new occurences */
 	if (pending_hits) {
-		dpput (index, 
-		       word, -1, 
-		       (char*) pending_hits->data, 
-		       pending_hits->len * sizeof (TrackerDBIndexItem), 
-		       DP_DCAT);
+		result = dpput (index,
+				word, -1,
+				(char*) pending_hits->data,
+				pending_hits->len * sizeof (TrackerDBIndexItem),
+				DP_DCAT);
 		g_array_free (pending_hits, TRUE);
+
+		if (!result) {
+			g_warning ("Could not insert pending word '%s': %s", word, dperrmsg (dpecode));
+		}
 	}
 
 	g_free (previous_hits);

Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer.c	(original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer.c	Tue Aug 19 09:13:55 2008
@@ -1112,9 +1112,6 @@
 		gchar *old_text;
 		gchar *new_text;
 
-		/* Update case */
-		g_debug ("Updating file '%s'", info->file->path);
-
 		/* TODO: Take the old metadata -> the new one,
 		 * calculate difference and add the words.
 		 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]