Bug 176293 - repl_chain_on_update() logs a message for every modify operation
repl_chain_on_update() logs a message for every modify operation
Status: CLOSED CURRENTRELEASE
Product: Red Hat Directory Server
Classification: Red Hat
Component: Replication - General (Show other bugs)
7.2
All Linux
medium Severity medium
: DS8.0
: ---
Assigned To: Noriko Hosoi
Viktor Ashirov
:
Depends On:
Blocks: 152373 240316
  Show dependency treegraph
 
Reported: 2005-12-20 18:03 EST by Noriko Hosoi
Modified: 2016-05-06 10:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-06 10:31:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cvs diff replutil.c (4.43 KB, patch)
2006-01-16 13:26 EST, Noriko Hosoi
no flags Details | Diff
cvs commit message (670 bytes, text/plain)
2006-01-16 14:02 EST, Noriko Hosoi
no flags Details

  None (edit)
Description Noriko Hosoi 2005-12-20 18:03:08 EST
Description of problem:
Report from Ulf:
[19/Dec/2005:13:32:20 -0800] - Connection is NULL and hence cannot access
SLAPI_CONN_ID

Really it's any internal operation that causes the message because they don't
have a connection.  It happens for every modify now because op_shared_modify()
does a getentry() on the target entry to check if it has local pwp attributes.

The connection ID isn't actually used in repl_chain_on_update(), it was part of
some debug logging but that's all commented out.

Index: replutil.c
===================================================================
RCS file:
/repository/source/ldap2/ldapserver/ldap/servers/plugins/replication/replutil.c,v
retrieving revision 1.1.1.1
diff -U8 -r1.1.1.1 replutil.c
--- replutil.c  2005/07/08 23:25:37     1.1.1.1
+++ replutil.c  2005/12/19 21:35:51
@@ -824,17 +824,23 @@
       int repl_op = 0;
       int local_backend = -1; /* index of local backend */
       int chaining_backend = -1; /* index of chain backend */
       PRBool local_online = PR_FALSE; /* true if the local db is online */
       PRBool chain_online = PR_FALSE; /* true if the chain db is online */
       int ii;
       int opid, connid;

-       slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
+       slapi_pblock_get(pb, SLAPI_OPERATION, &op);
+
+       if (operation_is_flag_set(op, OP_FLAG_INTERNAL)) {
+               connid=-1;  /* Is there a better way to numerically indicate an
internal op in a log msg? */
+       } else {
+               slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
+       }
       slapi_pblock_get(pb, SLAPI_OPERATION_ID, &opid);
       /* first, we have to decide which backend is the local backend
        * and which is the chaining one
        * also find out if any are not online (e.g. during import)
        */
       for (ii = 0; ii < be_count; ++ii)
       {
               Slapi_Backend *be =
slapi_be_select_by_instance_name(mtn_be_names[ii]);
@@ -862,18 +868,16 @@
                                               (mtn_be_states[ii] ==
SLAPI_BE_STATE_ON) ? "online" : "offline");
*/
       }

       /* if no chaining backends are defined, just use the local one */
       if (chaining_backend == -1) {
               return local_backend;
       }
-
-       slapi_pblock_get(pb, SLAPI_OPERATION, &op);

       /* All internal operations go to the local backend */
       if (operation_is_flag_set(op, OP_FLAG_INTERNAL)) {
               return local_backend;
       }

       /* Check the operation type
        * read-only operation will go to the local backend if online
Comment 1 Noriko Hosoi 2006-01-16 13:26:31 EST
Created attachment 123246 [details]
cvs diff replutil.c

Checking in Ulf's proposal to the source code.
Comment 2 Noriko Hosoi 2006-01-16 14:02:43 EST
Created attachment 123248 [details]
cvs commit message

Reviewed by Nathan and Pete (Thank you!)
Comment 3 Chandrasekar Kannan 2007-07-25 14:51:51 EDT
DS7.2 is not a valid milestone anymore. Anything thats set to DS7.2 should be
set to DS8.0. Will make further changes per bug council on 07/24/2007, after this.

Note You need to log in before you can comment on or make changes to this bug.