Ticket #1036 (new defect)

Opened 3 years ago

Last modified 2 years ago

Register all store resources at begin of transaction

Reported by: ronald Assigned to: pag
Priority: low Milestone:
Component: topaz Version: 0.9-rc1
Keywords: transaction OTM Cc:
Blocking: Blocked By:

Description

Currently stores are activated on demand, i.e. when first accessed, and their XAResource(s) are enlisted with the TM at that time. However, this reduces the transaction isolation level to something less than snapshot-isolation and closer to read-committed. The following scenario illustrates the problem, assuming two resources (stores):

  1. Transaction A begins
  2. Transaction A reads from store 1 (store 1's XAResource is enlisted)
  3. Transaction B begins
  4. Transaction B updates store 1
  5. Transaction B updates store 2
  6. Transaction B commits
  7. Transaction A reads from store 2 (store 1's XAResource is enlisted)

At this point transaction A now sees an inconsistent state: it sees B's modifications to store 2 but not those to store 1.

By always enlisting all XAResources at transaction begin we can reduce the chance of seeing inconsistent states; additionally, if we do all these enlistements together in a synchronized block (which synchronizes across all transactions) then we can completely close the window.

Dependency Graph

Change History

08/13/09 15:00:06 changed by npeterson

  • owner changed from ronald to pag.
  • priority changed from unassigned to low.