[ 
https://issues.apache.org/jira/browse/PHOENIX-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15061379#comment-15061379
 ] 

James Taylor commented on PHOENIX-1261:
---------------------------------------

This is looking really good, [~samarthjain]. Couple of comments:
- Remove this code from UngroupedAggregateRegionObserver as I don't think it's 
used anymore:
{code}
+    // TODO: make this size configurable. Ask around if there is a threadpool 
co-processors can access.
+    private static final ExecutorService STATS_POOL = 
Executors.newFixedThreadPool(2, new ThreadFactory() {
+        @Override
+        public Thread newThread(Runnable r) {
+            Thread t = Executors.defaultThreadFactory().newThread(r);
+            t.setDaemon(true);
+            return t;
+        }
+    });
+
{code}
- Make stats commit during postSplit() coprocessor hook in 
UngroupedAggregateRegionObserver asynchronous too.
- Minor nit: don't use all caps for {{UPDATE_STATS_POOL}} since it's not static 
anymore.

> Update stats table asynchronously
> ---------------------------------
>
>                 Key: PHOENIX-1261
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1261
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Samarth Jain
>             Fix For: 4.7.0
>
>         Attachments: 1261-wip.patch
>
>
> Instead of writing the the stats table directly in the thread performing 
> major compaction, we should instead write to it asynchronously, perhaps using 
> the same asynchronous mechanism used by tracing. Apparently HBase used to 
> have a "custodian" table where they'd write as compaction and other 
> background tasks were running, and this leads to bad things happening if the 
> table being written to can't be reached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to