[Xorp-hackers] order of create/delete operations

Pavlin Radoslavov pavlin at icir.org
Tue May 9 16:58:43 PDT 2006


> The case I'm thinking of is when an underlying data value is
> referenced by two distinct nodes that are not directly related to
> each other (parent/child). So a construction similar to:
> 
> 
> #note wrapped by a transaction.
> common_parent {
>    sib1 {
>       foo {
>          %create:
>          %delete
>       }
>    }
> 
>    sib2 {
>       foo {
>          %create:
>          %delete
>       }
>    }
> }
> 
> 
> Now, let's say that both foo's point to the same data structure,

Can you clarify what you mean by "same data structure". E.g., does
it mean that both "foo" contain same XRLs send to the same target?

> then the order of creation/deletion are important--for instance:
> 
> delete common_parent sib1 foo
> create common_parent sib2 foo
> 
> is completely different from:
> 
> create common_parent sib2 foo
> delete common_parent sib1 foo 

Are you saying that if we use the above "create/delete" xorpsh
commands in different order, then the corresponding %create and
%delete methods are also executed in different orders?
Do sib1 and sib2 belong to the same module?
If yes, then it looks like a bug to me, because I think the %create
should always happen before the %delete (unless I am
forgetting/missing something).

Pavlin

> The order of execute of these two commands is not determinate (or maybe it is, but I haven't figured it out yet).
> 
> Probably it would be better to re-work the data structure in this
> case--but this isn't always possible (as in one case we
> have). Does this make sense? If deletes were always applied first
> in a transaction then the behavior would be deterministic and the
> delete operation above would always occur first.



More information about the Xorp-hackers mailing list