} else if (currentState == PIndexState.INACTIVE && newState == PIndexState.USABLE) {
newState = PIndexState.ACTIVE;
newKVs.set(0, KeyValueUtil.newKeyValue(key, TABLE_FAMILY_BYTES, INDEX_STATE_BYTES, timeStamp, Bytes.toBytes(newState.getSerializedValue())));
}
if (currentState != newState) {
region.mutateRowsWithLocks(tableMetadata, Collections.<byte[]>emptySet());
// Invalidate from cache
Cache<ImmutableBytesPtr,PTable> metaDataCache = GlobalCache.getInstance(this.getEnvironment()).getMetaDataCache();
metaDataCache.invalidate(cacheKey);
}
// Get client timeStamp from mutations, since it may get updated by the mutateRowsWithLocks call