Kouhei Sutou
null+****@clear*****
Tue Oct 8 12:37:57 JST 2013
Kouhei Sutou 2013-10-08 12:37:57 +0900 (Tue, 08 Oct 2013) New Revision: 24e4d9bdb8cb22f6b3c7c90a426c26e935feaab1 https://github.com/groonga/groonga/commit/24e4d9bdb8cb22f6b3c7c90a426c26e935feaab1 Message: Revert "Add missing lock for table creation" This reverts commit 1f1a77402e22a75ca74d488694cd584ac8566dc6. The lock isn't needed because process global IO objects are guarded by lock at grn_io_register() and grn_io_unregister() in io.c. The lock is taken for temporary table that is used for search result. So the lock may cause a performance regression bug. (We should run a benchmark but we don't yet...) Modified files: lib/db.c Modified: lib/db.c (+0 -7) =================================================================== --- lib/db.c 2013-10-08 12:37:14 +0900 (1e57b72) +++ lib/db.c 2013-10-08 12:37:57 +0900 (d373f69) @@ -871,10 +871,6 @@ grn_table_create_with_max_n_subrecs(grn_ctx *ctx, const char *name, } calc_rec_size(flags, max_n_subrecs, range_size, &subrec_size, &subrec_offset, &key_size, &value_size); - { - grn_io *db_io; - db_io = grn_obj_io(db); - if (!grn_io_lock(ctx, db_io, 10000000)) { switch (flags & GRN_OBJ_TABLE_TYPE_MASK) { case GRN_OBJ_TABLE_HASH_KEY : res = (grn_obj *)grn_hash_create(ctx, path, key_size, value_size, flags); @@ -890,9 +886,6 @@ grn_table_create_with_max_n_subrecs(grn_ctx *ctx, const char *name, res = (grn_obj *)grn_array_create(ctx, path, value_size, flags); break; } - grn_io_unlock(db_io); - } - } if (res) { DB_OBJ(res)->header.impl_flags = 0; DB_OBJ(res)->header.domain = domain; -------------- next part -------------- HTML����������������������������...Download