phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajeshbabu Chintaguntla (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-4215) Partial index rebuild never complete after PHOENIX-3525 when rebuild period is configured
Date Tue, 19 Sep 2017 16:38:00 GMT


Rajeshbabu Chintaguntla commented on PHOENIX-4215:

The reason for the partial index rebuilding not moving forward  because PhoenixRuntime#getTableNoCache
always get the index from the server cache but not scanned from system catalog directly and
one more thing is for updating disable timestamp wit HRegion#checkAndPut which doesn't invalidate
the cache and server so we always see the same disable timestamp for index. Because of this
scanBeginTime and scanEndTime for index rebuild are same in each iterator that's why we won't
move forward and after some time of threshold we go ahead and disable the index permanently.

                    PTable indexPTable = PhoenixRuntime.getTableNoCache(conn, indexTableFullName);
	private static boolean updateDisableTimestamp(PhoenixConnection conn, String indexTableName,
	        long disabledTimestamp, HTableInterface metaTable, long expectedDisabledTimestamp)
throws IOException {
		byte[] indexTableKey = SchemaUtil.getTableKeyFromFullName(indexTableName);
		Put put = new Put(indexTableKey);
		put.addColumn(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP_BYTES,
		return metaTable.checkAndPut(indexTableKey, PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES,
				PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP_BYTES, CompareOp.EQUAL, PLong.INSTANCE.toBytes(expectedDisabledTimestamp),

> Partial index rebuild never complete after PHOENIX-3525 when rebuild period is configured
> -----------------------------------------------------------------------------------------
>                 Key: PHOENIX-4215
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>             Fix For: 4.12.0
>         Attachments: PHOENIX-4215_testcase.patch
> Currently the default value of phoenix.index.failure.handling.rebuild.period is long
max. When we configure it some thing like an hour or day then partial index rebuild never
complete and the index is never usable until recreate it. 

This message was sent by Atlassian JIRA

View raw message