Kouhei Sutou
null+****@clear*****
Mon Dec 7 12:38:18 JST 2015
Kouhei Sutou 2015-12-07 12:38:18 +0900 (Mon, 07 Dec 2015) New Revision: 64a499d849fc98f6e2f40419e04a7466b168ba32 https://github.com/groonga/groonga/commit/64a499d849fc98f6e2f40419e04a7466b168ba32 Message: ii: use CRIT() to reduce the same error GRN_LOG() always show message bug ERR() doesn't show continuous the same message. Modified files: lib/ii.c Modified: lib/ii.c (+14 -1) =================================================================== --- lib/ii.c 2015-12-07 12:32:36 +0900 (90bcd6d) +++ lib/ii.c 2015-12-07 12:38:18 +0900 (5e5efdc) @@ -2429,8 +2429,21 @@ typedef struct { }\ }\ } else {\ - GRN_LOG(ctx, GRN_LOG_CRIT, "invalid chunk(%d,%d)", bt->tid, cid.rid);\ + const char *name;\ + char name_buffer[GRN_TABLE_MAX_KEY_SIZE];\ + int name_size;\ rc = GRN_FILE_CORRUPT;\ + if (DB_OBJ(ii)->id == GRN_ID_NIL) {\ + name = "(temporary)";\ + name_size = strlen(name);\ + } else {\ + name_size = grn_obj_name(ctx, (grn_obj *)ii,\ + name_buffer, GRN_TABLE_MAX_KEY_SIZE);\ + name = name_buffer;\ + }\ + CRIT(rc,\ + "[ii][broken] invalid posting in chunk: %.*s: (%d,%d)",\ + name_size, name, bt->tid, cid.rid);\ break;\ }\ }\ -------------- next part -------------- HTML����������������������������...Télécharger