ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Tupitsyn (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4899) .NET: Review Dictionary usage in APIs
Date Wed, 05 Apr 2017 11:58:41 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956725#comment-15956725

Pavel Tupitsyn commented on IGNITE-4899:

{{GetAll}} reads data from pooled memory using pooled stream. Returning lazy {{IEnumerable}}
will capture these pooled things and may lead to undefined behavior. We should not do this.

> .NET: Review Dictionary usage in APIs
> -------------------------------------
>                 Key: IGNITE-4899
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4899
>             Project: Ignite
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>              Labels: .NET, breaking-api
>             Fix For: 2.0
> We have replaced {{IDictionary}} with {{IEnumerable<KeyValuePair<TK, TV>>}}
in {{ICacheStore}}, let's do the same for other APIs like {{ICache.GetAll}}.
> Reading GetAll results into a dictionary is inefficient in case when user only needs
to iterate over results (unneeded allocation and hashing).

This message was sent by Atlassian JIRA

View raw message