[MDSAL-217] Cache support API to improve clustered data reads performance Created: 09/Jan/17  Updated: 31/Oct/18  Resolved: 31/Oct/18

Status: Resolved
Project: mdsal
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.2

Type: Improvement
Reporter: Ravit Peretz Assignee: Jie Han
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Relates
relates to MDSAL-107 Wildcard DataChangeListeners are not ... Verified

 Description   

Clustered data reads may be time-consuming, therefore a requirement for a cache was raised by netvirt and genius, yet this capability can be useful across odl projects.

This cache should be initially populated and maintained going forward.

discussing this topic in mdsal-dev list, a suggestion to enhance the current API to support this requirement was made:

https://lists.opendaylight.org/pipermail/mdsal-dev/2016-December/000881.html
https://lists.opendaylight.org/pipermail/mdsal-dev/2016-December/000859.html
https://lists.opendaylight.org/pipermail/mdsal-dev/2016-December/000853.html
https://lists.opendaylight.org/pipermail/mdsal-dev/2017-January/000921.html

More info, copied from Robert's mail:
There is one more problem, which are wildcard DTCLs. TstanceIdehese are allowed to be wildcarded on any YangInntifier component corresponding to a keyed list.

list foo {
leaf foo;
key foo;

list bar {
leaf bar;
key bar;

container baz

{ leaf baz; }

}
}

All of these are valid subscriptions:
/foo
/foo/foo[foo=*]/bar
/foo/foo[foo="abc"]/bar/bar[bar=*]
/foo/foo[foo=*]/bar/bar[bar=*]/baz
/foo/foo[foo="abc"]/bar/bar[bar="abc"]

The first two do not have a binding representation, but they are valid at DOM level. All except the last one are wildcards.

I think the current discussion is making an implicit assumption what the relationship between the registration YIID and the one reported to the listener. With concrete YIIDs, they are YangInstanceIdentifier.equals().
Wildcards are expanded as data is discovered, hence there is no such relationship – except they share the prefix leading to the first wildcard.

It is critical the API contract of the proposed method is defined with this difference in mind.

===========================================================================

Please note that this issue is different from:
https://bugs.opendaylight.org/show_bug.cgi?id=2504

The difference is that this issue makes an assumption on follower locality, while the cache does not. This is an important distinction in clusters where there is no shard presence (leader/follower) on some nodes.



 Comments   
Comment by Michael Vorburger [ 17/Sep/18 ]

JieHan2017 FYI in the genius project tpantelis and me use our DataObjectCache (and InstanceIdDataObjectCache), see sources in https://github.com/opendaylight/genius/tree/master/mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/mdsalutil/cache - I thought this may interest you here.

Comment by Jie Han [ 18/Sep/18 ]

Thank you very much, M.
It looks a new area for me by now,
anyway I'll go for it.

Generated at Wed Feb 07 20:09:06 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.