ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (IGNITE-6195) SQL: Do not allow JOINs on caches with different affinity functions
Date Fri, 16 Nov 2018 09:02:00 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-6195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vladimir Ozerov reassigned IGNITE-6195:
---------------------------------------

    Assignee:     (was: Sergey Grimstad)

> SQL: Do not allow JOINs on caches with different affinity functions
> -------------------------------------------------------------------
>
>                 Key: IGNITE-6195
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6195
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>            Priority: Major
>              Labels: iep-24, sql-stability, usability
>             Fix For: 2.8
>
>         Attachments: patch6195.patch
>
>
> Currently it is possible to execute JOIN on non-colocated caches. No exceptions will
appear, user just receive incorrect result. We need to detect such situations and throw errors
instead.
> *Proposed solution*
> Correct SQL result is possible when either distributed joins are enabled, or data is
co-located properly. Under *proper* co-location we mean:
> 1) Participating {{PARTITIONED}} caches use the same affinity function
> 2) This affinity function doesn't depend on it's own previous state, i.e. it doesn't
rely on {{AffinityFunctionContext.previousAssignment}}. For instance, {{RendezvousAffinityFunction}}
doesn't use, while {{FairAffinityFunction}} does.
> As such, the following procedure should be implemented in order to determine whether
SQL can be executed:
> 1) If {{distributedJoins}} are enabled - return, SQL can be executed
> 2) Get the list of participating caches
> 3) Exclude {{REPLICATED}} caches from that list
> 4) If all remaining caches belong to the same cache group - return, SQL can be executed
> 5) Get affinity function of the first cache
> 6) Check if affinity function doesn't use {{AffinityFunctionContext.previousAssignment}}.
This could be controlled either through annotation, or through new method on {{AffinityFunction}}
interface, e.g. {{boolean isDependOnPreviousState}}. If {{false}} - throw an exception
> 7) Check if affinity functions of all caches are equal through standard {{equals()}}
method. If {{false}} - throw an exception.
> 8) Otherwise - SQL can be executed safely.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message