[
https://issues.apache.org/jira/browse/HBASE-18906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16207866#comment-16207866
]
Anoop Sam John commented on HBASE-18906:
----------------------------------------
Checking the Phoenix master branch I could not see usage of these waitFor APIs.
Though it is having a wait logic. Checks the regions size and if the region
size > N * region flush size (where N = blocking MemStore size multiplier - 1)
the code follows a wait.. It basically doing a wait for the flush to happen.
(The flush would have initiated when size was more than flush size)
{code}
for (int i = 0; region.getMemstoreSize() > blockingMemstoreSize && i < 30; i++)
{
try {
checkForRegionClosing();
Thread.sleep(100);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new IOException(e);
}
}
{code}
May be we should give a notify to CPs when flush on region is over? They
should be able to register listeners. These kind of sleeps can be avoided
then. Just random thoughts.
> Investigate Phoenix usages of Region#waitForXXX APIs
> ----------------------------------------------------
>
> Key: HBASE-18906
> URL: https://issues.apache.org/jira/browse/HBASE-18906
> Project: HBase
> Issue Type: Sub-task
> Components: Coprocessors
> Reporter: Anoop Sam John
> Assignee: Anoop Sam John
> Fix For: 2.0.0-alpha-4
>
>
> While reviewing HBASE-18183, Andy pointed out that Phoenix uses
> waitForFlushesAndCompactions and/or waitForFlushes for diff reasons. This
> issue is to see why they need them and whether alternate ways are possible.
> This seems to be too much internal stuff and a normal CP hook calling these
> would be dangerous.
> If there are alternate ways for Phoenix not to use this and not landing in
> issues (As said by Andy) we should suggest/fix for them.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)