[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-29 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-4214:
-

FAILURE: Integrated in Jenkins build Phoenix-master #1825 (See 
[https://builds.apache.org/job/Phoenix-master/1825/])
Revert "PHOENIX-4214 Scans which write should not block region split or 
(jtaylor: rev f4e51143a35bdd48f025b925c9988f98de92a4c3)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
* (edit) 
phoenix-core/src/it/java/org/apache/phoenix/execute/UpsertSelectOverlappingBatchesIT.java
PHOENIX-4214 Scans which write should not block region split or close (jtaylor: 
rev f00380ef79795a675cfa5b50082147a273ac26f9)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
* (edit) 
phoenix-core/src/it/java/org/apache/phoenix/execute/UpsertSelectOverlappingBatchesIT.java


> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
>Assignee: Vincent Poon
> Fix For: 4.12.0
>
> Attachments: PHOENIX-4214-0.98-v2.patch, 
> PHOENIX-4214-4.x-HBase-0.98_v1.patch, PHOENIX-4214.master.v1.patch, 
> PHOENIX-4214.master.v2.patch, splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-26 Thread Vincent Poon (JIRA)

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

Vincent Poon commented on PHOENIX-4214:
---

Thanks [~jamestaylor], I'll take a look.  IIRC the WIP was working on 0.98 so 
should be easy to adapt.  I'll try to get a patch up for 0.98 soon.

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
>Assignee: Vincent Poon
> Attachments: PHOENIX-4214-4.x-HBase-0.98_v1.patch, 
> PHOENIX-4214.master.v1.patch, splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-26 Thread Hudson (JIRA)

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

Hudson commented on PHOENIX-4214:
-

FAILURE: Integrated in Jenkins build Phoenix-master #1811 (See 
[https://builds.apache.org/job/Phoenix-master/1811/])
PHOENIX-4214 Scans which write should not block region split or close (jtaylor: 
rev 5d9572736a991f19121477a0822d4b8bf26b4c69)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
* (edit) 
phoenix-core/src/it/java/org/apache/phoenix/execute/UpsertSelectOverlappingBatchesIT.java


> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
>Assignee: Vincent Poon
> Attachments: PHOENIX-4214-4.x-HBase-0.98_v1.patch, 
> PHOENIX-4214.master.v1.patch, splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-26 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-4214:
---

FYI, test passes on master and 4.x-HBase-1.2 branch.

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
>Assignee: Vincent Poon
> Attachments: PHOENIX-4214-4.x-HBase-0.98_v1.patch, 
> PHOENIX-4214.master.v1.patch, splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-26 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-4214:
---

Fails on 4.x-HBase-1.1 branch with:
{code}
[INFO] Running org.apache.phoenix.execute.UpsertSelectOverlappingBatchesIT
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 125.877 
s <<< FAILURE! - in org.apache.phoenix.execute.UpsertSelectOverlappingBatchesIT
[ERROR] 
testSplitDuringUpsertSelect(org.apache.phoenix.execute.UpsertSelectOverlappingBatchesIT)
  Time elapsed: 41.12 s  <<< FAILURE!
junit.framework.AssertionFailedError: Waiting timed out after [30,000] msec
at 
org.apache.phoenix.execute.UpsertSelectOverlappingBatchesIT.testSplitDuringUpsertSelect(UpsertSelectOverlappingBatchesIT.java:209)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   UpsertSelectOverlappingBatchesIT.testSplitDuringUpsertSelect:209 
Waiting timed out after [30,000] msec
{code}

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
>Assignee: Vincent Poon
> Attachments: PHOENIX-4214-4.x-HBase-0.98_v1.patch, 
> PHOENIX-4214.master.v1.patch, splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-25 Thread churro morales (JIRA)

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

churro morales commented on PHOENIX-4214:
-

+1 lgtm 

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
>Assignee: Vincent Poon
> Attachments: PHOENIX-4214.master.v1.patch, 
> splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-25 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-4214:
---

Ping [~lhofhansl]. Did you +1 this one above?

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
>Assignee: Vincent Poon
> Attachments: PHOENIX-4214.master.v1.patch, 
> splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-22 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-4214:
---

bq. Is there a specific exception I should be throwing to get the HBase client 
to retry, without the phoenix client having to handle the exception?
I'm not sure. Best thing to do is probably play around with it. I do know that 
if an IOException wraps a SQLException, we have a mechanism to turn that into 
the same SQLException on the client side.

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
> Attachments: PHOENIX-4214.master.v1.patch, 
> splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-21 Thread Vincent Poon (JIRA)

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

Vincent Poon commented on PHOENIX-4214:
---

Was trying to port this to master but the other unrelated tests were failing 
due to PHOENIX-4219
In the process of extracting out the relevant tests just for this jira, will 
hopefully post an update soon

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
> Attachments: splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-20 Thread James Taylor (JIRA)

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

James Taylor commented on PHOENIX-4214:
---

Just want to confirm, [~lhofhansl], that your comment before was a +1 before 
this gets committed.

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
> Attachments: splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-16 Thread Andrew Purtell (JIRA)

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

Andrew Purtell commented on PHOENIX-4214:
-

bq. And HBase 1.3+ supports replication of bulk loads, I believe.
Yes, but there is an accounting problem with that we would need to fix first 
before relying on it. Not a big deal. See HBASE-18116

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
> Attachments: splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-15 Thread Vincent Poon (JIRA)

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

Vincent Poon commented on PHOENIX-4214:
---

[~lhofhansl] Yes, this patch blocks only new write requests, and lets existing 
ones finish.  I was thinking for case of local index creation, maybe we could 
write to HFiles directly, then bulk load into HBase at the end?  This would 
avoid the flush/split deadlock issue in PHOENIX-3111 altogether.  And HBase 
1.3+ supports replication of bulk loads, I believe.

Normal upsert select and deletes would still need this patch, though.

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
> Attachments: splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-15 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on PHOENIX-4214:


Nice tests. And fix seems to make sense.

So the worst scenario would be synchronous creation of a local index, right?
In that case we scan entire regions (in the worst case) and write the index 
data out.
I guess in that case we could always cause a split during, and we should let 
the write finish, or else the next retry will again cause a split. I think this 
would handle this, as we're just blocking *new* write RPCs, correct?


> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
> Attachments: splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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


[jira] [Commented] (PHOENIX-4214) Scans which write should not block region split or close

2017-09-15 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on PHOENIX-4214:


I think unless we suspend a thread or the JVM is shutting down, the finally 
will get executed. (the documentation, however, is a bit unclear on this)

> Scans which write should not block region split or close
> 
>
> Key: PHOENIX-4214
> URL: https://issues.apache.org/jira/browse/PHOENIX-4214
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.12.0
>Reporter: Vincent Poon
> Attachments: splitDuringUpsertSelect_wip.patch
>
>
> PHOENIX-3111 introduced a scan reference counter which is checked during 
> region preSplit and preClose.  However, a steady stream of UPSERT SELECT or 
> DELETE can keep the count above 0 indefinitely, preventing or greatly 
> delaying a region split or close.
> We should try to avoid starvation of the split / close request, and 
> fail/reject queries where appropriate.



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