Hi Andy,

Thanks for your review.

On Thu, Dec 17, 2015 at 2:00 PM, Andy Zhou <az...@ovn.org> wrote:

>
>
> On Tue, Dec 15, 2015 at 7:06 PM, Han Zhou <zhou...@gmail.com> wrote:
>
>> Cached json objects were reused when sending notifications to
>> clients. This created a problem when there were different versions
>> of monitors coexiting. E.g. clients expecting version2 notification
>> would receive messages with method == "update2" but payload in
>> version1 format, which end up failure of processing the updates.
>>
>> This patch fixes the issue by using dedicated cache for each version.
>>
>>
> Is it really necessary to have json cache array? How about extending
> ovsdb_monitor_json_cache_node to also include version, than multiples
> versions
> of json_object can co-exist in a single cache.  What do you think?
>
>
Well this could be an alternative solution. Since dbmon doesn't know which
versions of objects will be required later at the moment when the cache
node is being constructed, what we can do is to compose the object only for
the version of the first jsonrpc_monitor, and when a new version of
jsonrpc_monitor comes, compose for the new version.
That means we will need to redefine the search function as "search and then
check the version in the node", and redefine the insert function as "search
and then update for new version (if hash node not found, create new node)".

This should work but I am not sure if there is strong benefit compare to
the current patch which seems to be more straightforward. What do you think?

-- 
Best regards,
Han
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to