You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2020/05/21 23:35:57 UTC
[GitHub] [phoenix] priyankporwal commented on a change in pull request #785: PHOENIX-5910 IndexTool verification-only runs should have counters fo…
priyankporwal commented on a change in pull request #785:
URL: https://github.com/apache/phoenix/pull/785#discussion_r428969459
##########
File path: phoenix-core/src/main/java/org/apache/phoenix/coprocessor/IndexRebuildRegionScanner.java
##########
@@ -489,6 +490,42 @@ private boolean isDeleteFamily(Mutation mutation) {
}
return getMutationsWithSameTS(put, del);
}
+
+ private void updateUnverifiedIndexRowCounters(Put actual,
+ IndexToolVerificationResult.PhaseResult verificationPhaseResult) {
+ byte[] dataKey = indexMaintainer.buildDataRowKey(new ImmutableBytesWritable(actual.getRow()), viewConstants);
+ Pair<Put, Delete> putDeletePair = dataKeyToMutationMap.get(dataKey);
+ Put put = putDeletePair.getFirst();
+ if (put == null) {
+ return;
+ }
+ Delete del = putDeletePair.getSecond();
+ if (del != null && getMaxTimestamp(del) >= getTimestamp(put)) {
+ return;
+ }
+ byte[] indexRowKey = getIndexRowKey(indexMaintainer, put);
+ if (Bytes.compareTo(actual.getRow(), 0, actual.getRow().length,
+ indexRowKey, 0, indexRowKey.length) != 0) {
+ return;
+ }
+ List<Cell> cellList = actual.get(indexMaintainer.getEmptyKeyValueFamily().copyBytesIfNecessary(),
+ indexMaintainer.getEmptyKeyValueQualifier());
+ Cell cell = (cellList != null && !cellList.isEmpty()) ? cellList.get(0) : null;
+ if (cell == null) {
+ verificationPhaseResult.setUnknownIndexRowCount(verificationPhaseResult.getUnknownIndexRowCount() + 1);
Review comment:
I had to read a few lines of code above to understand that, but I also haven't worked on it. Maybe a comment will ease quick code surfing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org