Bug 1102048 - Transactions and data should prefer to be sourced from a primary owner
Summary: Transactions and data should prefer to be sourced from a primary owner
Keywords:
Status: ON_QA
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER6
: 6.3.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-28 11:49 UTC by Dan Berindei
Modified: 2014-06-05 09:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-4091 0 Major Resolved Transactions and data should prefer to be sourced from a primary owner 2014-09-04 01:44:52 UTC
Red Hat Issue Tracker ISPN-4108 0 Major Resolved Pessimistic tx for a union CH will not be forwarded to all owners. 2014-09-04 01:44:52 UTC

Description Dan Berindei 2014-05-28 11:49:44 UTC
The current state transfer mechanism will ask the backup segments for transaction and state information. However, this breaks if there is a pessimistic transaction executing on the primary data owner, Consider the following use case:

A new owner joins and sources the ongoing transactions and data for key k from the backup. Meanwhile, a local transaction has started on the primary owner for k, but has not prepared on any remote nodes. So the new node does not know about the ongoing transaction. While that's going on, a new tx starts on the new owner. Since these are pessimistic, the new transaction will acquires the lock for the same key.

So we can have data inconsistency.

The state transfer mechanism should prefer to source the transaction and state information from the primary owner. This should cover all cases: if the originator is not the primary owner, then any (backup) locks must be replicated to all the owners, either directly during the tx or during a previous state transfer.

For transactions that are started on the old primary owner after the tx list was sent to the joiner, we still don't replicate the lock information to the joiner (because the originator is still the primary owner in the union CH that we use during state transfer). When state transfer ends and the joiner becomes the new primary owner, it will allow other txs to lock the same key.

We should change PessimisticLockingInterceptor to replicate the lock command to the other owners even if the originator is the primary owner, when there is a state transfer in progress.


Note You need to log in before you can comment on or make changes to this bug.