Issue 3617: commit_one_phase (ots-rtf) Source: Red Hat (Dr. Mark Little, mlittle(at)redhat.com) Nature: Uncategorized Issue Severity: Summary: The commit_one_phase optimisation is available in OTS for the case where a coordinator only has a single resource registered with it. However, consider the following situation, which is concerned with heuristics (and assume that the application wants to know about heuristics too): A root coordinator has two remote resources registered with it, and calls prepare on each (they both return VoteCommit), followed by commit. The second resource throws a HeuristicRollback, so the root coordinator throws a HeuristicMixed exception from Current::commit. Now let's assume both resources reside within the same process, which uses interposition at the client. So, rather than having two resources registered with the root, there is only one, the interposed coordinator. When commit is called on the root coordinator it sees only the interposed coordinator, so can call commit_one_phase instead of prepare/commit as above. If both resources are the interposed coordinator behave as before (i.e., one will throw HeuristicRollback), the interposed coordinator would like to return HeuristicMixed to the root coordinator. However, the signature of commit_one_phase only lets it throw HeuristicHazard. It would be useful if the same information was available to the root coordinator (and hence the application) regardless of the physical distribution of the Resources. This is especially the case where heuristics are concerned, as more accurate information is better than none. Resolution: Revised Text: Actions taken: May 17, 2000: receive dissue Discussion: End of Annotations:===== From: "Mark Little" To: "OTS Revision Task Force" , Subject: commit_one_phase Date: Wed, 17 May 2000 13:10:45 +0100 Organization: Newcastle University MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Content-Type: text/plain; charset="iso-8859-1" X-UIDL: Vigd9;-"!!#\k!!A89!! The commit_one_phase optimisation is available in OTS for the case where a coordinator only has a single resource registered with it. However, consider the following situation, which is concerned with heuristics (and assume that the application wants to know about heuristics too): A root coordinator has two remote resources registered with it, and calls prepare on each (they both return VoteCommit), followed by commit. The second resource throws a HeuristicRollback, so the root coordinator throws a HeuristicMixed exception from Current::commit. Now let's assume both resources reside within the same process, which uses interposition at the client. So, rather than having two resources registered with the root, there is only one, the interposed coordinator. When commit is called on the root coordinator it sees only the interposed coordinator, so can call commit_one_phase instead of prepare/commit as above. If both resources are the interposed coordinator behave as before (i.e., one will throw HeuristicRollback), the interposed coordinator would like to return HeuristicMixed to the root coordinator. However, the signature of commit_one_phase only lets it throw HeuristicHazard. It would be useful if the same information was available to the root coordinator (and hence the application) regardless of the physical distribution of the Resources. This is especially the case where heuristics are concerned, as more accurate information is better than none. Mark. ----------------------------------------------------------------------- SENDER : Dr. Mark Little, Arjuna Project, Distributed Systems Research. PHONE : +44 191 222 8066, FAX : +44 191 222 8232 POST : Department of Computing Science, University of Newcastle upon Tyne, UK, NE1 7RU EMAIL : M.C.Little@newcastle.ac.uk From: "Eric Newcomer" To: "Mark Little" , "OTS Revision Task Force" , Subject: RE: commit_one_phase Date: Wed, 17 May 2000 10:55:02 -0400 Message-ID: <006201bfc00f$e11845d0$da029bd4@dublin.iona.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 In-Reply-To: <140301bfbff8$f1db50e0$6e96f080@ncl.ac.uk> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal Content-Type: text/plain; charset="iso-8859-1" X-UIDL: E<;!!$\Me95MA!!3fFe9 I agree it's a good idea to propagate the same exception information. > -----Original Message----- > From: Mark Little [mailto:M.C.Little@ncl.ac.uk] > Sent: Wednesday, May 17, 2000 8:11 AM > To: OTS Revision Task Force; issues@omg.org > Subject: commit_one_phase > > > The commit_one_phase optimisation is available in OTS for the case where a > coordinator only has a single resource registered with it. > However, consider > the following situation, which is concerned with heuristics (and > assume that > the application wants to know about heuristics too): > > A root coordinator has two remote resources registered with it, and calls > prepare on each (they both return VoteCommit), followed by commit. The > second resource throws a HeuristicRollback, so the root > coordinator throws a > HeuristicMixed exception from Current::commit. > > Now let's assume both resources reside within the same process, which uses > interposition at the client. So, rather than having two resources > registered > with the root, there is only one, the interposed coordinator. > When commit is > called on the root coordinator it sees only the interposed coordinator, so > can call commit_one_phase instead of prepare/commit as above. If both > resources are the interposed coordinator behave as before (i.e., one will > throw HeuristicRollback), the interposed coordinator would like to return > HeuristicMixed to the root coordinator. However, the signature of > commit_one_phase only lets it throw HeuristicHazard. > > It would be useful if the same information was available to the root > coordinator (and hence the application) regardless of the physical > distribution of the Resources. This is especially the case where > heuristics > are concerned, as more accurate information is better than none. > > Mark. > > ----------------------------------------------------------------------- > SENDER : Dr. Mark Little, Arjuna Project, Distributed Systems Research. > PHONE : +44 191 222 8066, FAX : +44 191 222 8232 > POST : Department of Computing Science, University of Newcastle upon > Tyne, UK, NE1 7RU > EMAIL : M.C.Little@newcastle.ac.uk > > Date: Wed, 17 May 2000 10:56:40 -0700 From: Blake Biesecker To: Eric Newcomer Cc: Mark Little , OTS Revision Task Force , issues@omg.org Subject: Re: commit_one_phase Message-ID: <20000517105640.I21409@gemstone.com> References: <140301bfbff8$f1db50e0$6e96f080@ncl.ac.uk> <006201bfc00f$e11845d0$da029bd4@dublin.iona.ie> Mime-Version: 1.0 X-Mailer: Mutt 1.0pre4i In-Reply-To: <006201bfc00f$e11845d0$da029bd4@dublin.iona.ie>; from eric.newcomer@iona.com on Wed, May 17, 2000 at 10:55:02AM -0400 X-Disclaimer: I only speak for myself, unless I expressly indicate otherwise. Content-Type: text/plain; charset=us-ascii X-UIDL: 82Me97/Yd9j2[!!fg[d9 I agree with Mark's point, but is it important enough to change IDL and cause interop problems with 1.0 and 1.1 code. Blake On Wed, May 17, 2000 at 10:55:02AM -0400, Eric Newcomer wrote: > I agree it's a good idea to propagate the same exception information. > > > -----Original Message----- > > From: Mark Little [mailto:M.C.Little@ncl.ac.uk] > > Sent: Wednesday, May 17, 2000 8:11 AM > > To: OTS Revision Task Force; issues@omg.org > > Subject: commit_one_phase > > > > > > The commit_one_phase optimisation is available in OTS for the case where a > > coordinator only has a single resource registered with it. > > However, consider > > the following situation, which is concerned with heuristics (and > > assume that > > the application wants to know about heuristics too): > > > > A root coordinator has two remote resources registered with it, and calls > > prepare on each (they both return VoteCommit), followed by commit. The > > second resource throws a HeuristicRollback, so the root > > coordinator throws a > > HeuristicMixed exception from Current::commit. > > > > Now let's assume both resources reside within the same process, which uses > > interposition at the client. So, rather than having two resources > > registered > > with the root, there is only one, the interposed coordinator. > > When commit is > > called on the root coordinator it sees only the interposed coordinator, so > > can call commit_one_phase instead of prepare/commit as above. If both > > resources are the interposed coordinator behave as before (i.e., one will > > throw HeuristicRollback), the interposed coordinator would like to return > > HeuristicMixed to the root coordinator. However, the signature of > > commit_one_phase only lets it throw HeuristicHazard. > > > > It would be useful if the same information was available to the root > > coordinator (and hence the application) regardless of the physical > > distribution of the Resources. This is especially the case where > > heuristics > > are concerned, as more accurate information is better than none. > > > > Mark. > > > > ----------------------------------------------------------------------- > > SENDER : Dr. Mark Little, Arjuna Project, Distributed Systems Research. > > PHONE : +44 191 222 8066, FAX : +44 191 222 8232 > > POST : Department of Computing Science, University of Newcastle upon > > Tyne, UK, NE1 7RU > > EMAIL : M.C.Little@newcastle.ac.uk > > > > > From: "Mark Little" To: "Blake Biesecker" , "Eric Newcomer" Cc: "OTS Revision Task Force" , References: <140301bfbff8$f1db50e0$6e96f080@ncl.ac.uk> <006201bfc00f$e11845d0$da029bd4@dublin.iona.ie> <20000517105640.I21409@gemstone.com> Subject: Re: commit_one_phase Date: Thu, 18 May 2000 09:03:16 +0100 Organization: Newcastle University MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Content-Type: text/plain; charset="iso-8859-1" X-UIDL: c\9e9)O1!!TJf!!U`*e9 ----- Original Message ----- > I agree with Mark's point, but is it important enough to change > IDL and cause interop problems with 1.0 and 1.1 code. If it weren't related to heuristics then I'd be torn in both directions, i.e., to change and not to change (the fact that the behaviours differ depending upon the distributed configuration of the application would still push me towards wanting to change). However, heuristics are inherently difficult enough to deal with for the application/system manager without throwing additional uncertainty into the works. This isn't a change for the sake of changing, but rather for the sake of manageability and consistency. HeuristicHazard may mean something completely different to HeuristicMixed as far as resolution of concerned. It's not that such a change "would be nice", I actually think it is necessary (IMHO). It potentially has an affect on XA too, since commit (with TMONEPHASE) is allowed to throw XA_HEURHAZ and XA_HEURMIX as far as I know. Mark. ----------------------------------------------------------------------- SENDER : Dr. Mark Little, Arjuna Project, Distributed Systems Research. PHONE : +44 191 222 8066, FAX : +44 191 222 8232 POST : Department of Computing Science, University of Newcastle upon Tyne, UK, NE1 7RU EMAIL : M.C.Little@newcastle.ac.uk Date: Thu, 18 May 2000 18:30:06 +1000 (EST) From: Michi Henning To: Mark Little cc: OTS Revision Task Force Subject: Re: commit_one_phase In-Reply-To: <151101bfc09f$86721620$6e96f080@ncl.ac.uk> Message-ID: Organization: Object Oriented Concepts MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: kZ+e9jZad9N7+!!IeLe9 On Thu, 18 May 2000, Mark Little wrote: > If it weren't related to heuristics then I'd be torn in both directions, > i.e., to change and not to change (the fact that the behaviours differ > depending upon the distributed configuration of the application would still > push me towards wanting to change). However, heuristics are inherently > difficult enough to deal with for the application/system manager without > throwing additional uncertainty into the works. This isn't a change for the > sake of changing, but rather for the sake of manageability and consistency. > HeuristicHazard may mean something completely different to HeuristicMixed as > far as resolution of concerned. It's not that such a change "would be nice", > I actually think it is necessary (IMHO). It potentially has an affect on XA > too, since commit (with TMONEPHASE) is allowed to throw XA_HEURHAZ and > XA_HEURMIX as far as I know. We noticed the same thing here. It looks like HeuristicHazard was simply forgotten in the original spec. The problem, as usual, is how to add this? We can't just modify the IDL without assigning new repository IDs. But then, old and new implementations can't interoperate anymore :-( Cheers, Michi. -- Michi Henning +61 7 3891 5744 Object Oriented Concepts +61 4 1118 2700 (mobile) Suite 4, 904 Stanley St +61 7 3891 5009 (fax) East Brisbane 4169 michi@ooc.com.au AUSTRALIA http://www.ooc.com.au/staff/michi-henning.html