Kouhei Sutou
null+****@clear*****
Wed Apr 15 21:55:47 JST 2015
Kouhei Sutou 2015-04-15 21:55:47 +0900 (Wed, 15 Apr 2015) New Revision: f39b9d985e59419951416552086e89bca692e5a3 https://github.com/groonga/groonga/commit/f39b9d985e59419951416552086e89bca692e5a3 Message: Remove GRN_JA_SKIP_SAME_VALUE_PUT check Now ,the feature is always enabled. Modified files: lib/ctx.c lib/grn_store.h lib/store.c Modified: lib/ctx.c (+0 -15) =================================================================== --- lib/ctx.c 2015-04-15 21:54:00 +0900 (9c09a3e) +++ lib/ctx.c 2015-04-15 21:55:47 +0900 (992faa0) @@ -807,20 +807,6 @@ check_overcommit_memory(grn_ctx *ctx) fclose(file); } -static void -check_grn_ja_skip_same_value_put(grn_ctx *ctx) -{ - char grn_ja_skip_same_value_put_env[GRN_ENV_BUFFER_SIZE]; - - grn_getenv("GRN_JA_SKIP_SAME_VALUE_PUT", - grn_ja_skip_same_value_put_env, - GRN_ENV_BUFFER_SIZE); - if (grn_ja_skip_same_value_put_env[0] && - strcmp(grn_ja_skip_same_value_put_env, "no") == 0) { - grn_ja_skip_same_value_put = GRN_FALSE; - } -} - grn_rc grn_init(void) { @@ -935,7 +921,6 @@ grn_init(void) } GRN_LOG(ctx, GRN_LOG_NOTICE, "grn_init"); check_overcommit_memory(ctx); - check_grn_ja_skip_same_value_put(ctx); return rc; } Modified: lib/grn_store.h (+0 -2) =================================================================== --- lib/grn_store.h 2015-04-15 21:54:00 +0900 (742d113) +++ lib/grn_store.h 2015-04-15 21:55:47 +0900 (9e1223e) @@ -71,8 +71,6 @@ void *grn_ra_ref_cache(grn_ctx *ctx, grn_ra *ra, grn_id id, grn_ra_cache *cache) /**** variable sized elements ****/ -extern grn_bool grn_ja_skip_same_value_put; - typedef struct _grn_ja grn_ja; struct _grn_ja { Modified: lib/store.c (+1 -4) =================================================================== --- lib/store.c 2015-04-15 21:54:00 +0900 (527d7ce) +++ lib/store.c 2015-04-15 21:55:47 +0900 (027f86b) @@ -338,8 +338,6 @@ struct grn_ja_header { #define SEGMENTS_GINFO_ON(ja,seg,width) (SEGMENTS_AT(ja,seg) = SEG_GINFO|(width)) #define SEGMENTS_OFF(ja,seg) (SEGMENTS_AT(ja,seg) = 0) -grn_bool grn_ja_skip_same_value_put = GRN_TRUE; - static grn_ja * _grn_ja_create(grn_ctx *ctx, grn_ja *ja, const char *path, unsigned int max_element_size, uint32_t flags) @@ -901,8 +899,7 @@ grn_ja_put_raw(grn_ctx *ctx, grn_ja *ja, grn_id id, grn_io_win iw; grn_ja_einfo einfo; - if (grn_ja_skip_same_value_put && - (flags & GRN_OBJ_SET_MASK) == GRN_OBJ_SET && + if ((flags & GRN_OBJ_SET_MASK) == GRN_OBJ_SET && value_len > 0) { grn_io_win jw; uint32_t old_len; -------------- next part -------------- HTML����������������������������...Download