Vladimir Ozerov created IGNITE-3828:
---------------------------------------
Summary: Data streamer: use identity comparison for "activeKeys" in DataStreamerImpl.load0 method.
Key: IGNITE-3828
URL:
https://issues.apache.org/jira/browse/IGNITE-3828 Project: Ignite
Issue Type: Task
Components: streaming
Affects Versions: 1.7
Reporter: Vladimir Ozerov
Assignee: Andrew Mashenkov
Priority: Minor
Fix For: 1.8
See {{DataStreamerImpl.load0}} method. One of it's arguments is {{activeKeys}} collection. Elements from this collection is removed when batch is successfully applied on the server. Currently this collections is concurrent hash set of {{KeyCacheObject}}. In case hash conflict occurs (which is not unusual for streaming when lots of keys are loaded), it leads to full byte-by-byte comparison of binary objects. It might be very inefficient.
To avoid the problem we should wrap {{KeyCacheObject}} into additional class with overridden {{equals}} and {{hashCode}} methods, so equality check is performed only through reference equality ({{==}}). This way hash conflicts will be resolved extremely fast.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)