Skip to content

Conversation

@kadirozde
Copy link
Contributor

…previous design as unverified

@kadirozde kadirozde requested a review from gjacoby126 June 26, 2019 23:53
if (isEmptyColumn(cell)) {
// Before PHOENIX-5156, the empty column value was set to 'x'. With PHOENIX-5156, it is now
// set to VERIFIED (1) and UNVERIFIED (2). In order to skip the index rows that are inserted before PHOENIX-5156
// we consider anything that is not UNVERIFIED means VERIFIED. IndexTool should be used to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comment needs to be changed too to reflect new behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove the comments

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

byte[] indexTableName = region.getRegionInfo().getTable().getName();
dataHTable = ServerUtil.getHTableForCoprocessorScan(env,
SchemaUtil.getPhysicalTableName(dataTableName, env.getConfiguration()));
dataHTable = ServerUtil.ConnectionFactory.getConnection(ServerUtil.ConnectionType.DEFAULT_SERVER_CONNECTION, env).getTable(TableName.valueOf(dataTableName));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Line is too long

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will break into two lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@priyankporwal priyankporwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only minor comments to address.

Copy link
Contributor

@gjacoby126 gjacoby126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @kadirozde . One nit on logging, plus the small changes that @priyankporwal already requested.

}
// Rebuild the index rows from the corresponding the rows in the the data table
byte[] dataRowKey = indexMaintainer.buildDataRowKey(new ImmutableBytesWritable(indexRowKey), viewConstants);
LOG.debug("repairIndexRows : " + Bytes.toStringBinary(dataRowKey) + " --> " + Bytes.toStringBinary(indexRowKey));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log should be at TRACE, both because it could be quite verbose, and because some operators have restrictions about logging customer data, which can be contained in row keys.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove the log. It was not really important to have it. We can have metrics instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@gjacoby126 gjacoby126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thanks @kadirozde . Looks like you'll need to rebase before merging though.

@kadirozde kadirozde closed this Jul 3, 2019
@kadirozde kadirozde deleted the PHOENIX-5373 branch July 3, 2019 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants