Committed by
Yuta HIGUCHI
ONOS-3472 Fixing ConsistentMap key equality
- ConsistentMap's key equality is based on serialized byte[]. 2 Problems fixed by this patch: (1) By caching Key -> String representation, Cache will use Key's Object#equals for look up, which can possibly have different equality than byte[] equality, leading to wrong String to be used as a key in backend Database. Fixed by reversing the mapping. (2) Similar issues with keySet(), entrySet() Set based on reference equality needs to be used to avoid deduplication based on Object#equals Fixed by replacing Set implementation with MappingSet. Change-Id: I1b727abd2614a9b72b5b1d02ecca2de26493adcc
Showing
3 changed files
with
164 additions
and
16 deletions
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment