phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Kumar Maturi (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-5094) Index can transition from INACTIVE to ACTIVE via Phoenix Client
Date Wed, 23 Jan 2019 06:58:00 GMT


Kiran Kumar Maturi commented on PHOENIX-5094:

[~vincentpoon] as suggested I have made the change to increment the counter when the index
transition happens to inactive from disabled.
if (indexState == PIndexState.DISABLE) {
IndexUtil.incrementCounterForIndex(conn, indexTableFullName, 1);
IndexUtil.updateIndexState(conn, indexTableFullName, PIndexState.INACTIVE, null);
continue; // Must wait until clients start to do index maintenance again
and decrement counter  for indices that are going to be made active
public List<PTable> decrementIndexesPendingDisableCount(PhoenixConnection conn, PTable
dataPTable, List<PTable> indexes, int amount){
List<PTable> indexesIncremented = new ArrayList<>();
for(PTable index :indexes) {
try {
String indexName = index.getName().getString();
IndexUtil.incrementCounterForIndex(conn, indexName, amount);
}catch(Exception e) {
LOG.warn("Increment " + amount +" for index :" + index.getName().getString() + "of table:
" + dataPTable.getName().getString() + e);
return indexesIncremented;
i am not checking for the pending disable count == 1 as the count might have been incremented
by temporary failures, which might have been fixed by the rebuilder.

Good to have changes

1) make PhoenixIndexFailurePolicy#incrementCounterForIndex(old) public or use IndexUtil#incrementCounterForIndex(new)
every where  as the function is currently repeated at. please suggest.

2) Move IndexRebuildIncrementDisableCountIT#mutateRandomly to IndexTestUtil currently i
am using the same code again and again. I will try to find if any other static methods exist
for this please let me know if any better way to do it.

please review and suggest any other changes to be made. Thanks

> Index can transition from INACTIVE to ACTIVE via Phoenix Client
> ---------------------------------------------------------------
>                 Key: PHOENIX-5094
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 5.0.0, 4.14.1
>            Reporter: Monani Mihir
>            Assignee: Kiran Kumar Maturi
>            Priority: Major
>         Attachments: PHOENIX-5094-4.14-HBase-1.3.01.patch
> Suppose Index is in INACTIVE state and Client load is running continuously. With INACTIVE
State, client will keep maintaining index.
> Before Rebuilder could run and bring index back in sync with data table, If some mutation
for Index fails from client side, then client will transition Index state (From INACTIVE-->
> If client succeeds in writing mutation in subsequent retries, it will transition Index
state again ( From PENDING_DISABLE --> ACTIVE) .
> Above scenario will leave some part of Index out of sync with data table.

This message was sent by Atlassian JIRA

View raw message