Below is the list of changes that have just been committed into a local
6.0 repository of . When does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-01-23 12:41:34-05:00, jas@rowvwade. +1 -0
Back off on exclusive lock on transaction during commit,
commitNoUpdate, and rollback, leaving it in place for
transaction start.
storage/falcon/Transaction.cpp@stripped, 2008-01-23 12:41:26-05:00, jas@rowvwade. +8 -11
Back off on exclusive lock on transaction during commit,
commitNoUpdate, and rollback, leaving it in place for
transaction start.
diff -Nrup a/storage/falcon/Transaction.cpp b/storage/falcon/Transaction.cpp
--- a/storage/falcon/Transaction.cpp 2008-01-23 12:11:02 -05:00
+++ b/storage/falcon/Transaction.cpp 2008-01-23 12:41:26 -05:00
@@ -244,8 +244,6 @@ void Transaction::commit()
return;
}
- Sync sync(&syncObject, "Transaction::commit");
- sync.lock(Exclusive);
TransactionManager *transactionManager = database->transactionManager;
addRef();
@@ -257,7 +255,7 @@ void Transaction::commit()
sync.lock(Shared);
for (DeferredIndex *deferredIndex= deferredIndexes; deferredIndex;
- deferredIndex = deferredIndex->nextInTransaction)
+ deferredIndex = deferredIndex->nextInTransaction)
if (deferredIndex->index)
database->dbb->logIndexUpdates(deferredIndex);
@@ -291,6 +289,7 @@ void Transaction::commit()
database->flushInversion(this);
syncActiveTransactions.lock(Exclusive);
transactionManager->activeTransactions.remove(this);
+ syncActiveTransactions.unlock();
for (RecordVersion *record = firstRecord; record; record = record->nextInTrans)
if (!record->priorVersion)
@@ -298,7 +297,6 @@ void Transaction::commit()
else if (record->state == recDeleted && record->format->table->cardinality > 0)
--record->format->table->cardinality;
- syncActiveTransactions.unlock();
Sync syncCommitted(&transactionManager->committedTransactions.syncObject, "Transaction::commit");
syncCommitted.lock(Exclusive);
transactionManager->committedTransactions.append(this);
@@ -318,15 +316,14 @@ void Transaction::commit()
// Add ourselves to the list of lingering committed transactions
- sync.unlock();
release();
}
void Transaction::commitNoUpdates(void)
{
- Sync sync(&syncObject, "Transaction::commitNoUpdates");
- sync.lock(Exclusive);
+ //Sync sync(&syncObject, "Transaction::commitNoUpdates");
+ //sync.lock(Exclusive);
TransactionManager *transactionManager = database->transactionManager;
addRef();
ASSERT(!deferredIndexes);
@@ -397,7 +394,7 @@ void Transaction::commitNoUpdates(void)
state = Available;
writePending = false;
//syncInit.unlock();
- sync.unlock();
+ //sync.unlock();
syncActiveTransactions.unlock();
syncActive.unlock();
release();
@@ -411,8 +408,8 @@ void Transaction::rollback()
if (!isActive())
throw SQLEXCEPTION (RUNTIME_ERROR, "transaction is not active");
- Sync sync(&syncObject, "Transaction::rollback");
- sync.lock(Exclusive);
+ //Sync sync(&syncObject, "Transaction::rollback");
+ //sync.lock(Exclusive);
if (deferredIndexes)
{
@@ -482,7 +479,7 @@ void Transaction::rollback()
inList = false;
transactionManager->activeTransactions.remove(this);
syncActiveTransactions.unlock();
- sync.unlock();
+ //sync.unlock();
release();
}
| Thread |
|---|
| • bk commit into 6.0 tree (jas:1.2787) | U-ROWVWADEjas | 23 Jan |