On 7/25/23 11:32, Ilya Maximets wrote:
> On a server size, default values are just normal values. The only
Uhm, I guess you meant "server side", right?
> difference is that they are initialized from default atoms. They are
> allocated on a separate piece of memory as any other values, so there
> should not be any special treatment.
>
> Current code doesn't apply the diff to a column with default values
> after reading the file transaction and that breaks the logic.
>
> For example, if we have a column with a set and a minimum number of
> elements for a type is 1, it will be initialized with one default atom.
> On mutation, new values can be added and the diff will contain only
> these new values, while the column will contain both the new values
> and the default atom. While reading such transaction from a file
> with a diff, current code will replace the content loosing the default
Nit: losing
> atom. The only case where we need to actually replace is if this row
> doesn't exist and it's not actually a diff, i.e. if this row was just
> created to be populated with a json content.
>
> Fix that by removing the wrong check and not use values as a diff
> in case the row doesn't exist in a database.
>
> Fixes: 2ccd66f594f7 ("ovsdb: Use column diffs for ovsdb and raft log
> entries.")
> Signed-off-by: Ilya Maximets <[email protected]>
> ---
Acked-by: Dumitru Ceara <[email protected]>
Thanks!
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev