On Mon, Jun 11, 2018 at 11:23:58AM -0700, Han Zhou wrote: > On Fri, Jun 8, 2018 at 2:59 PM, Ben Pfaff <[email protected]> wrote: > > > > We're working to make ovn-controller compute more incrementally, to reduce > > CPU usage. To make it easier to keep track of dependencies, it makes > sense > > to pass around pointers to fine-grained resources instead of an entire > > database at a time. This commit introduces a way to pass individual > tables > > around and starts using that feature in ovn-controller. > > > > CC: Han Zhou <[email protected]> > > Signed-off-by: Ben Pfaff <[email protected]> > > --- > > In this patch although tables are passed individually, the ctx parameter is > still kept for most functions. With ctx, it is still easy for the function > to access any tables than the individual tables passed. > I see two reasons why ctx is still kept in this patch: > 1) index implementation requires passing the IDL, and I saw this is > addressed in next patches by redesigning the index mechanism > 2) OVSDB transaction requires passing the ..._idl_txn in the ctx. I think > we can pass in ..._idl_txn directly instead of the ctx. This would avoid > the misuse of tables. > > What do you think about point 2)?
Eliminating ctx is a goal but this series doesn't accomplish it yet. I hope to do that in a followup. Passing in idl_txn is an easy way to do it; I was hoping to somehow distinguish read-only tables from read/write ones (maybe via const?) but I haven't gotten that far. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
