phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Poon (JIRA)" <>
Subject [jira] [Updated] (PHOENIX-4214) Scans which write should not block region split or close
Date Fri, 15 Sep 2017 00:14:00 GMT


Vincent Poon updated PHOENIX-4214:
    Attachment: splitDuringUpsertSelect_wip.patch

Here's a patch that has following tests to reproduce the issue, they're part of a larger suite
I was writing to test global mutable secondary indexing:
Patch includes something like what Samarth Jain suggested - when a split/close has been requested,
I throw IOException for any new incoming scans that require a write. This at least allows
the split/close to happen eventually, as the scansRefCounter won't go up, while still allowing
for the existing operations in progress to finish.
The loop in preClose is rather dangerous, since if a scanner thread is interrupted, there
is no guarantee the finally block will run, and so the scanRefCounter might never get back
to 0. I encountered this in the test when the miniCluster was attempting to shutdown, not
sure if there are other scenarios where this might happen in actual production usage. I throw
an IOException during an interrupt there to avoid this.
Note that you currently can't run all the tests in the suite, so just run the individual tests
you want to try.

> Scans which write should not block region split or close
> --------------------------------------------------------
>                 Key: PHOENIX-4214
>                 URL:
>             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

View raw message