On Fri, Jul 27, 2018 at 4:54 AM Robert Varga <n...@hq.sk> wrote:

> On 27/07/18 11:41, Anil Vishnoi wrote:
> >
> >     My initial reaction is that such an optimization in
> >     ManagedNewTransactionRunner is probably pointless as whatever
> >     happens behind the scenes on a commit is surely already smart enough
> >     by itself for a submit on an empty transaction to basically be a low
> >     overhead NOOP anyway?
> >
> > ​Or if transaction API can expose some api like isEmpty() (just
> > example), that can come bit handy here?
>
> I don't think the benefit of such a method justifies additional state
> tracking required to support it.
>
​Depends on the cost of the two operations, if cost of submitting the empty
transaction is  less than cancelling it, yes it doesn't make sense, but
otherwise i think it makes life convinient for folks directly consuming the
api (compared to through wrappers).

>
> Regards,
> Robert
>
>

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

Reply via email to