-
1. Re: TxInterceptor and 1-phase commits
belaban Nov 7, 2005 4:07 PM (in response to manik)#2 No, we still need async transactional replication.
#1 Why is the OptTxInterceptor starting point for all of this ? If so, the we should rename it to TxInterceptor (but don't we have such a class already) ? -
2. Re: TxInterceptor and 1-phase commits
manik Nov 7, 2005 5:07 PM (in response to manik)already been renamed - there was no such thing as a tx interceptor before that
-
3. Re: TxInterceptor and 1-phase commits
manik Nov 7, 2005 5:20 PM (in response to manik)I agree we need async transactional repl, but is using 1PC the right way to do this? Should we follow the way we deal with this in O/L and have the prepare phase as synchronous but the commit phase as async.? Better data integrity?
-
4. Re: TxInterceptor and 1-phase commits
brian.stansberry Nov 7, 2005 5:31 PM (in response to manik)This would have the effect of forcing HttpSession replication to run synchronously, as the cache changes we make to reflect changes to the session are always wrapped in a tx. Doing this would significantly reduce the responsiveness of webapps.
-
5. Re: TxInterceptor and 1-phase commits
ben.wang Nov 7, 2005 6:52 PM (in response to manik)Yes, key is we do replication during "prepare" phase (we still do this right?). So if "prepare" is synchronous, it behaves almost like a REPL_SYNC mode, which is not what we want.
-
6. Re: TxInterceptor and 1-phase commits
manik Nov 8, 2005 1:09 PM (in response to manik)Yes, replication is done during a prepare. My only disconcert with running prepare asynchronously is that it does risk data integrity. It does certainly affect scalability though.
Anyway, one way or the other I'd like to be consistent - opt. locking async replication to follow pess. locking async replication (i.e., 1PC) or vice versa? -
7. Re: TxInterceptor and 1-phase commits
belaban Nov 8, 2005 5:35 PM (in response to manik)The risk of losing data is documented, as with all other asynchronous replication schemes, so no problem there IMO. Let devs choose for themselves...
I don't see a diff between O/L and P/L here, as locking and replication are orthogonal issues IMO -
8. Re: TxInterceptor and 1-phase commits
manik Nov 9, 2005 7:52 AM (in response to manik)"bela@jboss.com" wrote:
I don't see a diff between O/L and P/L here, as locking and replication are orthogonal issues IMO
I agree. And that is why it bugged me that async replication was handled differently in these 2 cases. Anyway, now that the tx interceptor is separate, I can make this change to replication handling in the optimistic case, so that async replication uses a 1-phase commit and prepares are asynchronous, as in the pessimistic case.