[Groonga-commit] groonga/groonga at 762f428 [master] Remove needless touch on removing temporary tables and columns

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 7 17:11:52 JST 2018


Kouhei Sutou	2018-03-07 17:11:52 +0900 (Wed, 07 Mar 2018)

  New Revision: 762f42884c7ebb823a85d5ec454059e416d1271e
  https://github.com/groonga/groonga/commit/762f42884c7ebb823a85d5ec454059e416d1271e

  Message:
    Remove needless touch on removing temporary tables and columns

  Modified files:
    lib/db.c

  Modified: lib/db.c (+23 -9)
===================================================================
--- lib/db.c    2018-03-07 16:45:48 +0900 (092f5787d)
+++ lib/db.c    2018-03-07 17:11:52 +0900 (950a37021)
@@ -9665,7 +9665,9 @@ _grn_obj_remove_pat(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     if (rc != GRN_SUCCESS) { return rc; }
   }
 
-  grn_obj_touch(ctx, db, NULL);
+  if (!(id & GRN_OBJ_TMP_OBJECT)) {
+    grn_obj_touch(ctx, db, NULL);
+  }
 
   return rc;
 }
@@ -9707,7 +9709,9 @@ _grn_obj_remove_dat(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     if (rc != GRN_SUCCESS) { return rc; }
   }
 
-  grn_obj_touch(ctx, db, NULL);
+  if (!(id & GRN_OBJ_TMP_OBJECT)) {
+    grn_obj_touch(ctx, db, NULL);
+  }
 
   return rc;
 }
@@ -9749,7 +9753,9 @@ _grn_obj_remove_hash(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     if (rc != GRN_SUCCESS) { return rc; }
   }
 
-  grn_obj_touch(ctx, db, NULL);
+  if (!(id & GRN_OBJ_TMP_OBJECT)) {
+    grn_obj_touch(ctx, db, NULL);
+  }
 
   return rc;
 }
@@ -9789,7 +9795,9 @@ _grn_obj_remove_array(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     if (rc != GRN_SUCCESS) { return rc; }
   }
 
-  grn_obj_touch(ctx, db, NULL);
+  if (!(id & GRN_OBJ_TMP_OBJECT)) {
+    grn_obj_touch(ctx, db, NULL);
+  }
 
   return rc;
 }
@@ -9817,7 +9825,9 @@ _grn_obj_remove_ja(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     if (rc != GRN_SUCCESS) { return rc; }
   }
 
-  grn_obj_touch(ctx, db, NULL);
+  if (!(id & GRN_OBJ_TMP_OBJECT)) {
+    grn_obj_touch(ctx, db, NULL);
+  }
 
   return rc;
 }
@@ -9844,7 +9854,10 @@ _grn_obj_remove_ra(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     rc = grn_obj_delete_by_id(ctx, db, id, GRN_TRUE);
     if (rc != GRN_SUCCESS) { return rc; }
   }
-  grn_obj_touch(ctx, db, NULL);
+
+  if (!(id & GRN_OBJ_TMP_OBJECT)) {
+    grn_obj_touch(ctx, db, NULL);
+  }
 
   return rc;
 }
@@ -9871,7 +9884,9 @@ _grn_obj_remove_index(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     if (rc != GRN_SUCCESS) { return rc; }
   }
 
-  grn_obj_touch(ctx, db, NULL);
+  if (!(id & GRN_OBJ_TMP_OBJECT)) {
+    grn_obj_touch(ctx, db, NULL);
+  }
 
   return rc;
 }
@@ -9898,10 +9913,9 @@ _grn_obj_remove_db_obj(grn_ctx *ctx, grn_obj *obj, grn_obj *db, grn_id id,
     if (rc != GRN_SUCCESS) { return rc; }
     rc = grn_obj_delete_by_id(ctx, db, id, GRN_TRUE);
     if (rc != GRN_SUCCESS) { return rc; }
+    grn_obj_touch(ctx, db, NULL);
   }
 
-  grn_obj_touch(ctx, db, NULL);
-
   return rc;
 }
 
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180307/5ce2c633/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index