On 01/19/2017 05:59 PM, Sela, Guy wrote:
> When submitting a delete transaction on a node that doesn’t exist,
> MD-SAL’s behavior is to throw ModifiedNodeNotExists Exception.

Are you referring to ModifiedNodeDoesNotExistException? If so, then...

> There are many usecases where there is a “cleanup” code that tries to
> delete some state even though it is not 100% there, just for the sake of
> cleanup.
> 
> I saw it in netvirt where delete flow operations get exceptions because
> the flow is not there.
> 
> My question is more of a design issue, isn’t an exception in this case
> is “too brutal”?

... the exception is thrown when there is a data dependency
inconsistency. This typically indicates that two components are
manipulating the same subtree independently and concurrently.

This inherently comes from the MVCC nature of DataTree. Each operation
is executed in the context of of state as observed in transaction
isolation. Hence a request to delete a path is in reality a one of two
transitions:
1) non-existent -> non-existent
2) existent -> non-existent

What you are seeing is violation of preconditions, i.e. it was there
when delete was issued, but it is not there when the delete was being
executed. Since we are dealing with a tree structure, these include all
parent nodes with explicit lifecycle (lists, list entries, presence
containers)

The question you need to answer to solve the problem you are seeing is:
why has the path disappeared?

Bye,
Robert

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to