You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Andrew Wong (JIRA)" <ji...@apache.org> on 2019/06/13 06:41:00 UTC

[jira] [Assigned] (KUDU-2850) Thrift comparison is broken

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

Andrew Wong reassigned KUDU-2850:
---------------------------------

    Assignee: Andrew Wong

> Thrift comparison is broken
> ---------------------------
>
>                 Key: KUDU-2850
>                 URL: https://issues.apache.org/jira/browse/KUDU-2850
>             Project: Kudu
>          Issue Type: Bug
>          Components: authz
>    Affects Versions: 1.10.0
>            Reporter: Andrew Wong
>            Assignee: Andrew Wong
>            Priority: Blocker
>
> Kudu has custom-defined operator< for its Thrift objects, used for maps and sets, found here:
> [https://github.com/apache/kudu/blob/master/src/kudu/sentry/thrift_operators.cc|https://github.com/apache/kudu/blob/master/src/kudu/sentry/thrift_operators.cc#L62]
> Let's walk through a couple examples of TSentryAuthorizables (using the format server.uri.db.table.column).
> {{"server".none."db".none.none < "server"."uri".none.none.none because none < "uri"}}
> At the same time:
> {{"server"."uri".none.none.none < "server".none."db".none.none because none < "db"}}
> This is clearly wrong because a < b, but b < a. Specifically, in this second case, we are not returning upon comparing "uri" vs none, when we should be because we've ||ed a bunch of comparisons together in our operator.
> Given we use it in every map/set of TSentry(Privilege,Authorizable) thanks to our usage of auto-gened Thrift, we should fix this ASAP.



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