[infinispan-dev] IRC meeting
Pedro Ruivo
pruivo at gsd.inesc-id.pt
Wed May 2 09:43:46 EDT 2012
Hi,
On 5/2/12 1:54 PM, Dan Berindei wrote:
> One question I haven't been able to figure out is about the unpaired
> prepares and commits that arrive to a joiner before the PREPARE_VIEW
> command. (Unpaired because the joiner didn't receive the corresponding
> commit/prepare.) I think this could even happen for commit commands
> that arrive after PREPARE_VIEW. What happens to those?
if the prepare arrives before the PREPARE_VIEW, you can discard it,
because it will receive the state that already contains the updates
values of that transaction
for the commit/rollback, it can be a little more complicated. My idea is
to tag the commit/rollback command with the ViewId of when the prepare
was received. And then do the following (in the JoinNode)
1) if prepare, commit or rollback is delivered before PREPARE_VIEW:
discard it (same reason above)
2) if commit or rollback is delivered after the PREPARE_VIEW, then you
check the ViewId in the commit / rollback. In this case:
2.1) if the commit/rollback.viewId < PREPARE_VIEW.newViewId, then you
can discard it because it corresponds to a transaction delivered before
the PREPARE_VIEW.
2.2) Otherwise, you must hold it until the COMMIT/ROLLBACK_VIEW is received.
2.2.1) if the ROLLBACK_VIEW is received, then you are in case 1) and you
can discard the command.
What do you think? Any other ideas?
Cheers,
Pedro
More information about the infinispan-dev
mailing list