ITS#7402 add txnID to debug output to aid tracing

This commit is contained in:
Howard Chu 2012-10-20 09:25:14 -07:00
parent 0e05417b58
commit 48f6a47c1e
6 changed files with 24 additions and 0 deletions

View 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 );

View 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 );

View 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 );

View 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,

View 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 );

View 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;