ovn-org/libovsdb

Field filtering on Monitors does not work

jcaamano opened this issue · 2 comments

With

// Only Monitor Required SBDB tables to reduce memory overhead
chassisPrivate := sbdb.ChassisPrivate{}
_, err = c.Monitor(ctx,
    c.NewMonitor(
	    client.WithTable(&chassisPrivate, &chassisPrivate.Name),
    ),
)

we get
field pointer does not correspond to orm struct

This is because the model passed in WithTable is not used later on to build the TableMonitor. Instead, a new model is built from the mapper for which the field pointer passed does not apply.

This issue was found while doing this:
ovn-org/ovn-kubernetes#2940
Once fixed, we should follow up on that change and leverage it.