"discuss" <discuss-boun...@openvswitch.org> wrote on 02/29/2016 08:37:02
AM:

> From: Ryan Moats/Omaha/IBM@IBMUS
> To: discuss@openvswitch.org
> Date: 02/29/2016 08:37 AM
> Subject: [ovs-discuss] OVSDB change tracking - is the delete case
> really usable?
> Sent by: "discuss" <discuss-boun...@openvswitch.org>
>
> All-
>
> I bumped into the following while trying to persist the logical flow
> information in ovn-controller:
>
> When OVSDB change tracking is turned on, sequence numbers
> are generated for each row delete event. However, the memory
> the row uses is freed anyway, so code that is looping through
> tracked changes has no way to determine *which* row has been
> deleted.
>
> This admits of three rather nasty solutions that immediately come
> to mind:
>
> (1) keep a copy of the row information around (which amounts to
> a memory leak - ugh)
> (2) if you are trying to persist data and you hit a delete event,
> do some variation of "flush the persisted data and rebuild the table
> from scratch", which begs the question if the data is *really*
> persisted...
> (3) replace ovsdb...

[moving to dev@ at russellb's request]

I did think of a fourth, somewhat less ugly solution:

(4) each row has separate change tracking numbers for delete, modify
and insert.  This means that the deleted row still has it's original
insert sequence number (which by definition) is unique.  If that is
included somewhere in the persisted data (and used as the hashmap
to help searching) then I should be able to find the deleted row.
By the way, this will also improve searching for modified rows as they
will also include the insert sequence number [which I think means that
we won't have to mess around with action or match comparison]

Ryan (regXboi)
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to