Subject: Issue: Atomicity, batching and config result message

From: Jamal Hadi Salim <[email-masked]>
Date: Sat, 11 Dec 2004 11:57:50 -0500

Some small nitpick coming from implementation experience and its a good
time to bring this up.

There are 3 modes in which a single PL message with a batch of multiple
LFB targets or even multiple operations to one LFB selector can be
executed:

1) "all-or-none" Atomic transaction. I believe the SNMP way of life.

The FE executes operations till the first one fails. If one fails
to execute all fail. A 2pc may help here.
We discussed earlier that if we crossed transactions across messages we
would have atomic flag indicating where things start and end as part of
one transaction. (section 3.3.1)

2) "one of N" independent operations.

In which several independent operations are targeted at one or more LFB
selector. CE doesnt care if one fails - execution needs to continue. It
just neds to be told why the failure happened at each failed operation.

3) "go to N" loose transaction

In which all operations are executed on FE sequentially until first
failure. The rest are not executed but everything upto failed is not
undone (unlike #1).

So far our experiences looking at the config response message implies it
respects #2 only.
Can we discuss the above? Do we need all 3 modes? Do we keep one?
We need to discuss the atomicity flags per operation/ message with
more clarity

In regards to Config response. It does seem to me to be a source of a
lot of noise if i have to send back the full message everytime. I should
be able to say "I want this config in all-or-none mode and just send me
a NACK with global reason when a failure happens". This has been
restricting how we batch in our implementation.

Anyways, hopefully this will start a discussion that will lead to a
resolution.

cheers,
jamal

---

From: "Joel M. Halpern" <[email-masked]>
Date: Sat, 11 Dec 2004 12:02:16 -0500

It is nice to be able to support mode 2 (do what you can from the set).
My understanding was that the atomic / transaction mode would be used to
enable mode 1 (all or none) whether the components were in one request or
several.  I believe the theory was that this could even be used to support
atomicity across FEs.
However, I don't know that we have seen enough details to be able to mark
this "done".

In practice, my impression is that mode 3 (up to N errors) is not
particularly helpful, is hard to implement, and is a pain for
protocol.  Hence I would prefer not to try to provide it.

For completeness, I will mention a mode 4 that was discussed.  This would
be "go till error" where the processing stops at the first error, but
earlier operations are not unwound.  This is easy to implement, and a CE
can use it to cover a number of cases.  However, it is probably not worth
doing if we are going to have full rollback anyway.  (It is a useful
augment if all we were doing was mode 2, do whatever works.)

Yours,
Joel

---

From: Jamal Hadi Salim <[email-masked]>
Date: Mon, 13 Dec 2004 09:10:26 -0500

> several.  I believe the theory was that this could even be used to support

A 2pc should allow cross FE atomicity of transactions..

> However, I don't know that we have seen enough details to be able to mark

I think we may need two maintainance messages (maybe 3) that would
facilitate 2pC. This would be directed at one or more LFB targets
(or at the FE Object if what you want is to lock the FE).
Those commands could also be used as aliases for LOCK/UNLOCK.
Start and End(what you refer as done) of a specific transaction
(whether in one message batch or across, could be done via global flags
as opposed per operation flags)

> For completeness, I will mention a mode 4 that was discussed.

I may have miscommunicated - #3 is infact the same as what you refer to
as #4.

>   This would
> earlier operations are not unwound.

Nod from here.

>   This is easy to implement, and a CE

It seems to me the 3 modes can be selected from a global flag level
(we need two bits).
For default we can have mode 2. Does this sound reasonable?

So in summary:
Global flags, - 2 for selecting the 3 modes.
Global Types/commands: - 2 one for "DONE" and another one for "START"
DONE is also == UNLOCK, START == LOCK used only in 2pc like setup.

cheers,
jamal