From fa4aa3ee94aa12db6a26e515bff536a798590228 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Tue, 16 Jun 2009 21:13:09 +0000 Subject: [PATCH] Partially revert 1.32; pcache must allow other callbacks to see its results --- servers/slapd/overlays/pcache.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index d91b6f327c..80a5d74028 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -2399,8 +2399,6 @@ pcache_op_search( op->o_tmpfree( tempstr.bv_val, op->o_tmpmemctx ); if (answerable) { - /* Need to clear the callbacks of the original operation, - * in case there are other overlays */ BackendDB *save_bd = op->o_bd; slap_callback *save_cb = op->o_callback; @@ -2413,7 +2411,12 @@ pcache_op_search( send_ldap_result( op, rs ); } else { op->o_bd = &cm->db; - op->o_callback = NULL; + if ( cm->response_cb == PCACHE_RESPONSE_CB_TAIL ) { + /* The cached entry was already processed by any + * other overlays, so don't let it get processed again. + */ + op->o_callback = NULL; + } i = cm->db.bd_info->bi_op_search( op, rs ); } ldap_pvt_thread_rdwr_runlock(&answerable->rwlock); -- 2.39.5