phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Monani Mihir (JIRA)" <>
Subject [jira] [Created] (PHOENIX-5048) Index Rebuilder does not handle INDEX_STATE timestamp check for all index
Date Wed, 28 Nov 2018 08:55:02 GMT
Monani Mihir created PHOENIX-5048:

             Summary: Index Rebuilder does not handle INDEX_STATE timestamp check for all
                 Key: PHOENIX-5048
             Project: Phoenix
          Issue Type: Improvement
    Affects Versions: 4.14.1
            Reporter: Monani Mihir

After rebuilder is finished for Partial Index Rebuild, It will check if Index state has been
updated after Upper bound of the scan we use in partial index Rebuild. If that happens then
it will fail Index Rebuild as Index write failure occured while we were rebuilding Index.
public void updateIndexState(RpcController controller, UpdateIndexStateRequest request,
RpcCallback<MetaDataResponse> done) {
if (actualTimestamp > expectedTimestamp) {
Suppose Data Table has 3 index and above condition becomes true for first index , then we
won't even check for remain two Index.

for (PTable indexPTable : indexesToPartiallyRebuild) {
String indexTableFullName = SchemaUtil.getTableName(
if (scanEndTime == latestUpperBoundTimestamp) {
IndexUtil.updateIndexState(conn, indexTableFullName, PIndexState.ACTIVE, 0L, latestUpperBoundTimestamp);
batchExecutedPerTableMap.remove(dataPTable.getName());"Making Index:" + indexPTable.getTableName() + " active after rebuilding");
} else {
// Increment timestamp so that client sees updated disable timestamp
IndexUtil.updateIndexState(conn, indexTableFullName, indexPTable.getIndexState(), scanEndTime
* signOfDisableTimeStamp, latestUpperBoundTimestamp);
Long noOfBatches = batchExecutedPerTableMap.get(dataPTable.getName());
if (noOfBatches == null) {
noOfBatches = 0l;
batchExecutedPerTableMap.put(dataPTable.getName(), ++noOfBatches);"During Round-robin build: Successfully updated index disabled timestamp for "
+ indexTableFullName + " to " + scanEndTime);



This message was sent by Atlassian JIRA

View raw message