浏览代码

Ticket 47732 - ds logs many "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin returned error" messages

Bug Description:  there are many error messages relate to postop delete plugins
			whichare not justified

Fix Description:   the usn plugin always returns an error when an attempt is made
			to delete a non-existing entry, checking the ldap code in
			the pblock.
			But the plugin executes correctly and the error is aleady set
			so return succes

https://fedorahosted.org/389/ticket/47732

Reviewed by: richm, thanks
Ludwig Krispenz 11 年之前
父节点
当前提交
71a120d4ec
共有 2 个文件被更改,包括 8 次插入6 次删除
  1. 6 4
      ldap/servers/plugins/usn/usn.c
  2. 2 2
      ldap/servers/slapd/back-ldbm/ldbm_delete.c

+ 6 - 4
ldap/servers/plugins/usn/usn.c

@@ -520,8 +520,8 @@ usn_bepostop (Slapi_PBlock *pb)
     /* if op is not successful, don't increment the counter */
     slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
     if (LDAP_SUCCESS != rc) {
-        slapi_pblock_set(pb, SLAPI_RESULT_CODE, &rc);
-        rc = SLAPI_PLUGIN_FAILURE;
+	/* no plugin failure */
+        rc = SLAPI_PLUGIN_SUCCESS;
         goto bail;
     }
 
@@ -557,7 +557,8 @@ usn_bepostop_modify (Slapi_PBlock *pb)
     /* if op is not successful, don't increment the counter */
     slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
     if (LDAP_SUCCESS != rc) {
-        rc = SLAPI_PLUGIN_FAILURE;
+	/* no plugin failure */
+        rc = SLAPI_PLUGIN_SUCCESS;
         goto bail;
     }
 
@@ -606,7 +607,8 @@ usn_bepostop_delete (Slapi_PBlock *pb)
     /* if op is not successful, don't increment the counter */
     slapi_pblock_get(pb, SLAPI_RESULT_CODE, &rc);
     if (LDAP_SUCCESS != rc) {
-        rc = SLAPI_PLUGIN_FAILURE;
+	/* no plugin failure */
+        rc = SLAPI_PLUGIN_SUCCESS;
         goto bail;
     }
 

+ 2 - 2
ldap/servers/slapd/back-ldbm/ldbm_delete.c

@@ -1089,7 +1089,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
 
 	/* call the transaction post delete plugins just before the commit */
 	if (plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
-		LDAPDebug0Args( LDAP_DEBUG_ANY, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
+		LDAPDebug0Args( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
 						"returned error code\n" );
 		if (!ldap_result_code) {
 			slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
@@ -1198,7 +1198,7 @@ error_return:
 
 		/* call the transaction post delete plugins just before the abort */
 		if (plugin_call_plugins(pb, SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN)) {
-			LDAPDebug1Arg( LDAP_DEBUG_ANY, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
+			LDAPDebug1Arg( LDAP_DEBUG_TRACE, "SLAPI_PLUGIN_BE_TXN_POST_DELETE_FN plugin "
 						   "returned error code %d\n", retval );
 			if (!ldap_result_code) {
 				slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);