List:Falcon Storage Engine« Previous MessageNext Message »
From:Olav Sandstaa Date:March 23 2009 3:16pm
Subject:New TransactionState object patch - please review
View as plain text  
Hi,

I have committed a patch for the TransactionState object as discussed 
both by email and in Athens. This patch does:

  1. Implement the TransactionState object

  2. Changes Transaction::getRelativeState, visible(), needToLock, 
waitForTransaction to only use the new Transaction state object

(for more detail see the commit email). The patch is available here:

   http://lists.mysql.com/commits/70075

This patch is "complete" in the sense that is solves the issues we have 
seen when methods in the Transaction class access other Transaction 
objects by using the RecordVersion's transaction pointer. Several bugs 
(e.g 41357) is caused by this pointing to deleted transaction objects.

Still, there is more work to be done in this area and I propose that 
these are fixed in separate follow-up patches:

  -clean up the RecordVersion object to only/mostly use the 
TransactionState pointer instead of the Transaction pointer in all cases 
where it is sufficient (hopefully all)
  -transactionID is now duplicated in RecordVersion, TransactionState 
and Transaction classes - I did not do this "query replace" in this 
patch because it will cause a lot of small changes (and the patch is 
already over 1100 lines)

In addition there are also two related areas where we access deleted 
transaction objects that need to be fixed:

  -Accessing transaction objects from deferred indexes (should use the 
transaction state object instead, I think - at least there are similar 
crashes in this area)
  -The deadlock detector can access deleted transactions (see bug 41665) 
as described in separate email

I suggest the current patch is reviewed and if accepted I will commit it 
into the falcon-team tree. The patch solves real bugs, it is by far 
large enough and there are people working on other bugs in this area 
that would benefit from having this in their code.

Thanks,
Olav
Thread
New TransactionState object patch - please reviewOlav Sandstaa23 Mar