]> git.sur5r.net Git - openldap/commitdiff
ITS#7402 add txnID to debug output to aid tracing
authorHoward Chu <hyc@openldap.org>
Sat, 20 Oct 2012 16:25:14 +0000 (09:25 -0700)
committerHoward Chu <hyc@openldap.org>
Sat, 20 Oct 2012 16:25:14 +0000 (09:25 -0700)
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/config.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/back-bdb/tools.c

index f9055b9bb048be1493b412dc162d4e82d1b4c632..89d6e4967e40e747f553d8b680b2b41e9576f777 100644 (file)
@@ -159,6 +159,8 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto return_results;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_add) ": txn1 id: %u\n",
+               ltid->id(ltid), 0, 0 );
 
        opinfo.boi_oe.oe_key = bdb;
        opinfo.boi_txn = ltid;
@@ -376,6 +378,8 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto return_results;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_add) ": txn2 id: %u\n",
+               lt2->id(lt2), 0, 0 );
 
        /* dn2id index */
        rs->sr_err = bdb_dn2id_add( op, lt2, ei, op->ora_e );
index 85569f36947c0ba91d5ccb4032786b618058d7ad..d12e5d8091d438640b29faac565e63a24b7ad888 100644 (file)
@@ -241,6 +241,8 @@ bdb_online_index( void *ctx, void *arg )
                rc = TXN_BEGIN( bdb->bi_dbenv, NULL, &txn, bdb->bi_db_opflags );
                if ( rc ) 
                        break;
+               Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_online_index) ": txn id: %u\n",
+                       txn->id(txn), 0, 0 );
                if ( getnext ) {
                        getnext = 0;
                        BDB_ID2DISK( id, &nid );
index 9b9b3e63dbe83ebf19ef333b90b091c7dad73bee..017ba960d0bcf44b8cbd08a11186fafdefbcf476 100644 (file)
@@ -143,6 +143,8 @@ retry:      /* transaction retry */
        /* begin transaction */
        rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, NULL, &ltid, 
                bdb->bi_db_opflags );
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_delete) ": txn1 id: %u\n",
+               ltid->id(ltid), 0, 0 );
        rs->sr_text = NULL;
        if( rs->sr_err != 0 ) {
                Debug( LDAP_DEBUG_TRACE,
@@ -368,6 +370,8 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto return_results;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_delete) ": txn2 id: %u\n",
+               lt2->id(lt2), 0, 0 );
 
        BDB_LOG_PRINTF( bdb->bi_dbenv, lt2, "slapd Starting delete %s(%d)",
                e->e_nname.bv_val, e->e_id );
index 734cdec3be013ed9b33183ad6fbc78b1b7ac2dbf..6b8c6ba6be214f05fcc06b3ca1f7a989395a1e6e 100644 (file)
@@ -514,6 +514,8 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto return_results;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_modify) ": txn1 id: %u\n",
+               ltid->id(ltid), 0, 0 );
 
        opinfo.boi_oe.oe_key = bdb;
        opinfo.boi_txn = ltid;
@@ -633,6 +635,8 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto return_results;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_modify) ": txn2 id: %u\n",
+               lt2->id(lt2), 0, 0 );
        /* Modify the entry */
        dummy = *e;
        rs->sr_err = bdb_modify_internal( op, lt2, op->orm_modlist,
index 1d7e4a717c07a1c83447b0841277354c6644eac6..c0dd650df94d8124095c7e9ba76e7c6fcd07b730 100644 (file)
@@ -162,6 +162,8 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto return_results;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_modrdn) ": txn1 id: %u\n",
+               ltid->id(ltid), 0, 0 );
 
        opinfo.boi_oe.oe_key = bdb;
        opinfo.boi_txn = ltid;
@@ -601,6 +603,8 @@ retry:      /* transaction retry */
                rs->sr_text = "internal error";
                goto return_results;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_modrdn) ": txn2 id: %u\n",
+               lt2->id(lt2), 0, 0 );
 
        /* delete old DN */
        rs->sr_err = bdb_dn2id_delete( op, lt2, eip, e );
index 40d46461dddd02062b9191a944251b895380b7b3..88b561d9b7baa8a750652af671eb0a1259694f34 100644 (file)
@@ -672,6 +672,8 @@ ID bdb_tool_entry_put(
                         text->bv_val, 0, 0 );
                return NOID;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_tool_entry_put) ": txn id: %u\n",
+               tid->id(tid), 0, 0 );
        }
 
        op.o_hdr = &ohdr;
@@ -839,6 +841,8 @@ int bdb_tool_entry_reindex(
                        db_strerror(rc), rc, 0 );
                goto done;
        }
+       Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_tool_entry_reindex) ": txn id: %u\n",
+               tid->id(tid), 0, 0 );
        }
        
        /*
@@ -929,6 +933,8 @@ ID bdb_tool_entry_modify(
                                 text->bv_val, 0, 0 );
                        return NOID;
                }
+               Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_tool_entry_modify) ": txn id: %u\n",
+                       tid->id(tid), 0, 0 );
        }
 
        op.o_hdr = &ohdr;