transaction. Truncating a database in Citadel is always synchronous,
and with big tables (such as when the full text indexer is switched off
or reinitialized) it was running out of memory.
- $Log$
- Revision 647.21 2005/05/23 19:31:52 ajc
- * test
-
Revision 647.20 2005/05/23 19:26:04 ajc
* Move the location of the "enable full text index" configuration item to
a new location. Reusing an old location was a stupid idea because old
*/
void cdb_trunc(int cdb)
{
- //DB_TXN *tid;
+ /* DB_TXN *tid; */
int ret;
u_int32_t count;
"attempt to write during r/o cursor");
retry:
- //txbegin(&tid);
+ /* txbegin(&tid); */
if ((ret = dbp[cdb]->truncate(dbp[cdb], /* db */
NULL, /* transaction ID */
&count, /* #rows deleted */
0))) { /* flags */
if (ret == DB_LOCK_DEADLOCK) {
- //txabort(tid);
+ /* txabort(tid); */
goto retry;
} else {
lprintf(CTDL_EMERG,
abort();
}
} else {
- //txcommit(tid);
+ /* txcommit(tid); */
}
}
}