[Xorp-hackers] order of create/delete operations

Michael Larson mike at vyatta.com
Tue May 9 20:35:59 PDT 2006


OK Pavlin--I see your point and it makes sense. All creates are applied before deletes, which is required when operating on single nodes (you need to create the node before you can delete it)--and it makes sense to apply this rule across all nodes.

I believe the behavior I'm seeing is consistent with that. Thanks!

Mike

----- Original Message -----
From: Pavlin Radoslavov <pavlin at icir.org>
To: Michael Larson <mike at vyatta.com>
Cc: xorp-hackers at icir.org, Pavlin Radoslavov <pavlin at icir.org>
Sent: Tuesday, May 9, 2006 4:58:43 PM GMT-0800
Subject: Re: [Xorp-hackers] order of create/delete operations

> 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.

_______________________________________________
Xorp-hackers mailing list
Xorp-hackers at icir.org
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers



More information about the Xorp-hackers mailing list