Github user jyates commented on a diff in the pull request: https://github.com/apache/phoenix/pull/55#discussion_r27154098 --- Diff: phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java --- @@ -40,28 +40,34 @@ private static final int DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER = 10; private RpcScheduler delegate; - private int minPriority; - private int maxPriority; - private RpcExecutor callExecutor; + private int indexPriority; + private int metadataPriority; + private RpcExecutor indexCallExecutor; + private RpcExecutor metadataCallExecutor; private int port; - public PhoenixIndexRpcScheduler(int indexHandlerCount, Configuration conf, - RpcScheduler delegate, int minPriority, int maxPriority) { + public PhoenixRpcScheduler(int indexHandlerCount, int metadataHandlerCount, Configuration conf, --- End diff -- Can we do layered handlers instead of clumping them all into one? HBase did this with its meta, regular, and replication queues and it is terribly ugly. Instead, maybe have this class instantiate the necessary handler and then chain through them until one of the handlers range (min/max priority) applies to the incoming message and it then passes it onto the queue. You could also do some checking to ensure the ranges don't overlap, etc. At the very least, this will get rid of the layers of if/else below.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---