phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Soldatov (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (PHOENIX-3360) Secondary index configuration is wrong
Date Tue, 04 Jul 2017 18:18:00 GMT

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

Sergey Soldatov reopened PHOENIX-3360:
--------------------------------------

Well, I don't like to do that, but this fix doesn't work. Checked with master branch with
HBase 1.3.
I believe that most of the testing was performed with the initial patch which sets configuration
for the services and the case with setting configuration for the env was not tested or was
tested with Phoenix controller factory in hbase-site.xml. 
When we are getting connection for the environment, we call CoprocessorHConnection#getConnectionForEnvironment
which has following code:
{code}
   if (env instanceof RegionCoprocessorEnvironment) {
      RegionCoprocessorEnvironment e = (RegionCoprocessorEnvironment) env;
      RegionServerServices services = e.getRegionServerServices();
      if (services instanceof HRegionServer) {
       * return new CoprocessorHConnection((HRegionServer) services);*
      }
    }
{code}
Since we are running on RS, we get the connection with _services_ configuration. 

> Secondary index configuration is wrong
> --------------------------------------
>
>                 Key: PHOENIX-3360
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3360
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Enis Soztutar
>            Assignee: William Yang
>            Priority: Critical
>             Fix For: 4.10.0
>
>         Attachments: ConfCP.java, indexlogging.patch, PHOENIX-3360.patch, PHOENIX-3360-v2.PATCH,
PHOENIX-3360-v3.PATCH, PHOENIX-3360-v4.PATCH
>
>
> IndexRpcScheduler allocates some handler threads and uses a higher priority for RPCs.
The corresponding IndexRpcController is not used by default as it is, but used through ServerRpcControllerFactory
that we configure from Ambari by default which sets the priority of the outgoing RPCs to either
metadata priority, or the index priority.
> However, after reading code of IndexRpcController / ServerRpcController it seems that
the IndexRPCController DOES NOT look at whether the outgoing RPC is for an Index table or
not. It just sets ALL rpc priorities to be the index priority. The intention seems to be the
case that ONLY on servers, we configure ServerRpcControllerFactory, and with clients we NEVER
configure ServerRpcControllerFactory, but instead use ClientRpcControllerFactory. We configure
ServerRpcControllerFactory from Ambari, which in affect makes it so that ALL rpcs from Phoenix
are only handled by the index handlers by default. It means all deadlock cases are still there.

> The documentation in https://phoenix.apache.org/secondary_indexing.html is also wrong
in this sense. It does not talk about server side / client side. Plus this way of configuring
different values is not how HBase configuration is deployed. We cannot have the configuration
show the ServerRpcControllerFactory even only for server nodes, because the clients running
on those nodes will also see the wrong values. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message