if (atid->epoch != ubik_currentTrans->tid.epoch
|| atid->counter > ubik_currentTrans->tid.counter || abortalways) {
/* don't match, abort it */
+ int endit = 0;
/* If the thread is not waiting for lock - ok to end it */
if (ubik_currentTrans->locktype != LOCKWAIT) {
+ endit = 1;
+ }
+
+ ViceLog(0, ("urecovery_CheckTid: Aborting/ending bad remote "
+ "transaction. (tx %d.%d, atid %d.%d, abortalways %d, "
+ "endit %d)\n",
+ ubik_currentTrans->tid.epoch,
+ ubik_currentTrans->tid.counter,
+ atid->epoch, atid->counter,
+ abortalways, endit));
+ if (endit) {
udisk_end(ubik_currentTrans);
}
ubik_currentTrans = (struct ubik_trans *)0;
* the write-lock above if there is a write transaction in progress,
* but then, it won't hurt to check, will it?
*/
- if (ubik_dbase->flags & DBWRITING) {
+ if (ubik_dbase->dbFlags & DBWRITING) {
struct timeval tv;
int safety = 0;
long cur_usec = 50000;
- while ((ubik_dbase->flags & DBWRITING) && (safety < 500)) {
+ while ((ubik_dbase->dbFlags & DBWRITING) && (safety < 500)) {
DBRELE(ubik_dbase);
/* sleep for a little while */
tv.tv_sec = 0;